| Index: generated/googleapis/lib/compute/v1.dart
|
| diff --git a/generated/googleapis/lib/compute/v1.dart b/generated/googleapis/lib/compute/v1.dart
|
| index 217115dc383b22c03926b2e8c6812e8f827023f6..c039cb4341a36bff9f878dcbd8c2132d7c653d0d 100644
|
| --- a/generated/googleapis/lib/compute/v1.dart
|
| +++ b/generated/googleapis/lib/compute/v1.dart
|
| @@ -61,8 +61,8 @@ class ComputeApi {
|
| ZoneOperationsResourceApi get zoneOperations => new ZoneOperationsResourceApi(_requester);
|
| ZonesResourceApi get zones => new ZonesResourceApi(_requester);
|
|
|
| - ComputeApi(http.Client client) :
|
| - _requester = new common_internal.ApiRequester(client, "https://www.googleapis.com/", "compute/v1/projects/");
|
| + ComputeApi(http.Client client, {core.String rootUrl: "https://www.googleapis.com/", core.String servicePath: "compute/v1/projects/"}) :
|
| + _requester = new common_internal.ApiRequester(client, rootUrl, servicePath);
|
| }
|
|
|
|
|
| @@ -4393,6 +4393,114 @@ class InstancesResourceApi {
|
| return _response.then((data) => new Operation.fromJson(data));
|
| }
|
|
|
| + /**
|
| + * Starts an instance
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [project] - Name of the project scoping this request.
|
| + * Value must have pattern
|
| + * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))".
|
| + *
|
| + * [zone] - Name of the zone scoping this request.
|
| + * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
|
| + *
|
| + * [instance] - Name of the instance resource to start.
|
| + * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
|
| + *
|
| + * Completes with a [Operation].
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<Operation> start(core.String project, core.String zone, core.String instance) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (project == null) {
|
| + throw new core.ArgumentError("Parameter project is required.");
|
| + }
|
| + if (zone == null) {
|
| + throw new core.ArgumentError("Parameter zone is required.");
|
| + }
|
| + if (instance == null) {
|
| + throw new core.ArgumentError("Parameter instance is required.");
|
| + }
|
| +
|
| +
|
| + _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + common_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Escaper.ecapeVariable('$instance') + '/start';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new Operation.fromJson(data));
|
| + }
|
| +
|
| + /**
|
| + * Stops an instance
|
| + *
|
| + * Request parameters:
|
| + *
|
| + * [project] - Name of the project scoping this request.
|
| + * Value must have pattern
|
| + * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))".
|
| + *
|
| + * [zone] - Name of the zone scoping this request.
|
| + * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
|
| + *
|
| + * [instance] - Name of the instance resource to start.
|
| + * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?".
|
| + *
|
| + * Completes with a [Operation].
|
| + *
|
| + * Completes with a [common.ApiRequestError] if the API endpoint returned an
|
| + * error.
|
| + *
|
| + * If the used [http.Client] completes with an error when making a REST call,
|
| + * this method will complete with the same error.
|
| + */
|
| + async.Future<Operation> stop(core.String project, core.String zone, core.String instance) {
|
| + var _url = null;
|
| + var _queryParams = new core.Map();
|
| + var _uploadMedia = null;
|
| + var _uploadOptions = null;
|
| + var _downloadOptions = common.DownloadOptions.Metadata;
|
| + var _body = null;
|
| +
|
| + if (project == null) {
|
| + throw new core.ArgumentError("Parameter project is required.");
|
| + }
|
| + if (zone == null) {
|
| + throw new core.ArgumentError("Parameter zone is required.");
|
| + }
|
| + if (instance == null) {
|
| + throw new core.ArgumentError("Parameter instance is required.");
|
| + }
|
| +
|
| +
|
| + _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + common_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Escaper.ecapeVariable('$instance') + '/stop';
|
| +
|
| + var _response = _requester.request(_url,
|
| + "POST",
|
| + body: _body,
|
| + queryParams: _queryParams,
|
| + uploadOptions: _uploadOptions,
|
| + uploadMedia: _uploadMedia,
|
| + downloadOptions: _downloadOptions);
|
| + return _response.then((data) => new Operation.fromJson(data));
|
| + }
|
| +
|
| }
|
|
|
|
|
|
|