| 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 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1325 "POST", | 1325 "POST", |
| 1326 body: _body, | 1326 body: _body, |
| 1327 queryParams: _queryParams, | 1327 queryParams: _queryParams, |
| 1328 uploadOptions: _uploadOptions, | 1328 uploadOptions: _uploadOptions, |
| 1329 uploadMedia: _uploadMedia, | 1329 uploadMedia: _uploadMedia, |
| 1330 downloadOptions: _downloadOptions); | 1330 downloadOptions: _downloadOptions); |
| 1331 return _response.then((data) => new Operation.fromJson(data)); | 1331 return _response.then((data) => new Operation.fromJson(data)); |
| 1332 } | 1332 } |
| 1333 | 1333 |
| 1334 /** | 1334 /** |
| 1335 * Truncate MySQL general and slow query log tables |
| 1336 * |
| 1337 * [request] - The metadata request object. |
| 1338 * |
| 1339 * Request parameters: |
| 1340 * |
| 1341 * [project] - Project ID of the Cloud SQL project. |
| 1342 * |
| 1343 * [instance] - Cloud SQL instance ID. This does not include the project ID. |
| 1344 * |
| 1345 * Completes with a [Operation]. |
| 1346 * |
| 1347 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1348 * error. |
| 1349 * |
| 1350 * If the used [http.Client] completes with an error when making a REST call, |
| 1351 * this method will complete with the same error. |
| 1352 */ |
| 1353 async.Future<Operation> truncateLog(InstancesTruncateLogRequest request, core.
String project, core.String instance) { |
| 1354 var _url = null; |
| 1355 var _queryParams = new core.Map(); |
| 1356 var _uploadMedia = null; |
| 1357 var _uploadOptions = null; |
| 1358 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1359 var _body = null; |
| 1360 |
| 1361 if (request != null) { |
| 1362 _body = convert.JSON.encode((request).toJson()); |
| 1363 } |
| 1364 if (project == null) { |
| 1365 throw new core.ArgumentError("Parameter project is required."); |
| 1366 } |
| 1367 if (instance == null) { |
| 1368 throw new core.ArgumentError("Parameter instance is required."); |
| 1369 } |
| 1370 |
| 1371 _url = 'projects/' + commons.Escaper.ecapeVariable('$project') + '/instances
/' + commons.Escaper.ecapeVariable('$instance') + '/truncateLog'; |
| 1372 |
| 1373 var _response = _requester.request(_url, |
| 1374 "POST", |
| 1375 body: _body, |
| 1376 queryParams: _queryParams, |
| 1377 uploadOptions: _uploadOptions, |
| 1378 uploadMedia: _uploadMedia, |
| 1379 downloadOptions: _downloadOptions); |
| 1380 return _response.then((data) => new Operation.fromJson(data)); |
| 1381 } |
| 1382 |
| 1383 /** |
| 1335 * Updates settings of a Cloud SQL instance. Caution: This is not a partial | 1384 * Updates settings of a Cloud SQL instance. Caution: This is not a partial |
| 1336 * update, so you must include values for all the settings that you want to | 1385 * update, so you must include values for all the settings that you want to |
| 1337 * retain. For partial updates, use patch. | 1386 * retain. For partial updates, use patch. |
| 1338 * | 1387 * |
| 1339 * [request] - The metadata request object. | 1388 * [request] - The metadata request object. |
| 1340 * | 1389 * |
| 1341 * Request parameters: | 1390 * Request parameters: |
| 1342 * | 1391 * |
| 1343 * [project] - Project ID of the project that contains the instance. | 1392 * [project] - Project ID of the project that contains the instance. |
| 1344 * | 1393 * |
| (...skipping 2020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3365 | 3414 |
| 3366 core.Map toJson() { | 3415 core.Map toJson() { |
| 3367 var _json = new core.Map(); | 3416 var _json = new core.Map(); |
| 3368 if (restoreBackupContext != null) { | 3417 if (restoreBackupContext != null) { |
| 3369 _json["restoreBackupContext"] = (restoreBackupContext).toJson(); | 3418 _json["restoreBackupContext"] = (restoreBackupContext).toJson(); |
| 3370 } | 3419 } |
| 3371 return _json; | 3420 return _json; |
| 3372 } | 3421 } |
| 3373 } | 3422 } |
| 3374 | 3423 |
| 3424 /** Instance truncate log request. */ |
| 3425 class InstancesTruncateLogRequest { |
| 3426 /** Contains details about the truncate log operation. */ |
| 3427 TruncateLogContext truncateLogContext; |
| 3428 |
| 3429 InstancesTruncateLogRequest(); |
| 3430 |
| 3431 InstancesTruncateLogRequest.fromJson(core.Map _json) { |
| 3432 if (_json.containsKey("truncateLogContext")) { |
| 3433 truncateLogContext = new TruncateLogContext.fromJson(_json["truncateLogCon
text"]); |
| 3434 } |
| 3435 } |
| 3436 |
| 3437 core.Map toJson() { |
| 3438 var _json = new core.Map(); |
| 3439 if (truncateLogContext != null) { |
| 3440 _json["truncateLogContext"] = (truncateLogContext).toJson(); |
| 3441 } |
| 3442 return _json; |
| 3443 } |
| 3444 } |
| 3445 |
| 3375 /** IP Management configuration. */ | 3446 /** IP Management configuration. */ |
| 3376 class IpConfiguration { | 3447 class IpConfiguration { |
| 3377 /** | 3448 /** |
| 3378 * The list of external networks that are allowed to connect to the instance | 3449 * The list of external networks that are allowed to connect to the instance |
| 3379 * using the IP. In CIDR notation, also known as 'slash' notation (e.g. | 3450 * using the IP. In CIDR notation, also known as 'slash' notation (e.g. |
| 3380 * 192.168.100.0/24). | 3451 * 192.168.100.0/24). |
| 3381 */ | 3452 */ |
| 3382 core.List<AclEntry> authorizedNetworks; | 3453 core.List<AclEntry> authorizedNetworks; |
| 3383 /** Whether the instance should be assigned an IP address or not. */ | 3454 /** Whether the instance should be assigned an IP address or not. */ |
| 3384 core.bool ipv4Enabled; | 3455 core.bool ipv4Enabled; |
| (...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4612 if (items != null) { | 4683 if (items != null) { |
| 4613 _json["items"] = items.map((value) => (value).toJson()).toList(); | 4684 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 4614 } | 4685 } |
| 4615 if (kind != null) { | 4686 if (kind != null) { |
| 4616 _json["kind"] = kind; | 4687 _json["kind"] = kind; |
| 4617 } | 4688 } |
| 4618 return _json; | 4689 return _json; |
| 4619 } | 4690 } |
| 4620 } | 4691 } |
| 4621 | 4692 |
| 4693 /** Database Instance truncate log context. */ |
| 4694 class TruncateLogContext { |
| 4695 /** This is always sql#truncateLogContext. */ |
| 4696 core.String kind; |
| 4697 /** |
| 4698 * The type of log to truncate. Valid values are MYSQL_GENERAL_TABLE and |
| 4699 * MYSQL_SLOW_TABLE. |
| 4700 */ |
| 4701 core.String logType; |
| 4702 |
| 4703 TruncateLogContext(); |
| 4704 |
| 4705 TruncateLogContext.fromJson(core.Map _json) { |
| 4706 if (_json.containsKey("kind")) { |
| 4707 kind = _json["kind"]; |
| 4708 } |
| 4709 if (_json.containsKey("logType")) { |
| 4710 logType = _json["logType"]; |
| 4711 } |
| 4712 } |
| 4713 |
| 4714 core.Map toJson() { |
| 4715 var _json = new core.Map(); |
| 4716 if (kind != null) { |
| 4717 _json["kind"] = kind; |
| 4718 } |
| 4719 if (logType != null) { |
| 4720 _json["logType"] = logType; |
| 4721 } |
| 4722 return _json; |
| 4723 } |
| 4724 } |
| 4725 |
| 4622 /** A Cloud SQL user resource. */ | 4726 /** A Cloud SQL user resource. */ |
| 4623 class User { | 4727 class User { |
| 4624 /** HTTP 1.1 Entity tag for the resource. */ | 4728 /** HTTP 1.1 Entity tag for the resource. */ |
| 4625 core.String etag; | 4729 core.String etag; |
| 4626 /** | 4730 /** |
| 4627 * The host name from which the user can connect. For insert operations, host | 4731 * The host name from which the user can connect. For insert operations, host |
| 4628 * defaults to an empty string. For update operations, host is specified as | 4732 * defaults to an empty string. For update operations, host is specified as |
| 4629 * part of the request URL. The host name cannot be updated after insertion. | 4733 * part of the request URL. The host name cannot be updated after insertion. |
| 4630 */ | 4734 */ |
| 4631 core.String host; | 4735 core.String host; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4737 } | 4841 } |
| 4738 if (kind != null) { | 4842 if (kind != null) { |
| 4739 _json["kind"] = kind; | 4843 _json["kind"] = kind; |
| 4740 } | 4844 } |
| 4741 if (nextPageToken != null) { | 4845 if (nextPageToken != null) { |
| 4742 _json["nextPageToken"] = nextPageToken; | 4846 _json["nextPageToken"] = nextPageToken; |
| 4743 } | 4847 } |
| 4744 return _json; | 4848 return _json; |
| 4745 } | 4849 } |
| 4746 } | 4850 } |
| OLD | NEW |