| OLD | NEW |
| 1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 | 2 |
| 3 library googleapis_beta.sqladmin.v1beta4; | 3 library googleapis_beta.sqladmin.v1beta4; |
| 4 | 4 |
| 5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
| 8 | 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 final commons.ApiRequester _requester; | 573 final commons.ApiRequester _requester; |
| 574 | 574 |
| 575 FlagsResourceApi(commons.ApiRequester client) : | 575 FlagsResourceApi(commons.ApiRequester client) : |
| 576 _requester = client; | 576 _requester = client; |
| 577 | 577 |
| 578 /** | 578 /** |
| 579 * List all available database flags for Google Cloud SQL instances. | 579 * List all available database flags for Google Cloud SQL instances. |
| 580 * | 580 * |
| 581 * Request parameters: | 581 * Request parameters: |
| 582 * | 582 * |
| 583 * [databaseVersion] - Database version for flag retrieval. Flags are specific |
| 584 * to the database version. |
| 585 * |
| 583 * Completes with a [FlagsListResponse]. | 586 * Completes with a [FlagsListResponse]. |
| 584 * | 587 * |
| 585 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 588 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 586 * error. | 589 * error. |
| 587 * | 590 * |
| 588 * If the used [http.Client] completes with an error when making a REST call, | 591 * If the used [http.Client] completes with an error when making a REST call, |
| 589 * this method will complete with the same error. | 592 * this method will complete with the same error. |
| 590 */ | 593 */ |
| 591 async.Future<FlagsListResponse> list() { | 594 async.Future<FlagsListResponse> list({core.String databaseVersion}) { |
| 592 var _url = null; | 595 var _url = null; |
| 593 var _queryParams = new core.Map(); | 596 var _queryParams = new core.Map(); |
| 594 var _uploadMedia = null; | 597 var _uploadMedia = null; |
| 595 var _uploadOptions = null; | 598 var _uploadOptions = null; |
| 596 var _downloadOptions = commons.DownloadOptions.Metadata; | 599 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 597 var _body = null; | 600 var _body = null; |
| 598 | 601 |
| 602 if (databaseVersion != null) { |
| 603 _queryParams["databaseVersion"] = [databaseVersion]; |
| 604 } |
| 599 | 605 |
| 600 _url = 'flags'; | 606 _url = 'flags'; |
| 601 | 607 |
| 602 var _response = _requester.request(_url, | 608 var _response = _requester.request(_url, |
| 603 "GET", | 609 "GET", |
| 604 body: _body, | 610 body: _body, |
| 605 queryParams: _queryParams, | 611 queryParams: _queryParams, |
| 606 uploadOptions: _uploadOptions, | 612 uploadOptions: _uploadOptions, |
| 607 uploadMedia: _uploadMedia, | 613 uploadMedia: _uploadMedia, |
| 608 downloadOptions: _downloadOptions); | 614 downloadOptions: _downloadOptions); |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 956 | 962 |
| 957 /** | 963 /** |
| 958 * Lists instances under a given project in the alphabetical order of the | 964 * Lists instances under a given project in the alphabetical order of the |
| 959 * instance name. | 965 * instance name. |
| 960 * | 966 * |
| 961 * Request parameters: | 967 * Request parameters: |
| 962 * | 968 * |
| 963 * [project] - Project ID of the project for which to list Cloud SQL | 969 * [project] - Project ID of the project for which to list Cloud SQL |
| 964 * instances. | 970 * instances. |
| 965 * | 971 * |
| 972 * [filter] - A filter expression for filtering listed instances. |
| 973 * |
| 966 * [maxResults] - The maximum number of results to return per response. | 974 * [maxResults] - The maximum number of results to return per response. |
| 967 * | 975 * |
| 968 * [pageToken] - A previously-returned page token representing part of the | 976 * [pageToken] - A previously-returned page token representing part of the |
| 969 * larger set of results to view. | 977 * larger set of results to view. |
| 970 * | 978 * |
| 971 * Completes with a [InstancesListResponse]. | 979 * Completes with a [InstancesListResponse]. |
| 972 * | 980 * |
| 973 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 981 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 974 * error. | 982 * error. |
| 975 * | 983 * |
| 976 * If the used [http.Client] completes with an error when making a REST call, | 984 * If the used [http.Client] completes with an error when making a REST call, |
| 977 * this method will complete with the same error. | 985 * this method will complete with the same error. |
| 978 */ | 986 */ |
| 979 async.Future<InstancesListResponse> list(core.String project, {core.int maxRes
ults, core.String pageToken}) { | 987 async.Future<InstancesListResponse> list(core.String project, {core.String fil
ter, core.int maxResults, core.String pageToken}) { |
| 980 var _url = null; | 988 var _url = null; |
| 981 var _queryParams = new core.Map(); | 989 var _queryParams = new core.Map(); |
| 982 var _uploadMedia = null; | 990 var _uploadMedia = null; |
| 983 var _uploadOptions = null; | 991 var _uploadOptions = null; |
| 984 var _downloadOptions = commons.DownloadOptions.Metadata; | 992 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 985 var _body = null; | 993 var _body = null; |
| 986 | 994 |
| 987 if (project == null) { | 995 if (project == null) { |
| 988 throw new core.ArgumentError("Parameter project is required."); | 996 throw new core.ArgumentError("Parameter project is required."); |
| 989 } | 997 } |
| 998 if (filter != null) { |
| 999 _queryParams["filter"] = [filter]; |
| 1000 } |
| 990 if (maxResults != null) { | 1001 if (maxResults != null) { |
| 991 _queryParams["maxResults"] = ["${maxResults}"]; | 1002 _queryParams["maxResults"] = ["${maxResults}"]; |
| 992 } | 1003 } |
| 993 if (pageToken != null) { | 1004 if (pageToken != null) { |
| 994 _queryParams["pageToken"] = [pageToken]; | 1005 _queryParams["pageToken"] = [pageToken]; |
| 995 } | 1006 } |
| 996 | 1007 |
| 997 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances
'; | 1008 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances
'; |
| 998 | 1009 |
| 999 var _response = _requester.request(_url, | 1010 var _response = _requester.request(_url, |
| (...skipping 2527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3527 if (timeToRetire != null) { | 3538 if (timeToRetire != null) { |
| 3528 _json["timeToRetire"] = (timeToRetire).toIso8601String(); | 3539 _json["timeToRetire"] = (timeToRetire).toIso8601String(); |
| 3529 } | 3540 } |
| 3530 if (type != null) { | 3541 if (type != null) { |
| 3531 _json["type"] = type; | 3542 _json["type"] = type; |
| 3532 } | 3543 } |
| 3533 return _json; | 3544 return _json; |
| 3534 } | 3545 } |
| 3535 } | 3546 } |
| 3536 | 3547 |
| 3548 /** User defined labels for Cloud SQL instances. */ |
| 3549 class Labels { |
| 3550 /** The key of the label. */ |
| 3551 core.String key; |
| 3552 /** The value of the label. */ |
| 3553 core.String value; |
| 3554 |
| 3555 Labels(); |
| 3556 |
| 3557 Labels.fromJson(core.Map _json) { |
| 3558 if (_json.containsKey("key")) { |
| 3559 key = _json["key"]; |
| 3560 } |
| 3561 if (_json.containsKey("value")) { |
| 3562 value = _json["value"]; |
| 3563 } |
| 3564 } |
| 3565 |
| 3566 core.Map toJson() { |
| 3567 var _json = new core.Map(); |
| 3568 if (key != null) { |
| 3569 _json["key"] = key; |
| 3570 } |
| 3571 if (value != null) { |
| 3572 _json["value"] = value; |
| 3573 } |
| 3574 return _json; |
| 3575 } |
| 3576 } |
| 3577 |
| 3537 /** | 3578 /** |
| 3538 * Preferred location. This specifies where a Cloud SQL instance should | 3579 * Preferred location. This specifies where a Cloud SQL instance should |
| 3539 * preferably be located, either in a specific Compute Engine zone, or | 3580 * preferably be located, either in a specific Compute Engine zone, or |
| 3540 * co-located with an App Engine application. Note that if the preferred | 3581 * co-located with an App Engine application. Note that if the preferred |
| 3541 * location is not available, the instance will be located as close as possible | 3582 * location is not available, the instance will be located as close as possible |
| 3542 * within the region. Only one location may be specified. | 3583 * within the region. Only one location may be specified. |
| 3543 */ | 3584 */ |
| 3544 class LocationPreference { | 3585 class LocationPreference { |
| 3545 /** | 3586 /** |
| 3546 * The AppEngine application to follow, it must be in the same region as the | 3587 * The AppEngine application to follow, it must be in the same region as the |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4152 * when not in use. Instances with PER_USE pricing turn off after 15 minutes | 4193 * when not in use. Instances with PER_USE pricing turn off after 15 minutes |
| 4153 * of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours | 4194 * of inactivity. Instances with PER_PACKAGE pricing turn off after 12 hours |
| 4154 * of inactivity. | 4195 * of inactivity. |
| 4155 */ | 4196 */ |
| 4156 core.String activationPolicy; | 4197 core.String activationPolicy; |
| 4157 /** | 4198 /** |
| 4158 * The App Engine app IDs that can access this instance. This property is only | 4199 * The App Engine app IDs that can access this instance. This property is only |
| 4159 * applicable to First Generation instances. | 4200 * applicable to First Generation instances. |
| 4160 */ | 4201 */ |
| 4161 core.List<core.String> authorizedGaeApplications; | 4202 core.List<core.String> authorizedGaeApplications; |
| 4162 /** | 4203 /** Reserved for future use. */ |
| 4163 * The availability type. This can be one of the following. | |
| 4164 * ZONAL: A Cloud SQL instance that is zonally available. The instance is | |
| 4165 * bound to a single GCE zone and may be inaccessible during an outage for | |
| 4166 * that GCE zone. | |
| 4167 * REGIONAL: A Cloud SQL instance that is regionally available. The instance | |
| 4168 * is provisioned in multiple zones within a region and is able to provide | |
| 4169 * higher availability than an instance with a zonal availability type. | |
| 4170 */ | |
| 4171 core.String availabilityType; | 4204 core.String availabilityType; |
| 4172 /** The daily backup configuration for the instance. */ | 4205 /** The daily backup configuration for the instance. */ |
| 4173 BackupConfiguration backupConfiguration; | 4206 BackupConfiguration backupConfiguration; |
| 4174 /** | 4207 /** |
| 4175 * Configuration specific to read replica instances. Indicates whether | 4208 * Configuration specific to read replica instances. Indicates whether |
| 4176 * database flags for crash-safe replication are enabled. This property is | 4209 * database flags for crash-safe replication are enabled. This property is |
| 4177 * only applicable to First Generation instances. | 4210 * only applicable to First Generation instances. |
| 4178 */ | 4211 */ |
| 4179 core.bool crashSafeReplicationEnabled; | 4212 core.bool crashSafeReplicationEnabled; |
| 4180 /** | 4213 /** |
| (...skipping 14 matching lines...) Expand all Loading... |
| 4195 */ | 4228 */ |
| 4196 core.bool databaseReplicationEnabled; | 4229 core.bool databaseReplicationEnabled; |
| 4197 /** | 4230 /** |
| 4198 * The settings for IP Management. This allows to enable or disable the | 4231 * The settings for IP Management. This allows to enable or disable the |
| 4199 * instance IP and manage which external networks can connect to the instance. | 4232 * instance IP and manage which external networks can connect to the instance. |
| 4200 * The IPv4 address cannot be disabled for Second Generation instances. | 4233 * The IPv4 address cannot be disabled for Second Generation instances. |
| 4201 */ | 4234 */ |
| 4202 IpConfiguration ipConfiguration; | 4235 IpConfiguration ipConfiguration; |
| 4203 /** This is always sql#settings. */ | 4236 /** This is always sql#settings. */ |
| 4204 core.String kind; | 4237 core.String kind; |
| 4238 /** User defined labels. */ |
| 4239 core.List<Labels> labels; |
| 4205 /** | 4240 /** |
| 4206 * The location preference settings. This allows the instance to be located as | 4241 * The location preference settings. This allows the instance to be located as |
| 4207 * near as possible to either an App Engine app or GCE zone for better | 4242 * near as possible to either an App Engine app or GCE zone for better |
| 4208 * performance. App Engine co-location is only applicable to First Generation | 4243 * performance. App Engine co-location is only applicable to First Generation |
| 4209 * instances. | 4244 * instances. |
| 4210 */ | 4245 */ |
| 4211 LocationPreference locationPreference; | 4246 LocationPreference locationPreference; |
| 4212 /** | 4247 /** |
| 4213 * The maintenance window for this instance. This specifies when the instance | 4248 * The maintenance window for this instance. This specifies when the instance |
| 4214 * may be restarted for maintenance purposes. Applies only to Second | 4249 * may be restarted for maintenance purposes. Applies only to Second |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4279 } | 4314 } |
| 4280 if (_json.containsKey("databaseReplicationEnabled")) { | 4315 if (_json.containsKey("databaseReplicationEnabled")) { |
| 4281 databaseReplicationEnabled = _json["databaseReplicationEnabled"]; | 4316 databaseReplicationEnabled = _json["databaseReplicationEnabled"]; |
| 4282 } | 4317 } |
| 4283 if (_json.containsKey("ipConfiguration")) { | 4318 if (_json.containsKey("ipConfiguration")) { |
| 4284 ipConfiguration = new IpConfiguration.fromJson(_json["ipConfiguration"]); | 4319 ipConfiguration = new IpConfiguration.fromJson(_json["ipConfiguration"]); |
| 4285 } | 4320 } |
| 4286 if (_json.containsKey("kind")) { | 4321 if (_json.containsKey("kind")) { |
| 4287 kind = _json["kind"]; | 4322 kind = _json["kind"]; |
| 4288 } | 4323 } |
| 4324 if (_json.containsKey("labels")) { |
| 4325 labels = _json["labels"].map((value) => new Labels.fromJson(value)).toList
(); |
| 4326 } |
| 4289 if (_json.containsKey("locationPreference")) { | 4327 if (_json.containsKey("locationPreference")) { |
| 4290 locationPreference = new LocationPreference.fromJson(_json["locationPrefer
ence"]); | 4328 locationPreference = new LocationPreference.fromJson(_json["locationPrefer
ence"]); |
| 4291 } | 4329 } |
| 4292 if (_json.containsKey("maintenanceWindow")) { | 4330 if (_json.containsKey("maintenanceWindow")) { |
| 4293 maintenanceWindow = new MaintenanceWindow.fromJson(_json["maintenanceWindo
w"]); | 4331 maintenanceWindow = new MaintenanceWindow.fromJson(_json["maintenanceWindo
w"]); |
| 4294 } | 4332 } |
| 4295 if (_json.containsKey("pricingPlan")) { | 4333 if (_json.containsKey("pricingPlan")) { |
| 4296 pricingPlan = _json["pricingPlan"]; | 4334 pricingPlan = _json["pricingPlan"]; |
| 4297 } | 4335 } |
| 4298 if (_json.containsKey("replicationType")) { | 4336 if (_json.containsKey("replicationType")) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4340 } | 4378 } |
| 4341 if (databaseReplicationEnabled != null) { | 4379 if (databaseReplicationEnabled != null) { |
| 4342 _json["databaseReplicationEnabled"] = databaseReplicationEnabled; | 4380 _json["databaseReplicationEnabled"] = databaseReplicationEnabled; |
| 4343 } | 4381 } |
| 4344 if (ipConfiguration != null) { | 4382 if (ipConfiguration != null) { |
| 4345 _json["ipConfiguration"] = (ipConfiguration).toJson(); | 4383 _json["ipConfiguration"] = (ipConfiguration).toJson(); |
| 4346 } | 4384 } |
| 4347 if (kind != null) { | 4385 if (kind != null) { |
| 4348 _json["kind"] = kind; | 4386 _json["kind"] = kind; |
| 4349 } | 4387 } |
| 4388 if (labels != null) { |
| 4389 _json["labels"] = labels.map((value) => (value).toJson()).toList(); |
| 4390 } |
| 4350 if (locationPreference != null) { | 4391 if (locationPreference != null) { |
| 4351 _json["locationPreference"] = (locationPreference).toJson(); | 4392 _json["locationPreference"] = (locationPreference).toJson(); |
| 4352 } | 4393 } |
| 4353 if (maintenanceWindow != null) { | 4394 if (maintenanceWindow != null) { |
| 4354 _json["maintenanceWindow"] = (maintenanceWindow).toJson(); | 4395 _json["maintenanceWindow"] = (maintenanceWindow).toJson(); |
| 4355 } | 4396 } |
| 4356 if (pricingPlan != null) { | 4397 if (pricingPlan != null) { |
| 4357 _json["pricingPlan"] = pricingPlan; | 4398 _json["pricingPlan"] = pricingPlan; |
| 4358 } | 4399 } |
| 4359 if (replicationType != null) { | 4400 if (replicationType != null) { |
| (...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4869 } | 4910 } |
| 4870 if (kind != null) { | 4911 if (kind != null) { |
| 4871 _json["kind"] = kind; | 4912 _json["kind"] = kind; |
| 4872 } | 4913 } |
| 4873 if (nextPageToken != null) { | 4914 if (nextPageToken != null) { |
| 4874 _json["nextPageToken"] = nextPageToken; | 4915 _json["nextPageToken"] = nextPageToken; |
| 4875 } | 4916 } |
| 4876 return _json; | 4917 return _json; |
| 4877 } | 4918 } |
| 4878 } | 4919 } |
| OLD | NEW |