| OLD | NEW |
| 1 library googleapis_beta.autoscaler.v1beta2; | 1 library googleapis_beta.resourceviews.v1beta2; |
| 2 | 2 |
| 3 import "dart:core" as core; | 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; | 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
| 7 | 7 |
| 8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
| 9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
| 11 import '../common/common.dart' as common; | 11 import '../common/common.dart' as common; |
| 12 | 12 |
| 13 export '../common/common.dart' show ApiRequestError; | 13 export '../common/common.dart' show ApiRequestError; |
| 14 export '../common/common.dart' show DetailedApiRequestError; | 14 export '../common/common.dart' show DetailedApiRequestError; |
| 15 | 15 |
| 16 /** | 16 /** |
| 17 * The Google Compute Engine Autoscaler API provides autoscaling for groups of | 17 * The Resource View API allows users to create and manage logical sets of |
| 18 * Cloud VMs. | 18 * Google Compute Engine instances. |
| 19 */ | 19 */ |
| 20 class AutoscalerApi { | 20 class ResourceviewsApi { |
| 21 /** View and manage your data across Google Cloud Platform services */ |
| 22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
| 23 |
| 21 /** View and manage your Google Compute Engine resources */ | 24 /** View and manage your Google Compute Engine resources */ |
| 22 static const ComputeScope = "https://www.googleapis.com/auth/compute"; | 25 static const ComputeScope = "https://www.googleapis.com/auth/compute"; |
| 23 | 26 |
| 24 /** View your Google Compute Engine resources */ | 27 /** View your Google Compute Engine resources */ |
| 25 static const ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.r
eadonly"; | 28 static const ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.r
eadonly"; |
| 26 | 29 |
| 30 /** |
| 31 * View and manage your Google Cloud Platform management resources and |
| 32 * deployment status information |
| 33 */ |
| 34 static const NdevCloudmanScope = "https://www.googleapis.com/auth/ndev.cloudma
n"; |
| 35 |
| 36 /** |
| 37 * View your Google Cloud Platform management resources and deployment status |
| 38 * information |
| 39 */ |
| 40 static const NdevCloudmanReadonlyScope = "https://www.googleapis.com/auth/ndev
.cloudman.readonly"; |
| 41 |
| 27 | 42 |
| 28 final common_internal.ApiRequester _requester; | 43 final common_internal.ApiRequester _requester; |
| 29 | 44 |
| 30 AutoscalersResourceApi get autoscalers => new AutoscalersResourceApi(_requeste
r); | |
| 31 ZoneOperationsResourceApi get zoneOperations => new ZoneOperationsResourceApi(
_requester); | 45 ZoneOperationsResourceApi get zoneOperations => new ZoneOperationsResourceApi(
_requester); |
| 46 ZoneViewsResourceApi get zoneViews => new ZoneViewsResourceApi(_requester); |
| 32 | 47 |
| 33 AutoscalerApi(http.Client client) : | 48 ResourceviewsApi(http.Client client) : |
| 34 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "autoscaler/v1beta2/"); | 49 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "resourceviews/v1beta2/projects/"); |
| 35 } | 50 } |
| 36 | 51 |
| 37 | 52 |
| 38 /** Not documented yet. */ | 53 /** Not documented yet. */ |
| 39 class AutoscalersResourceApi { | 54 class ZoneOperationsResourceApi { |
| 40 final common_internal.ApiRequester _requester; | 55 final common_internal.ApiRequester _requester; |
| 41 | 56 |
| 42 AutoscalersResourceApi(common_internal.ApiRequester client) : | 57 ZoneOperationsResourceApi(common_internal.ApiRequester client) : |
| 43 _requester = client; | 58 _requester = client; |
| 44 | 59 |
| 45 /** | 60 /** |
| 46 * Deletes the specified Autoscaler resource. | 61 * Retrieves the specified zone-specific operation resource. |
| 47 * | 62 * |
| 48 * Request parameters: | 63 * Request parameters: |
| 49 * | 64 * |
| 50 * [project] - Project ID of Autoscaler resource. | 65 * [project] - Name of the project scoping this request. |
| 66 * Value must have pattern |
| 67 * "(?:(?:[-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])?))". |
| 51 * | 68 * |
| 52 * [zone] - Zone name of Autoscaler resource. | 69 * [zone] - Name of the zone scoping this request. |
| 70 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 53 * | 71 * |
| 54 * [autoscaler] - Name of the Autoscaler resource. | 72 * [operation] - Name of the operation resource to return. |
| 73 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 55 * | 74 * |
| 56 * Completes with a [Operation]. | 75 * Completes with a [Operation]. |
| 57 * | 76 * |
| 58 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 77 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 59 * error. | 78 * error. |
| 60 * | 79 * |
| 61 * If the used [http.Client] completes with an error when making a REST call, | 80 * If the used [http.Client] completes with an error when making a REST call, |
| 62 * this method will complete with the same error. | 81 * this method will complete with the same error. |
| 63 */ | 82 */ |
| 64 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing autoscaler) { | 83 async.Future<Operation> get(core.String project, core.String zone, core.String
operation) { |
| 65 var _url = null; | 84 var _url = null; |
| 66 var _queryParams = new core.Map(); | 85 var _queryParams = new core.Map(); |
| 67 var _uploadMedia = null; | 86 var _uploadMedia = null; |
| 68 var _uploadOptions = null; | 87 var _uploadOptions = null; |
| 69 var _downloadOptions = common.DownloadOptions.Metadata; | 88 var _downloadOptions = common.DownloadOptions.Metadata; |
| 70 var _body = null; | 89 var _body = null; |
| 71 | 90 |
| 72 if (project == null) { | 91 if (project == null) { |
| 73 throw new core.ArgumentError("Parameter project is required."); | 92 throw new core.ArgumentError("Parameter project is required."); |
| 74 } | 93 } |
| 75 if (zone == null) { | 94 if (zone == null) { |
| 76 throw new core.ArgumentError("Parameter zone is required."); | 95 throw new core.ArgumentError("Parameter zone is required."); |
| 77 } | 96 } |
| 78 if (autoscaler == null) { | 97 if (operation == null) { |
| 79 throw new core.ArgumentError("Parameter autoscaler is required."); | 98 throw new core.ArgumentError("Parameter operation is required."); |
| 80 } | 99 } |
| 81 | 100 |
| 82 | 101 |
| 83 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers/' + comm
on_internal.Escaper.ecapeVariable('$autoscaler'); | 102 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations/' + common_internal.Esc
aper.ecapeVariable('$operation'); |
| 84 | 103 |
| 85 var _response = _requester.request(_url, | 104 var _response = _requester.request(_url, |
| 86 "DELETE", | 105 "GET", |
| 87 body: _body, | 106 body: _body, |
| 88 queryParams: _queryParams, | 107 queryParams: _queryParams, |
| 89 uploadOptions: _uploadOptions, | 108 uploadOptions: _uploadOptions, |
| 90 uploadMedia: _uploadMedia, | 109 uploadMedia: _uploadMedia, |
| 91 downloadOptions: _downloadOptions); | 110 downloadOptions: _downloadOptions); |
| 92 return _response.then((data) => new Operation.fromJson(data)); | 111 return _response.then((data) => new Operation.fromJson(data)); |
| 93 } | 112 } |
| 94 | 113 |
| 95 /** | 114 /** |
| 96 * Gets the specified Autoscaler resource. | 115 * Retrieves the list of operation resources contained within the specified |
| 116 * zone. |
| 97 * | 117 * |
| 98 * Request parameters: | 118 * Request parameters: |
| 99 * | 119 * |
| 100 * [project] - Project ID of Autoscaler resource. | 120 * [project] - Name of the project scoping this request. |
| 121 * Value must have pattern |
| 122 * "(?:(?:[-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])?))". |
| 101 * | 123 * |
| 102 * [zone] - Zone name of Autoscaler resource. | 124 * [zone] - Name of the zone scoping this request. |
| 125 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 103 * | 126 * |
| 104 * [autoscaler] - Name of the Autoscaler resource. | 127 * [filter] - Optional. Filter expression for filtering listed resources. |
| 105 * | 128 * |
| 106 * Completes with a [Autoscaler]. | 129 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 130 * value is 500 and default value is 500. |
| 131 * Value must be between "0" and "500". |
| 132 * |
| 133 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 134 * by maxResults. Used to continue a previous list request. |
| 135 * |
| 136 * Completes with a [OperationList]. |
| 107 * | 137 * |
| 108 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 138 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 109 * error. | 139 * error. |
| 110 * | 140 * |
| 111 * If the used [http.Client] completes with an error when making a REST call, | 141 * If the used [http.Client] completes with an error when making a REST call, |
| 112 * this method will complete with the same error. | 142 * this method will complete with the same error. |
| 113 */ | 143 */ |
| 114 async.Future<Autoscaler> get(core.String project, core.String zone, core.Strin
g autoscaler) { | 144 async.Future<OperationList> list(core.String project, core.String zone, {core.
String filter, core.int maxResults, core.String pageToken}) { |
| 115 var _url = null; | 145 var _url = null; |
| 116 var _queryParams = new core.Map(); | 146 var _queryParams = new core.Map(); |
| 117 var _uploadMedia = null; | 147 var _uploadMedia = null; |
| 118 var _uploadOptions = null; | 148 var _uploadOptions = null; |
| 119 var _downloadOptions = common.DownloadOptions.Metadata; | 149 var _downloadOptions = common.DownloadOptions.Metadata; |
| 120 var _body = null; | 150 var _body = null; |
| 121 | 151 |
| 122 if (project == null) { | 152 if (project == null) { |
| 123 throw new core.ArgumentError("Parameter project is required."); | 153 throw new core.ArgumentError("Parameter project is required."); |
| 124 } | 154 } |
| 125 if (zone == null) { | 155 if (zone == null) { |
| 126 throw new core.ArgumentError("Parameter zone is required."); | 156 throw new core.ArgumentError("Parameter zone is required."); |
| 127 } | 157 } |
| 128 if (autoscaler == null) { | 158 if (filter != null) { |
| 129 throw new core.ArgumentError("Parameter autoscaler is required."); | 159 _queryParams["filter"] = [filter]; |
| 160 } |
| 161 if (maxResults != null) { |
| 162 _queryParams["maxResults"] = ["${maxResults}"]; |
| 163 } |
| 164 if (pageToken != null) { |
| 165 _queryParams["pageToken"] = [pageToken]; |
| 130 } | 166 } |
| 131 | 167 |
| 132 | 168 |
| 133 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers/' + comm
on_internal.Escaper.ecapeVariable('$autoscaler'); | 169 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations'; |
| 134 | 170 |
| 135 var _response = _requester.request(_url, | 171 var _response = _requester.request(_url, |
| 136 "GET", | 172 "GET", |
| 137 body: _body, | 173 body: _body, |
| 138 queryParams: _queryParams, | 174 queryParams: _queryParams, |
| 139 uploadOptions: _uploadOptions, | 175 uploadOptions: _uploadOptions, |
| 140 uploadMedia: _uploadMedia, | 176 uploadMedia: _uploadMedia, |
| 141 downloadOptions: _downloadOptions); | 177 downloadOptions: _downloadOptions); |
| 142 return _response.then((data) => new Autoscaler.fromJson(data)); | 178 return _response.then((data) => new OperationList.fromJson(data)); |
| 143 } | 179 } |
| 144 | 180 |
| 181 } |
| 182 |
| 183 |
| 184 /** Not documented yet. */ |
| 185 class ZoneViewsResourceApi { |
| 186 final common_internal.ApiRequester _requester; |
| 187 |
| 188 ZoneViewsResourceApi(common_internal.ApiRequester client) : |
| 189 _requester = client; |
| 190 |
| 145 /** | 191 /** |
| 146 * Adds new Autoscaler resource. | 192 * Add resources to the view. |
| 147 * | 193 * |
| 148 * [request] - The metadata request object. | 194 * [request] - The metadata request object. |
| 149 * | 195 * |
| 150 * Request parameters: | 196 * Request parameters: |
| 151 * | 197 * |
| 152 * [project] - Project ID of Autoscaler resource. | 198 * [project] - The project name of the resource view. |
| 153 * | 199 * |
| 154 * [zone] - Zone name of Autoscaler resource. | 200 * [zone] - The zone name of the resource view. |
| 201 * |
| 202 * [resourceView] - The name of the resource view. |
| 155 * | 203 * |
| 156 * Completes with a [Operation]. | 204 * Completes with a [Operation]. |
| 157 * | 205 * |
| 158 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 206 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 159 * error. | 207 * error. |
| 160 * | 208 * |
| 161 * If the used [http.Client] completes with an error when making a REST call, | 209 * If the used [http.Client] completes with an error when making a REST call, |
| 162 * this method will complete with the same error. | 210 * this method will complete with the same error. |
| 163 */ | 211 */ |
| 164 async.Future<Operation> insert(Autoscaler request, core.String project, core.S
tring zone) { | 212 async.Future<Operation> addResources(ZoneViewsAddResourcesRequest request, cor
e.String project, core.String zone, core.String resourceView) { |
| 165 var _url = null; | 213 var _url = null; |
| 166 var _queryParams = new core.Map(); | 214 var _queryParams = new core.Map(); |
| 167 var _uploadMedia = null; | 215 var _uploadMedia = null; |
| 168 var _uploadOptions = null; | 216 var _uploadOptions = null; |
| 169 var _downloadOptions = common.DownloadOptions.Metadata; | 217 var _downloadOptions = common.DownloadOptions.Metadata; |
| 170 var _body = null; | 218 var _body = null; |
| 171 | 219 |
| 172 if (request != null) { | 220 if (request != null) { |
| 173 _body = convert.JSON.encode((request).toJson()); | 221 _body = convert.JSON.encode((request).toJson()); |
| 174 } | 222 } |
| 175 if (project == null) { | 223 if (project == null) { |
| 176 throw new core.ArgumentError("Parameter project is required."); | 224 throw new core.ArgumentError("Parameter project is required."); |
| 177 } | 225 } |
| 178 if (zone == null) { | 226 if (zone == null) { |
| 179 throw new core.ArgumentError("Parameter zone is required."); | 227 throw new core.ArgumentError("Parameter zone is required."); |
| 180 } | 228 } |
| 229 if (resourceView == null) { |
| 230 throw new core.ArgumentError("Parameter resourceView is required."); |
| 231 } |
| 181 | 232 |
| 182 | 233 |
| 183 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers'; | 234 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView') + '/addResources'; |
| 184 | 235 |
| 185 var _response = _requester.request(_url, | 236 var _response = _requester.request(_url, |
| 186 "POST", | 237 "POST", |
| 187 body: _body, | 238 body: _body, |
| 188 queryParams: _queryParams, | 239 queryParams: _queryParams, |
| 189 uploadOptions: _uploadOptions, | 240 uploadOptions: _uploadOptions, |
| 190 uploadMedia: _uploadMedia, | 241 uploadMedia: _uploadMedia, |
| 191 downloadOptions: _downloadOptions); | 242 downloadOptions: _downloadOptions); |
| 192 return _response.then((data) => new Operation.fromJson(data)); | 243 return _response.then((data) => new Operation.fromJson(data)); |
| 193 } | 244 } |
| 194 | 245 |
| 195 /** | 246 /** |
| 196 * Lists all Autoscaler resources in this zone. | 247 * Delete a resource view. |
| 197 * | 248 * |
| 198 * Request parameters: | 249 * Request parameters: |
| 199 * | 250 * |
| 200 * [project] - Project ID of Autoscaler resource. | 251 * [project] - The project name of the resource view. |
| 201 * | 252 * |
| 202 * [zone] - Zone name of Autoscaler resource. | 253 * [zone] - The zone name of the resource view. |
| 203 * | 254 * |
| 204 * [filter] - null | 255 * [resourceView] - The name of the resource view. |
| 205 * | 256 * |
| 206 * [maxResults] - null | 257 * Completes with a [Operation]. |
| 207 * Value must be between "0" and "500". | |
| 208 * | |
| 209 * [pageToken] - null | |
| 210 * | |
| 211 * Completes with a [AutoscalerListResponse]. | |
| 212 * | 258 * |
| 213 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 259 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 214 * error. | 260 * error. |
| 215 * | 261 * |
| 216 * If the used [http.Client] completes with an error when making a REST call, | 262 * If the used [http.Client] completes with an error when making a REST call, |
| 217 * this method will complete with the same error. | 263 * this method will complete with the same error. |
| 218 */ | 264 */ |
| 219 async.Future<AutoscalerListResponse> list(core.String project, core.String zon
e, {core.String filter, core.int maxResults, core.String pageToken}) { | 265 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing resourceView) { |
| 220 var _url = null; | 266 var _url = null; |
| 221 var _queryParams = new core.Map(); | 267 var _queryParams = new core.Map(); |
| 222 var _uploadMedia = null; | 268 var _uploadMedia = null; |
| 223 var _uploadOptions = null; | 269 var _uploadOptions = null; |
| 224 var _downloadOptions = common.DownloadOptions.Metadata; | 270 var _downloadOptions = common.DownloadOptions.Metadata; |
| 225 var _body = null; | 271 var _body = null; |
| 226 | 272 |
| 227 if (project == null) { | 273 if (project == null) { |
| 228 throw new core.ArgumentError("Parameter project is required."); | 274 throw new core.ArgumentError("Parameter project is required."); |
| 229 } | 275 } |
| 230 if (zone == null) { | 276 if (zone == null) { |
| 231 throw new core.ArgumentError("Parameter zone is required."); | 277 throw new core.ArgumentError("Parameter zone is required."); |
| 232 } | 278 } |
| 233 if (filter != null) { | 279 if (resourceView == null) { |
| 234 _queryParams["filter"] = [filter]; | 280 throw new core.ArgumentError("Parameter resourceView is required."); |
| 235 } | |
| 236 if (maxResults != null) { | |
| 237 _queryParams["maxResults"] = ["${maxResults}"]; | |
| 238 } | |
| 239 if (pageToken != null) { | |
| 240 _queryParams["pageToken"] = [pageToken]; | |
| 241 } | 281 } |
| 242 | 282 |
| 243 | 283 |
| 244 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers'; | 284 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView'); |
| 245 | 285 |
| 246 var _response = _requester.request(_url, | 286 var _response = _requester.request(_url, |
| 247 "GET", | 287 "DELETE", |
| 248 body: _body, | 288 body: _body, |
| 249 queryParams: _queryParams, | 289 queryParams: _queryParams, |
| 250 uploadOptions: _uploadOptions, | 290 uploadOptions: _uploadOptions, |
| 251 uploadMedia: _uploadMedia, | 291 uploadMedia: _uploadMedia, |
| 252 downloadOptions: _downloadOptions); | 292 downloadOptions: _downloadOptions); |
| 253 return _response.then((data) => new AutoscalerListResponse.fromJson(data)); | 293 return _response.then((data) => new Operation.fromJson(data)); |
| 254 } | 294 } |
| 255 | 295 |
| 256 /** | 296 /** |
| 257 * Update the entire content of the Autoscaler resource. This method supports | 297 * Get the information of a zonal resource view. |
| 258 * patch semantics. | |
| 259 * | |
| 260 * [request] - The metadata request object. | |
| 261 * | 298 * |
| 262 * Request parameters: | 299 * Request parameters: |
| 263 * | 300 * |
| 264 * [project] - Project ID of Autoscaler resource. | 301 * [project] - The project name of the resource view. |
| 265 * | 302 * |
| 266 * [zone] - Zone name of Autoscaler resource. | 303 * [zone] - The zone name of the resource view. |
| 267 * | 304 * |
| 268 * [autoscaler] - Name of the Autoscaler resource. | 305 * [resourceView] - The name of the resource view. |
| 269 * | 306 * |
| 270 * Completes with a [Operation]. | 307 * Completes with a [ResourceView]. |
| 271 * | 308 * |
| 272 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 309 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 273 * error. | 310 * error. |
| 274 * | 311 * |
| 275 * If the used [http.Client] completes with an error when making a REST call, | 312 * If the used [http.Client] completes with an error when making a REST call, |
| 276 * this method will complete with the same error. | 313 * this method will complete with the same error. |
| 277 */ | 314 */ |
| 278 async.Future<Operation> patch(Autoscaler request, core.String project, core.St
ring zone, core.String autoscaler) { | 315 async.Future<ResourceView> get(core.String project, core.String zone, core.Str
ing resourceView) { |
| 279 var _url = null; | 316 var _url = null; |
| 280 var _queryParams = new core.Map(); | 317 var _queryParams = new core.Map(); |
| 281 var _uploadMedia = null; | 318 var _uploadMedia = null; |
| 282 var _uploadOptions = null; | 319 var _uploadOptions = null; |
| 283 var _downloadOptions = common.DownloadOptions.Metadata; | 320 var _downloadOptions = common.DownloadOptions.Metadata; |
| 284 var _body = null; | 321 var _body = null; |
| 285 | 322 |
| 286 if (request != null) { | |
| 287 _body = convert.JSON.encode((request).toJson()); | |
| 288 } | |
| 289 if (project == null) { | 323 if (project == null) { |
| 290 throw new core.ArgumentError("Parameter project is required."); | 324 throw new core.ArgumentError("Parameter project is required."); |
| 291 } | 325 } |
| 292 if (zone == null) { | 326 if (zone == null) { |
| 293 throw new core.ArgumentError("Parameter zone is required."); | 327 throw new core.ArgumentError("Parameter zone is required."); |
| 294 } | 328 } |
| 295 if (autoscaler == null) { | 329 if (resourceView == null) { |
| 296 throw new core.ArgumentError("Parameter autoscaler is required."); | 330 throw new core.ArgumentError("Parameter resourceView is required."); |
| 297 } | 331 } |
| 298 | 332 |
| 299 | 333 |
| 300 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers/' + comm
on_internal.Escaper.ecapeVariable('$autoscaler'); | 334 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView'); |
| 301 | 335 |
| 302 var _response = _requester.request(_url, | 336 var _response = _requester.request(_url, |
| 303 "PATCH", | 337 "GET", |
| 304 body: _body, | 338 body: _body, |
| 305 queryParams: _queryParams, | 339 queryParams: _queryParams, |
| 306 uploadOptions: _uploadOptions, | 340 uploadOptions: _uploadOptions, |
| 307 uploadMedia: _uploadMedia, | 341 uploadMedia: _uploadMedia, |
| 308 downloadOptions: _downloadOptions); | 342 downloadOptions: _downloadOptions); |
| 309 return _response.then((data) => new Operation.fromJson(data)); | 343 return _response.then((data) => new ResourceView.fromJson(data)); |
| 310 } | 344 } |
| 311 | 345 |
| 312 /** | 346 /** |
| 313 * Update the entire content of the Autoscaler resource. | 347 * Get the service information of a resource view or a resource. |
| 314 * | |
| 315 * [request] - The metadata request object. | |
| 316 * | 348 * |
| 317 * Request parameters: | 349 * Request parameters: |
| 318 * | 350 * |
| 319 * [project] - Project ID of Autoscaler resource. | 351 * [project] - The project name of the resource view. |
| 320 * | 352 * |
| 321 * [zone] - Zone name of Autoscaler resource. | 353 * [zone] - The zone name of the resource view. |
| 322 * | 354 * |
| 323 * [autoscaler] - Name of the Autoscaler resource. | 355 * [resourceView] - The name of the resource view. |
| 324 * | 356 * |
| 325 * Completes with a [Operation]. | 357 * [resourceName] - The name of the resource if user wants to get the service |
| 358 * information of the resource. |
| 359 * |
| 360 * Completes with a [ZoneViewsGetServiceResponse]. |
| 326 * | 361 * |
| 327 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 362 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 328 * error. | 363 * error. |
| 329 * | 364 * |
| 330 * If the used [http.Client] completes with an error when making a REST call, | 365 * If the used [http.Client] completes with an error when making a REST call, |
| 331 * this method will complete with the same error. | 366 * this method will complete with the same error. |
| 332 */ | 367 */ |
| 333 async.Future<Operation> update(Autoscaler request, core.String project, core.S
tring zone, core.String autoscaler) { | 368 async.Future<ZoneViewsGetServiceResponse> getService(core.String project, core
.String zone, core.String resourceView, {core.String resourceName}) { |
| 334 var _url = null; | 369 var _url = null; |
| 335 var _queryParams = new core.Map(); | 370 var _queryParams = new core.Map(); |
| 336 var _uploadMedia = null; | 371 var _uploadMedia = null; |
| 337 var _uploadOptions = null; | 372 var _uploadOptions = null; |
| 338 var _downloadOptions = common.DownloadOptions.Metadata; | 373 var _downloadOptions = common.DownloadOptions.Metadata; |
| 339 var _body = null; | 374 var _body = null; |
| 340 | 375 |
| 341 if (request != null) { | |
| 342 _body = convert.JSON.encode((request).toJson()); | |
| 343 } | |
| 344 if (project == null) { | 376 if (project == null) { |
| 345 throw new core.ArgumentError("Parameter project is required."); | 377 throw new core.ArgumentError("Parameter project is required."); |
| 346 } | 378 } |
| 347 if (zone == null) { | 379 if (zone == null) { |
| 348 throw new core.ArgumentError("Parameter zone is required."); | 380 throw new core.ArgumentError("Parameter zone is required."); |
| 349 } | 381 } |
| 350 if (autoscaler == null) { | 382 if (resourceView == null) { |
| 351 throw new core.ArgumentError("Parameter autoscaler is required."); | 383 throw new core.ArgumentError("Parameter resourceView is required."); |
| 384 } |
| 385 if (resourceName != null) { |
| 386 _queryParams["resourceName"] = [resourceName]; |
| 352 } | 387 } |
| 353 | 388 |
| 354 | 389 |
| 355 _url = 'projects/' + common_internal.Escaper.ecapeVariable('$project') + '/z
ones/' + common_internal.Escaper.ecapeVariable('$zone') + '/autoscalers/' + comm
on_internal.Escaper.ecapeVariable('$autoscaler'); | 390 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView') + '/getService'; |
| 356 | 391 |
| 357 var _response = _requester.request(_url, | 392 var _response = _requester.request(_url, |
| 358 "PUT", | 393 "POST", |
| 359 body: _body, | 394 body: _body, |
| 360 queryParams: _queryParams, | 395 queryParams: _queryParams, |
| 361 uploadOptions: _uploadOptions, | 396 uploadOptions: _uploadOptions, |
| 362 uploadMedia: _uploadMedia, | 397 uploadMedia: _uploadMedia, |
| 363 downloadOptions: _downloadOptions); | 398 downloadOptions: _downloadOptions); |
| 364 return _response.then((data) => new Operation.fromJson(data)); | 399 return _response.then((data) => new ZoneViewsGetServiceResponse.fromJson(dat
a)); |
| 365 } | 400 } |
| 366 | 401 |
| 367 } | |
| 368 | |
| 369 | |
| 370 /** Not documented yet. */ | |
| 371 class ZoneOperationsResourceApi { | |
| 372 final common_internal.ApiRequester _requester; | |
| 373 | |
| 374 ZoneOperationsResourceApi(common_internal.ApiRequester client) : | |
| 375 _requester = client; | |
| 376 | |
| 377 /** | 402 /** |
| 378 * Deletes the specified zone-specific operation resource. | 403 * Create a resource view. |
| 404 * |
| 405 * [request] - The metadata request object. |
| 379 * | 406 * |
| 380 * Request parameters: | 407 * Request parameters: |
| 381 * | 408 * |
| 382 * [project] - null | 409 * [project] - The project name of the resource view. |
| 383 * Value must have pattern | |
| 384 * "(?:(?:[-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])?))". | |
| 385 * | 410 * |
| 386 * [zone] - null | 411 * [zone] - The zone name of the resource view. |
| 387 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
| 388 * | 412 * |
| 389 * [operation] - null | 413 * Completes with a [Operation]. |
| 390 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
| 391 * | 414 * |
| 392 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 415 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 393 * error. | 416 * error. |
| 394 * | 417 * |
| 395 * If the used [http.Client] completes with an error when making a REST call, | 418 * If the used [http.Client] completes with an error when making a REST call, |
| 396 * this method will complete with the same error. | 419 * this method will complete with the same error. |
| 397 */ | 420 */ |
| 398 async.Future delete(core.String project, core.String zone, core.String operati
on) { | 421 async.Future<Operation> insert(ResourceView request, core.String project, core
.String zone) { |
| 399 var _url = null; | 422 var _url = null; |
| 400 var _queryParams = new core.Map(); | 423 var _queryParams = new core.Map(); |
| 401 var _uploadMedia = null; | 424 var _uploadMedia = null; |
| 402 var _uploadOptions = null; | 425 var _uploadOptions = null; |
| 403 var _downloadOptions = common.DownloadOptions.Metadata; | 426 var _downloadOptions = common.DownloadOptions.Metadata; |
| 404 var _body = null; | 427 var _body = null; |
| 405 | 428 |
| 429 if (request != null) { |
| 430 _body = convert.JSON.encode((request).toJson()); |
| 431 } |
| 406 if (project == null) { | 432 if (project == null) { |
| 407 throw new core.ArgumentError("Parameter project is required."); | 433 throw new core.ArgumentError("Parameter project is required."); |
| 408 } | 434 } |
| 409 if (zone == null) { | 435 if (zone == null) { |
| 410 throw new core.ArgumentError("Parameter zone is required."); | 436 throw new core.ArgumentError("Parameter zone is required."); |
| 411 } | 437 } |
| 412 if (operation == null) { | |
| 413 throw new core.ArgumentError("Parameter operation is required."); | |
| 414 } | |
| 415 | 438 |
| 416 _downloadOptions = null; | |
| 417 | 439 |
| 418 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations/' + common_internal.Esc
aper.ecapeVariable('$operation'); | 440 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews'; |
| 419 | 441 |
| 420 var _response = _requester.request(_url, | 442 var _response = _requester.request(_url, |
| 421 "DELETE", | 443 "POST", |
| 422 body: _body, | 444 body: _body, |
| 423 queryParams: _queryParams, | 445 queryParams: _queryParams, |
| 424 uploadOptions: _uploadOptions, | 446 uploadOptions: _uploadOptions, |
| 425 uploadMedia: _uploadMedia, | 447 uploadMedia: _uploadMedia, |
| 426 downloadOptions: _downloadOptions); | 448 downloadOptions: _downloadOptions); |
| 427 return _response.then((data) => null); | 449 return _response.then((data) => new Operation.fromJson(data)); |
| 428 } | 450 } |
| 429 | 451 |
| 430 /** | 452 /** |
| 431 * Retrieves the specified zone-specific operation resource. | 453 * List resource views. |
| 432 * | 454 * |
| 433 * Request parameters: | 455 * Request parameters: |
| 434 * | 456 * |
| 435 * [project] - null | 457 * [project] - The project name of the resource view. |
| 436 * Value must have pattern | |
| 437 * "(?:(?:[-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])?))". | |
| 438 * | 458 * |
| 439 * [zone] - null | 459 * [zone] - The zone name of the resource view. |
| 440 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
| 441 * | 460 * |
| 442 * [operation] - null | 461 * [maxResults] - Maximum count of results to be returned. Acceptable values |
| 443 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 462 * are 0 to 5000, inclusive. (Default: 5000) |
| 463 * Value must be between "0" and "5000". |
| 444 * | 464 * |
| 445 * Completes with a [Operation]. | 465 * [pageToken] - Specifies a nextPageToken returned by a previous list |
| 466 * request. This token can be used to request the next page of results from a |
| 467 * previous list request. |
| 468 * |
| 469 * Completes with a [ZoneViewsList]. |
| 446 * | 470 * |
| 447 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 471 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 448 * error. | 472 * error. |
| 449 * | 473 * |
| 450 * If the used [http.Client] completes with an error when making a REST call, | 474 * If the used [http.Client] completes with an error when making a REST call, |
| 451 * this method will complete with the same error. | 475 * this method will complete with the same error. |
| 452 */ | 476 */ |
| 453 async.Future<Operation> get(core.String project, core.String zone, core.String
operation) { | 477 async.Future<ZoneViewsList> list(core.String project, core.String zone, {core.
int maxResults, core.String pageToken}) { |
| 454 var _url = null; | 478 var _url = null; |
| 455 var _queryParams = new core.Map(); | 479 var _queryParams = new core.Map(); |
| 456 var _uploadMedia = null; | 480 var _uploadMedia = null; |
| 457 var _uploadOptions = null; | 481 var _uploadOptions = null; |
| 458 var _downloadOptions = common.DownloadOptions.Metadata; | 482 var _downloadOptions = common.DownloadOptions.Metadata; |
| 459 var _body = null; | 483 var _body = null; |
| 460 | 484 |
| 461 if (project == null) { | 485 if (project == null) { |
| 462 throw new core.ArgumentError("Parameter project is required."); | 486 throw new core.ArgumentError("Parameter project is required."); |
| 463 } | 487 } |
| 464 if (zone == null) { | 488 if (zone == null) { |
| 465 throw new core.ArgumentError("Parameter zone is required."); | 489 throw new core.ArgumentError("Parameter zone is required."); |
| 466 } | 490 } |
| 467 if (operation == null) { | 491 if (maxResults != null) { |
| 468 throw new core.ArgumentError("Parameter operation is required."); | 492 _queryParams["maxResults"] = ["${maxResults}"]; |
| 493 } |
| 494 if (pageToken != null) { |
| 495 _queryParams["pageToken"] = [pageToken]; |
| 469 } | 496 } |
| 470 | 497 |
| 471 | 498 |
| 472 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations/' + common_internal.Esc
aper.ecapeVariable('$operation'); | 499 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews'; |
| 473 | 500 |
| 474 var _response = _requester.request(_url, | 501 var _response = _requester.request(_url, |
| 475 "GET", | 502 "GET", |
| 476 body: _body, | 503 body: _body, |
| 477 queryParams: _queryParams, | 504 queryParams: _queryParams, |
| 478 uploadOptions: _uploadOptions, | 505 uploadOptions: _uploadOptions, |
| 479 uploadMedia: _uploadMedia, | 506 uploadMedia: _uploadMedia, |
| 480 downloadOptions: _downloadOptions); | 507 downloadOptions: _downloadOptions); |
| 481 return _response.then((data) => new Operation.fromJson(data)); | 508 return _response.then((data) => new ZoneViewsList.fromJson(data)); |
| 482 } | 509 } |
| 483 | 510 |
| 484 /** | 511 /** |
| 485 * Retrieves the list of operation resources contained within the specified | 512 * List the resources of the resource view. |
| 486 * zone. | |
| 487 * | 513 * |
| 488 * Request parameters: | 514 * Request parameters: |
| 489 * | 515 * |
| 490 * [project] - null | 516 * [project] - The project name of the resource view. |
| 491 * Value must have pattern | |
| 492 * "(?:(?:[-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])?))". | |
| 493 * | 517 * |
| 494 * [zone] - null | 518 * [zone] - The zone name of the resource view. |
| 495 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
| 496 * | 519 * |
| 497 * [filter] - null | 520 * [resourceView] - The name of the resource view. |
| 498 * | 521 * |
| 499 * [maxResults] - null | 522 * [format] - The requested format of the return value. It can be URL or |
| 500 * Value must be between "0" and "500". | 523 * URL_PORT. A JSON object will be included in the response based on the |
| 524 * format. The default format is NONE, which results in no JSON in the |
| 525 * response. |
| 526 * Possible string values are: |
| 527 * - "NONE" |
| 528 * - "URL" |
| 529 * - "URL_PORT" |
| 501 * | 530 * |
| 502 * [pageToken] - null | 531 * [listState] - The state of the instance to list. By default, it lists all |
| 532 * instances. |
| 533 * Possible string values are: |
| 534 * - "ALL" |
| 535 * - "RUNNING" |
| 503 * | 536 * |
| 504 * Completes with a [OperationList]. | 537 * [maxResults] - Maximum count of results to be returned. Acceptable values |
| 538 * are 0 to 5000, inclusive. (Default: 5000) |
| 539 * Value must be between "0" and "5000". |
| 540 * |
| 541 * [pageToken] - Specifies a nextPageToken returned by a previous list |
| 542 * request. This token can be used to request the next page of results from a |
| 543 * previous list request. |
| 544 * |
| 545 * [serviceName] - The service name to return in the response. It is optional |
| 546 * and if it is not set, all the service end points will be returned. |
| 547 * |
| 548 * Completes with a [ZoneViewsListResourcesResponse]. |
| 505 * | 549 * |
| 506 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 550 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 507 * error. | 551 * error. |
| 508 * | 552 * |
| 509 * If the used [http.Client] completes with an error when making a REST call, | 553 * If the used [http.Client] completes with an error when making a REST call, |
| 510 * this method will complete with the same error. | 554 * this method will complete with the same error. |
| 511 */ | 555 */ |
| 512 async.Future<OperationList> list(core.String project, core.String zone, {core.
String filter, core.int maxResults, core.String pageToken}) { | 556 async.Future<ZoneViewsListResourcesResponse> listResources(core.String project
, core.String zone, core.String resourceView, {core.String format, core.String l
istState, core.int maxResults, core.String pageToken, core.String serviceName})
{ |
| 513 var _url = null; | 557 var _url = null; |
| 514 var _queryParams = new core.Map(); | 558 var _queryParams = new core.Map(); |
| 515 var _uploadMedia = null; | 559 var _uploadMedia = null; |
| 516 var _uploadOptions = null; | 560 var _uploadOptions = null; |
| 517 var _downloadOptions = common.DownloadOptions.Metadata; | 561 var _downloadOptions = common.DownloadOptions.Metadata; |
| 518 var _body = null; | 562 var _body = null; |
| 519 | 563 |
| 520 if (project == null) { | 564 if (project == null) { |
| 521 throw new core.ArgumentError("Parameter project is required."); | 565 throw new core.ArgumentError("Parameter project is required."); |
| 522 } | 566 } |
| 523 if (zone == null) { | 567 if (zone == null) { |
| 524 throw new core.ArgumentError("Parameter zone is required."); | 568 throw new core.ArgumentError("Parameter zone is required."); |
| 525 } | 569 } |
| 526 if (filter != null) { | 570 if (resourceView == null) { |
| 527 _queryParams["filter"] = [filter]; | 571 throw new core.ArgumentError("Parameter resourceView is required."); |
| 572 } |
| 573 if (format != null) { |
| 574 _queryParams["format"] = [format]; |
| 575 } |
| 576 if (listState != null) { |
| 577 _queryParams["listState"] = [listState]; |
| 528 } | 578 } |
| 529 if (maxResults != null) { | 579 if (maxResults != null) { |
| 530 _queryParams["maxResults"] = ["${maxResults}"]; | 580 _queryParams["maxResults"] = ["${maxResults}"]; |
| 531 } | 581 } |
| 532 if (pageToken != null) { | 582 if (pageToken != null) { |
| 533 _queryParams["pageToken"] = [pageToken]; | 583 _queryParams["pageToken"] = [pageToken]; |
| 534 } | 584 } |
| 585 if (serviceName != null) { |
| 586 _queryParams["serviceName"] = [serviceName]; |
| 587 } |
| 535 | 588 |
| 536 | 589 |
| 537 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations'; | 590 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView') + '/resources'; |
| 538 | 591 |
| 539 var _response = _requester.request(_url, | 592 var _response = _requester.request(_url, |
| 540 "GET", | 593 "GET", |
| 541 body: _body, | 594 body: _body, |
| 542 queryParams: _queryParams, | 595 queryParams: _queryParams, |
| 543 uploadOptions: _uploadOptions, | 596 uploadOptions: _uploadOptions, |
| 544 uploadMedia: _uploadMedia, | 597 uploadMedia: _uploadMedia, |
| 545 downloadOptions: _downloadOptions); | 598 downloadOptions: _downloadOptions); |
| 546 return _response.then((data) => new OperationList.fromJson(data)); | 599 return _response.then((data) => new ZoneViewsListResourcesResponse.fromJson(
data)); |
| 600 } |
| 601 |
| 602 /** |
| 603 * Remove resources from the view. |
| 604 * |
| 605 * [request] - The metadata request object. |
| 606 * |
| 607 * Request parameters: |
| 608 * |
| 609 * [project] - The project name of the resource view. |
| 610 * |
| 611 * [zone] - The zone name of the resource view. |
| 612 * |
| 613 * [resourceView] - The name of the resource view. |
| 614 * |
| 615 * Completes with a [Operation]. |
| 616 * |
| 617 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 618 * error. |
| 619 * |
| 620 * If the used [http.Client] completes with an error when making a REST call, |
| 621 * this method will complete with the same error. |
| 622 */ |
| 623 async.Future<Operation> removeResources(ZoneViewsRemoveResourcesRequest reques
t, core.String project, core.String zone, core.String resourceView) { |
| 624 var _url = null; |
| 625 var _queryParams = new core.Map(); |
| 626 var _uploadMedia = null; |
| 627 var _uploadOptions = null; |
| 628 var _downloadOptions = common.DownloadOptions.Metadata; |
| 629 var _body = null; |
| 630 |
| 631 if (request != null) { |
| 632 _body = convert.JSON.encode((request).toJson()); |
| 633 } |
| 634 if (project == null) { |
| 635 throw new core.ArgumentError("Parameter project is required."); |
| 636 } |
| 637 if (zone == null) { |
| 638 throw new core.ArgumentError("Parameter zone is required."); |
| 639 } |
| 640 if (resourceView == null) { |
| 641 throw new core.ArgumentError("Parameter resourceView is required."); |
| 642 } |
| 643 |
| 644 |
| 645 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView') + '/removeResources'; |
| 646 |
| 647 var _response = _requester.request(_url, |
| 648 "POST", |
| 649 body: _body, |
| 650 queryParams: _queryParams, |
| 651 uploadOptions: _uploadOptions, |
| 652 uploadMedia: _uploadMedia, |
| 653 downloadOptions: _downloadOptions); |
| 654 return _response.then((data) => new Operation.fromJson(data)); |
| 655 } |
| 656 |
| 657 /** |
| 658 * Update the service information of a resource view or a resource. |
| 659 * |
| 660 * [request] - The metadata request object. |
| 661 * |
| 662 * Request parameters: |
| 663 * |
| 664 * [project] - The project name of the resource view. |
| 665 * |
| 666 * [zone] - The zone name of the resource view. |
| 667 * |
| 668 * [resourceView] - The name of the resource view. |
| 669 * |
| 670 * Completes with a [Operation]. |
| 671 * |
| 672 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 673 * error. |
| 674 * |
| 675 * If the used [http.Client] completes with an error when making a REST call, |
| 676 * this method will complete with the same error. |
| 677 */ |
| 678 async.Future<Operation> setService(ZoneViewsSetServiceRequest request, core.St
ring project, core.String zone, core.String resourceView) { |
| 679 var _url = null; |
| 680 var _queryParams = new core.Map(); |
| 681 var _uploadMedia = null; |
| 682 var _uploadOptions = null; |
| 683 var _downloadOptions = common.DownloadOptions.Metadata; |
| 684 var _body = null; |
| 685 |
| 686 if (request != null) { |
| 687 _body = convert.JSON.encode((request).toJson()); |
| 688 } |
| 689 if (project == null) { |
| 690 throw new core.ArgumentError("Parameter project is required."); |
| 691 } |
| 692 if (zone == null) { |
| 693 throw new core.ArgumentError("Parameter zone is required."); |
| 694 } |
| 695 if (resourceView == null) { |
| 696 throw new core.ArgumentError("Parameter resourceView is required."); |
| 697 } |
| 698 |
| 699 |
| 700 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/resourceViews/' + common_internal.
Escaper.ecapeVariable('$resourceView') + '/setService'; |
| 701 |
| 702 var _response = _requester.request(_url, |
| 703 "POST", |
| 704 body: _body, |
| 705 queryParams: _queryParams, |
| 706 uploadOptions: _uploadOptions, |
| 707 uploadMedia: _uploadMedia, |
| 708 downloadOptions: _downloadOptions); |
| 709 return _response.then((data) => new Operation.fromJson(data)); |
| 547 } | 710 } |
| 548 | 711 |
| 549 } | 712 } |
| 550 | 713 |
| 551 | 714 |
| 552 | 715 |
| 553 /** Cloud Autoscaler resource. */ | 716 /** The Label to be applied to the resource views. */ |
| 554 class Autoscaler { | 717 class Label { |
| 555 /** Configuration parameters for autoscaling algorithm. */ | 718 /** Key of the label. */ |
| 556 AutoscalingPolicy autoscalingPolicy; | 719 core.String key; |
| 557 | 720 |
| 558 /** [Output Only] Creation timestamp in RFC3339 text format. */ | 721 /** Value of the label. */ |
| 559 core.String creationTimestamp; | 722 core.String value; |
| 560 | |
| 561 /** | |
| 562 * An optional textual description of the resource provided by the client. | |
| 563 */ | |
| 564 core.String description; | |
| 565 | |
| 566 /** | |
| 567 * [Output Only] Unique identifier for the resource; defined by the server. | |
| 568 */ | |
| 569 core.String id; | |
| 570 | |
| 571 /** Type of resource. */ | |
| 572 core.String kind; | |
| 573 | |
| 574 /** Name of the Autoscaler resource. Must be unique per project and zone. */ | |
| 575 core.String name; | |
| 576 | |
| 577 /** [Output Only] A self-link to the Autoscaler configuration resource. */ | |
| 578 core.String selfLink; | |
| 579 | |
| 580 /** | |
| 581 * URL to the entity which will be autoscaled. Currently the only supported | |
| 582 * value is ReplicaPool?s URL. Note: it is illegal to specify multiple | |
| 583 * Autoscalers for the same target. | |
| 584 */ | |
| 585 core.String target; | |
| 586 | 723 |
| 587 | 724 |
| 588 Autoscaler(); | 725 Label(); |
| 589 | 726 |
| 590 Autoscaler.fromJson(core.Map _json) { | 727 Label.fromJson(core.Map _json) { |
| 591 if (_json.containsKey("autoscalingPolicy")) { | 728 if (_json.containsKey("key")) { |
| 592 autoscalingPolicy = new AutoscalingPolicy.fromJson(_json["autoscalingPolic
y"]); | 729 key = _json["key"]; |
| 593 } | 730 } |
| 594 if (_json.containsKey("creationTimestamp")) { | 731 if (_json.containsKey("value")) { |
| 595 creationTimestamp = _json["creationTimestamp"]; | 732 value = _json["value"]; |
| 596 } | |
| 597 if (_json.containsKey("description")) { | |
| 598 description = _json["description"]; | |
| 599 } | |
| 600 if (_json.containsKey("id")) { | |
| 601 id = _json["id"]; | |
| 602 } | |
| 603 if (_json.containsKey("kind")) { | |
| 604 kind = _json["kind"]; | |
| 605 } | |
| 606 if (_json.containsKey("name")) { | |
| 607 name = _json["name"]; | |
| 608 } | |
| 609 if (_json.containsKey("selfLink")) { | |
| 610 selfLink = _json["selfLink"]; | |
| 611 } | |
| 612 if (_json.containsKey("target")) { | |
| 613 target = _json["target"]; | |
| 614 } | 733 } |
| 615 } | 734 } |
| 616 | 735 |
| 617 core.Map toJson() { | 736 core.Map toJson() { |
| 618 var _json = new core.Map(); | 737 var _json = new core.Map(); |
| 619 if (autoscalingPolicy != null) { | 738 if (key != null) { |
| 620 _json["autoscalingPolicy"] = (autoscalingPolicy).toJson(); | 739 _json["key"] = key; |
| 621 } | 740 } |
| 622 if (creationTimestamp != null) { | 741 if (value != null) { |
| 623 _json["creationTimestamp"] = creationTimestamp; | 742 _json["value"] = value; |
| 624 } | |
| 625 if (description != null) { | |
| 626 _json["description"] = description; | |
| 627 } | |
| 628 if (id != null) { | |
| 629 _json["id"] = id; | |
| 630 } | |
| 631 if (kind != null) { | |
| 632 _json["kind"] = kind; | |
| 633 } | |
| 634 if (name != null) { | |
| 635 _json["name"] = name; | |
| 636 } | |
| 637 if (selfLink != null) { | |
| 638 _json["selfLink"] = selfLink; | |
| 639 } | |
| 640 if (target != null) { | |
| 641 _json["target"] = target; | |
| 642 } | 743 } |
| 643 return _json; | 744 return _json; |
| 644 } | 745 } |
| 645 } | 746 } |
| 646 | 747 |
| 647 | 748 |
| 648 /** Not documented yet. */ | 749 /** |
| 649 class AutoscalerListResponse { | 750 * The list response item that contains the resource and end points information. |
| 650 /** Autoscaler resources. */ | 751 */ |
| 651 core.List<Autoscaler> items; | 752 class ListResourceResponseItem { |
| 753 /** The list of service end points on the resource. */ |
| 754 core.Map<core.String, core.List<core.int>> endpoints; |
| 652 | 755 |
| 653 /** Type of resource. */ | 756 /** The full URL of the resource. */ |
| 654 core.String kind; | 757 core.String resource; |
| 655 | |
| 656 /** [Output only] A token used to continue a truncated list request. */ | |
| 657 core.String nextPageToken; | |
| 658 | 758 |
| 659 | 759 |
| 660 AutoscalerListResponse(); | 760 ListResourceResponseItem(); |
| 661 | 761 |
| 662 AutoscalerListResponse.fromJson(core.Map _json) { | 762 ListResourceResponseItem.fromJson(core.Map _json) { |
| 663 if (_json.containsKey("items")) { | 763 if (_json.containsKey("endpoints")) { |
| 664 items = _json["items"].map((value) => new Autoscaler.fromJson(value)).toLi
st(); | 764 endpoints = _json["endpoints"]; |
| 665 } | 765 } |
| 666 if (_json.containsKey("kind")) { | 766 if (_json.containsKey("resource")) { |
| 667 kind = _json["kind"]; | 767 resource = _json["resource"]; |
| 668 } | |
| 669 if (_json.containsKey("nextPageToken")) { | |
| 670 nextPageToken = _json["nextPageToken"]; | |
| 671 } | 768 } |
| 672 } | 769 } |
| 673 | 770 |
| 674 core.Map toJson() { | 771 core.Map toJson() { |
| 675 var _json = new core.Map(); | 772 var _json = new core.Map(); |
| 676 if (items != null) { | 773 if (endpoints != null) { |
| 677 _json["items"] = items.map((value) => (value).toJson()).toList(); | 774 _json["endpoints"] = endpoints; |
| 678 } | 775 } |
| 679 if (kind != null) { | 776 if (resource != null) { |
| 680 _json["kind"] = kind; | 777 _json["resource"] = resource; |
| 681 } | |
| 682 if (nextPageToken != null) { | |
| 683 _json["nextPageToken"] = nextPageToken; | |
| 684 } | 778 } |
| 685 return _json; | 779 return _json; |
| 686 } | 780 } |
| 687 } | |
| 688 | |
| 689 | |
| 690 /** Cloud Autoscaler policy. */ | |
| 691 class AutoscalingPolicy { | |
| 692 /** | |
| 693 * The number of seconds that the Autoscaler should wait between two | |
| 694 * succeeding changes to the number of virtual machines. You should define an | |
| 695 * interval that is at least as long as the initialization time of a virtual | |
| 696 * machine and the time it may take for replica pool to create the virtual | |
| 697 * machine. The default is 60 seconds. | |
| 698 */ | |
| 699 core.int coolDownPeriodSec; | |
| 700 | |
| 701 /** | |
| 702 * Exactly one utilization policy should be provided. Configuration parameters | |
| 703 * of CPU based autoscaling policy. | |
| 704 */ | |
| 705 AutoscalingPolicyCpuUtilization cpuUtilization; | |
| 706 | |
| 707 /** Configuration parameters of autoscaling based on custom metric. */ | |
| 708 core.List<AutoscalingPolicyCustomMetricUtilization> customMetricUtilizations; | |
| 709 | |
| 710 /** Configuration parameters of autoscaling based on load balancer. */ | |
| 711 AutoscalingPolicyLoadBalancingUtilization loadBalancingUtilization; | |
| 712 | |
| 713 /** The maximum number of replicas that the Autoscaler can scale up to. */ | |
| 714 core.int maxNumReplicas; | |
| 715 | |
| 716 /** The minimum number of replicas that the Autoscaler can scale down to. */ | |
| 717 core.int minNumReplicas; | |
| 718 | |
| 719 | |
| 720 AutoscalingPolicy(); | |
| 721 | |
| 722 AutoscalingPolicy.fromJson(core.Map _json) { | |
| 723 if (_json.containsKey("coolDownPeriodSec")) { | |
| 724 coolDownPeriodSec = _json["coolDownPeriodSec"]; | |
| 725 } | |
| 726 if (_json.containsKey("cpuUtilization")) { | |
| 727 cpuUtilization = new AutoscalingPolicyCpuUtilization.fromJson(_json["cpuUt
ilization"]); | |
| 728 } | |
| 729 if (_json.containsKey("customMetricUtilizations")) { | |
| 730 customMetricUtilizations = _json["customMetricUtilizations"].map((value) =
> new AutoscalingPolicyCustomMetricUtilization.fromJson(value)).toList(); | |
| 731 } | |
| 732 if (_json.containsKey("loadBalancingUtilization")) { | |
| 733 loadBalancingUtilization = new AutoscalingPolicyLoadBalancingUtilization.f
romJson(_json["loadBalancingUtilization"]); | |
| 734 } | |
| 735 if (_json.containsKey("maxNumReplicas")) { | |
| 736 maxNumReplicas = _json["maxNumReplicas"]; | |
| 737 } | |
| 738 if (_json.containsKey("minNumReplicas")) { | |
| 739 minNumReplicas = _json["minNumReplicas"]; | |
| 740 } | |
| 741 } | |
| 742 | |
| 743 core.Map toJson() { | |
| 744 var _json = new core.Map(); | |
| 745 if (coolDownPeriodSec != null) { | |
| 746 _json["coolDownPeriodSec"] = coolDownPeriodSec; | |
| 747 } | |
| 748 if (cpuUtilization != null) { | |
| 749 _json["cpuUtilization"] = (cpuUtilization).toJson(); | |
| 750 } | |
| 751 if (customMetricUtilizations != null) { | |
| 752 _json["customMetricUtilizations"] = customMetricUtilizations.map((value) =
> (value).toJson()).toList(); | |
| 753 } | |
| 754 if (loadBalancingUtilization != null) { | |
| 755 _json["loadBalancingUtilization"] = (loadBalancingUtilization).toJson(); | |
| 756 } | |
| 757 if (maxNumReplicas != null) { | |
| 758 _json["maxNumReplicas"] = maxNumReplicas; | |
| 759 } | |
| 760 if (minNumReplicas != null) { | |
| 761 _json["minNumReplicas"] = minNumReplicas; | |
| 762 } | |
| 763 return _json; | |
| 764 } | |
| 765 } | |
| 766 | |
| 767 | |
| 768 /** CPU utilization policy. */ | |
| 769 class AutoscalingPolicyCpuUtilization { | |
| 770 /** | |
| 771 * The target utilization that the Autoscaler should maintain. It is | |
| 772 * represented as a fraction of used cores. For example: 6 cores used in | |
| 773 * 8-core VM are represented here as 0.75. Must be a float value between (0, | |
| 774 * 1]. If not defined, the default is 0.8. | |
| 775 */ | |
| 776 core.double utilizationTarget; | |
| 777 | |
| 778 | |
| 779 AutoscalingPolicyCpuUtilization(); | |
| 780 | |
| 781 AutoscalingPolicyCpuUtilization.fromJson(core.Map _json) { | |
| 782 if (_json.containsKey("utilizationTarget")) { | |
| 783 utilizationTarget = _json["utilizationTarget"]; | |
| 784 } | |
| 785 } | |
| 786 | |
| 787 core.Map toJson() { | |
| 788 var _json = new core.Map(); | |
| 789 if (utilizationTarget != null) { | |
| 790 _json["utilizationTarget"] = utilizationTarget; | |
| 791 } | |
| 792 return _json; | |
| 793 } | |
| 794 } | |
| 795 | |
| 796 | |
| 797 /** Custom utilization metric policy. */ | |
| 798 class AutoscalingPolicyCustomMetricUtilization { | |
| 799 /** | |
| 800 * Identifier of the metric. It should be a Cloud Monitoring metric. The | |
| 801 * metric can not have negative values. The metric should be an utilization | |
| 802 * metric (increasing number of VMs handling requests x times should reduce | |
| 803 * average value of the metric roughly x times). For example you could use: | |
| 804 * compute.googleapis.com/instance/network/received_bytes_count. | |
| 805 */ | |
| 806 core.String metric; | |
| 807 | |
| 808 /** | |
| 809 * Target value of the metric which Autoscaler should maintain. Must be a | |
| 810 * positive value. | |
| 811 */ | |
| 812 core.double utilizationTarget; | |
| 813 | |
| 814 /** Defines type in which utilization_target is expressed. */ | |
| 815 core.String utilizationTargetType; | |
| 816 | |
| 817 | |
| 818 AutoscalingPolicyCustomMetricUtilization(); | |
| 819 | |
| 820 AutoscalingPolicyCustomMetricUtilization.fromJson(core.Map _json) { | |
| 821 if (_json.containsKey("metric")) { | |
| 822 metric = _json["metric"]; | |
| 823 } | |
| 824 if (_json.containsKey("utilizationTarget")) { | |
| 825 utilizationTarget = _json["utilizationTarget"]; | |
| 826 } | |
| 827 if (_json.containsKey("utilizationTargetType")) { | |
| 828 utilizationTargetType = _json["utilizationTargetType"]; | |
| 829 } | |
| 830 } | |
| 831 | |
| 832 core.Map toJson() { | |
| 833 var _json = new core.Map(); | |
| 834 if (metric != null) { | |
| 835 _json["metric"] = metric; | |
| 836 } | |
| 837 if (utilizationTarget != null) { | |
| 838 _json["utilizationTarget"] = utilizationTarget; | |
| 839 } | |
| 840 if (utilizationTargetType != null) { | |
| 841 _json["utilizationTargetType"] = utilizationTargetType; | |
| 842 } | |
| 843 return _json; | |
| 844 } | |
| 845 } | |
| 846 | |
| 847 | |
| 848 /** Load balancing utilization policy. */ | |
| 849 class AutoscalingPolicyLoadBalancingUtilization { | |
| 850 /** | |
| 851 * Fraction of backend capacity utilization (set in HTTP load balancing | |
| 852 * configuration) that Autoscaler should maintain. Must be a positive float | |
| 853 * value. If not defined, the default is 0.8. For example if your | |
| 854 * maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set | |
| 855 * at 10 and you would like to keep number of instances such that each | |
| 856 * instance receives 7 QPS on average, set this to 0.7. | |
| 857 */ | |
| 858 core.double utilizationTarget; | |
| 859 | |
| 860 | |
| 861 AutoscalingPolicyLoadBalancingUtilization(); | |
| 862 | |
| 863 AutoscalingPolicyLoadBalancingUtilization.fromJson(core.Map _json) { | |
| 864 if (_json.containsKey("utilizationTarget")) { | |
| 865 utilizationTarget = _json["utilizationTarget"]; | |
| 866 } | |
| 867 } | |
| 868 | |
| 869 core.Map toJson() { | |
| 870 var _json = new core.Map(); | |
| 871 if (utilizationTarget != null) { | |
| 872 _json["utilizationTarget"] = utilizationTarget; | |
| 873 } | |
| 874 return _json; | |
| 875 } | |
| 876 } | 781 } |
| 877 | 782 |
| 878 | 783 |
| 879 /** Not documented yet. */ | 784 /** Not documented yet. */ |
| 880 class OperationErrorErrors { | 785 class OperationErrorErrors { |
| 881 /** Not documented yet. */ | 786 /** [Output Only] The error type identifier for this error. */ |
| 882 core.String code; | 787 core.String code; |
| 883 | 788 |
| 884 /** Not documented yet. */ | 789 /** |
| 790 * [Output Only] Indicates the field in the request which caused the error. |
| 791 * This property is optional. |
| 792 */ |
| 885 core.String location; | 793 core.String location; |
| 886 | 794 |
| 887 /** Not documented yet. */ | 795 /** [Output Only] An optional, human-readable error message. */ |
| 888 core.String message; | 796 core.String message; |
| 889 | 797 |
| 890 | 798 |
| 891 OperationErrorErrors(); | 799 OperationErrorErrors(); |
| 892 | 800 |
| 893 OperationErrorErrors.fromJson(core.Map _json) { | 801 OperationErrorErrors.fromJson(core.Map _json) { |
| 894 if (_json.containsKey("code")) { | 802 if (_json.containsKey("code")) { |
| 895 code = _json["code"]; | 803 code = _json["code"]; |
| 896 } | 804 } |
| 897 if (_json.containsKey("location")) { | 805 if (_json.containsKey("location")) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 911 _json["location"] = location; | 819 _json["location"] = location; |
| 912 } | 820 } |
| 913 if (message != null) { | 821 if (message != null) { |
| 914 _json["message"] = message; | 822 _json["message"] = message; |
| 915 } | 823 } |
| 916 return _json; | 824 return _json; |
| 917 } | 825 } |
| 918 } | 826 } |
| 919 | 827 |
| 920 | 828 |
| 921 /** Not documented yet. */ | 829 /** |
| 830 * [Output Only] If errors occurred during processing of this operation, this |
| 831 * field will be populated. |
| 832 */ |
| 922 class OperationError { | 833 class OperationError { |
| 923 /** Not documented yet. */ | 834 /** |
| 835 * [Output Only] The array of errors encountered while processing this |
| 836 * operation. |
| 837 */ |
| 924 core.List<OperationErrorErrors> errors; | 838 core.List<OperationErrorErrors> errors; |
| 925 | 839 |
| 926 | 840 |
| 927 OperationError(); | 841 OperationError(); |
| 928 | 842 |
| 929 OperationError.fromJson(core.Map _json) { | 843 OperationError.fromJson(core.Map _json) { |
| 930 if (_json.containsKey("errors")) { | 844 if (_json.containsKey("errors")) { |
| 931 errors = _json["errors"].map((value) => new OperationErrorErrors.fromJson(
value)).toList(); | 845 errors = _json["errors"].map((value) => new OperationErrorErrors.fromJson(
value)).toList(); |
| 932 } | 846 } |
| 933 } | 847 } |
| 934 | 848 |
| 935 core.Map toJson() { | 849 core.Map toJson() { |
| 936 var _json = new core.Map(); | 850 var _json = new core.Map(); |
| 937 if (errors != null) { | 851 if (errors != null) { |
| 938 _json["errors"] = errors.map((value) => (value).toJson()).toList(); | 852 _json["errors"] = errors.map((value) => (value).toJson()).toList(); |
| 939 } | 853 } |
| 940 return _json; | 854 return _json; |
| 941 } | 855 } |
| 942 } | 856 } |
| 943 | 857 |
| 944 | 858 |
| 945 /** Not documented yet. */ | 859 /** Not documented yet. */ |
| 946 class OperationWarningsData { | 860 class OperationWarningsData { |
| 947 /** Not documented yet. */ | 861 /** [Output Only] Metadata key for this warning. */ |
| 948 core.String key; | 862 core.String key; |
| 949 | 863 |
| 950 /** Not documented yet. */ | 864 /** [Output Only] Metadata value for this warning. */ |
| 951 core.String value; | 865 core.String value; |
| 952 | 866 |
| 953 | 867 |
| 954 OperationWarningsData(); | 868 OperationWarningsData(); |
| 955 | 869 |
| 956 OperationWarningsData.fromJson(core.Map _json) { | 870 OperationWarningsData.fromJson(core.Map _json) { |
| 957 if (_json.containsKey("key")) { | 871 if (_json.containsKey("key")) { |
| 958 key = _json["key"]; | 872 key = _json["key"]; |
| 959 } | 873 } |
| 960 if (_json.containsKey("value")) { | 874 if (_json.containsKey("value")) { |
| 961 value = _json["value"]; | 875 value = _json["value"]; |
| 962 } | 876 } |
| 963 } | 877 } |
| 964 | 878 |
| 965 core.Map toJson() { | 879 core.Map toJson() { |
| 966 var _json = new core.Map(); | 880 var _json = new core.Map(); |
| 967 if (key != null) { | 881 if (key != null) { |
| 968 _json["key"] = key; | 882 _json["key"] = key; |
| 969 } | 883 } |
| 970 if (value != null) { | 884 if (value != null) { |
| 971 _json["value"] = value; | 885 _json["value"] = value; |
| 972 } | 886 } |
| 973 return _json; | 887 return _json; |
| 974 } | 888 } |
| 975 } | 889 } |
| 976 | 890 |
| 977 | 891 |
| 978 /** Not documented yet. */ | 892 /** Not documented yet. */ |
| 979 class OperationWarnings { | 893 class OperationWarnings { |
| 980 /** Not documented yet. */ | 894 /** [Output only] The warning type identifier for this warning. */ |
| 981 core.String code; | 895 core.String code; |
| 982 | 896 |
| 983 /** Not documented yet. */ | 897 /** [Output only] Metadata for this warning in key:value format. */ |
| 984 core.List<OperationWarningsData> data; | 898 core.List<OperationWarningsData> data; |
| 985 | 899 |
| 986 /** Not documented yet. */ | 900 /** [Output only] Optional human-readable details for this warning. */ |
| 987 core.String message; | 901 core.String message; |
| 988 | 902 |
| 989 | 903 |
| 990 OperationWarnings(); | 904 OperationWarnings(); |
| 991 | 905 |
| 992 OperationWarnings.fromJson(core.Map _json) { | 906 OperationWarnings.fromJson(core.Map _json) { |
| 993 if (_json.containsKey("code")) { | 907 if (_json.containsKey("code")) { |
| 994 code = _json["code"]; | 908 code = _json["code"]; |
| 995 } | 909 } |
| 996 if (_json.containsKey("data")) { | 910 if (_json.containsKey("data")) { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1010 _json["data"] = data.map((value) => (value).toJson()).toList(); | 924 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 1011 } | 925 } |
| 1012 if (message != null) { | 926 if (message != null) { |
| 1013 _json["message"] = message; | 927 _json["message"] = message; |
| 1014 } | 928 } |
| 1015 return _json; | 929 return _json; |
| 1016 } | 930 } |
| 1017 } | 931 } |
| 1018 | 932 |
| 1019 | 933 |
| 1020 /** Not documented yet. */ | 934 /** An operation resource, used to manage asynchronous API requests. */ |
| 1021 class Operation { | 935 class Operation { |
| 1022 /** Not documented yet. */ | 936 /** |
| 937 * [Output only] An optional identifier specified by the client when the |
| 938 * mutation was initiated. Must be unique for all operation resources in the |
| 939 * project. |
| 940 */ |
| 1023 core.String clientOperationId; | 941 core.String clientOperationId; |
| 1024 | 942 |
| 1025 /** Not documented yet. */ | 943 /** |
| 944 * [Output Only] The time that this operation was requested, in RFC3339 text |
| 945 * format. |
| 946 */ |
| 1026 core.String creationTimestamp; | 947 core.String creationTimestamp; |
| 1027 | 948 |
| 1028 /** Not documented yet. */ | 949 /** |
| 950 * [Output Only] The time that this operation was completed, in RFC3339 text |
| 951 * format. |
| 952 */ |
| 1029 core.String endTime; | 953 core.String endTime; |
| 1030 | 954 |
| 1031 /** Not documented yet. */ | 955 /** |
| 956 * [Output Only] If errors occurred during processing of this operation, this |
| 957 * field will be populated. |
| 958 */ |
| 1032 OperationError error; | 959 OperationError error; |
| 1033 | 960 |
| 1034 /** Not documented yet. */ | 961 /** [Output only] If operation fails, the HTTP error message returned. */ |
| 1035 core.String httpErrorMessage; | 962 core.String httpErrorMessage; |
| 1036 | 963 |
| 1037 /** Not documented yet. */ | 964 /** [Output only] If operation fails, the HTTP error status code returned. */ |
| 1038 core.int httpErrorStatusCode; | 965 core.int httpErrorStatusCode; |
| 1039 | 966 |
| 1040 /** Not documented yet. */ | 967 /** |
| 968 * [Output Only] Unique identifier for the resource, generated by the server. |
| 969 */ |
| 1041 core.String id; | 970 core.String id; |
| 1042 | 971 |
| 1043 /** Not documented yet. */ | 972 /** |
| 973 * [Output Only] The time that this operation was requested, in RFC3339 text |
| 974 * format. |
| 975 */ |
| 1044 core.String insertTime; | 976 core.String insertTime; |
| 1045 | 977 |
| 1046 /** Type of the resource. */ | 978 /** [Output only] Type of the resource. */ |
| 1047 core.String kind; | 979 core.String kind; |
| 1048 | 980 |
| 1049 /** Not documented yet. */ | 981 /** [Output Only] Name of the resource. */ |
| 1050 core.String name; | 982 core.String name; |
| 1051 | 983 |
| 1052 /** Not documented yet. */ | 984 /** |
| 985 * [Output only] Type of the operation. Operations include insert, update, and |
| 986 * delete. |
| 987 */ |
| 1053 core.String operationType; | 988 core.String operationType; |
| 1054 | 989 |
| 1055 /** Not documented yet. */ | 990 /** |
| 991 * [Output only] An optional progress indicator that ranges from 0 to 100. |
| 992 * There is no requirement that this be linear or support any granularity of |
| 993 * operations. This should not be used to guess at when the operation will be |
| 994 * complete. This number should be monotonically increasing as the operation |
| 995 * progresses. |
| 996 */ |
| 1056 core.int progress; | 997 core.int progress; |
| 1057 | 998 |
| 1058 /** Not documented yet. */ | 999 /** |
| 1000 * [Output Only] URL of the region where the operation resides. Only available |
| 1001 * when performing regional operations. |
| 1002 */ |
| 1059 core.String region; | 1003 core.String region; |
| 1060 | 1004 |
| 1061 /** Not documented yet. */ | 1005 /** [Output Only] Server-defined fully-qualified URL for this resource. */ |
| 1062 core.String selfLink; | 1006 core.String selfLink; |
| 1063 | 1007 |
| 1064 /** Not documented yet. */ | 1008 /** |
| 1009 * [Output Only] The time that this operation was started by the server, in |
| 1010 * RFC3339 text format. |
| 1011 */ |
| 1065 core.String startTime; | 1012 core.String startTime; |
| 1066 | 1013 |
| 1067 /** Not documented yet. */ | 1014 /** [Output Only] Status of the operation. */ |
| 1068 core.String status; | 1015 core.String status; |
| 1069 | 1016 |
| 1070 /** Not documented yet. */ | 1017 /** |
| 1018 * [Output Only] An optional textual description of the current status of the |
| 1019 * operation. |
| 1020 */ |
| 1071 core.String statusMessage; | 1021 core.String statusMessage; |
| 1072 | 1022 |
| 1073 /** Not documented yet. */ | 1023 /** |
| 1024 * [Output Only] Unique target ID which identifies a particular incarnation of |
| 1025 * the target. |
| 1026 */ |
| 1074 core.String targetId; | 1027 core.String targetId; |
| 1075 | 1028 |
| 1076 /** Not documented yet. */ | 1029 /** [Output only] URL of the resource the operation is mutating. */ |
| 1077 core.String targetLink; | 1030 core.String targetLink; |
| 1078 | 1031 |
| 1079 /** Not documented yet. */ | 1032 /** |
| 1033 * [Output Only] User who requested the operation, for example: |
| 1034 * user@example.com. |
| 1035 */ |
| 1080 core.String user; | 1036 core.String user; |
| 1081 | 1037 |
| 1082 /** Not documented yet. */ | 1038 /** |
| 1039 * [Output Only] If there are issues with this operation, a warning is |
| 1040 * returned. |
| 1041 */ |
| 1083 core.List<OperationWarnings> warnings; | 1042 core.List<OperationWarnings> warnings; |
| 1084 | 1043 |
| 1085 /** Not documented yet. */ | 1044 /** |
| 1045 * [Output Only] URL of the zone where the operation resides. Only available |
| 1046 * when performing per-zone operations. |
| 1047 */ |
| 1086 core.String zone; | 1048 core.String zone; |
| 1087 | 1049 |
| 1088 | 1050 |
| 1089 Operation(); | 1051 Operation(); |
| 1090 | 1052 |
| 1091 Operation.fromJson(core.Map _json) { | 1053 Operation.fromJson(core.Map _json) { |
| 1092 if (_json.containsKey("clientOperationId")) { | 1054 if (_json.containsKey("clientOperationId")) { |
| 1093 clientOperationId = _json["clientOperationId"]; | 1055 clientOperationId = _json["clientOperationId"]; |
| 1094 } | 1056 } |
| 1095 if (_json.containsKey("creationTimestamp")) { | 1057 if (_json.containsKey("creationTimestamp")) { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 if (zone != null) { | 1187 if (zone != null) { |
| 1226 _json["zone"] = zone; | 1188 _json["zone"] = zone; |
| 1227 } | 1189 } |
| 1228 return _json; | 1190 return _json; |
| 1229 } | 1191 } |
| 1230 } | 1192 } |
| 1231 | 1193 |
| 1232 | 1194 |
| 1233 /** Not documented yet. */ | 1195 /** Not documented yet. */ |
| 1234 class OperationList { | 1196 class OperationList { |
| 1235 /** Not documented yet. */ | 1197 /** |
| 1198 * Unique identifier for the resource; defined by the server (output only). |
| 1199 */ |
| 1236 core.String id; | 1200 core.String id; |
| 1237 | 1201 |
| 1238 /** Not documented yet. */ | 1202 /** The operation resources. */ |
| 1239 core.List<Operation> items; | 1203 core.List<Operation> items; |
| 1240 | 1204 |
| 1241 /** Type of resource. */ | 1205 /** Type of resource. */ |
| 1242 core.String kind; | 1206 core.String kind; |
| 1243 | 1207 |
| 1244 /** Not documented yet. */ | 1208 /** A token used to continue a truncated list request (output only). */ |
| 1245 core.String nextPageToken; | 1209 core.String nextPageToken; |
| 1246 | 1210 |
| 1247 /** Not documented yet. */ | 1211 /** Server defined URL for this resource (output only). */ |
| 1248 core.String selfLink; | 1212 core.String selfLink; |
| 1249 | 1213 |
| 1250 | 1214 |
| 1251 OperationList(); | 1215 OperationList(); |
| 1252 | 1216 |
| 1253 OperationList.fromJson(core.Map _json) { | 1217 OperationList.fromJson(core.Map _json) { |
| 1254 if (_json.containsKey("id")) { | 1218 if (_json.containsKey("id")) { |
| 1255 id = _json["id"]; | 1219 id = _json["id"]; |
| 1256 } | 1220 } |
| 1257 if (_json.containsKey("items")) { | 1221 if (_json.containsKey("items")) { |
| (...skipping 25 matching lines...) Expand all Loading... |
| 1283 _json["nextPageToken"] = nextPageToken; | 1247 _json["nextPageToken"] = nextPageToken; |
| 1284 } | 1248 } |
| 1285 if (selfLink != null) { | 1249 if (selfLink != null) { |
| 1286 _json["selfLink"] = selfLink; | 1250 _json["selfLink"] = selfLink; |
| 1287 } | 1251 } |
| 1288 return _json; | 1252 return _json; |
| 1289 } | 1253 } |
| 1290 } | 1254 } |
| 1291 | 1255 |
| 1292 | 1256 |
| 1257 /** The resource view object. */ |
| 1258 class ResourceView { |
| 1259 /** The creation time of the resource view. */ |
| 1260 core.String creationTimestamp; |
| 1261 |
| 1262 /** The detailed description of the resource view. */ |
| 1263 core.String description; |
| 1264 |
| 1265 /** Services endpoint information. */ |
| 1266 core.List<ServiceEndpoint> endpoints; |
| 1267 |
| 1268 /** The fingerprint of the service endpoint information. */ |
| 1269 core.String fingerprint; |
| 1270 |
| 1271 /** [Output Only] The ID of the resource view. */ |
| 1272 core.String id; |
| 1273 |
| 1274 /** Type of the resource. */ |
| 1275 core.String kind; |
| 1276 |
| 1277 /** The labels for events. */ |
| 1278 core.List<Label> labels; |
| 1279 |
| 1280 /** The name of the resource view. */ |
| 1281 core.String name; |
| 1282 |
| 1283 /** |
| 1284 * The URL of a Compute Engine network to which the resources in the view |
| 1285 * belong. |
| 1286 */ |
| 1287 core.String network; |
| 1288 |
| 1289 /** A list of all resources in the resource view. */ |
| 1290 core.List<core.String> resources; |
| 1291 |
| 1292 /** [Output Only] A self-link to the resource view. */ |
| 1293 core.String selfLink; |
| 1294 |
| 1295 /** The total number of resources in the resource view. */ |
| 1296 core.int size; |
| 1297 |
| 1298 |
| 1299 ResourceView(); |
| 1300 |
| 1301 ResourceView.fromJson(core.Map _json) { |
| 1302 if (_json.containsKey("creationTimestamp")) { |
| 1303 creationTimestamp = _json["creationTimestamp"]; |
| 1304 } |
| 1305 if (_json.containsKey("description")) { |
| 1306 description = _json["description"]; |
| 1307 } |
| 1308 if (_json.containsKey("endpoints")) { |
| 1309 endpoints = _json["endpoints"].map((value) => new ServiceEndpoint.fromJson
(value)).toList(); |
| 1310 } |
| 1311 if (_json.containsKey("fingerprint")) { |
| 1312 fingerprint = _json["fingerprint"]; |
| 1313 } |
| 1314 if (_json.containsKey("id")) { |
| 1315 id = _json["id"]; |
| 1316 } |
| 1317 if (_json.containsKey("kind")) { |
| 1318 kind = _json["kind"]; |
| 1319 } |
| 1320 if (_json.containsKey("labels")) { |
| 1321 labels = _json["labels"].map((value) => new Label.fromJson(value)).toList(
); |
| 1322 } |
| 1323 if (_json.containsKey("name")) { |
| 1324 name = _json["name"]; |
| 1325 } |
| 1326 if (_json.containsKey("network")) { |
| 1327 network = _json["network"]; |
| 1328 } |
| 1329 if (_json.containsKey("resources")) { |
| 1330 resources = _json["resources"]; |
| 1331 } |
| 1332 if (_json.containsKey("selfLink")) { |
| 1333 selfLink = _json["selfLink"]; |
| 1334 } |
| 1335 if (_json.containsKey("size")) { |
| 1336 size = _json["size"]; |
| 1337 } |
| 1338 } |
| 1339 |
| 1340 core.Map toJson() { |
| 1341 var _json = new core.Map(); |
| 1342 if (creationTimestamp != null) { |
| 1343 _json["creationTimestamp"] = creationTimestamp; |
| 1344 } |
| 1345 if (description != null) { |
| 1346 _json["description"] = description; |
| 1347 } |
| 1348 if (endpoints != null) { |
| 1349 _json["endpoints"] = endpoints.map((value) => (value).toJson()).toList(); |
| 1350 } |
| 1351 if (fingerprint != null) { |
| 1352 _json["fingerprint"] = fingerprint; |
| 1353 } |
| 1354 if (id != null) { |
| 1355 _json["id"] = id; |
| 1356 } |
| 1357 if (kind != null) { |
| 1358 _json["kind"] = kind; |
| 1359 } |
| 1360 if (labels != null) { |
| 1361 _json["labels"] = labels.map((value) => (value).toJson()).toList(); |
| 1362 } |
| 1363 if (name != null) { |
| 1364 _json["name"] = name; |
| 1365 } |
| 1366 if (network != null) { |
| 1367 _json["network"] = network; |
| 1368 } |
| 1369 if (resources != null) { |
| 1370 _json["resources"] = resources; |
| 1371 } |
| 1372 if (selfLink != null) { |
| 1373 _json["selfLink"] = selfLink; |
| 1374 } |
| 1375 if (size != null) { |
| 1376 _json["size"] = size; |
| 1377 } |
| 1378 return _json; |
| 1379 } |
| 1380 } |
| 1381 |
| 1382 |
| 1383 /** The service endpoint that may be started in a VM. */ |
| 1384 class ServiceEndpoint { |
| 1385 /** The name of the service endpoint. */ |
| 1386 core.String name; |
| 1387 |
| 1388 /** The port of the service endpoint. */ |
| 1389 core.int port; |
| 1390 |
| 1391 |
| 1392 ServiceEndpoint(); |
| 1393 |
| 1394 ServiceEndpoint.fromJson(core.Map _json) { |
| 1395 if (_json.containsKey("name")) { |
| 1396 name = _json["name"]; |
| 1397 } |
| 1398 if (_json.containsKey("port")) { |
| 1399 port = _json["port"]; |
| 1400 } |
| 1401 } |
| 1402 |
| 1403 core.Map toJson() { |
| 1404 var _json = new core.Map(); |
| 1405 if (name != null) { |
| 1406 _json["name"] = name; |
| 1407 } |
| 1408 if (port != null) { |
| 1409 _json["port"] = port; |
| 1410 } |
| 1411 return _json; |
| 1412 } |
| 1413 } |
| 1414 |
| 1415 |
| 1416 /** The request to add resources to the resource view. */ |
| 1417 class ZoneViewsAddResourcesRequest { |
| 1418 /** The list of resources to be added. */ |
| 1419 core.List<core.String> resources; |
| 1420 |
| 1421 |
| 1422 ZoneViewsAddResourcesRequest(); |
| 1423 |
| 1424 ZoneViewsAddResourcesRequest.fromJson(core.Map _json) { |
| 1425 if (_json.containsKey("resources")) { |
| 1426 resources = _json["resources"]; |
| 1427 } |
| 1428 } |
| 1429 |
| 1430 core.Map toJson() { |
| 1431 var _json = new core.Map(); |
| 1432 if (resources != null) { |
| 1433 _json["resources"] = resources; |
| 1434 } |
| 1435 return _json; |
| 1436 } |
| 1437 } |
| 1438 |
| 1439 |
| 1440 /** Not documented yet. */ |
| 1441 class ZoneViewsGetServiceResponse { |
| 1442 /** The service information. */ |
| 1443 core.List<ServiceEndpoint> endpoints; |
| 1444 |
| 1445 /** The fingerprint of the service information. */ |
| 1446 core.String fingerprint; |
| 1447 |
| 1448 |
| 1449 ZoneViewsGetServiceResponse(); |
| 1450 |
| 1451 ZoneViewsGetServiceResponse.fromJson(core.Map _json) { |
| 1452 if (_json.containsKey("endpoints")) { |
| 1453 endpoints = _json["endpoints"].map((value) => new ServiceEndpoint.fromJson
(value)).toList(); |
| 1454 } |
| 1455 if (_json.containsKey("fingerprint")) { |
| 1456 fingerprint = _json["fingerprint"]; |
| 1457 } |
| 1458 } |
| 1459 |
| 1460 core.Map toJson() { |
| 1461 var _json = new core.Map(); |
| 1462 if (endpoints != null) { |
| 1463 _json["endpoints"] = endpoints.map((value) => (value).toJson()).toList(); |
| 1464 } |
| 1465 if (fingerprint != null) { |
| 1466 _json["fingerprint"] = fingerprint; |
| 1467 } |
| 1468 return _json; |
| 1469 } |
| 1470 } |
| 1471 |
| 1472 |
| 1473 /** The response to a list request. */ |
| 1474 class ZoneViewsList { |
| 1475 /** The result that contains all resource views that meet the criteria. */ |
| 1476 core.List<ResourceView> items; |
| 1477 |
| 1478 /** Type of resource. */ |
| 1479 core.String kind; |
| 1480 |
| 1481 /** A token used for pagination. */ |
| 1482 core.String nextPageToken; |
| 1483 |
| 1484 /** Server defined URL for this resource (output only). */ |
| 1485 core.String selfLink; |
| 1486 |
| 1487 |
| 1488 ZoneViewsList(); |
| 1489 |
| 1490 ZoneViewsList.fromJson(core.Map _json) { |
| 1491 if (_json.containsKey("items")) { |
| 1492 items = _json["items"].map((value) => new ResourceView.fromJson(value)).to
List(); |
| 1493 } |
| 1494 if (_json.containsKey("kind")) { |
| 1495 kind = _json["kind"]; |
| 1496 } |
| 1497 if (_json.containsKey("nextPageToken")) { |
| 1498 nextPageToken = _json["nextPageToken"]; |
| 1499 } |
| 1500 if (_json.containsKey("selfLink")) { |
| 1501 selfLink = _json["selfLink"]; |
| 1502 } |
| 1503 } |
| 1504 |
| 1505 core.Map toJson() { |
| 1506 var _json = new core.Map(); |
| 1507 if (items != null) { |
| 1508 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1509 } |
| 1510 if (kind != null) { |
| 1511 _json["kind"] = kind; |
| 1512 } |
| 1513 if (nextPageToken != null) { |
| 1514 _json["nextPageToken"] = nextPageToken; |
| 1515 } |
| 1516 if (selfLink != null) { |
| 1517 _json["selfLink"] = selfLink; |
| 1518 } |
| 1519 return _json; |
| 1520 } |
| 1521 } |
| 1522 |
| 1523 |
| 1524 /** The response to a list resource request. */ |
| 1525 class ZoneViewsListResourcesResponse { |
| 1526 /** The formatted JSON that is requested by the user. */ |
| 1527 core.List<ListResourceResponseItem> items; |
| 1528 |
| 1529 /** |
| 1530 * The URL of a Compute Engine network to which the resources in the view |
| 1531 * belong. |
| 1532 */ |
| 1533 core.String network; |
| 1534 |
| 1535 /** A token used for pagination. */ |
| 1536 core.String nextPageToken; |
| 1537 |
| 1538 |
| 1539 ZoneViewsListResourcesResponse(); |
| 1540 |
| 1541 ZoneViewsListResourcesResponse.fromJson(core.Map _json) { |
| 1542 if (_json.containsKey("items")) { |
| 1543 items = _json["items"].map((value) => new ListResourceResponseItem.fromJso
n(value)).toList(); |
| 1544 } |
| 1545 if (_json.containsKey("network")) { |
| 1546 network = _json["network"]; |
| 1547 } |
| 1548 if (_json.containsKey("nextPageToken")) { |
| 1549 nextPageToken = _json["nextPageToken"]; |
| 1550 } |
| 1551 } |
| 1552 |
| 1553 core.Map toJson() { |
| 1554 var _json = new core.Map(); |
| 1555 if (items != null) { |
| 1556 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 1557 } |
| 1558 if (network != null) { |
| 1559 _json["network"] = network; |
| 1560 } |
| 1561 if (nextPageToken != null) { |
| 1562 _json["nextPageToken"] = nextPageToken; |
| 1563 } |
| 1564 return _json; |
| 1565 } |
| 1566 } |
| 1567 |
| 1568 |
| 1569 /** The request to remove resources from the resource view. */ |
| 1570 class ZoneViewsRemoveResourcesRequest { |
| 1571 /** The list of resources to be removed. */ |
| 1572 core.List<core.String> resources; |
| 1573 |
| 1574 |
| 1575 ZoneViewsRemoveResourcesRequest(); |
| 1576 |
| 1577 ZoneViewsRemoveResourcesRequest.fromJson(core.Map _json) { |
| 1578 if (_json.containsKey("resources")) { |
| 1579 resources = _json["resources"]; |
| 1580 } |
| 1581 } |
| 1582 |
| 1583 core.Map toJson() { |
| 1584 var _json = new core.Map(); |
| 1585 if (resources != null) { |
| 1586 _json["resources"] = resources; |
| 1587 } |
| 1588 return _json; |
| 1589 } |
| 1590 } |
| 1591 |
| 1592 |
| 1593 /** Not documented yet. */ |
| 1594 class ZoneViewsSetServiceRequest { |
| 1595 /** The service information to be updated. */ |
| 1596 core.List<ServiceEndpoint> endpoints; |
| 1597 |
| 1598 /** |
| 1599 * Fingerprint of the service information; a hash of the contents. This field |
| 1600 * is used for optimistic locking when updating the service entries. |
| 1601 */ |
| 1602 core.String fingerprint; |
| 1603 |
| 1604 /** |
| 1605 * The name of the resource if user wants to update the service information of |
| 1606 * the resource. |
| 1607 */ |
| 1608 core.String resourceName; |
| 1609 |
| 1610 |
| 1611 ZoneViewsSetServiceRequest(); |
| 1612 |
| 1613 ZoneViewsSetServiceRequest.fromJson(core.Map _json) { |
| 1614 if (_json.containsKey("endpoints")) { |
| 1615 endpoints = _json["endpoints"].map((value) => new ServiceEndpoint.fromJson
(value)).toList(); |
| 1616 } |
| 1617 if (_json.containsKey("fingerprint")) { |
| 1618 fingerprint = _json["fingerprint"]; |
| 1619 } |
| 1620 if (_json.containsKey("resourceName")) { |
| 1621 resourceName = _json["resourceName"]; |
| 1622 } |
| 1623 } |
| 1624 |
| 1625 core.Map toJson() { |
| 1626 var _json = new core.Map(); |
| 1627 if (endpoints != null) { |
| 1628 _json["endpoints"] = endpoints.map((value) => (value).toJson()).toList(); |
| 1629 } |
| 1630 if (fingerprint != null) { |
| 1631 _json["fingerprint"] = fingerprint; |
| 1632 } |
| 1633 if (resourceName != null) { |
| 1634 _json["resourceName"] = resourceName; |
| 1635 } |
| 1636 return _json; |
| 1637 } |
| 1638 } |
| 1639 |
| 1640 |
| OLD | NEW |