Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: generated/googleapis_beta/lib/sqladmin/v1beta3.dart

Issue 559053002: Generate 0.1.0 version of googleapis/googleapis_beta (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 library googleapis_beta.sqladmin.v1beta3;
2
3 import "dart:core" as core;
4 import "dart:collection" as collection;
5 import "dart:async" as async;
6 import "dart:convert" as convert;
7
8 import "package:crypto/crypto.dart" as crypto;
9 import 'package:http/http.dart' as http;
10 import '../src/common_internal.dart' as common_internal;
11 import '../common/common.dart' as common;
12
13 export '../common/common.dart' show ApiRequestError;
14 export '../common/common.dart' show DetailedApiRequestError;
15
16 /** API for Cloud SQL database instance management. */
17 class SqladminApi {
18 /** View and manage your data across Google Cloud Platform services */
19 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf orm";
20
21 /** Manage your Google SQL Service instances */
22 static const SqlserviceAdminScope = "https://www.googleapis.com/auth/sqlservic e.admin";
23
24
25 final common_internal.ApiRequester _requester;
26
27 BackupRunsResourceApi get backupRuns => new BackupRunsResourceApi(_requester);
28 FlagsResourceApi get flags => new FlagsResourceApi(_requester);
29 InstancesResourceApi get instances => new InstancesResourceApi(_requester);
30 OperationsResourceApi get operations => new OperationsResourceApi(_requester);
31 SslCertsResourceApi get sslCerts => new SslCertsResourceApi(_requester);
32 TiersResourceApi get tiers => new TiersResourceApi(_requester);
33
34 SqladminApi(http.Client client) :
35 _requester = new common_internal.ApiRequester(client, "https://www.googlea pis.com/", "/sql/v1beta3/");
36 }
37
38
39 /** Not documented yet. */
40 class BackupRunsResourceApi {
41 final common_internal.ApiRequester _requester;
42
43 BackupRunsResourceApi(common_internal.ApiRequester client) :
44 _requester = client;
45
46 /**
47 * Retrieves information about a specified backup run for a Cloud SQL
48 * instance.
49 *
50 * Request parameters:
51 *
52 * [project] - Project ID of the project that contains the instance.
53 *
54 * [instance] - Cloud SQL instance ID. This does not include the project ID.
55 *
56 * [backupConfiguration] - Identifier for the backup configuration. This gets
57 * generated automatically when a backup configuration is created.
58 *
59 * [dueTime] - The time when this run is due to start in RFC 3339 format, for
60 * example 2012-11-15T16:19:00.094Z.
61 *
62 * Completes with a [BackupRun].
63 *
64 * Completes with a [common.ApiRequestError] if the API endpoint returned an
65 * error.
66 *
67 * If the used [http.Client] completes with an error when making a REST call,
68 * this method will complete with the same error.
69 */
70 async.Future<BackupRun> get(core.String project, core.String instance, core.St ring backupConfiguration, core.String dueTime) {
71 var _url = null;
72 var _queryParams = new core.Map();
73 var _uploadMedia = null;
74 var _uploadOptions = null;
75 var _downloadOptions = common.DownloadOptions.Metadata;
76 var _body = null;
77
78 if (project == null) {
79 throw new core.ArgumentError("Parameter project is required.");
80 }
81 if (instance == null) {
82 throw new core.ArgumentError("Parameter instance is required.");
83 }
84 if (backupConfiguration == null) {
85 throw new core.ArgumentError("Parameter backupConfiguration is required.") ;
86 }
87 if (dueTime == null) {
88 throw new core.ArgumentError("Parameter dueTime is required.");
89 }
90 _queryParams["dueTime"] = [dueTime];
91
92
93 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/backupRuns/' + common_internal.Escaper.ecapeVariable('$backupConfiguration');
94
95 var _response = _requester.request(_url,
96 "GET",
97 body: _body,
98 queryParams: _queryParams,
99 uploadOptions: _uploadOptions,
100 uploadMedia: _uploadMedia,
101 downloadOptions: _downloadOptions);
102 return _response.then((data) => new BackupRun.fromJson(data));
103 }
104
105 /**
106 * Lists all backup runs associated with a Cloud SQL instance.
107 *
108 * Request parameters:
109 *
110 * [project] - Project ID of the project that contains the instance.
111 *
112 * [instance] - Cloud SQL instance ID. This does not include the project ID.
113 *
114 * [backupConfiguration] - Identifier for the backup configuration. This gets
115 * generated automatically when a backup configuration is created.
116 *
117 * [maxResults] - Maximum number of backup runs per response.
118 *
119 * [pageToken] - A previously-returned page token representing part of the
120 * larger set of results to view.
121 *
122 * Completes with a [BackupRunsListResponse].
123 *
124 * Completes with a [common.ApiRequestError] if the API endpoint returned an
125 * error.
126 *
127 * If the used [http.Client] completes with an error when making a REST call,
128 * this method will complete with the same error.
129 */
130 async.Future<BackupRunsListResponse> list(core.String project, core.String ins tance, core.String backupConfiguration, {core.int maxResults, core.String pageTo ken}) {
131 var _url = null;
132 var _queryParams = new core.Map();
133 var _uploadMedia = null;
134 var _uploadOptions = null;
135 var _downloadOptions = common.DownloadOptions.Metadata;
136 var _body = null;
137
138 if (project == null) {
139 throw new core.ArgumentError("Parameter project is required.");
140 }
141 if (instance == null) {
142 throw new core.ArgumentError("Parameter instance is required.");
143 }
144 if (backupConfiguration == null) {
145 throw new core.ArgumentError("Parameter backupConfiguration is required.") ;
146 }
147 _queryParams["backupConfiguration"] = [backupConfiguration];
148 if (maxResults != null) {
149 _queryParams["maxResults"] = ["${maxResults}"];
150 }
151 if (pageToken != null) {
152 _queryParams["pageToken"] = [pageToken];
153 }
154
155
156 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/backupRuns';
157
158 var _response = _requester.request(_url,
159 "GET",
160 body: _body,
161 queryParams: _queryParams,
162 uploadOptions: _uploadOptions,
163 uploadMedia: _uploadMedia,
164 downloadOptions: _downloadOptions);
165 return _response.then((data) => new BackupRunsListResponse.fromJson(data));
166 }
167
168 }
169
170
171 /** Not documented yet. */
172 class FlagsResourceApi {
173 final common_internal.ApiRequester _requester;
174
175 FlagsResourceApi(common_internal.ApiRequester client) :
176 _requester = client;
177
178 /**
179 * Lists all database flags that can be set for Google Cloud SQL instances.
180 *
181 * Request parameters:
182 *
183 * Completes with a [FlagsListResponse].
184 *
185 * Completes with a [common.ApiRequestError] if the API endpoint returned an
186 * error.
187 *
188 * If the used [http.Client] completes with an error when making a REST call,
189 * this method will complete with the same error.
190 */
191 async.Future<FlagsListResponse> list() {
192 var _url = null;
193 var _queryParams = new core.Map();
194 var _uploadMedia = null;
195 var _uploadOptions = null;
196 var _downloadOptions = common.DownloadOptions.Metadata;
197 var _body = null;
198
199
200
201 _url = 'flags';
202
203 var _response = _requester.request(_url,
204 "GET",
205 body: _body,
206 queryParams: _queryParams,
207 uploadOptions: _uploadOptions,
208 uploadMedia: _uploadMedia,
209 downloadOptions: _downloadOptions);
210 return _response.then((data) => new FlagsListResponse.fromJson(data));
211 }
212
213 }
214
215
216 /** Not documented yet. */
217 class InstancesResourceApi {
218 final common_internal.ApiRequester _requester;
219
220 InstancesResourceApi(common_internal.ApiRequester client) :
221 _requester = client;
222
223 /**
224 * Creates a Cloud SQL instance as a clone of a source instance.
225 *
226 * [request] - The metadata request object.
227 *
228 * Request parameters:
229 *
230 * [project] - Project ID of the source as well as the clone Cloud SQL
231 * instance.
232 *
233 * Completes with a [InstancesCloneResponse].
234 *
235 * Completes with a [common.ApiRequestError] if the API endpoint returned an
236 * error.
237 *
238 * If the used [http.Client] completes with an error when making a REST call,
239 * this method will complete with the same error.
240 */
241 async.Future<InstancesCloneResponse> clone(InstancesCloneRequest request, core .String project) {
242 var _url = null;
243 var _queryParams = new core.Map();
244 var _uploadMedia = null;
245 var _uploadOptions = null;
246 var _downloadOptions = common.DownloadOptions.Metadata;
247 var _body = null;
248
249 if (request != null) {
250 _body = convert.JSON.encode((request).toJson());
251 }
252 if (project == null) {
253 throw new core.ArgumentError("Parameter project is required.");
254 }
255
256
257 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/clone';
258
259 var _response = _requester.request(_url,
260 "POST",
261 body: _body,
262 queryParams: _queryParams,
263 uploadOptions: _uploadOptions,
264 uploadMedia: _uploadMedia,
265 downloadOptions: _downloadOptions);
266 return _response.then((data) => new InstancesCloneResponse.fromJson(data));
267 }
268
269 /**
270 * Deletes a Cloud SQL instance.
271 *
272 * Request parameters:
273 *
274 * [project] - Project ID of the project that contains the instance to be
275 * deleted.
276 *
277 * [instance] - Cloud SQL instance ID. This does not include the project ID.
278 *
279 * Completes with a [InstancesDeleteResponse].
280 *
281 * Completes with a [common.ApiRequestError] if the API endpoint returned an
282 * error.
283 *
284 * If the used [http.Client] completes with an error when making a REST call,
285 * this method will complete with the same error.
286 */
287 async.Future<InstancesDeleteResponse> delete(core.String project, core.String instance) {
288 var _url = null;
289 var _queryParams = new core.Map();
290 var _uploadMedia = null;
291 var _uploadOptions = null;
292 var _downloadOptions = common.DownloadOptions.Metadata;
293 var _body = null;
294
295 if (project == null) {
296 throw new core.ArgumentError("Parameter project is required.");
297 }
298 if (instance == null) {
299 throw new core.ArgumentError("Parameter instance is required.");
300 }
301
302
303 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance');
304
305 var _response = _requester.request(_url,
306 "DELETE",
307 body: _body,
308 queryParams: _queryParams,
309 uploadOptions: _uploadOptions,
310 uploadMedia: _uploadMedia,
311 downloadOptions: _downloadOptions);
312 return _response.then((data) => new InstancesDeleteResponse.fromJson(data));
313 }
314
315 /**
316 * Exports data from a Cloud SQL instance to a Google Cloud Storage bucket as
317 * a MySQL dump file.
318 *
319 * [request] - The metadata request object.
320 *
321 * Request parameters:
322 *
323 * [project] - Project ID of the project that contains the instance to be
324 * exported.
325 *
326 * [instance] - Cloud SQL instance ID. This does not include the project ID.
327 *
328 * Completes with a [InstancesExportResponse].
329 *
330 * Completes with a [common.ApiRequestError] if the API endpoint returned an
331 * error.
332 *
333 * If the used [http.Client] completes with an error when making a REST call,
334 * this method will complete with the same error.
335 */
336 async.Future<InstancesExportResponse> export(InstancesExportRequest request, c ore.String project, core.String instance) {
337 var _url = null;
338 var _queryParams = new core.Map();
339 var _uploadMedia = null;
340 var _uploadOptions = null;
341 var _downloadOptions = common.DownloadOptions.Metadata;
342 var _body = null;
343
344 if (request != null) {
345 _body = convert.JSON.encode((request).toJson());
346 }
347 if (project == null) {
348 throw new core.ArgumentError("Parameter project is required.");
349 }
350 if (instance == null) {
351 throw new core.ArgumentError("Parameter instance is required.");
352 }
353
354
355 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/export';
356
357 var _response = _requester.request(_url,
358 "POST",
359 body: _body,
360 queryParams: _queryParams,
361 uploadOptions: _uploadOptions,
362 uploadMedia: _uploadMedia,
363 downloadOptions: _downloadOptions);
364 return _response.then((data) => new InstancesExportResponse.fromJson(data));
365 }
366
367 /**
368 * Retrieves information about a Cloud SQL instance.
369 *
370 * Request parameters:
371 *
372 * [project] - Project ID of the project that contains the instance.
373 *
374 * [instance] - Database instance ID. This does not include the project ID.
375 *
376 * Completes with a [DatabaseInstance].
377 *
378 * Completes with a [common.ApiRequestError] if the API endpoint returned an
379 * error.
380 *
381 * If the used [http.Client] completes with an error when making a REST call,
382 * this method will complete with the same error.
383 */
384 async.Future<DatabaseInstance> get(core.String project, core.String instance) {
385 var _url = null;
386 var _queryParams = new core.Map();
387 var _uploadMedia = null;
388 var _uploadOptions = null;
389 var _downloadOptions = common.DownloadOptions.Metadata;
390 var _body = null;
391
392 if (project == null) {
393 throw new core.ArgumentError("Parameter project is required.");
394 }
395 if (instance == null) {
396 throw new core.ArgumentError("Parameter instance is required.");
397 }
398
399
400 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance');
401
402 var _response = _requester.request(_url,
403 "GET",
404 body: _body,
405 queryParams: _queryParams,
406 uploadOptions: _uploadOptions,
407 uploadMedia: _uploadMedia,
408 downloadOptions: _downloadOptions);
409 return _response.then((data) => new DatabaseInstance.fromJson(data));
410 }
411
412 /**
413 * Imports data into a Cloud SQL instance from a MySQL dump file stored in a
414 * Google Cloud Storage bucket.
415 *
416 * [request] - The metadata request object.
417 *
418 * Request parameters:
419 *
420 * [project] - Project ID of the project that contains the instance.
421 *
422 * [instance] - Cloud SQL instance ID. This does not include the project ID.
423 *
424 * Completes with a [InstancesImportResponse].
425 *
426 * Completes with a [common.ApiRequestError] if the API endpoint returned an
427 * error.
428 *
429 * If the used [http.Client] completes with an error when making a REST call,
430 * this method will complete with the same error.
431 */
432 async.Future<InstancesImportResponse> import(InstancesImportRequest request, c ore.String project, core.String instance) {
433 var _url = null;
434 var _queryParams = new core.Map();
435 var _uploadMedia = null;
436 var _uploadOptions = null;
437 var _downloadOptions = common.DownloadOptions.Metadata;
438 var _body = null;
439
440 if (request != null) {
441 _body = convert.JSON.encode((request).toJson());
442 }
443 if (project == null) {
444 throw new core.ArgumentError("Parameter project is required.");
445 }
446 if (instance == null) {
447 throw new core.ArgumentError("Parameter instance is required.");
448 }
449
450
451 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/import';
452
453 var _response = _requester.request(_url,
454 "POST",
455 body: _body,
456 queryParams: _queryParams,
457 uploadOptions: _uploadOptions,
458 uploadMedia: _uploadMedia,
459 downloadOptions: _downloadOptions);
460 return _response.then((data) => new InstancesImportResponse.fromJson(data));
461 }
462
463 /**
464 * Creates a new Cloud SQL instance.
465 *
466 * [request] - The metadata request object.
467 *
468 * Request parameters:
469 *
470 * [project] - Project ID of the project to which the newly created Cloud SQL
471 * instances should belong.
472 *
473 * Completes with a [InstancesInsertResponse].
474 *
475 * Completes with a [common.ApiRequestError] if the API endpoint returned an
476 * error.
477 *
478 * If the used [http.Client] completes with an error when making a REST call,
479 * this method will complete with the same error.
480 */
481 async.Future<InstancesInsertResponse> insert(DatabaseInstance request, core.St ring project) {
482 var _url = null;
483 var _queryParams = new core.Map();
484 var _uploadMedia = null;
485 var _uploadOptions = null;
486 var _downloadOptions = common.DownloadOptions.Metadata;
487 var _body = null;
488
489 if (request != null) {
490 _body = convert.JSON.encode((request).toJson());
491 }
492 if (project == null) {
493 throw new core.ArgumentError("Parameter project is required.");
494 }
495
496
497 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances';
498
499 var _response = _requester.request(_url,
500 "POST",
501 body: _body,
502 queryParams: _queryParams,
503 uploadOptions: _uploadOptions,
504 uploadMedia: _uploadMedia,
505 downloadOptions: _downloadOptions);
506 return _response.then((data) => new InstancesInsertResponse.fromJson(data));
507 }
508
509 /**
510 * Lists instances for a given project, in alphabetical order by instance
511 * name.
512 *
513 * Request parameters:
514 *
515 * [project] - Project ID of the project for which to list Cloud SQL
516 * instances.
517 *
518 * [maxResults] - The maximum number of results to return per response.
519 *
520 * [pageToken] - A previously-returned page token representing part of the
521 * larger set of results to view.
522 *
523 * Completes with a [InstancesListResponse].
524 *
525 * Completes with a [common.ApiRequestError] if the API endpoint returned an
526 * error.
527 *
528 * If the used [http.Client] completes with an error when making a REST call,
529 * this method will complete with the same error.
530 */
531 async.Future<InstancesListResponse> list(core.String project, {core.int maxRes ults, core.String pageToken}) {
532 var _url = null;
533 var _queryParams = new core.Map();
534 var _uploadMedia = null;
535 var _uploadOptions = null;
536 var _downloadOptions = common.DownloadOptions.Metadata;
537 var _body = null;
538
539 if (project == null) {
540 throw new core.ArgumentError("Parameter project is required.");
541 }
542 if (maxResults != null) {
543 _queryParams["maxResults"] = ["${maxResults}"];
544 }
545 if (pageToken != null) {
546 _queryParams["pageToken"] = [pageToken];
547 }
548
549
550 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances';
551
552 var _response = _requester.request(_url,
553 "GET",
554 body: _body,
555 queryParams: _queryParams,
556 uploadOptions: _uploadOptions,
557 uploadMedia: _uploadMedia,
558 downloadOptions: _downloadOptions);
559 return _response.then((data) => new InstancesListResponse.fromJson(data));
560 }
561
562 /**
563 * Updates the settings of a Cloud SQL instance. This method supports patch
564 * semantics.
565 *
566 * [request] - The metadata request object.
567 *
568 * Request parameters:
569 *
570 * [project] - Project ID of the project that contains the instance.
571 *
572 * [instance] - Cloud SQL instance ID. This does not include the project ID.
573 *
574 * Completes with a [InstancesUpdateResponse].
575 *
576 * Completes with a [common.ApiRequestError] if the API endpoint returned an
577 * error.
578 *
579 * If the used [http.Client] completes with an error when making a REST call,
580 * this method will complete with the same error.
581 */
582 async.Future<InstancesUpdateResponse> patch(DatabaseInstance request, core.Str ing project, core.String instance) {
583 var _url = null;
584 var _queryParams = new core.Map();
585 var _uploadMedia = null;
586 var _uploadOptions = null;
587 var _downloadOptions = common.DownloadOptions.Metadata;
588 var _body = null;
589
590 if (request != null) {
591 _body = convert.JSON.encode((request).toJson());
592 }
593 if (project == null) {
594 throw new core.ArgumentError("Parameter project is required.");
595 }
596 if (instance == null) {
597 throw new core.ArgumentError("Parameter instance is required.");
598 }
599
600
601 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance');
602
603 var _response = _requester.request(_url,
604 "PATCH",
605 body: _body,
606 queryParams: _queryParams,
607 uploadOptions: _uploadOptions,
608 uploadMedia: _uploadMedia,
609 downloadOptions: _downloadOptions);
610 return _response.then((data) => new InstancesUpdateResponse.fromJson(data));
611 }
612
613 /**
614 * Promotes the read replica instance to be a stand-alone Cloud SQL instance.
615 *
616 * Request parameters:
617 *
618 * [project] - ID of the project that contains the read replica.
619 *
620 * [instance] - Cloud SQL read replica instance name.
621 *
622 * Completes with a [InstancesPromoteReplicaResponse].
623 *
624 * Completes with a [common.ApiRequestError] if the API endpoint returned an
625 * error.
626 *
627 * If the used [http.Client] completes with an error when making a REST call,
628 * this method will complete with the same error.
629 */
630 async.Future<InstancesPromoteReplicaResponse> promoteReplica(core.String proje ct, core.String instance) {
631 var _url = null;
632 var _queryParams = new core.Map();
633 var _uploadMedia = null;
634 var _uploadOptions = null;
635 var _downloadOptions = common.DownloadOptions.Metadata;
636 var _body = null;
637
638 if (project == null) {
639 throw new core.ArgumentError("Parameter project is required.");
640 }
641 if (instance == null) {
642 throw new core.ArgumentError("Parameter instance is required.");
643 }
644
645
646 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/promoteRepli ca';
647
648 var _response = _requester.request(_url,
649 "POST",
650 body: _body,
651 queryParams: _queryParams,
652 uploadOptions: _uploadOptions,
653 uploadMedia: _uploadMedia,
654 downloadOptions: _downloadOptions);
655 return _response.then((data) => new InstancesPromoteReplicaResponse.fromJson (data));
656 }
657
658 /**
659 * Deletes all client certificates and generates a new server SSL certificate
660 * for a Cloud SQL instance.
661 *
662 * Request parameters:
663 *
664 * [project] - Project ID of the project that contains the instance.
665 *
666 * [instance] - Cloud SQL instance ID. This does not include the project ID.
667 *
668 * Completes with a [InstancesResetSslConfigResponse].
669 *
670 * Completes with a [common.ApiRequestError] if the API endpoint returned an
671 * error.
672 *
673 * If the used [http.Client] completes with an error when making a REST call,
674 * this method will complete with the same error.
675 */
676 async.Future<InstancesResetSslConfigResponse> resetSslConfig(core.String proje ct, core.String instance) {
677 var _url = null;
678 var _queryParams = new core.Map();
679 var _uploadMedia = null;
680 var _uploadOptions = null;
681 var _downloadOptions = common.DownloadOptions.Metadata;
682 var _body = null;
683
684 if (project == null) {
685 throw new core.ArgumentError("Parameter project is required.");
686 }
687 if (instance == null) {
688 throw new core.ArgumentError("Parameter instance is required.");
689 }
690
691
692 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/resetSslConf ig';
693
694 var _response = _requester.request(_url,
695 "POST",
696 body: _body,
697 queryParams: _queryParams,
698 uploadOptions: _uploadOptions,
699 uploadMedia: _uploadMedia,
700 downloadOptions: _downloadOptions);
701 return _response.then((data) => new InstancesResetSslConfigResponse.fromJson (data));
702 }
703
704 /**
705 * Restarts a Cloud SQL instance.
706 *
707 * Request parameters:
708 *
709 * [project] - Project ID of the project that contains the instance to be
710 * restarted.
711 *
712 * [instance] - Cloud SQL instance ID. This does not include the project ID.
713 *
714 * Completes with a [InstancesRestartResponse].
715 *
716 * Completes with a [common.ApiRequestError] if the API endpoint returned an
717 * error.
718 *
719 * If the used [http.Client] completes with an error when making a REST call,
720 * this method will complete with the same error.
721 */
722 async.Future<InstancesRestartResponse> restart(core.String project, core.Strin g instance) {
723 var _url = null;
724 var _queryParams = new core.Map();
725 var _uploadMedia = null;
726 var _uploadOptions = null;
727 var _downloadOptions = common.DownloadOptions.Metadata;
728 var _body = null;
729
730 if (project == null) {
731 throw new core.ArgumentError("Parameter project is required.");
732 }
733 if (instance == null) {
734 throw new core.ArgumentError("Parameter instance is required.");
735 }
736
737
738 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/restart';
739
740 var _response = _requester.request(_url,
741 "POST",
742 body: _body,
743 queryParams: _queryParams,
744 uploadOptions: _uploadOptions,
745 uploadMedia: _uploadMedia,
746 downloadOptions: _downloadOptions);
747 return _response.then((data) => new InstancesRestartResponse.fromJson(data)) ;
748 }
749
750 /**
751 * Restores a backup of a Cloud SQL instance.
752 *
753 * Request parameters:
754 *
755 * [project] - Project ID of the project that contains the instance.
756 *
757 * [instance] - Cloud SQL instance ID. This does not include the project ID.
758 *
759 * [backupConfiguration] - The identifier of the backup configuration. This
760 * gets generated automatically when a backup configuration is created.
761 *
762 * [dueTime] - The time when this run is due to start in RFC 3339 format, for
763 * example 2012-11-15T16:19:00.094Z.
764 *
765 * Completes with a [InstancesRestoreBackupResponse].
766 *
767 * Completes with a [common.ApiRequestError] if the API endpoint returned an
768 * error.
769 *
770 * If the used [http.Client] completes with an error when making a REST call,
771 * this method will complete with the same error.
772 */
773 async.Future<InstancesRestoreBackupResponse> restoreBackup(core.String project , core.String instance, core.String backupConfiguration, core.String dueTime) {
774 var _url = null;
775 var _queryParams = new core.Map();
776 var _uploadMedia = null;
777 var _uploadOptions = null;
778 var _downloadOptions = common.DownloadOptions.Metadata;
779 var _body = null;
780
781 if (project == null) {
782 throw new core.ArgumentError("Parameter project is required.");
783 }
784 if (instance == null) {
785 throw new core.ArgumentError("Parameter instance is required.");
786 }
787 if (backupConfiguration == null) {
788 throw new core.ArgumentError("Parameter backupConfiguration is required.") ;
789 }
790 _queryParams["backupConfiguration"] = [backupConfiguration];
791 if (dueTime == null) {
792 throw new core.ArgumentError("Parameter dueTime is required.");
793 }
794 _queryParams["dueTime"] = [dueTime];
795
796
797 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/restoreBacku p';
798
799 var _response = _requester.request(_url,
800 "POST",
801 body: _body,
802 queryParams: _queryParams,
803 uploadOptions: _uploadOptions,
804 uploadMedia: _uploadMedia,
805 downloadOptions: _downloadOptions);
806 return _response.then((data) => new InstancesRestoreBackupResponse.fromJson( data));
807 }
808
809 /**
810 * Sets the password for the root user of the specified Cloud SQL instance.
811 *
812 * [request] - The metadata request object.
813 *
814 * Request parameters:
815 *
816 * [project] - Project ID of the project that contains the instance.
817 *
818 * [instance] - Cloud SQL instance ID. This does not include the project ID.
819 *
820 * Completes with a [InstancesSetRootPasswordResponse].
821 *
822 * Completes with a [common.ApiRequestError] if the API endpoint returned an
823 * error.
824 *
825 * If the used [http.Client] completes with an error when making a REST call,
826 * this method will complete with the same error.
827 */
828 async.Future<InstancesSetRootPasswordResponse> setRootPassword(InstanceSetRoot PasswordRequest request, core.String project, core.String instance) {
829 var _url = null;
830 var _queryParams = new core.Map();
831 var _uploadMedia = null;
832 var _uploadOptions = null;
833 var _downloadOptions = common.DownloadOptions.Metadata;
834 var _body = null;
835
836 if (request != null) {
837 _body = convert.JSON.encode((request).toJson());
838 }
839 if (project == null) {
840 throw new core.ArgumentError("Parameter project is required.");
841 }
842 if (instance == null) {
843 throw new core.ArgumentError("Parameter instance is required.");
844 }
845
846
847 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/setRootPassw ord';
848
849 var _response = _requester.request(_url,
850 "POST",
851 body: _body,
852 queryParams: _queryParams,
853 uploadOptions: _uploadOptions,
854 uploadMedia: _uploadMedia,
855 downloadOptions: _downloadOptions);
856 return _response.then((data) => new InstancesSetRootPasswordResponse.fromJso n(data));
857 }
858
859 /**
860 * Updates the settings of a Cloud SQL instance.
861 *
862 * [request] - The metadata request object.
863 *
864 * Request parameters:
865 *
866 * [project] - Project ID of the project that contains the instance.
867 *
868 * [instance] - Cloud SQL instance ID. This does not include the project ID.
869 *
870 * Completes with a [InstancesUpdateResponse].
871 *
872 * Completes with a [common.ApiRequestError] if the API endpoint returned an
873 * error.
874 *
875 * If the used [http.Client] completes with an error when making a REST call,
876 * this method will complete with the same error.
877 */
878 async.Future<InstancesUpdateResponse> update(DatabaseInstance request, core.St ring project, core.String instance) {
879 var _url = null;
880 var _queryParams = new core.Map();
881 var _uploadMedia = null;
882 var _uploadOptions = null;
883 var _downloadOptions = common.DownloadOptions.Metadata;
884 var _body = null;
885
886 if (request != null) {
887 _body = convert.JSON.encode((request).toJson());
888 }
889 if (project == null) {
890 throw new core.ArgumentError("Parameter project is required.");
891 }
892 if (instance == null) {
893 throw new core.ArgumentError("Parameter instance is required.");
894 }
895
896
897 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance');
898
899 var _response = _requester.request(_url,
900 "PUT",
901 body: _body,
902 queryParams: _queryParams,
903 uploadOptions: _uploadOptions,
904 uploadMedia: _uploadMedia,
905 downloadOptions: _downloadOptions);
906 return _response.then((data) => new InstancesUpdateResponse.fromJson(data));
907 }
908
909 }
910
911
912 /** Not documented yet. */
913 class OperationsResourceApi {
914 final common_internal.ApiRequester _requester;
915
916 OperationsResourceApi(common_internal.ApiRequester client) :
917 _requester = client;
918
919 /**
920 * Retrieves information about a specific operation that was performed on a
921 * Cloud SQL instance.
922 *
923 * Request parameters:
924 *
925 * [project] - Project ID of the project that contains the instance.
926 *
927 * [instance] - Cloud SQL instance ID. This does not include the project ID.
928 *
929 * [operation] - Instance operation ID.
930 *
931 * Completes with a [InstanceOperation].
932 *
933 * Completes with a [common.ApiRequestError] if the API endpoint returned an
934 * error.
935 *
936 * If the used [http.Client] completes with an error when making a REST call,
937 * this method will complete with the same error.
938 */
939 async.Future<InstanceOperation> get(core.String project, core.String instance, core.String operation) {
940 var _url = null;
941 var _queryParams = new core.Map();
942 var _uploadMedia = null;
943 var _uploadOptions = null;
944 var _downloadOptions = common.DownloadOptions.Metadata;
945 var _body = null;
946
947 if (project == null) {
948 throw new core.ArgumentError("Parameter project is required.");
949 }
950 if (instance == null) {
951 throw new core.ArgumentError("Parameter instance is required.");
952 }
953 if (operation == null) {
954 throw new core.ArgumentError("Parameter operation is required.");
955 }
956
957
958 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/operations/' + common_internal.Escaper.ecapeVariable('$operation');
959
960 var _response = _requester.request(_url,
961 "GET",
962 body: _body,
963 queryParams: _queryParams,
964 uploadOptions: _uploadOptions,
965 uploadMedia: _uploadMedia,
966 downloadOptions: _downloadOptions);
967 return _response.then((data) => new InstanceOperation.fromJson(data));
968 }
969
970 /**
971 * Lists all operations that have been performed on a Cloud SQL instance.
972 *
973 * Request parameters:
974 *
975 * [project] - Project ID of the project that contains the instance.
976 *
977 * [instance] - Cloud SQL instance ID. This does not include the project ID.
978 *
979 * [maxResults] - Maximum number of operations per response.
980 *
981 * [pageToken] - A previously-returned page token representing part of the
982 * larger set of results to view.
983 *
984 * Completes with a [OperationsListResponse].
985 *
986 * Completes with a [common.ApiRequestError] if the API endpoint returned an
987 * error.
988 *
989 * If the used [http.Client] completes with an error when making a REST call,
990 * this method will complete with the same error.
991 */
992 async.Future<OperationsListResponse> list(core.String project, core.String ins tance, {core.int maxResults, core.String pageToken}) {
993 var _url = null;
994 var _queryParams = new core.Map();
995 var _uploadMedia = null;
996 var _uploadOptions = null;
997 var _downloadOptions = common.DownloadOptions.Metadata;
998 var _body = null;
999
1000 if (project == null) {
1001 throw new core.ArgumentError("Parameter project is required.");
1002 }
1003 if (instance == null) {
1004 throw new core.ArgumentError("Parameter instance is required.");
1005 }
1006 if (maxResults != null) {
1007 _queryParams["maxResults"] = ["${maxResults}"];
1008 }
1009 if (pageToken != null) {
1010 _queryParams["pageToken"] = [pageToken];
1011 }
1012
1013
1014 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/operations';
1015
1016 var _response = _requester.request(_url,
1017 "GET",
1018 body: _body,
1019 queryParams: _queryParams,
1020 uploadOptions: _uploadOptions,
1021 uploadMedia: _uploadMedia,
1022 downloadOptions: _downloadOptions);
1023 return _response.then((data) => new OperationsListResponse.fromJson(data));
1024 }
1025
1026 }
1027
1028
1029 /** Not documented yet. */
1030 class SslCertsResourceApi {
1031 final common_internal.ApiRequester _requester;
1032
1033 SslCertsResourceApi(common_internal.ApiRequester client) :
1034 _requester = client;
1035
1036 /**
1037 * Deletes an SSL certificate from a Cloud SQL instance.
1038 *
1039 * Request parameters:
1040 *
1041 * [project] - Project ID of the project that contains the instance to be
1042 * deleted.
1043 *
1044 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1045 *
1046 * [sha1Fingerprint] - Sha1 FingerPrint.
1047 *
1048 * Completes with a [SslCertsDeleteResponse].
1049 *
1050 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1051 * error.
1052 *
1053 * If the used [http.Client] completes with an error when making a REST call,
1054 * this method will complete with the same error.
1055 */
1056 async.Future<SslCertsDeleteResponse> delete(core.String project, core.String i nstance, core.String sha1Fingerprint) {
1057 var _url = null;
1058 var _queryParams = new core.Map();
1059 var _uploadMedia = null;
1060 var _uploadOptions = null;
1061 var _downloadOptions = common.DownloadOptions.Metadata;
1062 var _body = null;
1063
1064 if (project == null) {
1065 throw new core.ArgumentError("Parameter project is required.");
1066 }
1067 if (instance == null) {
1068 throw new core.ArgumentError("Parameter instance is required.");
1069 }
1070 if (sha1Fingerprint == null) {
1071 throw new core.ArgumentError("Parameter sha1Fingerprint is required.");
1072 }
1073
1074
1075 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts/' + common_internal.Escaper.ecapeVariable('$sha1Fingerprint');
1076
1077 var _response = _requester.request(_url,
1078 "DELETE",
1079 body: _body,
1080 queryParams: _queryParams,
1081 uploadOptions: _uploadOptions,
1082 uploadMedia: _uploadMedia,
1083 downloadOptions: _downloadOptions);
1084 return _response.then((data) => new SslCertsDeleteResponse.fromJson(data));
1085 }
1086
1087 /**
1088 * Retrieves an SSL certificate as specified by its SHA-1 fingerprint.
1089 *
1090 * Request parameters:
1091 *
1092 * [project] - Project ID of the project that contains the instance.
1093 *
1094 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1095 *
1096 * [sha1Fingerprint] - Sha1 FingerPrint.
1097 *
1098 * Completes with a [SslCert].
1099 *
1100 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1101 * error.
1102 *
1103 * If the used [http.Client] completes with an error when making a REST call,
1104 * this method will complete with the same error.
1105 */
1106 async.Future<SslCert> get(core.String project, core.String instance, core.Stri ng sha1Fingerprint) {
1107 var _url = null;
1108 var _queryParams = new core.Map();
1109 var _uploadMedia = null;
1110 var _uploadOptions = null;
1111 var _downloadOptions = common.DownloadOptions.Metadata;
1112 var _body = null;
1113
1114 if (project == null) {
1115 throw new core.ArgumentError("Parameter project is required.");
1116 }
1117 if (instance == null) {
1118 throw new core.ArgumentError("Parameter instance is required.");
1119 }
1120 if (sha1Fingerprint == null) {
1121 throw new core.ArgumentError("Parameter sha1Fingerprint is required.");
1122 }
1123
1124
1125 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts/' + common_internal.Escaper.ecapeVariable('$sha1Fingerprint');
1126
1127 var _response = _requester.request(_url,
1128 "GET",
1129 body: _body,
1130 queryParams: _queryParams,
1131 uploadOptions: _uploadOptions,
1132 uploadMedia: _uploadMedia,
1133 downloadOptions: _downloadOptions);
1134 return _response.then((data) => new SslCert.fromJson(data));
1135 }
1136
1137 /**
1138 * Creates an SSL certificate and returns the certificate, the associated
1139 * private key, and the server certificate authority.
1140 *
1141 * [request] - The metadata request object.
1142 *
1143 * Request parameters:
1144 *
1145 * [project] - Project ID of the project to which the newly created Cloud SQL
1146 * instances should belong.
1147 *
1148 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1149 *
1150 * Completes with a [SslCertsInsertResponse].
1151 *
1152 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1153 * error.
1154 *
1155 * If the used [http.Client] completes with an error when making a REST call,
1156 * this method will complete with the same error.
1157 */
1158 async.Future<SslCertsInsertResponse> insert(SslCertsInsertRequest request, cor e.String project, core.String instance) {
1159 var _url = null;
1160 var _queryParams = new core.Map();
1161 var _uploadMedia = null;
1162 var _uploadOptions = null;
1163 var _downloadOptions = common.DownloadOptions.Metadata;
1164 var _body = null;
1165
1166 if (request != null) {
1167 _body = convert.JSON.encode((request).toJson());
1168 }
1169 if (project == null) {
1170 throw new core.ArgumentError("Parameter project is required.");
1171 }
1172 if (instance == null) {
1173 throw new core.ArgumentError("Parameter instance is required.");
1174 }
1175
1176
1177 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts';
1178
1179 var _response = _requester.request(_url,
1180 "POST",
1181 body: _body,
1182 queryParams: _queryParams,
1183 uploadOptions: _uploadOptions,
1184 uploadMedia: _uploadMedia,
1185 downloadOptions: _downloadOptions);
1186 return _response.then((data) => new SslCertsInsertResponse.fromJson(data));
1187 }
1188
1189 /**
1190 * Lists all of the current SSL certificates defined for a Cloud SQL instance.
1191 *
1192 * Request parameters:
1193 *
1194 * [project] - Project ID of the project for which to list Cloud SQL
1195 * instances.
1196 *
1197 * [instance] - Cloud SQL instance ID. This does not include the project ID.
1198 *
1199 * Completes with a [SslCertsListResponse].
1200 *
1201 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1202 * error.
1203 *
1204 * If the used [http.Client] completes with an error when making a REST call,
1205 * this method will complete with the same error.
1206 */
1207 async.Future<SslCertsListResponse> list(core.String project, core.String insta nce) {
1208 var _url = null;
1209 var _queryParams = new core.Map();
1210 var _uploadMedia = null;
1211 var _uploadOptions = null;
1212 var _downloadOptions = common.DownloadOptions.Metadata;
1213 var _body = null;
1214
1215 if (project == null) {
1216 throw new core.ArgumentError("Parameter project is required.");
1217 }
1218 if (instance == null) {
1219 throw new core.ArgumentError("Parameter instance is required.");
1220 }
1221
1222
1223 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/i nstances/' + common_internal.Escaper.ecapeVariable('$instance') + '/sslCerts';
1224
1225 var _response = _requester.request(_url,
1226 "GET",
1227 body: _body,
1228 queryParams: _queryParams,
1229 uploadOptions: _uploadOptions,
1230 uploadMedia: _uploadMedia,
1231 downloadOptions: _downloadOptions);
1232 return _response.then((data) => new SslCertsListResponse.fromJson(data));
1233 }
1234
1235 }
1236
1237
1238 /** Not documented yet. */
1239 class TiersResourceApi {
1240 final common_internal.ApiRequester _requester;
1241
1242 TiersResourceApi(common_internal.ApiRequester client) :
1243 _requester = client;
1244
1245 /**
1246 * Lists service tiers that can be used to create Google Cloud SQL instances.
1247 *
1248 * Request parameters:
1249 *
1250 * [project] - Project ID of the project for which to list tiers.
1251 *
1252 * Completes with a [TiersListResponse].
1253 *
1254 * Completes with a [common.ApiRequestError] if the API endpoint returned an
1255 * error.
1256 *
1257 * If the used [http.Client] completes with an error when making a REST call,
1258 * this method will complete with the same error.
1259 */
1260 async.Future<TiersListResponse> list(core.String project) {
1261 var _url = null;
1262 var _queryParams = new core.Map();
1263 var _uploadMedia = null;
1264 var _uploadOptions = null;
1265 var _downloadOptions = common.DownloadOptions.Metadata;
1266 var _body = null;
1267
1268 if (project == null) {
1269 throw new core.ArgumentError("Parameter project is required.");
1270 }
1271
1272
1273 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/t iers';
1274
1275 var _response = _requester.request(_url,
1276 "GET",
1277 body: _body,
1278 queryParams: _queryParams,
1279 uploadOptions: _uploadOptions,
1280 uploadMedia: _uploadMedia,
1281 downloadOptions: _downloadOptions);
1282 return _response.then((data) => new TiersListResponse.fromJson(data));
1283 }
1284
1285 }
1286
1287
1288
1289 /** Database instance backup configuration. */
1290 class BackupConfiguration {
1291 /**
1292 * Whether binary log is enabled. If backup configuration is disabled, binary
1293 * log must be disabled as well.
1294 */
1295 core.bool binaryLogEnabled;
1296
1297 /** Whether this configuration is enabled. */
1298 core.bool enabled;
1299
1300 /**
1301 * Identifier for this configuration. This gets generated automatically when a
1302 * backup configuration is created.
1303 */
1304 core.String id;
1305
1306 /** This is always sql#backupConfiguration. */
1307 core.String kind;
1308
1309 /**
1310 * Start time for the daily backup configuration in UTC timezone in the 24
1311 * hour format - HH:MM.
1312 */
1313 core.String startTime;
1314
1315
1316 BackupConfiguration();
1317
1318 BackupConfiguration.fromJson(core.Map _json) {
1319 if (_json.containsKey("binaryLogEnabled")) {
1320 binaryLogEnabled = _json["binaryLogEnabled"];
1321 }
1322 if (_json.containsKey("enabled")) {
1323 enabled = _json["enabled"];
1324 }
1325 if (_json.containsKey("id")) {
1326 id = _json["id"];
1327 }
1328 if (_json.containsKey("kind")) {
1329 kind = _json["kind"];
1330 }
1331 if (_json.containsKey("startTime")) {
1332 startTime = _json["startTime"];
1333 }
1334 }
1335
1336 core.Map toJson() {
1337 var _json = new core.Map();
1338 if (binaryLogEnabled != null) {
1339 _json["binaryLogEnabled"] = binaryLogEnabled;
1340 }
1341 if (enabled != null) {
1342 _json["enabled"] = enabled;
1343 }
1344 if (id != null) {
1345 _json["id"] = id;
1346 }
1347 if (kind != null) {
1348 _json["kind"] = kind;
1349 }
1350 if (startTime != null) {
1351 _json["startTime"] = startTime;
1352 }
1353 return _json;
1354 }
1355 }
1356
1357
1358 /** A database instance backup run resource. */
1359 class BackupRun {
1360 /** Backup Configuration identifier. */
1361 core.String backupConfiguration;
1362
1363 /**
1364 * The due time of this run in UTC timezone in RFC 3339 format, for example
1365 * 2012-11-15T16:19:00.094Z.
1366 */
1367 core.DateTime dueTime;
1368
1369 /**
1370 * The time the backup operation completed in UTC timezone in RFC 3339 format,
1371 * for example 2012-11-15T16:19:00.094Z.
1372 */
1373 core.DateTime endTime;
1374
1375 /**
1376 * The time the run was enqueued in UTC timezone in RFC 3339 format, for
1377 * example 2012-11-15T16:19:00.094Z.
1378 */
1379 core.DateTime enqueuedTime;
1380
1381 /**
1382 * Information about why the backup operation failed. This is only present if
1383 * the run has the FAILED status.
1384 */
1385 OperationError error;
1386
1387 /** Name of the database instance. */
1388 core.String instance;
1389
1390 /** This is always sql#backupRun. */
1391 core.String kind;
1392
1393 /**
1394 * The time the backup operation actually started in UTC timezone in RFC 3339
1395 * format, for example 2012-11-15T16:19:00.094Z.
1396 */
1397 core.DateTime startTime;
1398
1399 /** The status of this run. */
1400 core.String status;
1401
1402
1403 BackupRun();
1404
1405 BackupRun.fromJson(core.Map _json) {
1406 if (_json.containsKey("backupConfiguration")) {
1407 backupConfiguration = _json["backupConfiguration"];
1408 }
1409 if (_json.containsKey("dueTime")) {
1410 dueTime = core.DateTime.parse(_json["dueTime"]);
1411 }
1412 if (_json.containsKey("endTime")) {
1413 endTime = core.DateTime.parse(_json["endTime"]);
1414 }
1415 if (_json.containsKey("enqueuedTime")) {
1416 enqueuedTime = core.DateTime.parse(_json["enqueuedTime"]);
1417 }
1418 if (_json.containsKey("error")) {
1419 error = new OperationError.fromJson(_json["error"]);
1420 }
1421 if (_json.containsKey("instance")) {
1422 instance = _json["instance"];
1423 }
1424 if (_json.containsKey("kind")) {
1425 kind = _json["kind"];
1426 }
1427 if (_json.containsKey("startTime")) {
1428 startTime = core.DateTime.parse(_json["startTime"]);
1429 }
1430 if (_json.containsKey("status")) {
1431 status = _json["status"];
1432 }
1433 }
1434
1435 core.Map toJson() {
1436 var _json = new core.Map();
1437 if (backupConfiguration != null) {
1438 _json["backupConfiguration"] = backupConfiguration;
1439 }
1440 if (dueTime != null) {
1441 _json["dueTime"] = (dueTime).toIso8601String();
1442 }
1443 if (endTime != null) {
1444 _json["endTime"] = (endTime).toIso8601String();
1445 }
1446 if (enqueuedTime != null) {
1447 _json["enqueuedTime"] = (enqueuedTime).toIso8601String();
1448 }
1449 if (error != null) {
1450 _json["error"] = (error).toJson();
1451 }
1452 if (instance != null) {
1453 _json["instance"] = instance;
1454 }
1455 if (kind != null) {
1456 _json["kind"] = kind;
1457 }
1458 if (startTime != null) {
1459 _json["startTime"] = (startTime).toIso8601String();
1460 }
1461 if (status != null) {
1462 _json["status"] = status;
1463 }
1464 return _json;
1465 }
1466 }
1467
1468
1469 /** Backup run list results. */
1470 class BackupRunsListResponse {
1471 /**
1472 * A list of backup runs in reverse chronological order of the enqueued time.
1473 */
1474 core.List<BackupRun> items;
1475
1476 /** This is always sql#backupRunsList. */
1477 core.String kind;
1478
1479 /**
1480 * The continuation token, used to page through large result sets. Provide
1481 * this value in a subsequent request to return the next page of results.
1482 */
1483 core.String nextPageToken;
1484
1485
1486 BackupRunsListResponse();
1487
1488 BackupRunsListResponse.fromJson(core.Map _json) {
1489 if (_json.containsKey("items")) {
1490 items = _json["items"].map((value) => new BackupRun.fromJson(value)).toLis t();
1491 }
1492 if (_json.containsKey("kind")) {
1493 kind = _json["kind"];
1494 }
1495 if (_json.containsKey("nextPageToken")) {
1496 nextPageToken = _json["nextPageToken"];
1497 }
1498 }
1499
1500 core.Map toJson() {
1501 var _json = new core.Map();
1502 if (items != null) {
1503 _json["items"] = items.map((value) => (value).toJson()).toList();
1504 }
1505 if (kind != null) {
1506 _json["kind"] = kind;
1507 }
1508 if (nextPageToken != null) {
1509 _json["nextPageToken"] = nextPageToken;
1510 }
1511 return _json;
1512 }
1513 }
1514
1515
1516 /** Binary log coordinates. */
1517 class BinLogCoordinates {
1518 /** Name of the binary log file for a Cloud SQL instance. */
1519 core.String binLogFileName;
1520
1521 /** Position (offset) within the binary log file. */
1522 core.String binLogPosition;
1523
1524 /** This is always sql#binLogCoordinates. */
1525 core.String kind;
1526
1527
1528 BinLogCoordinates();
1529
1530 BinLogCoordinates.fromJson(core.Map _json) {
1531 if (_json.containsKey("binLogFileName")) {
1532 binLogFileName = _json["binLogFileName"];
1533 }
1534 if (_json.containsKey("binLogPosition")) {
1535 binLogPosition = _json["binLogPosition"];
1536 }
1537 if (_json.containsKey("kind")) {
1538 kind = _json["kind"];
1539 }
1540 }
1541
1542 core.Map toJson() {
1543 var _json = new core.Map();
1544 if (binLogFileName != null) {
1545 _json["binLogFileName"] = binLogFileName;
1546 }
1547 if (binLogPosition != null) {
1548 _json["binLogPosition"] = binLogPosition;
1549 }
1550 if (kind != null) {
1551 _json["kind"] = kind;
1552 }
1553 return _json;
1554 }
1555 }
1556
1557
1558 /** Database instance clone context. */
1559 class CloneContext {
1560 /**
1561 * Binary log coordinates, if specified, indentify the position up to which
1562 * the source instance should be cloned. If not specified, the source instance
1563 * is cloned up to the most recent binary log coordinates.
1564 */
1565 BinLogCoordinates binLogCoordinates;
1566
1567 /** Name of the Cloud SQL instance to be created as a clone. */
1568 core.String destinationInstanceName;
1569
1570 /** This is always sql#cloneContext. */
1571 core.String kind;
1572
1573 /** Name of the Cloud SQL instance to be cloned. */
1574 core.String sourceInstanceName;
1575
1576
1577 CloneContext();
1578
1579 CloneContext.fromJson(core.Map _json) {
1580 if (_json.containsKey("binLogCoordinates")) {
1581 binLogCoordinates = new BinLogCoordinates.fromJson(_json["binLogCoordinate s"]);
1582 }
1583 if (_json.containsKey("destinationInstanceName")) {
1584 destinationInstanceName = _json["destinationInstanceName"];
1585 }
1586 if (_json.containsKey("kind")) {
1587 kind = _json["kind"];
1588 }
1589 if (_json.containsKey("sourceInstanceName")) {
1590 sourceInstanceName = _json["sourceInstanceName"];
1591 }
1592 }
1593
1594 core.Map toJson() {
1595 var _json = new core.Map();
1596 if (binLogCoordinates != null) {
1597 _json["binLogCoordinates"] = (binLogCoordinates).toJson();
1598 }
1599 if (destinationInstanceName != null) {
1600 _json["destinationInstanceName"] = destinationInstanceName;
1601 }
1602 if (kind != null) {
1603 _json["kind"] = kind;
1604 }
1605 if (sourceInstanceName != null) {
1606 _json["sourceInstanceName"] = sourceInstanceName;
1607 }
1608 return _json;
1609 }
1610 }
1611
1612
1613 /** MySQL flags for Cloud SQL instances. */
1614 class DatabaseFlags {
1615 /**
1616 * The name of the flag. These flags are passed at instance startup, so
1617 * include both MySQL server options and MySQL system variables. Flags should
1618 * be specified with underscores, not hyphens. Refer to the official MySQL
1619 * documentation on server options and system variables for descriptions of
1620 * what these flags do. Acceptable values are: character_set_server utf8 or
1621 * utf8mb4 event_scheduler on or off (Note: The event scheduler will only work
1622 * reliably if the instance activationPolicy is set to ALWAYS) general_log on
1623 * or off group_concat_max_len 4..17179869184 innodb_flush_log_at_trx_commit
1624 * 0..2 innodb_lock_wait_timeout 1..1073741824 log_bin_trust_function_creators
1625 * on or off log_output Can be either TABLE or NONE, FILE is not supported
1626 * log_queries_not_using_indexes on or off long_query_time 0..30000000
1627 * lower_case_table_names 0..2 max_allowed_packet 16384..1073741824 read_only
1628 * on or off skip_show_database on or off slow_query_log on or off. If set to
1629 * on, you must also set the log_output flag to TABLE to receive logs.
1630 * wait_timeout 1..31536000
1631 */
1632 core.String name;
1633
1634 /**
1635 * The value of the flag. Booleans should be set using 1 for true, and 0 for
1636 * false. This field must be omitted if the flag doesn't take a value.
1637 */
1638 core.String value;
1639
1640
1641 DatabaseFlags();
1642
1643 DatabaseFlags.fromJson(core.Map _json) {
1644 if (_json.containsKey("name")) {
1645 name = _json["name"];
1646 }
1647 if (_json.containsKey("value")) {
1648 value = _json["value"];
1649 }
1650 }
1651
1652 core.Map toJson() {
1653 var _json = new core.Map();
1654 if (name != null) {
1655 _json["name"] = name;
1656 }
1657 if (value != null) {
1658 _json["value"] = value;
1659 }
1660 return _json;
1661 }
1662 }
1663
1664
1665 /** A Cloud SQL instance resource. */
1666 class DatabaseInstance {
1667 /** The current disk usage of the instance in bytes. */
1668 core.String currentDiskSize;
1669
1670 /**
1671 * The database engine type and version. Can be MYSQL_5_5 or MYSQL_5_6.
1672 * Defaults to MYSQL_5_5. The databaseVersion cannot be changed after instance
1673 * creation.
1674 */
1675 core.String databaseVersion;
1676
1677 /** HTTP 1.1 Entity tag for the resource. */
1678 core.String etag;
1679
1680 /** Name of the Cloud SQL instance. This does not include the project ID. */
1681 core.String instance;
1682
1683 /**
1684 * The instance type. This can be one of the following.
1685 * CLOUD_SQL_INSTANCE: Regular Cloud SQL instance.
1686 * READ_REPLICA_INSTANCE: Cloud SQL instance acting as a read-replica.
1687 */
1688 core.String instanceType;
1689
1690 /** The assigned IP addresses for the instance. */
1691 core.List<IpMapping> ipAddresses;
1692
1693 /** This is always sql#instance. */
1694 core.String kind;
1695
1696 /**
1697 * The name of the instance which will act as master in the replication setup.
1698 */
1699 core.String masterInstanceName;
1700
1701 /** The maximum disk size of the instance in bytes. */
1702 core.String maxDiskSize;
1703
1704 /**
1705 * The project ID of the project containing the Cloud SQL instance. The Google
1706 * apps domain is prefixed if applicable.
1707 */
1708 core.String project;
1709
1710 /**
1711 * The geographical region. Can be us-east1, us-central, asia-east1 or
1712 * europe-west1. Defaults to us-central. The region can not be changed after
1713 * instance creation.
1714 */
1715 core.String region;
1716
1717 /** The replicas of the instance. */
1718 core.List<core.String> replicaNames;
1719
1720 /** SSL configuration. */
1721 SslCert serverCaCert;
1722
1723 /** The user settings. */
1724 Settings settings;
1725
1726 /**
1727 * The current serving state of the Cloud SQL instance. This can be one of the
1728 * following.
1729 * RUNNABLE: The instance is running, or is ready to run when accessed.
1730 * SUSPENDED: The instance is not available, for example due to problems with
1731 * billing.
1732 * PENDING_CREATE: The instance is being created.
1733 * MAINTENANCE: The instance is down for maintenance.
1734 * UNKNOWN_STATE: The state of the instance is unknown.
1735 */
1736 core.String state;
1737
1738
1739 DatabaseInstance();
1740
1741 DatabaseInstance.fromJson(core.Map _json) {
1742 if (_json.containsKey("currentDiskSize")) {
1743 currentDiskSize = _json["currentDiskSize"];
1744 }
1745 if (_json.containsKey("databaseVersion")) {
1746 databaseVersion = _json["databaseVersion"];
1747 }
1748 if (_json.containsKey("etag")) {
1749 etag = _json["etag"];
1750 }
1751 if (_json.containsKey("instance")) {
1752 instance = _json["instance"];
1753 }
1754 if (_json.containsKey("instanceType")) {
1755 instanceType = _json["instanceType"];
1756 }
1757 if (_json.containsKey("ipAddresses")) {
1758 ipAddresses = _json["ipAddresses"].map((value) => new IpMapping.fromJson(v alue)).toList();
1759 }
1760 if (_json.containsKey("kind")) {
1761 kind = _json["kind"];
1762 }
1763 if (_json.containsKey("masterInstanceName")) {
1764 masterInstanceName = _json["masterInstanceName"];
1765 }
1766 if (_json.containsKey("maxDiskSize")) {
1767 maxDiskSize = _json["maxDiskSize"];
1768 }
1769 if (_json.containsKey("project")) {
1770 project = _json["project"];
1771 }
1772 if (_json.containsKey("region")) {
1773 region = _json["region"];
1774 }
1775 if (_json.containsKey("replicaNames")) {
1776 replicaNames = _json["replicaNames"];
1777 }
1778 if (_json.containsKey("serverCaCert")) {
1779 serverCaCert = new SslCert.fromJson(_json["serverCaCert"]);
1780 }
1781 if (_json.containsKey("settings")) {
1782 settings = new Settings.fromJson(_json["settings"]);
1783 }
1784 if (_json.containsKey("state")) {
1785 state = _json["state"];
1786 }
1787 }
1788
1789 core.Map toJson() {
1790 var _json = new core.Map();
1791 if (currentDiskSize != null) {
1792 _json["currentDiskSize"] = currentDiskSize;
1793 }
1794 if (databaseVersion != null) {
1795 _json["databaseVersion"] = databaseVersion;
1796 }
1797 if (etag != null) {
1798 _json["etag"] = etag;
1799 }
1800 if (instance != null) {
1801 _json["instance"] = instance;
1802 }
1803 if (instanceType != null) {
1804 _json["instanceType"] = instanceType;
1805 }
1806 if (ipAddresses != null) {
1807 _json["ipAddresses"] = ipAddresses.map((value) => (value).toJson()).toList ();
1808 }
1809 if (kind != null) {
1810 _json["kind"] = kind;
1811 }
1812 if (masterInstanceName != null) {
1813 _json["masterInstanceName"] = masterInstanceName;
1814 }
1815 if (maxDiskSize != null) {
1816 _json["maxDiskSize"] = maxDiskSize;
1817 }
1818 if (project != null) {
1819 _json["project"] = project;
1820 }
1821 if (region != null) {
1822 _json["region"] = region;
1823 }
1824 if (replicaNames != null) {
1825 _json["replicaNames"] = replicaNames;
1826 }
1827 if (serverCaCert != null) {
1828 _json["serverCaCert"] = (serverCaCert).toJson();
1829 }
1830 if (settings != null) {
1831 _json["settings"] = (settings).toJson();
1832 }
1833 if (state != null) {
1834 _json["state"] = state;
1835 }
1836 return _json;
1837 }
1838 }
1839
1840
1841 /** Database instance export context. */
1842 class ExportContext {
1843 /**
1844 * Databases (for example, guestbook) from which the export is made. If
1845 * unspecified, all databases are exported.
1846 */
1847 core.List<core.String> database;
1848
1849 /** This is always sql#exportContext. */
1850 core.String kind;
1851
1852 /**
1853 * Tables to export, or that were exported, from the specified database. If
1854 * you specify tables, specify one and only one database.
1855 */
1856 core.List<core.String> table;
1857
1858 /**
1859 * The path to the file in Google Cloud Storage where the export will be
1860 * stored, or where it was already stored. The URI is in the form
1861 * gs://bucketName/fileName. If the file already exists, the operation fails.
1862 * If the filename ends with .gz, the contents are compressed.
1863 */
1864 core.String uri;
1865
1866
1867 ExportContext();
1868
1869 ExportContext.fromJson(core.Map _json) {
1870 if (_json.containsKey("database")) {
1871 database = _json["database"];
1872 }
1873 if (_json.containsKey("kind")) {
1874 kind = _json["kind"];
1875 }
1876 if (_json.containsKey("table")) {
1877 table = _json["table"];
1878 }
1879 if (_json.containsKey("uri")) {
1880 uri = _json["uri"];
1881 }
1882 }
1883
1884 core.Map toJson() {
1885 var _json = new core.Map();
1886 if (database != null) {
1887 _json["database"] = database;
1888 }
1889 if (kind != null) {
1890 _json["kind"] = kind;
1891 }
1892 if (table != null) {
1893 _json["table"] = table;
1894 }
1895 if (uri != null) {
1896 _json["uri"] = uri;
1897 }
1898 return _json;
1899 }
1900 }
1901
1902
1903 /** A Google Cloud SQL service flag resource. */
1904 class Flag {
1905 /** For STRING flags, a list of strings that the value can be set to. */
1906 core.List<core.String> allowedStringValues;
1907
1908 /**
1909 * The database version this flag applies to. Currently this can only be
1910 * [MYSQL_5_5].
1911 */
1912 core.List<core.String> appliesTo;
1913
1914 /** This is always sql#flag. */
1915 core.String kind;
1916
1917 /** For INTEGER flags, the maximum allowed value. */
1918 core.String maxValue;
1919
1920 /** For INTEGER flags, the minimum allowed value. */
1921 core.String minValue;
1922
1923 /**
1924 * This is the name of the flag. Flag names always use underscores, not
1925 * hyphens, e.g. max_allowed_packet
1926 */
1927 core.String name;
1928
1929 /**
1930 * The type of the flag. Flags are typed to being BOOLEAN, STRING, INTEGER or
1931 * NONE. NONE is used for flags which do not take a value, such as
1932 * skip_grant_tables.
1933 */
1934 core.String type;
1935
1936
1937 Flag();
1938
1939 Flag.fromJson(core.Map _json) {
1940 if (_json.containsKey("allowedStringValues")) {
1941 allowedStringValues = _json["allowedStringValues"];
1942 }
1943 if (_json.containsKey("appliesTo")) {
1944 appliesTo = _json["appliesTo"];
1945 }
1946 if (_json.containsKey("kind")) {
1947 kind = _json["kind"];
1948 }
1949 if (_json.containsKey("maxValue")) {
1950 maxValue = _json["maxValue"];
1951 }
1952 if (_json.containsKey("minValue")) {
1953 minValue = _json["minValue"];
1954 }
1955 if (_json.containsKey("name")) {
1956 name = _json["name"];
1957 }
1958 if (_json.containsKey("type")) {
1959 type = _json["type"];
1960 }
1961 }
1962
1963 core.Map toJson() {
1964 var _json = new core.Map();
1965 if (allowedStringValues != null) {
1966 _json["allowedStringValues"] = allowedStringValues;
1967 }
1968 if (appliesTo != null) {
1969 _json["appliesTo"] = appliesTo;
1970 }
1971 if (kind != null) {
1972 _json["kind"] = kind;
1973 }
1974 if (maxValue != null) {
1975 _json["maxValue"] = maxValue;
1976 }
1977 if (minValue != null) {
1978 _json["minValue"] = minValue;
1979 }
1980 if (name != null) {
1981 _json["name"] = name;
1982 }
1983 if (type != null) {
1984 _json["type"] = type;
1985 }
1986 return _json;
1987 }
1988 }
1989
1990
1991 /** Flags list response. */
1992 class FlagsListResponse {
1993 /** List of flags. */
1994 core.List<Flag> items;
1995
1996 /** This is always sql#flagsList. */
1997 core.String kind;
1998
1999
2000 FlagsListResponse();
2001
2002 FlagsListResponse.fromJson(core.Map _json) {
2003 if (_json.containsKey("items")) {
2004 items = _json["items"].map((value) => new Flag.fromJson(value)).toList();
2005 }
2006 if (_json.containsKey("kind")) {
2007 kind = _json["kind"];
2008 }
2009 }
2010
2011 core.Map toJson() {
2012 var _json = new core.Map();
2013 if (items != null) {
2014 _json["items"] = items.map((value) => (value).toJson()).toList();
2015 }
2016 if (kind != null) {
2017 _json["kind"] = kind;
2018 }
2019 return _json;
2020 }
2021 }
2022
2023
2024 /** Database instance import context. */
2025 class ImportContext {
2026 /**
2027 * The database (for example, guestbook) to which the import is made. If not
2028 * set, it is assumed that the database is specified in the file to be
2029 * imported.
2030 */
2031 core.String database;
2032
2033 /** This is always sql#importContext. */
2034 core.String kind;
2035
2036 /**
2037 * A path to the MySQL dump file in Google Cloud Storage from which the import
2038 * is made. The URI is in the form gs://bucketName/fileName. Compressed gzip
2039 * files (.gz) are also supported.
2040 */
2041 core.List<core.String> uri;
2042
2043
2044 ImportContext();
2045
2046 ImportContext.fromJson(core.Map _json) {
2047 if (_json.containsKey("database")) {
2048 database = _json["database"];
2049 }
2050 if (_json.containsKey("kind")) {
2051 kind = _json["kind"];
2052 }
2053 if (_json.containsKey("uri")) {
2054 uri = _json["uri"];
2055 }
2056 }
2057
2058 core.Map toJson() {
2059 var _json = new core.Map();
2060 if (database != null) {
2061 _json["database"] = database;
2062 }
2063 if (kind != null) {
2064 _json["kind"] = kind;
2065 }
2066 if (uri != null) {
2067 _json["uri"] = uri;
2068 }
2069 return _json;
2070 }
2071 }
2072
2073
2074 /**
2075 * An Operations resource contains information about database instance
2076 * operations such as create, delete, and restart. Operations resources are
2077 * created in response to operations that were initiated; you never create them
2078 * directly.
2079 */
2080 class InstanceOperation {
2081 /**
2082 * The time this operation finished in UTC timezone in RFC 3339 format, for
2083 * example 2012-11-15T16:19:00.094Z.
2084 */
2085 core.DateTime endTime;
2086
2087 /**
2088 * The time this operation was enqueued in UTC timezone in RFC 3339 format,
2089 * for example 2012-11-15T16:19:00.094Z.
2090 */
2091 core.DateTime enqueuedTime;
2092
2093 /**
2094 * The error(s) encountered by this operation. Only set if the operation
2095 * results in an error.
2096 */
2097 core.List<OperationError> error;
2098
2099 /** The context for export operation, if applicable. */
2100 ExportContext exportContext;
2101
2102 /** The context for import operation, if applicable. */
2103 ImportContext importContext;
2104
2105 /** Name of the database instance. */
2106 core.String instance;
2107
2108 /** This is always sql#instanceOperation. */
2109 core.String kind;
2110
2111 /**
2112 * An identifier that uniquely identifies the operation. You can use this
2113 * identifier to retrieve the Operations resource that has information about
2114 * the operation.
2115 */
2116 core.String operation;
2117
2118 /**
2119 * The type of the operation. Valid values are CREATE, DELETE, UPDATE,
2120 * RESTART, IMPORT, EXPORT, BACKUP_VOLUME, RESTORE_VOLUME.
2121 */
2122 core.String operationType;
2123
2124 /**
2125 * The time this operation actually started in UTC timezone in RFC 3339
2126 * format, for example 2012-11-15T16:19:00.094Z.
2127 */
2128 core.DateTime startTime;
2129
2130 /**
2131 * The state of an operation. Valid values are PENDING, RUNNING, DONE,
2132 * UNKNOWN.
2133 */
2134 core.String state;
2135
2136 /** The email address of the user who initiated this operation. */
2137 core.String userEmailAddress;
2138
2139
2140 InstanceOperation();
2141
2142 InstanceOperation.fromJson(core.Map _json) {
2143 if (_json.containsKey("endTime")) {
2144 endTime = core.DateTime.parse(_json["endTime"]);
2145 }
2146 if (_json.containsKey("enqueuedTime")) {
2147 enqueuedTime = core.DateTime.parse(_json["enqueuedTime"]);
2148 }
2149 if (_json.containsKey("error")) {
2150 error = _json["error"].map((value) => new OperationError.fromJson(value)). toList();
2151 }
2152 if (_json.containsKey("exportContext")) {
2153 exportContext = new ExportContext.fromJson(_json["exportContext"]);
2154 }
2155 if (_json.containsKey("importContext")) {
2156 importContext = new ImportContext.fromJson(_json["importContext"]);
2157 }
2158 if (_json.containsKey("instance")) {
2159 instance = _json["instance"];
2160 }
2161 if (_json.containsKey("kind")) {
2162 kind = _json["kind"];
2163 }
2164 if (_json.containsKey("operation")) {
2165 operation = _json["operation"];
2166 }
2167 if (_json.containsKey("operationType")) {
2168 operationType = _json["operationType"];
2169 }
2170 if (_json.containsKey("startTime")) {
2171 startTime = core.DateTime.parse(_json["startTime"]);
2172 }
2173 if (_json.containsKey("state")) {
2174 state = _json["state"];
2175 }
2176 if (_json.containsKey("userEmailAddress")) {
2177 userEmailAddress = _json["userEmailAddress"];
2178 }
2179 }
2180
2181 core.Map toJson() {
2182 var _json = new core.Map();
2183 if (endTime != null) {
2184 _json["endTime"] = (endTime).toIso8601String();
2185 }
2186 if (enqueuedTime != null) {
2187 _json["enqueuedTime"] = (enqueuedTime).toIso8601String();
2188 }
2189 if (error != null) {
2190 _json["error"] = error.map((value) => (value).toJson()).toList();
2191 }
2192 if (exportContext != null) {
2193 _json["exportContext"] = (exportContext).toJson();
2194 }
2195 if (importContext != null) {
2196 _json["importContext"] = (importContext).toJson();
2197 }
2198 if (instance != null) {
2199 _json["instance"] = instance;
2200 }
2201 if (kind != null) {
2202 _json["kind"] = kind;
2203 }
2204 if (operation != null) {
2205 _json["operation"] = operation;
2206 }
2207 if (operationType != null) {
2208 _json["operationType"] = operationType;
2209 }
2210 if (startTime != null) {
2211 _json["startTime"] = (startTime).toIso8601String();
2212 }
2213 if (state != null) {
2214 _json["state"] = state;
2215 }
2216 if (userEmailAddress != null) {
2217 _json["userEmailAddress"] = userEmailAddress;
2218 }
2219 return _json;
2220 }
2221 }
2222
2223
2224 /** Database instance set root password request. */
2225 class InstanceSetRootPasswordRequest {
2226 /** Set Root Password Context. */
2227 SetRootPasswordContext setRootPasswordContext;
2228
2229
2230 InstanceSetRootPasswordRequest();
2231
2232 InstanceSetRootPasswordRequest.fromJson(core.Map _json) {
2233 if (_json.containsKey("setRootPasswordContext")) {
2234 setRootPasswordContext = new SetRootPasswordContext.fromJson(_json["setRoo tPasswordContext"]);
2235 }
2236 }
2237
2238 core.Map toJson() {
2239 var _json = new core.Map();
2240 if (setRootPasswordContext != null) {
2241 _json["setRootPasswordContext"] = (setRootPasswordContext).toJson();
2242 }
2243 return _json;
2244 }
2245 }
2246
2247
2248 /** Database instance clone request. */
2249 class InstancesCloneRequest {
2250 /** Contains details about the clone operation. */
2251 CloneContext cloneContext;
2252
2253
2254 InstancesCloneRequest();
2255
2256 InstancesCloneRequest.fromJson(core.Map _json) {
2257 if (_json.containsKey("cloneContext")) {
2258 cloneContext = new CloneContext.fromJson(_json["cloneContext"]);
2259 }
2260 }
2261
2262 core.Map toJson() {
2263 var _json = new core.Map();
2264 if (cloneContext != null) {
2265 _json["cloneContext"] = (cloneContext).toJson();
2266 }
2267 return _json;
2268 }
2269 }
2270
2271
2272 /** Database instance clone response. */
2273 class InstancesCloneResponse {
2274 /** This is always sql#instancesClone. */
2275 core.String kind;
2276
2277 /**
2278 * An unique identifier for the operation associated with the cloned instance.
2279 * You can use this identifier to retrieve the Operations resource, which has
2280 * information about the operation.
2281 */
2282 core.String operation;
2283
2284
2285 InstancesCloneResponse();
2286
2287 InstancesCloneResponse.fromJson(core.Map _json) {
2288 if (_json.containsKey("kind")) {
2289 kind = _json["kind"];
2290 }
2291 if (_json.containsKey("operation")) {
2292 operation = _json["operation"];
2293 }
2294 }
2295
2296 core.Map toJson() {
2297 var _json = new core.Map();
2298 if (kind != null) {
2299 _json["kind"] = kind;
2300 }
2301 if (operation != null) {
2302 _json["operation"] = operation;
2303 }
2304 return _json;
2305 }
2306 }
2307
2308
2309 /** Database instance delete response. */
2310 class InstancesDeleteResponse {
2311 /** This is always sql#instancesDelete. */
2312 core.String kind;
2313
2314 /**
2315 * An identifier that uniquely identifies the operation. You can use this
2316 * identifier to retrieve the Operations resource that has information about
2317 * the operation.
2318 */
2319 core.String operation;
2320
2321
2322 InstancesDeleteResponse();
2323
2324 InstancesDeleteResponse.fromJson(core.Map _json) {
2325 if (_json.containsKey("kind")) {
2326 kind = _json["kind"];
2327 }
2328 if (_json.containsKey("operation")) {
2329 operation = _json["operation"];
2330 }
2331 }
2332
2333 core.Map toJson() {
2334 var _json = new core.Map();
2335 if (kind != null) {
2336 _json["kind"] = kind;
2337 }
2338 if (operation != null) {
2339 _json["operation"] = operation;
2340 }
2341 return _json;
2342 }
2343 }
2344
2345
2346 /** Database instance export request. */
2347 class InstancesExportRequest {
2348 /** Contains details about the export operation. */
2349 ExportContext exportContext;
2350
2351
2352 InstancesExportRequest();
2353
2354 InstancesExportRequest.fromJson(core.Map _json) {
2355 if (_json.containsKey("exportContext")) {
2356 exportContext = new ExportContext.fromJson(_json["exportContext"]);
2357 }
2358 }
2359
2360 core.Map toJson() {
2361 var _json = new core.Map();
2362 if (exportContext != null) {
2363 _json["exportContext"] = (exportContext).toJson();
2364 }
2365 return _json;
2366 }
2367 }
2368
2369
2370 /** Database instance export response. */
2371 class InstancesExportResponse {
2372 /** This is always sql#instancesExport. */
2373 core.String kind;
2374
2375 /**
2376 * An identifier that uniquely identifies the operation. You can use this
2377 * identifier to retrieve the Operations resource that has information about
2378 * the operation.
2379 */
2380 core.String operation;
2381
2382
2383 InstancesExportResponse();
2384
2385 InstancesExportResponse.fromJson(core.Map _json) {
2386 if (_json.containsKey("kind")) {
2387 kind = _json["kind"];
2388 }
2389 if (_json.containsKey("operation")) {
2390 operation = _json["operation"];
2391 }
2392 }
2393
2394 core.Map toJson() {
2395 var _json = new core.Map();
2396 if (kind != null) {
2397 _json["kind"] = kind;
2398 }
2399 if (operation != null) {
2400 _json["operation"] = operation;
2401 }
2402 return _json;
2403 }
2404 }
2405
2406
2407 /** Database instance import request. */
2408 class InstancesImportRequest {
2409 /** Contains details about the import operation. */
2410 ImportContext importContext;
2411
2412
2413 InstancesImportRequest();
2414
2415 InstancesImportRequest.fromJson(core.Map _json) {
2416 if (_json.containsKey("importContext")) {
2417 importContext = new ImportContext.fromJson(_json["importContext"]);
2418 }
2419 }
2420
2421 core.Map toJson() {
2422 var _json = new core.Map();
2423 if (importContext != null) {
2424 _json["importContext"] = (importContext).toJson();
2425 }
2426 return _json;
2427 }
2428 }
2429
2430
2431 /** Database instance import response. */
2432 class InstancesImportResponse {
2433 /** This is always sql#instancesImport. */
2434 core.String kind;
2435
2436 /**
2437 * An identifier that uniquely identifies the operation. You can use this
2438 * identifier to retrieve the Operations resource that has information about
2439 * the operation.
2440 */
2441 core.String operation;
2442
2443
2444 InstancesImportResponse();
2445
2446 InstancesImportResponse.fromJson(core.Map _json) {
2447 if (_json.containsKey("kind")) {
2448 kind = _json["kind"];
2449 }
2450 if (_json.containsKey("operation")) {
2451 operation = _json["operation"];
2452 }
2453 }
2454
2455 core.Map toJson() {
2456 var _json = new core.Map();
2457 if (kind != null) {
2458 _json["kind"] = kind;
2459 }
2460 if (operation != null) {
2461 _json["operation"] = operation;
2462 }
2463 return _json;
2464 }
2465 }
2466
2467
2468 /** Database instance insert response. */
2469 class InstancesInsertResponse {
2470 /** This is always sql#instancesInsert. */
2471 core.String kind;
2472
2473 /**
2474 * An identifier that uniquely identifies the operation. You can use this
2475 * identifier to retrieve the Operations resource that has information about
2476 * the operation.
2477 */
2478 core.String operation;
2479
2480
2481 InstancesInsertResponse();
2482
2483 InstancesInsertResponse.fromJson(core.Map _json) {
2484 if (_json.containsKey("kind")) {
2485 kind = _json["kind"];
2486 }
2487 if (_json.containsKey("operation")) {
2488 operation = _json["operation"];
2489 }
2490 }
2491
2492 core.Map toJson() {
2493 var _json = new core.Map();
2494 if (kind != null) {
2495 _json["kind"] = kind;
2496 }
2497 if (operation != null) {
2498 _json["operation"] = operation;
2499 }
2500 return _json;
2501 }
2502 }
2503
2504
2505 /** Database instances list response. */
2506 class InstancesListResponse {
2507 /** List of database instance resources. */
2508 core.List<DatabaseInstance> items;
2509
2510 /** This is always sql#instancesList. */
2511 core.String kind;
2512
2513 /**
2514 * The continuation token, used to page through large result sets. Provide
2515 * this value in a subsequent request to return the next page of results.
2516 */
2517 core.String nextPageToken;
2518
2519
2520 InstancesListResponse();
2521
2522 InstancesListResponse.fromJson(core.Map _json) {
2523 if (_json.containsKey("items")) {
2524 items = _json["items"].map((value) => new DatabaseInstance.fromJson(value) ).toList();
2525 }
2526 if (_json.containsKey("kind")) {
2527 kind = _json["kind"];
2528 }
2529 if (_json.containsKey("nextPageToken")) {
2530 nextPageToken = _json["nextPageToken"];
2531 }
2532 }
2533
2534 core.Map toJson() {
2535 var _json = new core.Map();
2536 if (items != null) {
2537 _json["items"] = items.map((value) => (value).toJson()).toList();
2538 }
2539 if (kind != null) {
2540 _json["kind"] = kind;
2541 }
2542 if (nextPageToken != null) {
2543 _json["nextPageToken"] = nextPageToken;
2544 }
2545 return _json;
2546 }
2547 }
2548
2549
2550 /** Database promote read replica response. */
2551 class InstancesPromoteReplicaResponse {
2552 /** This is always sql#instancesPromoteReplica. */
2553 core.String kind;
2554
2555 /**
2556 * An identifier that uniquely identifies the operation. You can use this
2557 * identifier to retrieve the Operations resource that has information about
2558 * the operation.
2559 */
2560 core.String operation;
2561
2562
2563 InstancesPromoteReplicaResponse();
2564
2565 InstancesPromoteReplicaResponse.fromJson(core.Map _json) {
2566 if (_json.containsKey("kind")) {
2567 kind = _json["kind"];
2568 }
2569 if (_json.containsKey("operation")) {
2570 operation = _json["operation"];
2571 }
2572 }
2573
2574 core.Map toJson() {
2575 var _json = new core.Map();
2576 if (kind != null) {
2577 _json["kind"] = kind;
2578 }
2579 if (operation != null) {
2580 _json["operation"] = operation;
2581 }
2582 return _json;
2583 }
2584 }
2585
2586
2587 /** Database instance resetSslConfig response. */
2588 class InstancesResetSslConfigResponse {
2589 /** This is always sql#instancesResetSslConfig. */
2590 core.String kind;
2591
2592 /**
2593 * An identifier that uniquely identifies the operation. You can use this
2594 * identifier to retrieve the Operations resource that has information about
2595 * the operation. All ssl client certificates will be deleted and a new server
2596 * certificate will be created. Does not take effect until the next instance
2597 * restart.
2598 */
2599 core.String operation;
2600
2601
2602 InstancesResetSslConfigResponse();
2603
2604 InstancesResetSslConfigResponse.fromJson(core.Map _json) {
2605 if (_json.containsKey("kind")) {
2606 kind = _json["kind"];
2607 }
2608 if (_json.containsKey("operation")) {
2609 operation = _json["operation"];
2610 }
2611 }
2612
2613 core.Map toJson() {
2614 var _json = new core.Map();
2615 if (kind != null) {
2616 _json["kind"] = kind;
2617 }
2618 if (operation != null) {
2619 _json["operation"] = operation;
2620 }
2621 return _json;
2622 }
2623 }
2624
2625
2626 /** Database instance restart response. */
2627 class InstancesRestartResponse {
2628 /** This is always sql#instancesRestart. */
2629 core.String kind;
2630
2631 /**
2632 * An identifier that uniquely identifies the operation. You can use this
2633 * identifier to retrieve the Operations resource that has information about
2634 * the operation.
2635 */
2636 core.String operation;
2637
2638
2639 InstancesRestartResponse();
2640
2641 InstancesRestartResponse.fromJson(core.Map _json) {
2642 if (_json.containsKey("kind")) {
2643 kind = _json["kind"];
2644 }
2645 if (_json.containsKey("operation")) {
2646 operation = _json["operation"];
2647 }
2648 }
2649
2650 core.Map toJson() {
2651 var _json = new core.Map();
2652 if (kind != null) {
2653 _json["kind"] = kind;
2654 }
2655 if (operation != null) {
2656 _json["operation"] = operation;
2657 }
2658 return _json;
2659 }
2660 }
2661
2662
2663 /** Database instance restore backup response. */
2664 class InstancesRestoreBackupResponse {
2665 /** This is always sql#instancesRestoreBackup. */
2666 core.String kind;
2667
2668 /**
2669 * An identifier that uniquely identifies the operation. You can use this
2670 * identifier to retrieve the Operations resource that has information about
2671 * the operation.
2672 */
2673 core.String operation;
2674
2675
2676 InstancesRestoreBackupResponse();
2677
2678 InstancesRestoreBackupResponse.fromJson(core.Map _json) {
2679 if (_json.containsKey("kind")) {
2680 kind = _json["kind"];
2681 }
2682 if (_json.containsKey("operation")) {
2683 operation = _json["operation"];
2684 }
2685 }
2686
2687 core.Map toJson() {
2688 var _json = new core.Map();
2689 if (kind != null) {
2690 _json["kind"] = kind;
2691 }
2692 if (operation != null) {
2693 _json["operation"] = operation;
2694 }
2695 return _json;
2696 }
2697 }
2698
2699
2700 /** Database instance set root password response. */
2701 class InstancesSetRootPasswordResponse {
2702 /** This is always sql#instancesSetRootPassword. */
2703 core.String kind;
2704
2705 /**
2706 * An identifier that uniquely identifies the operation. You can use this
2707 * identifier to retrieve the Operations resource that has information about
2708 * the operation.
2709 */
2710 core.String operation;
2711
2712
2713 InstancesSetRootPasswordResponse();
2714
2715 InstancesSetRootPasswordResponse.fromJson(core.Map _json) {
2716 if (_json.containsKey("kind")) {
2717 kind = _json["kind"];
2718 }
2719 if (_json.containsKey("operation")) {
2720 operation = _json["operation"];
2721 }
2722 }
2723
2724 core.Map toJson() {
2725 var _json = new core.Map();
2726 if (kind != null) {
2727 _json["kind"] = kind;
2728 }
2729 if (operation != null) {
2730 _json["operation"] = operation;
2731 }
2732 return _json;
2733 }
2734 }
2735
2736
2737 /** Database instance update response. */
2738 class InstancesUpdateResponse {
2739 /** This is always sql#instancesUpdate. */
2740 core.String kind;
2741
2742 /**
2743 * An identifier that uniquely identifies the operation. You can use this
2744 * identifier to retrieve information about the operation.
2745 */
2746 core.String operation;
2747
2748
2749 InstancesUpdateResponse();
2750
2751 InstancesUpdateResponse.fromJson(core.Map _json) {
2752 if (_json.containsKey("kind")) {
2753 kind = _json["kind"];
2754 }
2755 if (_json.containsKey("operation")) {
2756 operation = _json["operation"];
2757 }
2758 }
2759
2760 core.Map toJson() {
2761 var _json = new core.Map();
2762 if (kind != null) {
2763 _json["kind"] = kind;
2764 }
2765 if (operation != null) {
2766 _json["operation"] = operation;
2767 }
2768 return _json;
2769 }
2770 }
2771
2772
2773 /** IP Management configuration. */
2774 class IpConfiguration {
2775 /**
2776 * The list of external networks that are allowed to connect to the instance
2777 * using the IP. In CIDR notation, also known as 'slash' notation (e.g.
2778 * 192.168.100.0/24).
2779 */
2780 core.List<core.String> authorizedNetworks;
2781
2782 /** Whether the instance should be assigned an IP address or not. */
2783 core.bool enabled;
2784
2785 /**
2786 * Whether the mysqld should default to 'REQUIRE X509' for users connecting
2787 * over IP.
2788 */
2789 core.bool requireSsl;
2790
2791
2792 IpConfiguration();
2793
2794 IpConfiguration.fromJson(core.Map _json) {
2795 if (_json.containsKey("authorizedNetworks")) {
2796 authorizedNetworks = _json["authorizedNetworks"];
2797 }
2798 if (_json.containsKey("enabled")) {
2799 enabled = _json["enabled"];
2800 }
2801 if (_json.containsKey("requireSsl")) {
2802 requireSsl = _json["requireSsl"];
2803 }
2804 }
2805
2806 core.Map toJson() {
2807 var _json = new core.Map();
2808 if (authorizedNetworks != null) {
2809 _json["authorizedNetworks"] = authorizedNetworks;
2810 }
2811 if (enabled != null) {
2812 _json["enabled"] = enabled;
2813 }
2814 if (requireSsl != null) {
2815 _json["requireSsl"] = requireSsl;
2816 }
2817 return _json;
2818 }
2819 }
2820
2821
2822 /** Database instance IP Mapping. */
2823 class IpMapping {
2824 /** The IP address assigned. */
2825 core.String ipAddress;
2826
2827 /**
2828 * The due time for this IP to be retired in RFC 3339 format, for example
2829 * 2012-11-15T16:19:00.094Z. This field is only available when the IP is
2830 * scheduled to be retired.
2831 */
2832 core.DateTime timeToRetire;
2833
2834
2835 IpMapping();
2836
2837 IpMapping.fromJson(core.Map _json) {
2838 if (_json.containsKey("ipAddress")) {
2839 ipAddress = _json["ipAddress"];
2840 }
2841 if (_json.containsKey("timeToRetire")) {
2842 timeToRetire = core.DateTime.parse(_json["timeToRetire"]);
2843 }
2844 }
2845
2846 core.Map toJson() {
2847 var _json = new core.Map();
2848 if (ipAddress != null) {
2849 _json["ipAddress"] = ipAddress;
2850 }
2851 if (timeToRetire != null) {
2852 _json["timeToRetire"] = (timeToRetire).toIso8601String();
2853 }
2854 return _json;
2855 }
2856 }
2857
2858
2859 /**
2860 * Preferred location. This specifies where a Cloud SQL instance should
2861 * preferably be located, either in a specific Compute Engine zone, or
2862 * co-located with an App Engine application. Note that if the preferred
2863 * location is not available, the instance will be located as close as possible
2864 * within the region. Only one location may be specified.
2865 */
2866 class LocationPreference {
2867 /**
2868 * The App Engine application to follow, it must be in the same region as the
2869 * Cloud SQL instance.
2870 */
2871 core.String followGaeApplication;
2872
2873 /** This is always sql#locationPreference. */
2874 core.String kind;
2875
2876 /**
2877 * The preferred Compute Engine zone (e.g. us-centra1-a, us-central1-b, etc.).
2878 */
2879 core.String zone;
2880
2881
2882 LocationPreference();
2883
2884 LocationPreference.fromJson(core.Map _json) {
2885 if (_json.containsKey("followGaeApplication")) {
2886 followGaeApplication = _json["followGaeApplication"];
2887 }
2888 if (_json.containsKey("kind")) {
2889 kind = _json["kind"];
2890 }
2891 if (_json.containsKey("zone")) {
2892 zone = _json["zone"];
2893 }
2894 }
2895
2896 core.Map toJson() {
2897 var _json = new core.Map();
2898 if (followGaeApplication != null) {
2899 _json["followGaeApplication"] = followGaeApplication;
2900 }
2901 if (kind != null) {
2902 _json["kind"] = kind;
2903 }
2904 if (zone != null) {
2905 _json["zone"] = zone;
2906 }
2907 return _json;
2908 }
2909 }
2910
2911
2912 /** Database instance operation error. */
2913 class OperationError {
2914 /** Identifies the specific error that occurred. */
2915 core.String code;
2916
2917 /** This is always sql#operationError. */
2918 core.String kind;
2919
2920
2921 OperationError();
2922
2923 OperationError.fromJson(core.Map _json) {
2924 if (_json.containsKey("code")) {
2925 code = _json["code"];
2926 }
2927 if (_json.containsKey("kind")) {
2928 kind = _json["kind"];
2929 }
2930 }
2931
2932 core.Map toJson() {
2933 var _json = new core.Map();
2934 if (code != null) {
2935 _json["code"] = code;
2936 }
2937 if (kind != null) {
2938 _json["kind"] = kind;
2939 }
2940 return _json;
2941 }
2942 }
2943
2944
2945 /** Database instance list operations response. */
2946 class OperationsListResponse {
2947 /** List of operation resources. */
2948 core.List<InstanceOperation> items;
2949
2950 /** This is always sql#operationsList. */
2951 core.String kind;
2952
2953 /**
2954 * The continuation token, used to page through large result sets. Provide
2955 * this value in a subsequent request to return the next page of results.
2956 */
2957 core.String nextPageToken;
2958
2959
2960 OperationsListResponse();
2961
2962 OperationsListResponse.fromJson(core.Map _json) {
2963 if (_json.containsKey("items")) {
2964 items = _json["items"].map((value) => new InstanceOperation.fromJson(value )).toList();
2965 }
2966 if (_json.containsKey("kind")) {
2967 kind = _json["kind"];
2968 }
2969 if (_json.containsKey("nextPageToken")) {
2970 nextPageToken = _json["nextPageToken"];
2971 }
2972 }
2973
2974 core.Map toJson() {
2975 var _json = new core.Map();
2976 if (items != null) {
2977 _json["items"] = items.map((value) => (value).toJson()).toList();
2978 }
2979 if (kind != null) {
2980 _json["kind"] = kind;
2981 }
2982 if (nextPageToken != null) {
2983 _json["nextPageToken"] = nextPageToken;
2984 }
2985 return _json;
2986 }
2987 }
2988
2989
2990 /** Database instance set root password context. */
2991 class SetRootPasswordContext {
2992 /** This is always sql#setRootUserContext. */
2993 core.String kind;
2994
2995 /** The password for the root user. */
2996 core.String password;
2997
2998
2999 SetRootPasswordContext();
3000
3001 SetRootPasswordContext.fromJson(core.Map _json) {
3002 if (_json.containsKey("kind")) {
3003 kind = _json["kind"];
3004 }
3005 if (_json.containsKey("password")) {
3006 password = _json["password"];
3007 }
3008 }
3009
3010 core.Map toJson() {
3011 var _json = new core.Map();
3012 if (kind != null) {
3013 _json["kind"] = kind;
3014 }
3015 if (password != null) {
3016 _json["password"] = password;
3017 }
3018 return _json;
3019 }
3020 }
3021
3022
3023 /** Database instance settings. */
3024 class Settings {
3025 /**
3026 * The activation policy for this instance. This specifies when the instance
3027 * should be activated and is applicable only when the instance state is
3028 * RUNNABLE. This can be one of the following.
3029 * ALWAYS: The instance should always be active.
3030 * NEVER: The instance should never be activated.
3031 * ON_DEMAND: The instance is activated upon receiving requests.
3032 */
3033 core.String activationPolicy;
3034
3035 /** The App Engine app IDs that can access this instance. */
3036 core.List<core.String> authorizedGaeApplications;
3037
3038 /** The daily backup configuration for the instance. */
3039 core.List<BackupConfiguration> backupConfiguration;
3040
3041 /** The database flags passed to the instance at startup. */
3042 core.List<DatabaseFlags> databaseFlags;
3043
3044 /**
3045 * Configuration specific to read replica instance. Indicates whether
3046 * replication is enabled or not.
3047 */
3048 core.bool databaseReplicationEnabled;
3049
3050 /**
3051 * The settings for IP Management. This allows to enable or disable the
3052 * instance IP and manage which external networks can connect to the instance.
3053 */
3054 IpConfiguration ipConfiguration;
3055
3056 /** This is always sql#settings. */
3057 core.String kind;
3058
3059 /**
3060 * The location preference settings. This allows the instance to be located as
3061 * near as possible to either an App Engine app or GCE zone for better
3062 * performance.
3063 */
3064 LocationPreference locationPreference;
3065
3066 /**
3067 * The pricing plan for this instance. This can be either PER_USE or PACKAGE.
3068 */
3069 core.String pricingPlan;
3070
3071 /**
3072 * The type of replication this instance uses. This can be either ASYNCHRONOUS
3073 * or SYNCHRONOUS.
3074 */
3075 core.String replicationType;
3076
3077 /**
3078 * The version of instance settings. This is a required field for update
3079 * method to make sure concurrent updates are handled properly. During update,
3080 * use the most recent settingsVersion value for this instance and do not try
3081 * to update this value.
3082 */
3083 core.String settingsVersion;
3084
3085 /**
3086 * The tier of service for this instance, for example D1, D2. For more
3087 * information, see pricing.
3088 */
3089 core.String tier;
3090
3091
3092 Settings();
3093
3094 Settings.fromJson(core.Map _json) {
3095 if (_json.containsKey("activationPolicy")) {
3096 activationPolicy = _json["activationPolicy"];
3097 }
3098 if (_json.containsKey("authorizedGaeApplications")) {
3099 authorizedGaeApplications = _json["authorizedGaeApplications"];
3100 }
3101 if (_json.containsKey("backupConfiguration")) {
3102 backupConfiguration = _json["backupConfiguration"].map((value) => new Back upConfiguration.fromJson(value)).toList();
3103 }
3104 if (_json.containsKey("databaseFlags")) {
3105 databaseFlags = _json["databaseFlags"].map((value) => new DatabaseFlags.fr omJson(value)).toList();
3106 }
3107 if (_json.containsKey("databaseReplicationEnabled")) {
3108 databaseReplicationEnabled = _json["databaseReplicationEnabled"];
3109 }
3110 if (_json.containsKey("ipConfiguration")) {
3111 ipConfiguration = new IpConfiguration.fromJson(_json["ipConfiguration"]);
3112 }
3113 if (_json.containsKey("kind")) {
3114 kind = _json["kind"];
3115 }
3116 if (_json.containsKey("locationPreference")) {
3117 locationPreference = new LocationPreference.fromJson(_json["locationPrefer ence"]);
3118 }
3119 if (_json.containsKey("pricingPlan")) {
3120 pricingPlan = _json["pricingPlan"];
3121 }
3122 if (_json.containsKey("replicationType")) {
3123 replicationType = _json["replicationType"];
3124 }
3125 if (_json.containsKey("settingsVersion")) {
3126 settingsVersion = _json["settingsVersion"];
3127 }
3128 if (_json.containsKey("tier")) {
3129 tier = _json["tier"];
3130 }
3131 }
3132
3133 core.Map toJson() {
3134 var _json = new core.Map();
3135 if (activationPolicy != null) {
3136 _json["activationPolicy"] = activationPolicy;
3137 }
3138 if (authorizedGaeApplications != null) {
3139 _json["authorizedGaeApplications"] = authorizedGaeApplications;
3140 }
3141 if (backupConfiguration != null) {
3142 _json["backupConfiguration"] = backupConfiguration.map((value) => (value). toJson()).toList();
3143 }
3144 if (databaseFlags != null) {
3145 _json["databaseFlags"] = databaseFlags.map((value) => (value).toJson()).to List();
3146 }
3147 if (databaseReplicationEnabled != null) {
3148 _json["databaseReplicationEnabled"] = databaseReplicationEnabled;
3149 }
3150 if (ipConfiguration != null) {
3151 _json["ipConfiguration"] = (ipConfiguration).toJson();
3152 }
3153 if (kind != null) {
3154 _json["kind"] = kind;
3155 }
3156 if (locationPreference != null) {
3157 _json["locationPreference"] = (locationPreference).toJson();
3158 }
3159 if (pricingPlan != null) {
3160 _json["pricingPlan"] = pricingPlan;
3161 }
3162 if (replicationType != null) {
3163 _json["replicationType"] = replicationType;
3164 }
3165 if (settingsVersion != null) {
3166 _json["settingsVersion"] = settingsVersion;
3167 }
3168 if (tier != null) {
3169 _json["tier"] = tier;
3170 }
3171 return _json;
3172 }
3173 }
3174
3175
3176 /** SslCerts Resource */
3177 class SslCert {
3178 /** PEM representation. */
3179 core.String cert;
3180
3181 /** Serial number, as extracted from the certificate. */
3182 core.String certSerialNumber;
3183
3184 /** User supplied name. Constrained to [a-zA-Z.-_ ]+. */
3185 core.String commonName;
3186
3187 /** Time when the certificate was created. */
3188 core.DateTime createTime;
3189
3190 /** Time when the certificate expires. */
3191 core.DateTime expirationTime;
3192
3193 /** Name of the database instance. */
3194 core.String instance;
3195
3196 /** This is always sql#sslCert. */
3197 core.String kind;
3198
3199 /** Sha1 Fingerprint. */
3200 core.String sha1Fingerprint;
3201
3202
3203 SslCert();
3204
3205 SslCert.fromJson(core.Map _json) {
3206 if (_json.containsKey("cert")) {
3207 cert = _json["cert"];
3208 }
3209 if (_json.containsKey("certSerialNumber")) {
3210 certSerialNumber = _json["certSerialNumber"];
3211 }
3212 if (_json.containsKey("commonName")) {
3213 commonName = _json["commonName"];
3214 }
3215 if (_json.containsKey("createTime")) {
3216 createTime = core.DateTime.parse(_json["createTime"]);
3217 }
3218 if (_json.containsKey("expirationTime")) {
3219 expirationTime = core.DateTime.parse(_json["expirationTime"]);
3220 }
3221 if (_json.containsKey("instance")) {
3222 instance = _json["instance"];
3223 }
3224 if (_json.containsKey("kind")) {
3225 kind = _json["kind"];
3226 }
3227 if (_json.containsKey("sha1Fingerprint")) {
3228 sha1Fingerprint = _json["sha1Fingerprint"];
3229 }
3230 }
3231
3232 core.Map toJson() {
3233 var _json = new core.Map();
3234 if (cert != null) {
3235 _json["cert"] = cert;
3236 }
3237 if (certSerialNumber != null) {
3238 _json["certSerialNumber"] = certSerialNumber;
3239 }
3240 if (commonName != null) {
3241 _json["commonName"] = commonName;
3242 }
3243 if (createTime != null) {
3244 _json["createTime"] = (createTime).toIso8601String();
3245 }
3246 if (expirationTime != null) {
3247 _json["expirationTime"] = (expirationTime).toIso8601String();
3248 }
3249 if (instance != null) {
3250 _json["instance"] = instance;
3251 }
3252 if (kind != null) {
3253 _json["kind"] = kind;
3254 }
3255 if (sha1Fingerprint != null) {
3256 _json["sha1Fingerprint"] = sha1Fingerprint;
3257 }
3258 return _json;
3259 }
3260 }
3261
3262
3263 /** SslCertDetail. */
3264 class SslCertDetail {
3265 /** The public information about the cert. */
3266 SslCert certInfo;
3267
3268 /**
3269 * The private key for the client cert, in pem format. Keep private in order
3270 * to protect your security.
3271 */
3272 core.String certPrivateKey;
3273
3274
3275 SslCertDetail();
3276
3277 SslCertDetail.fromJson(core.Map _json) {
3278 if (_json.containsKey("certInfo")) {
3279 certInfo = new SslCert.fromJson(_json["certInfo"]);
3280 }
3281 if (_json.containsKey("certPrivateKey")) {
3282 certPrivateKey = _json["certPrivateKey"];
3283 }
3284 }
3285
3286 core.Map toJson() {
3287 var _json = new core.Map();
3288 if (certInfo != null) {
3289 _json["certInfo"] = (certInfo).toJson();
3290 }
3291 if (certPrivateKey != null) {
3292 _json["certPrivateKey"] = certPrivateKey;
3293 }
3294 return _json;
3295 }
3296 }
3297
3298
3299 /** SslCert delete response. */
3300 class SslCertsDeleteResponse {
3301 /** This is always sql#sslCertsDelete. */
3302 core.String kind;
3303
3304 /**
3305 * An identifier that uniquely identifies the operation. You can use this
3306 * identifier to retrieve the Operations resource that has information about
3307 * the operation.
3308 */
3309 core.String operation;
3310
3311
3312 SslCertsDeleteResponse();
3313
3314 SslCertsDeleteResponse.fromJson(core.Map _json) {
3315 if (_json.containsKey("kind")) {
3316 kind = _json["kind"];
3317 }
3318 if (_json.containsKey("operation")) {
3319 operation = _json["operation"];
3320 }
3321 }
3322
3323 core.Map toJson() {
3324 var _json = new core.Map();
3325 if (kind != null) {
3326 _json["kind"] = kind;
3327 }
3328 if (operation != null) {
3329 _json["operation"] = operation;
3330 }
3331 return _json;
3332 }
3333 }
3334
3335
3336 /** SslCerts insert request. */
3337 class SslCertsInsertRequest {
3338 /**
3339 * User supplied name. Must be a distinct name from the other certificates for
3340 * this instance. New certificates will not be usable until the instance is
3341 * restarted.
3342 */
3343 core.String commonName;
3344
3345
3346 SslCertsInsertRequest();
3347
3348 SslCertsInsertRequest.fromJson(core.Map _json) {
3349 if (_json.containsKey("commonName")) {
3350 commonName = _json["commonName"];
3351 }
3352 }
3353
3354 core.Map toJson() {
3355 var _json = new core.Map();
3356 if (commonName != null) {
3357 _json["commonName"] = commonName;
3358 }
3359 return _json;
3360 }
3361 }
3362
3363
3364 /** SslCert insert response. */
3365 class SslCertsInsertResponse {
3366 /**
3367 * The new client certificate and private key. The new certificate will not
3368 * work until the instance is restarted.
3369 */
3370 SslCertDetail clientCert;
3371
3372 /** This is always sql#sslCertsInsert. */
3373 core.String kind;
3374
3375 /**
3376 * The server Certificate Authority's certificate. If this is missing you can
3377 * force a new one to be generated by calling resetSslConfig method on
3378 * instances resource..
3379 */
3380 SslCert serverCaCert;
3381
3382
3383 SslCertsInsertResponse();
3384
3385 SslCertsInsertResponse.fromJson(core.Map _json) {
3386 if (_json.containsKey("clientCert")) {
3387 clientCert = new SslCertDetail.fromJson(_json["clientCert"]);
3388 }
3389 if (_json.containsKey("kind")) {
3390 kind = _json["kind"];
3391 }
3392 if (_json.containsKey("serverCaCert")) {
3393 serverCaCert = new SslCert.fromJson(_json["serverCaCert"]);
3394 }
3395 }
3396
3397 core.Map toJson() {
3398 var _json = new core.Map();
3399 if (clientCert != null) {
3400 _json["clientCert"] = (clientCert).toJson();
3401 }
3402 if (kind != null) {
3403 _json["kind"] = kind;
3404 }
3405 if (serverCaCert != null) {
3406 _json["serverCaCert"] = (serverCaCert).toJson();
3407 }
3408 return _json;
3409 }
3410 }
3411
3412
3413 /** SslCerts list response. */
3414 class SslCertsListResponse {
3415 /** List of client certificates for the instance. */
3416 core.List<SslCert> items;
3417
3418 /** This is always sql#sslCertsList. */
3419 core.String kind;
3420
3421
3422 SslCertsListResponse();
3423
3424 SslCertsListResponse.fromJson(core.Map _json) {
3425 if (_json.containsKey("items")) {
3426 items = _json["items"].map((value) => new SslCert.fromJson(value)).toList( );
3427 }
3428 if (_json.containsKey("kind")) {
3429 kind = _json["kind"];
3430 }
3431 }
3432
3433 core.Map toJson() {
3434 var _json = new core.Map();
3435 if (items != null) {
3436 _json["items"] = items.map((value) => (value).toJson()).toList();
3437 }
3438 if (kind != null) {
3439 _json["kind"] = kind;
3440 }
3441 return _json;
3442 }
3443 }
3444
3445
3446 /** A Google Cloud SQL service tier resource. */
3447 class Tier {
3448 /** The maximum disk size of this tier in bytes. */
3449 core.String DiskQuota;
3450
3451 /** The maximum RAM usage of this tier in bytes. */
3452 core.String RAM;
3453
3454 /** This is always sql#tier. */
3455 core.String kind;
3456
3457 /**
3458 * The applicable regions for this tier. Can be us-east1, europe-west1, or
3459 * asia-east1.
3460 */
3461 core.List<core.String> region;
3462
3463 /**
3464 * An identifier for the service tier, for example D1, D2 etc. For related
3465 * information, see Pricing.
3466 */
3467 core.String tier;
3468
3469
3470 Tier();
3471
3472 Tier.fromJson(core.Map _json) {
3473 if (_json.containsKey("DiskQuota")) {
3474 DiskQuota = _json["DiskQuota"];
3475 }
3476 if (_json.containsKey("RAM")) {
3477 RAM = _json["RAM"];
3478 }
3479 if (_json.containsKey("kind")) {
3480 kind = _json["kind"];
3481 }
3482 if (_json.containsKey("region")) {
3483 region = _json["region"];
3484 }
3485 if (_json.containsKey("tier")) {
3486 tier = _json["tier"];
3487 }
3488 }
3489
3490 core.Map toJson() {
3491 var _json = new core.Map();
3492 if (DiskQuota != null) {
3493 _json["DiskQuota"] = DiskQuota;
3494 }
3495 if (RAM != null) {
3496 _json["RAM"] = RAM;
3497 }
3498 if (kind != null) {
3499 _json["kind"] = kind;
3500 }
3501 if (region != null) {
3502 _json["region"] = region;
3503 }
3504 if (tier != null) {
3505 _json["tier"] = tier;
3506 }
3507 return _json;
3508 }
3509 }
3510
3511
3512 /** Tiers list response. */
3513 class TiersListResponse {
3514 /** List of tiers. */
3515 core.List<Tier> items;
3516
3517 /** This is always sql#tiersList. */
3518 core.String kind;
3519
3520
3521 TiersListResponse();
3522
3523 TiersListResponse.fromJson(core.Map _json) {
3524 if (_json.containsKey("items")) {
3525 items = _json["items"].map((value) => new Tier.fromJson(value)).toList();
3526 }
3527 if (_json.containsKey("kind")) {
3528 kind = _json["kind"];
3529 }
3530 }
3531
3532 core.Map toJson() {
3533 var _json = new core.Map();
3534 if (items != null) {
3535 _json["items"] = items.map((value) => (value).toJson()).toList();
3536 }
3537 if (kind != null) {
3538 _json["kind"] = kind;
3539 }
3540 return _json;
3541 }
3542 }
3543
3544
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698