OLD | NEW |
(Empty) | |
| 1 library googleapis.compute.v1; |
| 2 |
| 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; |
| 7 |
| 8 import "package:crypto/crypto.dart" as crypto; |
| 9 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; |
| 11 import '../common/common.dart' as common; |
| 12 |
| 13 export '../common/common.dart' show ApiRequestError; |
| 14 export '../common/common.dart' show DetailedApiRequestError; |
| 15 |
| 16 /** API for the Google Compute Engine service. */ |
| 17 class ComputeApi { |
| 18 /** View and manage your Google Compute Engine resources */ |
| 19 static const ComputeScope = "https://www.googleapis.com/auth/compute"; |
| 20 |
| 21 /** View your Google Compute Engine resources */ |
| 22 static const ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.r
eadonly"; |
| 23 |
| 24 /** Manage your data and permissions in Google Cloud Storage */ |
| 25 static const DevstorageFullControlScope = "https://www.googleapis.com/auth/dev
storage.full_control"; |
| 26 |
| 27 /** View your data in Google Cloud Storage */ |
| 28 static const DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devsto
rage.read_only"; |
| 29 |
| 30 /** Manage your data in Google Cloud Storage */ |
| 31 static const DevstorageReadWriteScope = "https://www.googleapis.com/auth/devst
orage.read_write"; |
| 32 |
| 33 |
| 34 final common_internal.ApiRequester _requester; |
| 35 |
| 36 AddressesResourceApi get addresses => new AddressesResourceApi(_requester); |
| 37 BackendServicesResourceApi get backendServices => new BackendServicesResourceA
pi(_requester); |
| 38 DiskTypesResourceApi get diskTypes => new DiskTypesResourceApi(_requester); |
| 39 DisksResourceApi get disks => new DisksResourceApi(_requester); |
| 40 FirewallsResourceApi get firewalls => new FirewallsResourceApi(_requester); |
| 41 ForwardingRulesResourceApi get forwardingRules => new ForwardingRulesResourceA
pi(_requester); |
| 42 GlobalAddressesResourceApi get globalAddresses => new GlobalAddressesResourceA
pi(_requester); |
| 43 GlobalForwardingRulesResourceApi get globalForwardingRules => new GlobalForwar
dingRulesResourceApi(_requester); |
| 44 GlobalOperationsResourceApi get globalOperations => new GlobalOperationsResour
ceApi(_requester); |
| 45 HttpHealthChecksResourceApi get httpHealthChecks => new HttpHealthChecksResour
ceApi(_requester); |
| 46 ImagesResourceApi get images => new ImagesResourceApi(_requester); |
| 47 InstancesResourceApi get instances => new InstancesResourceApi(_requester); |
| 48 LicensesResourceApi get licenses => new LicensesResourceApi(_requester); |
| 49 MachineTypesResourceApi get machineTypes => new MachineTypesResourceApi(_reque
ster); |
| 50 NetworksResourceApi get networks => new NetworksResourceApi(_requester); |
| 51 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
| 52 RegionOperationsResourceApi get regionOperations => new RegionOperationsResour
ceApi(_requester); |
| 53 RegionsResourceApi get regions => new RegionsResourceApi(_requester); |
| 54 RoutesResourceApi get routes => new RoutesResourceApi(_requester); |
| 55 SnapshotsResourceApi get snapshots => new SnapshotsResourceApi(_requester); |
| 56 TargetHttpProxiesResourceApi get targetHttpProxies => new TargetHttpProxiesRes
ourceApi(_requester); |
| 57 TargetInstancesResourceApi get targetInstances => new TargetInstancesResourceA
pi(_requester); |
| 58 TargetPoolsResourceApi get targetPools => new TargetPoolsResourceApi(_requeste
r); |
| 59 UrlMapsResourceApi get urlMaps => new UrlMapsResourceApi(_requester); |
| 60 ZoneOperationsResourceApi get zoneOperations => new ZoneOperationsResourceApi(
_requester); |
| 61 ZonesResourceApi get zones => new ZonesResourceApi(_requester); |
| 62 |
| 63 ComputeApi(http.Client client) : |
| 64 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/compute/v1/projects/"); |
| 65 } |
| 66 |
| 67 |
| 68 /** Not documented yet. */ |
| 69 class AddressesResourceApi { |
| 70 final common_internal.ApiRequester _requester; |
| 71 |
| 72 AddressesResourceApi(common_internal.ApiRequester client) : |
| 73 _requester = client; |
| 74 |
| 75 /** |
| 76 * Retrieves the list of addresses grouped by scope. |
| 77 * |
| 78 * Request parameters: |
| 79 * |
| 80 * [project] - Name of the project scoping this request. |
| 81 * Value must have pattern |
| 82 * "(?:(?:[-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])?))". |
| 83 * |
| 84 * [filter] - Optional. Filter expression for filtering listed resources. |
| 85 * |
| 86 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 87 * value is 500 and default value is 500. |
| 88 * Value must be between "0" and "500". |
| 89 * |
| 90 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 91 * by maxResults. Used to continue a previous list request. |
| 92 * |
| 93 * Completes with a [AddressAggregatedList]. |
| 94 * |
| 95 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 96 * error. |
| 97 * |
| 98 * If the used [http.Client] completes with an error when making a REST call, |
| 99 * this method will complete with the same error. |
| 100 */ |
| 101 async.Future<AddressAggregatedList> aggregatedList(core.String project, {core.
String filter, core.int maxResults, core.String pageToken}) { |
| 102 var _url = null; |
| 103 var _queryParams = new core.Map(); |
| 104 var _uploadMedia = null; |
| 105 var _uploadOptions = null; |
| 106 var _downloadOptions = common.DownloadOptions.Metadata; |
| 107 var _body = null; |
| 108 |
| 109 if (project == null) { |
| 110 throw new core.ArgumentError("Parameter project is required."); |
| 111 } |
| 112 if (filter != null) { |
| 113 _queryParams["filter"] = [filter]; |
| 114 } |
| 115 if (maxResults != null) { |
| 116 _queryParams["maxResults"] = ["${maxResults}"]; |
| 117 } |
| 118 if (pageToken != null) { |
| 119 _queryParams["pageToken"] = [pageToken]; |
| 120 } |
| 121 |
| 122 |
| 123 _url = common_internal.Escaper.ecapeVariable('$project') + '/aggregated/addr
esses'; |
| 124 |
| 125 var _response = _requester.request(_url, |
| 126 "GET", |
| 127 body: _body, |
| 128 queryParams: _queryParams, |
| 129 uploadOptions: _uploadOptions, |
| 130 uploadMedia: _uploadMedia, |
| 131 downloadOptions: _downloadOptions); |
| 132 return _response.then((data) => new AddressAggregatedList.fromJson(data)); |
| 133 } |
| 134 |
| 135 /** |
| 136 * Deletes the specified address resource. |
| 137 * |
| 138 * Request parameters: |
| 139 * |
| 140 * [project] - Name of the project scoping this request. |
| 141 * Value must have pattern |
| 142 * "(?:(?:[-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])?))". |
| 143 * |
| 144 * [region] - Name of the region scoping this request. |
| 145 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 146 * |
| 147 * [address] - Name of the address resource to delete. |
| 148 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 149 * |
| 150 * Completes with a [Operation]. |
| 151 * |
| 152 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 153 * error. |
| 154 * |
| 155 * If the used [http.Client] completes with an error when making a REST call, |
| 156 * this method will complete with the same error. |
| 157 */ |
| 158 async.Future<Operation> delete(core.String project, core.String region, core.S
tring address) { |
| 159 var _url = null; |
| 160 var _queryParams = new core.Map(); |
| 161 var _uploadMedia = null; |
| 162 var _uploadOptions = null; |
| 163 var _downloadOptions = common.DownloadOptions.Metadata; |
| 164 var _body = null; |
| 165 |
| 166 if (project == null) { |
| 167 throw new core.ArgumentError("Parameter project is required."); |
| 168 } |
| 169 if (region == null) { |
| 170 throw new core.ArgumentError("Parameter region is required."); |
| 171 } |
| 172 if (address == null) { |
| 173 throw new core.ArgumentError("Parameter address is required."); |
| 174 } |
| 175 |
| 176 |
| 177 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/addresses/' + common_internal.
Escaper.ecapeVariable('$address'); |
| 178 |
| 179 var _response = _requester.request(_url, |
| 180 "DELETE", |
| 181 body: _body, |
| 182 queryParams: _queryParams, |
| 183 uploadOptions: _uploadOptions, |
| 184 uploadMedia: _uploadMedia, |
| 185 downloadOptions: _downloadOptions); |
| 186 return _response.then((data) => new Operation.fromJson(data)); |
| 187 } |
| 188 |
| 189 /** |
| 190 * Returns the specified address resource. |
| 191 * |
| 192 * Request parameters: |
| 193 * |
| 194 * [project] - Name of the project scoping this request. |
| 195 * Value must have pattern |
| 196 * "(?:(?:[-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])?))". |
| 197 * |
| 198 * [region] - Name of the region scoping this request. |
| 199 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 200 * |
| 201 * [address] - Name of the address resource to return. |
| 202 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 203 * |
| 204 * Completes with a [Address]. |
| 205 * |
| 206 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 207 * error. |
| 208 * |
| 209 * If the used [http.Client] completes with an error when making a REST call, |
| 210 * this method will complete with the same error. |
| 211 */ |
| 212 async.Future<Address> get(core.String project, core.String region, core.String
address) { |
| 213 var _url = null; |
| 214 var _queryParams = new core.Map(); |
| 215 var _uploadMedia = null; |
| 216 var _uploadOptions = null; |
| 217 var _downloadOptions = common.DownloadOptions.Metadata; |
| 218 var _body = null; |
| 219 |
| 220 if (project == null) { |
| 221 throw new core.ArgumentError("Parameter project is required."); |
| 222 } |
| 223 if (region == null) { |
| 224 throw new core.ArgumentError("Parameter region is required."); |
| 225 } |
| 226 if (address == null) { |
| 227 throw new core.ArgumentError("Parameter address is required."); |
| 228 } |
| 229 |
| 230 |
| 231 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/addresses/' + common_internal.
Escaper.ecapeVariable('$address'); |
| 232 |
| 233 var _response = _requester.request(_url, |
| 234 "GET", |
| 235 body: _body, |
| 236 queryParams: _queryParams, |
| 237 uploadOptions: _uploadOptions, |
| 238 uploadMedia: _uploadMedia, |
| 239 downloadOptions: _downloadOptions); |
| 240 return _response.then((data) => new Address.fromJson(data)); |
| 241 } |
| 242 |
| 243 /** |
| 244 * Creates an address resource in the specified project using the data |
| 245 * included in the request. |
| 246 * |
| 247 * [request] - The metadata request object. |
| 248 * |
| 249 * Request parameters: |
| 250 * |
| 251 * [project] - Name of the project scoping this request. |
| 252 * Value must have pattern |
| 253 * "(?:(?:[-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])?))". |
| 254 * |
| 255 * [region] - Name of the region scoping this request. |
| 256 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 257 * |
| 258 * Completes with a [Operation]. |
| 259 * |
| 260 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 261 * error. |
| 262 * |
| 263 * If the used [http.Client] completes with an error when making a REST call, |
| 264 * this method will complete with the same error. |
| 265 */ |
| 266 async.Future<Operation> insert(Address request, core.String project, core.Stri
ng region) { |
| 267 var _url = null; |
| 268 var _queryParams = new core.Map(); |
| 269 var _uploadMedia = null; |
| 270 var _uploadOptions = null; |
| 271 var _downloadOptions = common.DownloadOptions.Metadata; |
| 272 var _body = null; |
| 273 |
| 274 if (request != null) { |
| 275 _body = convert.JSON.encode((request).toJson()); |
| 276 } |
| 277 if (project == null) { |
| 278 throw new core.ArgumentError("Parameter project is required."); |
| 279 } |
| 280 if (region == null) { |
| 281 throw new core.ArgumentError("Parameter region is required."); |
| 282 } |
| 283 |
| 284 |
| 285 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/addresses'; |
| 286 |
| 287 var _response = _requester.request(_url, |
| 288 "POST", |
| 289 body: _body, |
| 290 queryParams: _queryParams, |
| 291 uploadOptions: _uploadOptions, |
| 292 uploadMedia: _uploadMedia, |
| 293 downloadOptions: _downloadOptions); |
| 294 return _response.then((data) => new Operation.fromJson(data)); |
| 295 } |
| 296 |
| 297 /** |
| 298 * Retrieves the list of address resources contained within the specified |
| 299 * region. |
| 300 * |
| 301 * Request parameters: |
| 302 * |
| 303 * [project] - Name of the project scoping this request. |
| 304 * Value must have pattern |
| 305 * "(?:(?:[-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])?))". |
| 306 * |
| 307 * [region] - Name of the region scoping this request. |
| 308 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 309 * |
| 310 * [filter] - Optional. Filter expression for filtering listed resources. |
| 311 * |
| 312 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 313 * value is 500 and default value is 500. |
| 314 * Value must be between "0" and "500". |
| 315 * |
| 316 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 317 * by maxResults. Used to continue a previous list request. |
| 318 * |
| 319 * Completes with a [AddressList]. |
| 320 * |
| 321 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 322 * error. |
| 323 * |
| 324 * If the used [http.Client] completes with an error when making a REST call, |
| 325 * this method will complete with the same error. |
| 326 */ |
| 327 async.Future<AddressList> list(core.String project, core.String region, {core.
String filter, core.int maxResults, core.String pageToken}) { |
| 328 var _url = null; |
| 329 var _queryParams = new core.Map(); |
| 330 var _uploadMedia = null; |
| 331 var _uploadOptions = null; |
| 332 var _downloadOptions = common.DownloadOptions.Metadata; |
| 333 var _body = null; |
| 334 |
| 335 if (project == null) { |
| 336 throw new core.ArgumentError("Parameter project is required."); |
| 337 } |
| 338 if (region == null) { |
| 339 throw new core.ArgumentError("Parameter region is required."); |
| 340 } |
| 341 if (filter != null) { |
| 342 _queryParams["filter"] = [filter]; |
| 343 } |
| 344 if (maxResults != null) { |
| 345 _queryParams["maxResults"] = ["${maxResults}"]; |
| 346 } |
| 347 if (pageToken != null) { |
| 348 _queryParams["pageToken"] = [pageToken]; |
| 349 } |
| 350 |
| 351 |
| 352 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/addresses'; |
| 353 |
| 354 var _response = _requester.request(_url, |
| 355 "GET", |
| 356 body: _body, |
| 357 queryParams: _queryParams, |
| 358 uploadOptions: _uploadOptions, |
| 359 uploadMedia: _uploadMedia, |
| 360 downloadOptions: _downloadOptions); |
| 361 return _response.then((data) => new AddressList.fromJson(data)); |
| 362 } |
| 363 |
| 364 } |
| 365 |
| 366 |
| 367 /** Not documented yet. */ |
| 368 class BackendServicesResourceApi { |
| 369 final common_internal.ApiRequester _requester; |
| 370 |
| 371 BackendServicesResourceApi(common_internal.ApiRequester client) : |
| 372 _requester = client; |
| 373 |
| 374 /** |
| 375 * Deletes the specified BackendService resource. |
| 376 * |
| 377 * Request parameters: |
| 378 * |
| 379 * [project] - Name of the project scoping this request. |
| 380 * Value must have pattern |
| 381 * "(?:(?:[-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])?))". |
| 382 * |
| 383 * [backendService] - Name of the BackendService resource to delete. |
| 384 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 385 * |
| 386 * Completes with a [Operation]. |
| 387 * |
| 388 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 389 * error. |
| 390 * |
| 391 * If the used [http.Client] completes with an error when making a REST call, |
| 392 * this method will complete with the same error. |
| 393 */ |
| 394 async.Future<Operation> delete(core.String project, core.String backendService
) { |
| 395 var _url = null; |
| 396 var _queryParams = new core.Map(); |
| 397 var _uploadMedia = null; |
| 398 var _uploadOptions = null; |
| 399 var _downloadOptions = common.DownloadOptions.Metadata; |
| 400 var _body = null; |
| 401 |
| 402 if (project == null) { |
| 403 throw new core.ArgumentError("Parameter project is required."); |
| 404 } |
| 405 if (backendService == null) { |
| 406 throw new core.ArgumentError("Parameter backendService is required."); |
| 407 } |
| 408 |
| 409 |
| 410 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/backendS
ervices/' + common_internal.Escaper.ecapeVariable('$backendService'); |
| 411 |
| 412 var _response = _requester.request(_url, |
| 413 "DELETE", |
| 414 body: _body, |
| 415 queryParams: _queryParams, |
| 416 uploadOptions: _uploadOptions, |
| 417 uploadMedia: _uploadMedia, |
| 418 downloadOptions: _downloadOptions); |
| 419 return _response.then((data) => new Operation.fromJson(data)); |
| 420 } |
| 421 |
| 422 /** |
| 423 * Returns the specified BackendService resource. |
| 424 * |
| 425 * Request parameters: |
| 426 * |
| 427 * [project] - Name of the project scoping this request. |
| 428 * Value must have pattern |
| 429 * "(?:(?:[-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])?))". |
| 430 * |
| 431 * [backendService] - Name of the BackendService resource to return. |
| 432 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 433 * |
| 434 * Completes with a [BackendService]. |
| 435 * |
| 436 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 437 * error. |
| 438 * |
| 439 * If the used [http.Client] completes with an error when making a REST call, |
| 440 * this method will complete with the same error. |
| 441 */ |
| 442 async.Future<BackendService> get(core.String project, core.String backendServi
ce) { |
| 443 var _url = null; |
| 444 var _queryParams = new core.Map(); |
| 445 var _uploadMedia = null; |
| 446 var _uploadOptions = null; |
| 447 var _downloadOptions = common.DownloadOptions.Metadata; |
| 448 var _body = null; |
| 449 |
| 450 if (project == null) { |
| 451 throw new core.ArgumentError("Parameter project is required."); |
| 452 } |
| 453 if (backendService == null) { |
| 454 throw new core.ArgumentError("Parameter backendService is required."); |
| 455 } |
| 456 |
| 457 |
| 458 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/backendS
ervices/' + common_internal.Escaper.ecapeVariable('$backendService'); |
| 459 |
| 460 var _response = _requester.request(_url, |
| 461 "GET", |
| 462 body: _body, |
| 463 queryParams: _queryParams, |
| 464 uploadOptions: _uploadOptions, |
| 465 uploadMedia: _uploadMedia, |
| 466 downloadOptions: _downloadOptions); |
| 467 return _response.then((data) => new BackendService.fromJson(data)); |
| 468 } |
| 469 |
| 470 /** |
| 471 * Gets the most recent health check results for this BackendService. |
| 472 * |
| 473 * [request] - The metadata request object. |
| 474 * |
| 475 * Request parameters: |
| 476 * |
| 477 * [project] - null |
| 478 * Value must have pattern |
| 479 * "(?:(?:[-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])?))". |
| 480 * |
| 481 * [backendService] - Name of the BackendService resource to which the queried |
| 482 * instance belongs. |
| 483 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 484 * |
| 485 * Completes with a [BackendServiceGroupHealth]. |
| 486 * |
| 487 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 488 * error. |
| 489 * |
| 490 * If the used [http.Client] completes with an error when making a REST call, |
| 491 * this method will complete with the same error. |
| 492 */ |
| 493 async.Future<BackendServiceGroupHealth> getHealth(ResourceGroupReference reque
st, core.String project, core.String backendService) { |
| 494 var _url = null; |
| 495 var _queryParams = new core.Map(); |
| 496 var _uploadMedia = null; |
| 497 var _uploadOptions = null; |
| 498 var _downloadOptions = common.DownloadOptions.Metadata; |
| 499 var _body = null; |
| 500 |
| 501 if (request != null) { |
| 502 _body = convert.JSON.encode((request).toJson()); |
| 503 } |
| 504 if (project == null) { |
| 505 throw new core.ArgumentError("Parameter project is required."); |
| 506 } |
| 507 if (backendService == null) { |
| 508 throw new core.ArgumentError("Parameter backendService is required."); |
| 509 } |
| 510 |
| 511 |
| 512 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/backendS
ervices/' + common_internal.Escaper.ecapeVariable('$backendService') + '/getHeal
th'; |
| 513 |
| 514 var _response = _requester.request(_url, |
| 515 "POST", |
| 516 body: _body, |
| 517 queryParams: _queryParams, |
| 518 uploadOptions: _uploadOptions, |
| 519 uploadMedia: _uploadMedia, |
| 520 downloadOptions: _downloadOptions); |
| 521 return _response.then((data) => new BackendServiceGroupHealth.fromJson(data)
); |
| 522 } |
| 523 |
| 524 /** |
| 525 * Creates a BackendService resource in the specified project using the data |
| 526 * included in the request. |
| 527 * |
| 528 * [request] - The metadata request object. |
| 529 * |
| 530 * Request parameters: |
| 531 * |
| 532 * [project] - Name of the project scoping this request. |
| 533 * Value must have pattern |
| 534 * "(?:(?:[-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])?))". |
| 535 * |
| 536 * Completes with a [Operation]. |
| 537 * |
| 538 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 539 * error. |
| 540 * |
| 541 * If the used [http.Client] completes with an error when making a REST call, |
| 542 * this method will complete with the same error. |
| 543 */ |
| 544 async.Future<Operation> insert(BackendService request, core.String project) { |
| 545 var _url = null; |
| 546 var _queryParams = new core.Map(); |
| 547 var _uploadMedia = null; |
| 548 var _uploadOptions = null; |
| 549 var _downloadOptions = common.DownloadOptions.Metadata; |
| 550 var _body = null; |
| 551 |
| 552 if (request != null) { |
| 553 _body = convert.JSON.encode((request).toJson()); |
| 554 } |
| 555 if (project == null) { |
| 556 throw new core.ArgumentError("Parameter project is required."); |
| 557 } |
| 558 |
| 559 |
| 560 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/backendS
ervices'; |
| 561 |
| 562 var _response = _requester.request(_url, |
| 563 "POST", |
| 564 body: _body, |
| 565 queryParams: _queryParams, |
| 566 uploadOptions: _uploadOptions, |
| 567 uploadMedia: _uploadMedia, |
| 568 downloadOptions: _downloadOptions); |
| 569 return _response.then((data) => new Operation.fromJson(data)); |
| 570 } |
| 571 |
| 572 /** |
| 573 * Retrieves the list of BackendService resources available to the specified |
| 574 * project. |
| 575 * |
| 576 * Request parameters: |
| 577 * |
| 578 * [project] - Name of the project scoping this request. |
| 579 * Value must have pattern |
| 580 * "(?:(?:[-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])?))". |
| 581 * |
| 582 * [filter] - Optional. Filter expression for filtering listed resources. |
| 583 * |
| 584 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 585 * value is 500 and default value is 500. |
| 586 * Value must be between "0" and "500". |
| 587 * |
| 588 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 589 * by maxResults. Used to continue a previous list request. |
| 590 * |
| 591 * Completes with a [BackendServiceList]. |
| 592 * |
| 593 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 594 * error. |
| 595 * |
| 596 * If the used [http.Client] completes with an error when making a REST call, |
| 597 * this method will complete with the same error. |
| 598 */ |
| 599 async.Future<BackendServiceList> list(core.String project, {core.String filter
, core.int maxResults, core.String pageToken}) { |
| 600 var _url = null; |
| 601 var _queryParams = new core.Map(); |
| 602 var _uploadMedia = null; |
| 603 var _uploadOptions = null; |
| 604 var _downloadOptions = common.DownloadOptions.Metadata; |
| 605 var _body = null; |
| 606 |
| 607 if (project == null) { |
| 608 throw new core.ArgumentError("Parameter project is required."); |
| 609 } |
| 610 if (filter != null) { |
| 611 _queryParams["filter"] = [filter]; |
| 612 } |
| 613 if (maxResults != null) { |
| 614 _queryParams["maxResults"] = ["${maxResults}"]; |
| 615 } |
| 616 if (pageToken != null) { |
| 617 _queryParams["pageToken"] = [pageToken]; |
| 618 } |
| 619 |
| 620 |
| 621 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/backendS
ervices'; |
| 622 |
| 623 var _response = _requester.request(_url, |
| 624 "GET", |
| 625 body: _body, |
| 626 queryParams: _queryParams, |
| 627 uploadOptions: _uploadOptions, |
| 628 uploadMedia: _uploadMedia, |
| 629 downloadOptions: _downloadOptions); |
| 630 return _response.then((data) => new BackendServiceList.fromJson(data)); |
| 631 } |
| 632 |
| 633 /** |
| 634 * Update the entire content of the BackendService resource. This method |
| 635 * supports patch semantics. |
| 636 * |
| 637 * [request] - The metadata request object. |
| 638 * |
| 639 * Request parameters: |
| 640 * |
| 641 * [project] - Name of the project scoping this request. |
| 642 * Value must have pattern |
| 643 * "(?:(?:[-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])?))". |
| 644 * |
| 645 * [backendService] - Name of the BackendService resource to update. |
| 646 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 647 * |
| 648 * Completes with a [Operation]. |
| 649 * |
| 650 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 651 * error. |
| 652 * |
| 653 * If the used [http.Client] completes with an error when making a REST call, |
| 654 * this method will complete with the same error. |
| 655 */ |
| 656 async.Future<Operation> patch(BackendService request, core.String project, cor
e.String backendService) { |
| 657 var _url = null; |
| 658 var _queryParams = new core.Map(); |
| 659 var _uploadMedia = null; |
| 660 var _uploadOptions = null; |
| 661 var _downloadOptions = common.DownloadOptions.Metadata; |
| 662 var _body = null; |
| 663 |
| 664 if (request != null) { |
| 665 _body = convert.JSON.encode((request).toJson()); |
| 666 } |
| 667 if (project == null) { |
| 668 throw new core.ArgumentError("Parameter project is required."); |
| 669 } |
| 670 if (backendService == null) { |
| 671 throw new core.ArgumentError("Parameter backendService is required."); |
| 672 } |
| 673 |
| 674 |
| 675 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/backendS
ervices/' + common_internal.Escaper.ecapeVariable('$backendService'); |
| 676 |
| 677 var _response = _requester.request(_url, |
| 678 "PATCH", |
| 679 body: _body, |
| 680 queryParams: _queryParams, |
| 681 uploadOptions: _uploadOptions, |
| 682 uploadMedia: _uploadMedia, |
| 683 downloadOptions: _downloadOptions); |
| 684 return _response.then((data) => new Operation.fromJson(data)); |
| 685 } |
| 686 |
| 687 /** |
| 688 * Update the entire content of the BackendService resource. |
| 689 * |
| 690 * [request] - The metadata request object. |
| 691 * |
| 692 * Request parameters: |
| 693 * |
| 694 * [project] - Name of the project scoping this request. |
| 695 * Value must have pattern |
| 696 * "(?:(?:[-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])?))". |
| 697 * |
| 698 * [backendService] - Name of the BackendService resource to update. |
| 699 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 700 * |
| 701 * Completes with a [Operation]. |
| 702 * |
| 703 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 704 * error. |
| 705 * |
| 706 * If the used [http.Client] completes with an error when making a REST call, |
| 707 * this method will complete with the same error. |
| 708 */ |
| 709 async.Future<Operation> update(BackendService request, core.String project, co
re.String backendService) { |
| 710 var _url = null; |
| 711 var _queryParams = new core.Map(); |
| 712 var _uploadMedia = null; |
| 713 var _uploadOptions = null; |
| 714 var _downloadOptions = common.DownloadOptions.Metadata; |
| 715 var _body = null; |
| 716 |
| 717 if (request != null) { |
| 718 _body = convert.JSON.encode((request).toJson()); |
| 719 } |
| 720 if (project == null) { |
| 721 throw new core.ArgumentError("Parameter project is required."); |
| 722 } |
| 723 if (backendService == null) { |
| 724 throw new core.ArgumentError("Parameter backendService is required."); |
| 725 } |
| 726 |
| 727 |
| 728 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/backendS
ervices/' + common_internal.Escaper.ecapeVariable('$backendService'); |
| 729 |
| 730 var _response = _requester.request(_url, |
| 731 "PUT", |
| 732 body: _body, |
| 733 queryParams: _queryParams, |
| 734 uploadOptions: _uploadOptions, |
| 735 uploadMedia: _uploadMedia, |
| 736 downloadOptions: _downloadOptions); |
| 737 return _response.then((data) => new Operation.fromJson(data)); |
| 738 } |
| 739 |
| 740 } |
| 741 |
| 742 |
| 743 /** Not documented yet. */ |
| 744 class DiskTypesResourceApi { |
| 745 final common_internal.ApiRequester _requester; |
| 746 |
| 747 DiskTypesResourceApi(common_internal.ApiRequester client) : |
| 748 _requester = client; |
| 749 |
| 750 /** |
| 751 * Retrieves the list of disk type resources grouped by scope. |
| 752 * |
| 753 * Request parameters: |
| 754 * |
| 755 * [project] - Name of the project scoping this request. |
| 756 * Value must have pattern |
| 757 * "(?:(?:[-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])?))". |
| 758 * |
| 759 * [filter] - Optional. Filter expression for filtering listed resources. |
| 760 * |
| 761 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 762 * value is 500 and default value is 500. |
| 763 * Value must be between "0" and "500". |
| 764 * |
| 765 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 766 * by maxResults. Used to continue a previous list request. |
| 767 * |
| 768 * Completes with a [DiskTypeAggregatedList]. |
| 769 * |
| 770 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 771 * error. |
| 772 * |
| 773 * If the used [http.Client] completes with an error when making a REST call, |
| 774 * this method will complete with the same error. |
| 775 */ |
| 776 async.Future<DiskTypeAggregatedList> aggregatedList(core.String project, {core
.String filter, core.int maxResults, core.String pageToken}) { |
| 777 var _url = null; |
| 778 var _queryParams = new core.Map(); |
| 779 var _uploadMedia = null; |
| 780 var _uploadOptions = null; |
| 781 var _downloadOptions = common.DownloadOptions.Metadata; |
| 782 var _body = null; |
| 783 |
| 784 if (project == null) { |
| 785 throw new core.ArgumentError("Parameter project is required."); |
| 786 } |
| 787 if (filter != null) { |
| 788 _queryParams["filter"] = [filter]; |
| 789 } |
| 790 if (maxResults != null) { |
| 791 _queryParams["maxResults"] = ["${maxResults}"]; |
| 792 } |
| 793 if (pageToken != null) { |
| 794 _queryParams["pageToken"] = [pageToken]; |
| 795 } |
| 796 |
| 797 |
| 798 _url = common_internal.Escaper.ecapeVariable('$project') + '/aggregated/disk
Types'; |
| 799 |
| 800 var _response = _requester.request(_url, |
| 801 "GET", |
| 802 body: _body, |
| 803 queryParams: _queryParams, |
| 804 uploadOptions: _uploadOptions, |
| 805 uploadMedia: _uploadMedia, |
| 806 downloadOptions: _downloadOptions); |
| 807 return _response.then((data) => new DiskTypeAggregatedList.fromJson(data)); |
| 808 } |
| 809 |
| 810 /** |
| 811 * Returns the specified disk type resource. |
| 812 * |
| 813 * Request parameters: |
| 814 * |
| 815 * [project] - Name of the project scoping this request. |
| 816 * Value must have pattern |
| 817 * "(?:(?:[-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])?))". |
| 818 * |
| 819 * [zone] - Name of the zone scoping this request. |
| 820 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 821 * |
| 822 * [diskType] - Name of the disk type resource to return. |
| 823 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 824 * |
| 825 * Completes with a [DiskType]. |
| 826 * |
| 827 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 828 * error. |
| 829 * |
| 830 * If the used [http.Client] completes with an error when making a REST call, |
| 831 * this method will complete with the same error. |
| 832 */ |
| 833 async.Future<DiskType> get(core.String project, core.String zone, core.String
diskType) { |
| 834 var _url = null; |
| 835 var _queryParams = new core.Map(); |
| 836 var _uploadMedia = null; |
| 837 var _uploadOptions = null; |
| 838 var _downloadOptions = common.DownloadOptions.Metadata; |
| 839 var _body = null; |
| 840 |
| 841 if (project == null) { |
| 842 throw new core.ArgumentError("Parameter project is required."); |
| 843 } |
| 844 if (zone == null) { |
| 845 throw new core.ArgumentError("Parameter zone is required."); |
| 846 } |
| 847 if (diskType == null) { |
| 848 throw new core.ArgumentError("Parameter diskType is required."); |
| 849 } |
| 850 |
| 851 |
| 852 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/diskTypes/' + common_internal.Esca
per.ecapeVariable('$diskType'); |
| 853 |
| 854 var _response = _requester.request(_url, |
| 855 "GET", |
| 856 body: _body, |
| 857 queryParams: _queryParams, |
| 858 uploadOptions: _uploadOptions, |
| 859 uploadMedia: _uploadMedia, |
| 860 downloadOptions: _downloadOptions); |
| 861 return _response.then((data) => new DiskType.fromJson(data)); |
| 862 } |
| 863 |
| 864 /** |
| 865 * Retrieves the list of disk type resources available to the specified |
| 866 * project. |
| 867 * |
| 868 * Request parameters: |
| 869 * |
| 870 * [project] - Name of the project scoping this request. |
| 871 * Value must have pattern |
| 872 * "(?:(?:[-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])?))". |
| 873 * |
| 874 * [zone] - Name of the zone scoping this request. |
| 875 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 876 * |
| 877 * [filter] - Optional. Filter expression for filtering listed resources. |
| 878 * |
| 879 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 880 * value is 500 and default value is 500. |
| 881 * Value must be between "0" and "500". |
| 882 * |
| 883 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 884 * by maxResults. Used to continue a previous list request. |
| 885 * |
| 886 * Completes with a [DiskTypeList]. |
| 887 * |
| 888 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 889 * error. |
| 890 * |
| 891 * If the used [http.Client] completes with an error when making a REST call, |
| 892 * this method will complete with the same error. |
| 893 */ |
| 894 async.Future<DiskTypeList> list(core.String project, core.String zone, {core.S
tring filter, core.int maxResults, core.String pageToken}) { |
| 895 var _url = null; |
| 896 var _queryParams = new core.Map(); |
| 897 var _uploadMedia = null; |
| 898 var _uploadOptions = null; |
| 899 var _downloadOptions = common.DownloadOptions.Metadata; |
| 900 var _body = null; |
| 901 |
| 902 if (project == null) { |
| 903 throw new core.ArgumentError("Parameter project is required."); |
| 904 } |
| 905 if (zone == null) { |
| 906 throw new core.ArgumentError("Parameter zone is required."); |
| 907 } |
| 908 if (filter != null) { |
| 909 _queryParams["filter"] = [filter]; |
| 910 } |
| 911 if (maxResults != null) { |
| 912 _queryParams["maxResults"] = ["${maxResults}"]; |
| 913 } |
| 914 if (pageToken != null) { |
| 915 _queryParams["pageToken"] = [pageToken]; |
| 916 } |
| 917 |
| 918 |
| 919 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/diskTypes'; |
| 920 |
| 921 var _response = _requester.request(_url, |
| 922 "GET", |
| 923 body: _body, |
| 924 queryParams: _queryParams, |
| 925 uploadOptions: _uploadOptions, |
| 926 uploadMedia: _uploadMedia, |
| 927 downloadOptions: _downloadOptions); |
| 928 return _response.then((data) => new DiskTypeList.fromJson(data)); |
| 929 } |
| 930 |
| 931 } |
| 932 |
| 933 |
| 934 /** Not documented yet. */ |
| 935 class DisksResourceApi { |
| 936 final common_internal.ApiRequester _requester; |
| 937 |
| 938 DisksResourceApi(common_internal.ApiRequester client) : |
| 939 _requester = client; |
| 940 |
| 941 /** |
| 942 * Retrieves the list of disks grouped by scope. |
| 943 * |
| 944 * Request parameters: |
| 945 * |
| 946 * [project] - Name of the project scoping this request. |
| 947 * Value must have pattern |
| 948 * "(?:(?:[-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])?))". |
| 949 * |
| 950 * [filter] - Optional. Filter expression for filtering listed resources. |
| 951 * |
| 952 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 953 * value is 500 and default value is 500. |
| 954 * Value must be between "0" and "500". |
| 955 * |
| 956 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 957 * by maxResults. Used to continue a previous list request. |
| 958 * |
| 959 * Completes with a [DiskAggregatedList]. |
| 960 * |
| 961 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 962 * error. |
| 963 * |
| 964 * If the used [http.Client] completes with an error when making a REST call, |
| 965 * this method will complete with the same error. |
| 966 */ |
| 967 async.Future<DiskAggregatedList> aggregatedList(core.String project, {core.Str
ing filter, core.int maxResults, core.String pageToken}) { |
| 968 var _url = null; |
| 969 var _queryParams = new core.Map(); |
| 970 var _uploadMedia = null; |
| 971 var _uploadOptions = null; |
| 972 var _downloadOptions = common.DownloadOptions.Metadata; |
| 973 var _body = null; |
| 974 |
| 975 if (project == null) { |
| 976 throw new core.ArgumentError("Parameter project is required."); |
| 977 } |
| 978 if (filter != null) { |
| 979 _queryParams["filter"] = [filter]; |
| 980 } |
| 981 if (maxResults != null) { |
| 982 _queryParams["maxResults"] = ["${maxResults}"]; |
| 983 } |
| 984 if (pageToken != null) { |
| 985 _queryParams["pageToken"] = [pageToken]; |
| 986 } |
| 987 |
| 988 |
| 989 _url = common_internal.Escaper.ecapeVariable('$project') + '/aggregated/disk
s'; |
| 990 |
| 991 var _response = _requester.request(_url, |
| 992 "GET", |
| 993 body: _body, |
| 994 queryParams: _queryParams, |
| 995 uploadOptions: _uploadOptions, |
| 996 uploadMedia: _uploadMedia, |
| 997 downloadOptions: _downloadOptions); |
| 998 return _response.then((data) => new DiskAggregatedList.fromJson(data)); |
| 999 } |
| 1000 |
| 1001 /** |
| 1002 * Not documented yet. |
| 1003 * |
| 1004 * [request] - The metadata request object. |
| 1005 * |
| 1006 * Request parameters: |
| 1007 * |
| 1008 * [project] - Name of the project scoping this request. |
| 1009 * Value must have pattern |
| 1010 * "(?:(?:[-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])?))". |
| 1011 * |
| 1012 * [zone] - Name of the zone scoping this request. |
| 1013 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1014 * |
| 1015 * [disk] - Name of the persistent disk resource to snapshot. |
| 1016 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1017 * |
| 1018 * Completes with a [Operation]. |
| 1019 * |
| 1020 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1021 * error. |
| 1022 * |
| 1023 * If the used [http.Client] completes with an error when making a REST call, |
| 1024 * this method will complete with the same error. |
| 1025 */ |
| 1026 async.Future<Operation> createSnapshot(Snapshot request, core.String project,
core.String zone, core.String disk) { |
| 1027 var _url = null; |
| 1028 var _queryParams = new core.Map(); |
| 1029 var _uploadMedia = null; |
| 1030 var _uploadOptions = null; |
| 1031 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1032 var _body = null; |
| 1033 |
| 1034 if (request != null) { |
| 1035 _body = convert.JSON.encode((request).toJson()); |
| 1036 } |
| 1037 if (project == null) { |
| 1038 throw new core.ArgumentError("Parameter project is required."); |
| 1039 } |
| 1040 if (zone == null) { |
| 1041 throw new core.ArgumentError("Parameter zone is required."); |
| 1042 } |
| 1043 if (disk == null) { |
| 1044 throw new core.ArgumentError("Parameter disk is required."); |
| 1045 } |
| 1046 |
| 1047 |
| 1048 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/disks/' + common_internal.Escaper.
ecapeVariable('$disk') + '/createSnapshot'; |
| 1049 |
| 1050 var _response = _requester.request(_url, |
| 1051 "POST", |
| 1052 body: _body, |
| 1053 queryParams: _queryParams, |
| 1054 uploadOptions: _uploadOptions, |
| 1055 uploadMedia: _uploadMedia, |
| 1056 downloadOptions: _downloadOptions); |
| 1057 return _response.then((data) => new Operation.fromJson(data)); |
| 1058 } |
| 1059 |
| 1060 /** |
| 1061 * Deletes the specified persistent disk resource. |
| 1062 * |
| 1063 * Request parameters: |
| 1064 * |
| 1065 * [project] - Name of the project scoping this request. |
| 1066 * Value must have pattern |
| 1067 * "(?:(?:[-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])?))". |
| 1068 * |
| 1069 * [zone] - Name of the zone scoping this request. |
| 1070 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1071 * |
| 1072 * [disk] - Name of the persistent disk resource to delete. |
| 1073 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1074 * |
| 1075 * Completes with a [Operation]. |
| 1076 * |
| 1077 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1078 * error. |
| 1079 * |
| 1080 * If the used [http.Client] completes with an error when making a REST call, |
| 1081 * this method will complete with the same error. |
| 1082 */ |
| 1083 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing disk) { |
| 1084 var _url = null; |
| 1085 var _queryParams = new core.Map(); |
| 1086 var _uploadMedia = null; |
| 1087 var _uploadOptions = null; |
| 1088 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1089 var _body = null; |
| 1090 |
| 1091 if (project == null) { |
| 1092 throw new core.ArgumentError("Parameter project is required."); |
| 1093 } |
| 1094 if (zone == null) { |
| 1095 throw new core.ArgumentError("Parameter zone is required."); |
| 1096 } |
| 1097 if (disk == null) { |
| 1098 throw new core.ArgumentError("Parameter disk is required."); |
| 1099 } |
| 1100 |
| 1101 |
| 1102 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/disks/' + common_internal.Escaper.
ecapeVariable('$disk'); |
| 1103 |
| 1104 var _response = _requester.request(_url, |
| 1105 "DELETE", |
| 1106 body: _body, |
| 1107 queryParams: _queryParams, |
| 1108 uploadOptions: _uploadOptions, |
| 1109 uploadMedia: _uploadMedia, |
| 1110 downloadOptions: _downloadOptions); |
| 1111 return _response.then((data) => new Operation.fromJson(data)); |
| 1112 } |
| 1113 |
| 1114 /** |
| 1115 * Returns the specified persistent disk resource. |
| 1116 * |
| 1117 * Request parameters: |
| 1118 * |
| 1119 * [project] - Name of the project scoping this request. |
| 1120 * Value must have pattern |
| 1121 * "(?:(?:[-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])?))". |
| 1122 * |
| 1123 * [zone] - Name of the zone scoping this request. |
| 1124 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1125 * |
| 1126 * [disk] - Name of the persistent disk resource to return. |
| 1127 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1128 * |
| 1129 * Completes with a [Disk]. |
| 1130 * |
| 1131 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1132 * error. |
| 1133 * |
| 1134 * If the used [http.Client] completes with an error when making a REST call, |
| 1135 * this method will complete with the same error. |
| 1136 */ |
| 1137 async.Future<Disk> get(core.String project, core.String zone, core.String disk
) { |
| 1138 var _url = null; |
| 1139 var _queryParams = new core.Map(); |
| 1140 var _uploadMedia = null; |
| 1141 var _uploadOptions = null; |
| 1142 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1143 var _body = null; |
| 1144 |
| 1145 if (project == null) { |
| 1146 throw new core.ArgumentError("Parameter project is required."); |
| 1147 } |
| 1148 if (zone == null) { |
| 1149 throw new core.ArgumentError("Parameter zone is required."); |
| 1150 } |
| 1151 if (disk == null) { |
| 1152 throw new core.ArgumentError("Parameter disk is required."); |
| 1153 } |
| 1154 |
| 1155 |
| 1156 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/disks/' + common_internal.Escaper.
ecapeVariable('$disk'); |
| 1157 |
| 1158 var _response = _requester.request(_url, |
| 1159 "GET", |
| 1160 body: _body, |
| 1161 queryParams: _queryParams, |
| 1162 uploadOptions: _uploadOptions, |
| 1163 uploadMedia: _uploadMedia, |
| 1164 downloadOptions: _downloadOptions); |
| 1165 return _response.then((data) => new Disk.fromJson(data)); |
| 1166 } |
| 1167 |
| 1168 /** |
| 1169 * Creates a persistent disk resource in the specified project using the data |
| 1170 * included in the request. |
| 1171 * |
| 1172 * [request] - The metadata request object. |
| 1173 * |
| 1174 * Request parameters: |
| 1175 * |
| 1176 * [project] - Name of the project scoping this request. |
| 1177 * Value must have pattern |
| 1178 * "(?:(?:[-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])?))". |
| 1179 * |
| 1180 * [zone] - Name of the zone scoping this request. |
| 1181 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1182 * |
| 1183 * [sourceImage] - Optional. Source image to restore onto a disk. |
| 1184 * |
| 1185 * Completes with a [Operation]. |
| 1186 * |
| 1187 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1188 * error. |
| 1189 * |
| 1190 * If the used [http.Client] completes with an error when making a REST call, |
| 1191 * this method will complete with the same error. |
| 1192 */ |
| 1193 async.Future<Operation> insert(Disk request, core.String project, core.String
zone, {core.String sourceImage}) { |
| 1194 var _url = null; |
| 1195 var _queryParams = new core.Map(); |
| 1196 var _uploadMedia = null; |
| 1197 var _uploadOptions = null; |
| 1198 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1199 var _body = null; |
| 1200 |
| 1201 if (request != null) { |
| 1202 _body = convert.JSON.encode((request).toJson()); |
| 1203 } |
| 1204 if (project == null) { |
| 1205 throw new core.ArgumentError("Parameter project is required."); |
| 1206 } |
| 1207 if (zone == null) { |
| 1208 throw new core.ArgumentError("Parameter zone is required."); |
| 1209 } |
| 1210 if (sourceImage != null) { |
| 1211 _queryParams["sourceImage"] = [sourceImage]; |
| 1212 } |
| 1213 |
| 1214 |
| 1215 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/disks'; |
| 1216 |
| 1217 var _response = _requester.request(_url, |
| 1218 "POST", |
| 1219 body: _body, |
| 1220 queryParams: _queryParams, |
| 1221 uploadOptions: _uploadOptions, |
| 1222 uploadMedia: _uploadMedia, |
| 1223 downloadOptions: _downloadOptions); |
| 1224 return _response.then((data) => new Operation.fromJson(data)); |
| 1225 } |
| 1226 |
| 1227 /** |
| 1228 * Retrieves the list of persistent disk resources contained within the |
| 1229 * specified zone. |
| 1230 * |
| 1231 * Request parameters: |
| 1232 * |
| 1233 * [project] - Name of the project scoping this request. |
| 1234 * Value must have pattern |
| 1235 * "(?:(?:[-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])?))". |
| 1236 * |
| 1237 * [zone] - Name of the zone scoping this request. |
| 1238 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1239 * |
| 1240 * [filter] - Optional. Filter expression for filtering listed resources. |
| 1241 * |
| 1242 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 1243 * value is 500 and default value is 500. |
| 1244 * Value must be between "0" and "500". |
| 1245 * |
| 1246 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 1247 * by maxResults. Used to continue a previous list request. |
| 1248 * |
| 1249 * Completes with a [DiskList]. |
| 1250 * |
| 1251 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1252 * error. |
| 1253 * |
| 1254 * If the used [http.Client] completes with an error when making a REST call, |
| 1255 * this method will complete with the same error. |
| 1256 */ |
| 1257 async.Future<DiskList> list(core.String project, core.String zone, {core.Strin
g filter, core.int maxResults, core.String pageToken}) { |
| 1258 var _url = null; |
| 1259 var _queryParams = new core.Map(); |
| 1260 var _uploadMedia = null; |
| 1261 var _uploadOptions = null; |
| 1262 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1263 var _body = null; |
| 1264 |
| 1265 if (project == null) { |
| 1266 throw new core.ArgumentError("Parameter project is required."); |
| 1267 } |
| 1268 if (zone == null) { |
| 1269 throw new core.ArgumentError("Parameter zone is required."); |
| 1270 } |
| 1271 if (filter != null) { |
| 1272 _queryParams["filter"] = [filter]; |
| 1273 } |
| 1274 if (maxResults != null) { |
| 1275 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1276 } |
| 1277 if (pageToken != null) { |
| 1278 _queryParams["pageToken"] = [pageToken]; |
| 1279 } |
| 1280 |
| 1281 |
| 1282 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/disks'; |
| 1283 |
| 1284 var _response = _requester.request(_url, |
| 1285 "GET", |
| 1286 body: _body, |
| 1287 queryParams: _queryParams, |
| 1288 uploadOptions: _uploadOptions, |
| 1289 uploadMedia: _uploadMedia, |
| 1290 downloadOptions: _downloadOptions); |
| 1291 return _response.then((data) => new DiskList.fromJson(data)); |
| 1292 } |
| 1293 |
| 1294 } |
| 1295 |
| 1296 |
| 1297 /** Not documented yet. */ |
| 1298 class FirewallsResourceApi { |
| 1299 final common_internal.ApiRequester _requester; |
| 1300 |
| 1301 FirewallsResourceApi(common_internal.ApiRequester client) : |
| 1302 _requester = client; |
| 1303 |
| 1304 /** |
| 1305 * Deletes the specified firewall resource. |
| 1306 * |
| 1307 * Request parameters: |
| 1308 * |
| 1309 * [project] - Name of the project scoping this request. |
| 1310 * Value must have pattern |
| 1311 * "(?:(?:[-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])?))". |
| 1312 * |
| 1313 * [firewall] - Name of the firewall resource to delete. |
| 1314 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1315 * |
| 1316 * Completes with a [Operation]. |
| 1317 * |
| 1318 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1319 * error. |
| 1320 * |
| 1321 * If the used [http.Client] completes with an error when making a REST call, |
| 1322 * this method will complete with the same error. |
| 1323 */ |
| 1324 async.Future<Operation> delete(core.String project, core.String firewall) { |
| 1325 var _url = null; |
| 1326 var _queryParams = new core.Map(); |
| 1327 var _uploadMedia = null; |
| 1328 var _uploadOptions = null; |
| 1329 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1330 var _body = null; |
| 1331 |
| 1332 if (project == null) { |
| 1333 throw new core.ArgumentError("Parameter project is required."); |
| 1334 } |
| 1335 if (firewall == null) { |
| 1336 throw new core.ArgumentError("Parameter firewall is required."); |
| 1337 } |
| 1338 |
| 1339 |
| 1340 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/firewall
s/' + common_internal.Escaper.ecapeVariable('$firewall'); |
| 1341 |
| 1342 var _response = _requester.request(_url, |
| 1343 "DELETE", |
| 1344 body: _body, |
| 1345 queryParams: _queryParams, |
| 1346 uploadOptions: _uploadOptions, |
| 1347 uploadMedia: _uploadMedia, |
| 1348 downloadOptions: _downloadOptions); |
| 1349 return _response.then((data) => new Operation.fromJson(data)); |
| 1350 } |
| 1351 |
| 1352 /** |
| 1353 * Returns the specified firewall resource. |
| 1354 * |
| 1355 * Request parameters: |
| 1356 * |
| 1357 * [project] - Name of the project scoping this request. |
| 1358 * Value must have pattern |
| 1359 * "(?:(?:[-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])?))". |
| 1360 * |
| 1361 * [firewall] - Name of the firewall resource to return. |
| 1362 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1363 * |
| 1364 * Completes with a [Firewall]. |
| 1365 * |
| 1366 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1367 * error. |
| 1368 * |
| 1369 * If the used [http.Client] completes with an error when making a REST call, |
| 1370 * this method will complete with the same error. |
| 1371 */ |
| 1372 async.Future<Firewall> get(core.String project, core.String firewall) { |
| 1373 var _url = null; |
| 1374 var _queryParams = new core.Map(); |
| 1375 var _uploadMedia = null; |
| 1376 var _uploadOptions = null; |
| 1377 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1378 var _body = null; |
| 1379 |
| 1380 if (project == null) { |
| 1381 throw new core.ArgumentError("Parameter project is required."); |
| 1382 } |
| 1383 if (firewall == null) { |
| 1384 throw new core.ArgumentError("Parameter firewall is required."); |
| 1385 } |
| 1386 |
| 1387 |
| 1388 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/firewall
s/' + common_internal.Escaper.ecapeVariable('$firewall'); |
| 1389 |
| 1390 var _response = _requester.request(_url, |
| 1391 "GET", |
| 1392 body: _body, |
| 1393 queryParams: _queryParams, |
| 1394 uploadOptions: _uploadOptions, |
| 1395 uploadMedia: _uploadMedia, |
| 1396 downloadOptions: _downloadOptions); |
| 1397 return _response.then((data) => new Firewall.fromJson(data)); |
| 1398 } |
| 1399 |
| 1400 /** |
| 1401 * Creates a firewall resource in the specified project using the data |
| 1402 * included in the request. |
| 1403 * |
| 1404 * [request] - The metadata request object. |
| 1405 * |
| 1406 * Request parameters: |
| 1407 * |
| 1408 * [project] - Name of the project scoping this request. |
| 1409 * Value must have pattern |
| 1410 * "(?:(?:[-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])?))". |
| 1411 * |
| 1412 * Completes with a [Operation]. |
| 1413 * |
| 1414 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1415 * error. |
| 1416 * |
| 1417 * If the used [http.Client] completes with an error when making a REST call, |
| 1418 * this method will complete with the same error. |
| 1419 */ |
| 1420 async.Future<Operation> insert(Firewall request, core.String project) { |
| 1421 var _url = null; |
| 1422 var _queryParams = new core.Map(); |
| 1423 var _uploadMedia = null; |
| 1424 var _uploadOptions = null; |
| 1425 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1426 var _body = null; |
| 1427 |
| 1428 if (request != null) { |
| 1429 _body = convert.JSON.encode((request).toJson()); |
| 1430 } |
| 1431 if (project == null) { |
| 1432 throw new core.ArgumentError("Parameter project is required."); |
| 1433 } |
| 1434 |
| 1435 |
| 1436 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/firewall
s'; |
| 1437 |
| 1438 var _response = _requester.request(_url, |
| 1439 "POST", |
| 1440 body: _body, |
| 1441 queryParams: _queryParams, |
| 1442 uploadOptions: _uploadOptions, |
| 1443 uploadMedia: _uploadMedia, |
| 1444 downloadOptions: _downloadOptions); |
| 1445 return _response.then((data) => new Operation.fromJson(data)); |
| 1446 } |
| 1447 |
| 1448 /** |
| 1449 * Retrieves the list of firewall resources available to the specified |
| 1450 * project. |
| 1451 * |
| 1452 * Request parameters: |
| 1453 * |
| 1454 * [project] - Name of the project scoping this request. |
| 1455 * Value must have pattern |
| 1456 * "(?:(?:[-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])?))". |
| 1457 * |
| 1458 * [filter] - Optional. Filter expression for filtering listed resources. |
| 1459 * |
| 1460 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 1461 * value is 500 and default value is 500. |
| 1462 * Value must be between "0" and "500". |
| 1463 * |
| 1464 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 1465 * by maxResults. Used to continue a previous list request. |
| 1466 * |
| 1467 * Completes with a [FirewallList]. |
| 1468 * |
| 1469 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1470 * error. |
| 1471 * |
| 1472 * If the used [http.Client] completes with an error when making a REST call, |
| 1473 * this method will complete with the same error. |
| 1474 */ |
| 1475 async.Future<FirewallList> list(core.String project, {core.String filter, core
.int maxResults, core.String pageToken}) { |
| 1476 var _url = null; |
| 1477 var _queryParams = new core.Map(); |
| 1478 var _uploadMedia = null; |
| 1479 var _uploadOptions = null; |
| 1480 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1481 var _body = null; |
| 1482 |
| 1483 if (project == null) { |
| 1484 throw new core.ArgumentError("Parameter project is required."); |
| 1485 } |
| 1486 if (filter != null) { |
| 1487 _queryParams["filter"] = [filter]; |
| 1488 } |
| 1489 if (maxResults != null) { |
| 1490 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1491 } |
| 1492 if (pageToken != null) { |
| 1493 _queryParams["pageToken"] = [pageToken]; |
| 1494 } |
| 1495 |
| 1496 |
| 1497 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/firewall
s'; |
| 1498 |
| 1499 var _response = _requester.request(_url, |
| 1500 "GET", |
| 1501 body: _body, |
| 1502 queryParams: _queryParams, |
| 1503 uploadOptions: _uploadOptions, |
| 1504 uploadMedia: _uploadMedia, |
| 1505 downloadOptions: _downloadOptions); |
| 1506 return _response.then((data) => new FirewallList.fromJson(data)); |
| 1507 } |
| 1508 |
| 1509 /** |
| 1510 * Updates the specified firewall resource with the data included in the |
| 1511 * request. This method supports patch semantics. |
| 1512 * |
| 1513 * [request] - The metadata request object. |
| 1514 * |
| 1515 * Request parameters: |
| 1516 * |
| 1517 * [project] - Name of the project scoping this request. |
| 1518 * Value must have pattern |
| 1519 * "(?:(?:[-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])?))". |
| 1520 * |
| 1521 * [firewall] - Name of the firewall resource to update. |
| 1522 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1523 * |
| 1524 * Completes with a [Operation]. |
| 1525 * |
| 1526 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1527 * error. |
| 1528 * |
| 1529 * If the used [http.Client] completes with an error when making a REST call, |
| 1530 * this method will complete with the same error. |
| 1531 */ |
| 1532 async.Future<Operation> patch(Firewall request, core.String project, core.Stri
ng firewall) { |
| 1533 var _url = null; |
| 1534 var _queryParams = new core.Map(); |
| 1535 var _uploadMedia = null; |
| 1536 var _uploadOptions = null; |
| 1537 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1538 var _body = null; |
| 1539 |
| 1540 if (request != null) { |
| 1541 _body = convert.JSON.encode((request).toJson()); |
| 1542 } |
| 1543 if (project == null) { |
| 1544 throw new core.ArgumentError("Parameter project is required."); |
| 1545 } |
| 1546 if (firewall == null) { |
| 1547 throw new core.ArgumentError("Parameter firewall is required."); |
| 1548 } |
| 1549 |
| 1550 |
| 1551 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/firewall
s/' + common_internal.Escaper.ecapeVariable('$firewall'); |
| 1552 |
| 1553 var _response = _requester.request(_url, |
| 1554 "PATCH", |
| 1555 body: _body, |
| 1556 queryParams: _queryParams, |
| 1557 uploadOptions: _uploadOptions, |
| 1558 uploadMedia: _uploadMedia, |
| 1559 downloadOptions: _downloadOptions); |
| 1560 return _response.then((data) => new Operation.fromJson(data)); |
| 1561 } |
| 1562 |
| 1563 /** |
| 1564 * Updates the specified firewall resource with the data included in the |
| 1565 * request. |
| 1566 * |
| 1567 * [request] - The metadata request object. |
| 1568 * |
| 1569 * Request parameters: |
| 1570 * |
| 1571 * [project] - Name of the project scoping this request. |
| 1572 * Value must have pattern |
| 1573 * "(?:(?:[-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])?))". |
| 1574 * |
| 1575 * [firewall] - Name of the firewall resource to update. |
| 1576 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1577 * |
| 1578 * Completes with a [Operation]. |
| 1579 * |
| 1580 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1581 * error. |
| 1582 * |
| 1583 * If the used [http.Client] completes with an error when making a REST call, |
| 1584 * this method will complete with the same error. |
| 1585 */ |
| 1586 async.Future<Operation> update(Firewall request, core.String project, core.Str
ing firewall) { |
| 1587 var _url = null; |
| 1588 var _queryParams = new core.Map(); |
| 1589 var _uploadMedia = null; |
| 1590 var _uploadOptions = null; |
| 1591 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1592 var _body = null; |
| 1593 |
| 1594 if (request != null) { |
| 1595 _body = convert.JSON.encode((request).toJson()); |
| 1596 } |
| 1597 if (project == null) { |
| 1598 throw new core.ArgumentError("Parameter project is required."); |
| 1599 } |
| 1600 if (firewall == null) { |
| 1601 throw new core.ArgumentError("Parameter firewall is required."); |
| 1602 } |
| 1603 |
| 1604 |
| 1605 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/firewall
s/' + common_internal.Escaper.ecapeVariable('$firewall'); |
| 1606 |
| 1607 var _response = _requester.request(_url, |
| 1608 "PUT", |
| 1609 body: _body, |
| 1610 queryParams: _queryParams, |
| 1611 uploadOptions: _uploadOptions, |
| 1612 uploadMedia: _uploadMedia, |
| 1613 downloadOptions: _downloadOptions); |
| 1614 return _response.then((data) => new Operation.fromJson(data)); |
| 1615 } |
| 1616 |
| 1617 } |
| 1618 |
| 1619 |
| 1620 /** Not documented yet. */ |
| 1621 class ForwardingRulesResourceApi { |
| 1622 final common_internal.ApiRequester _requester; |
| 1623 |
| 1624 ForwardingRulesResourceApi(common_internal.ApiRequester client) : |
| 1625 _requester = client; |
| 1626 |
| 1627 /** |
| 1628 * Retrieves the list of forwarding rules grouped by scope. |
| 1629 * |
| 1630 * Request parameters: |
| 1631 * |
| 1632 * [project] - Name of the project scoping this request. |
| 1633 * Value must have pattern |
| 1634 * "(?:(?:[-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])?))". |
| 1635 * |
| 1636 * [filter] - Optional. Filter expression for filtering listed resources. |
| 1637 * |
| 1638 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 1639 * value is 500 and default value is 500. |
| 1640 * Value must be between "0" and "500". |
| 1641 * |
| 1642 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 1643 * by maxResults. Used to continue a previous list request. |
| 1644 * |
| 1645 * Completes with a [ForwardingRuleAggregatedList]. |
| 1646 * |
| 1647 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1648 * error. |
| 1649 * |
| 1650 * If the used [http.Client] completes with an error when making a REST call, |
| 1651 * this method will complete with the same error. |
| 1652 */ |
| 1653 async.Future<ForwardingRuleAggregatedList> aggregatedList(core.String project,
{core.String filter, core.int maxResults, core.String pageToken}) { |
| 1654 var _url = null; |
| 1655 var _queryParams = new core.Map(); |
| 1656 var _uploadMedia = null; |
| 1657 var _uploadOptions = null; |
| 1658 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1659 var _body = null; |
| 1660 |
| 1661 if (project == null) { |
| 1662 throw new core.ArgumentError("Parameter project is required."); |
| 1663 } |
| 1664 if (filter != null) { |
| 1665 _queryParams["filter"] = [filter]; |
| 1666 } |
| 1667 if (maxResults != null) { |
| 1668 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1669 } |
| 1670 if (pageToken != null) { |
| 1671 _queryParams["pageToken"] = [pageToken]; |
| 1672 } |
| 1673 |
| 1674 |
| 1675 _url = common_internal.Escaper.ecapeVariable('$project') + '/aggregated/forw
ardingRules'; |
| 1676 |
| 1677 var _response = _requester.request(_url, |
| 1678 "GET", |
| 1679 body: _body, |
| 1680 queryParams: _queryParams, |
| 1681 uploadOptions: _uploadOptions, |
| 1682 uploadMedia: _uploadMedia, |
| 1683 downloadOptions: _downloadOptions); |
| 1684 return _response.then((data) => new ForwardingRuleAggregatedList.fromJson(da
ta)); |
| 1685 } |
| 1686 |
| 1687 /** |
| 1688 * Deletes the specified ForwardingRule resource. |
| 1689 * |
| 1690 * Request parameters: |
| 1691 * |
| 1692 * [project] - Name of the project scoping this request. |
| 1693 * Value must have pattern |
| 1694 * "(?:(?:[-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])?))". |
| 1695 * |
| 1696 * [region] - Name of the region scoping this request. |
| 1697 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1698 * |
| 1699 * [forwardingRule] - Name of the ForwardingRule resource to delete. |
| 1700 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1701 * |
| 1702 * Completes with a [Operation]. |
| 1703 * |
| 1704 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1705 * error. |
| 1706 * |
| 1707 * If the used [http.Client] completes with an error when making a REST call, |
| 1708 * this method will complete with the same error. |
| 1709 */ |
| 1710 async.Future<Operation> delete(core.String project, core.String region, core.S
tring forwardingRule) { |
| 1711 var _url = null; |
| 1712 var _queryParams = new core.Map(); |
| 1713 var _uploadMedia = null; |
| 1714 var _uploadOptions = null; |
| 1715 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1716 var _body = null; |
| 1717 |
| 1718 if (project == null) { |
| 1719 throw new core.ArgumentError("Parameter project is required."); |
| 1720 } |
| 1721 if (region == null) { |
| 1722 throw new core.ArgumentError("Parameter region is required."); |
| 1723 } |
| 1724 if (forwardingRule == null) { |
| 1725 throw new core.ArgumentError("Parameter forwardingRule is required."); |
| 1726 } |
| 1727 |
| 1728 |
| 1729 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/forwardingRules/' + common_int
ernal.Escaper.ecapeVariable('$forwardingRule'); |
| 1730 |
| 1731 var _response = _requester.request(_url, |
| 1732 "DELETE", |
| 1733 body: _body, |
| 1734 queryParams: _queryParams, |
| 1735 uploadOptions: _uploadOptions, |
| 1736 uploadMedia: _uploadMedia, |
| 1737 downloadOptions: _downloadOptions); |
| 1738 return _response.then((data) => new Operation.fromJson(data)); |
| 1739 } |
| 1740 |
| 1741 /** |
| 1742 * Returns the specified ForwardingRule resource. |
| 1743 * |
| 1744 * Request parameters: |
| 1745 * |
| 1746 * [project] - Name of the project scoping this request. |
| 1747 * Value must have pattern |
| 1748 * "(?:(?:[-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])?))". |
| 1749 * |
| 1750 * [region] - Name of the region scoping this request. |
| 1751 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1752 * |
| 1753 * [forwardingRule] - Name of the ForwardingRule resource to return. |
| 1754 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1755 * |
| 1756 * Completes with a [ForwardingRule]. |
| 1757 * |
| 1758 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1759 * error. |
| 1760 * |
| 1761 * If the used [http.Client] completes with an error when making a REST call, |
| 1762 * this method will complete with the same error. |
| 1763 */ |
| 1764 async.Future<ForwardingRule> get(core.String project, core.String region, core
.String forwardingRule) { |
| 1765 var _url = null; |
| 1766 var _queryParams = new core.Map(); |
| 1767 var _uploadMedia = null; |
| 1768 var _uploadOptions = null; |
| 1769 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1770 var _body = null; |
| 1771 |
| 1772 if (project == null) { |
| 1773 throw new core.ArgumentError("Parameter project is required."); |
| 1774 } |
| 1775 if (region == null) { |
| 1776 throw new core.ArgumentError("Parameter region is required."); |
| 1777 } |
| 1778 if (forwardingRule == null) { |
| 1779 throw new core.ArgumentError("Parameter forwardingRule is required."); |
| 1780 } |
| 1781 |
| 1782 |
| 1783 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/forwardingRules/' + common_int
ernal.Escaper.ecapeVariable('$forwardingRule'); |
| 1784 |
| 1785 var _response = _requester.request(_url, |
| 1786 "GET", |
| 1787 body: _body, |
| 1788 queryParams: _queryParams, |
| 1789 uploadOptions: _uploadOptions, |
| 1790 uploadMedia: _uploadMedia, |
| 1791 downloadOptions: _downloadOptions); |
| 1792 return _response.then((data) => new ForwardingRule.fromJson(data)); |
| 1793 } |
| 1794 |
| 1795 /** |
| 1796 * Creates a ForwardingRule resource in the specified project and region using |
| 1797 * the data included in the request. |
| 1798 * |
| 1799 * [request] - The metadata request object. |
| 1800 * |
| 1801 * Request parameters: |
| 1802 * |
| 1803 * [project] - Name of the project scoping this request. |
| 1804 * Value must have pattern |
| 1805 * "(?:(?:[-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])?))". |
| 1806 * |
| 1807 * [region] - Name of the region scoping this request. |
| 1808 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1809 * |
| 1810 * Completes with a [Operation]. |
| 1811 * |
| 1812 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1813 * error. |
| 1814 * |
| 1815 * If the used [http.Client] completes with an error when making a REST call, |
| 1816 * this method will complete with the same error. |
| 1817 */ |
| 1818 async.Future<Operation> insert(ForwardingRule request, core.String project, co
re.String region) { |
| 1819 var _url = null; |
| 1820 var _queryParams = new core.Map(); |
| 1821 var _uploadMedia = null; |
| 1822 var _uploadOptions = null; |
| 1823 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1824 var _body = null; |
| 1825 |
| 1826 if (request != null) { |
| 1827 _body = convert.JSON.encode((request).toJson()); |
| 1828 } |
| 1829 if (project == null) { |
| 1830 throw new core.ArgumentError("Parameter project is required."); |
| 1831 } |
| 1832 if (region == null) { |
| 1833 throw new core.ArgumentError("Parameter region is required."); |
| 1834 } |
| 1835 |
| 1836 |
| 1837 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/forwardingRules'; |
| 1838 |
| 1839 var _response = _requester.request(_url, |
| 1840 "POST", |
| 1841 body: _body, |
| 1842 queryParams: _queryParams, |
| 1843 uploadOptions: _uploadOptions, |
| 1844 uploadMedia: _uploadMedia, |
| 1845 downloadOptions: _downloadOptions); |
| 1846 return _response.then((data) => new Operation.fromJson(data)); |
| 1847 } |
| 1848 |
| 1849 /** |
| 1850 * Retrieves the list of ForwardingRule resources available to the specified |
| 1851 * project and region. |
| 1852 * |
| 1853 * Request parameters: |
| 1854 * |
| 1855 * [project] - Name of the project scoping this request. |
| 1856 * Value must have pattern |
| 1857 * "(?:(?:[-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])?))". |
| 1858 * |
| 1859 * [region] - Name of the region scoping this request. |
| 1860 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1861 * |
| 1862 * [filter] - Optional. Filter expression for filtering listed resources. |
| 1863 * |
| 1864 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 1865 * value is 500 and default value is 500. |
| 1866 * Value must be between "0" and "500". |
| 1867 * |
| 1868 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 1869 * by maxResults. Used to continue a previous list request. |
| 1870 * |
| 1871 * Completes with a [ForwardingRuleList]. |
| 1872 * |
| 1873 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1874 * error. |
| 1875 * |
| 1876 * If the used [http.Client] completes with an error when making a REST call, |
| 1877 * this method will complete with the same error. |
| 1878 */ |
| 1879 async.Future<ForwardingRuleList> list(core.String project, core.String region,
{core.String filter, core.int maxResults, core.String pageToken}) { |
| 1880 var _url = null; |
| 1881 var _queryParams = new core.Map(); |
| 1882 var _uploadMedia = null; |
| 1883 var _uploadOptions = null; |
| 1884 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1885 var _body = null; |
| 1886 |
| 1887 if (project == null) { |
| 1888 throw new core.ArgumentError("Parameter project is required."); |
| 1889 } |
| 1890 if (region == null) { |
| 1891 throw new core.ArgumentError("Parameter region is required."); |
| 1892 } |
| 1893 if (filter != null) { |
| 1894 _queryParams["filter"] = [filter]; |
| 1895 } |
| 1896 if (maxResults != null) { |
| 1897 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1898 } |
| 1899 if (pageToken != null) { |
| 1900 _queryParams["pageToken"] = [pageToken]; |
| 1901 } |
| 1902 |
| 1903 |
| 1904 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/forwardingRules'; |
| 1905 |
| 1906 var _response = _requester.request(_url, |
| 1907 "GET", |
| 1908 body: _body, |
| 1909 queryParams: _queryParams, |
| 1910 uploadOptions: _uploadOptions, |
| 1911 uploadMedia: _uploadMedia, |
| 1912 downloadOptions: _downloadOptions); |
| 1913 return _response.then((data) => new ForwardingRuleList.fromJson(data)); |
| 1914 } |
| 1915 |
| 1916 /** |
| 1917 * Changes target url for forwarding rule. |
| 1918 * |
| 1919 * [request] - The metadata request object. |
| 1920 * |
| 1921 * Request parameters: |
| 1922 * |
| 1923 * [project] - Name of the project scoping this request. |
| 1924 * Value must have pattern |
| 1925 * "(?:(?:[-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])?))". |
| 1926 * |
| 1927 * [region] - Name of the region scoping this request. |
| 1928 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1929 * |
| 1930 * [forwardingRule] - Name of the ForwardingRule resource in which target is |
| 1931 * to be set. |
| 1932 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1933 * |
| 1934 * Completes with a [Operation]. |
| 1935 * |
| 1936 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 1937 * error. |
| 1938 * |
| 1939 * If the used [http.Client] completes with an error when making a REST call, |
| 1940 * this method will complete with the same error. |
| 1941 */ |
| 1942 async.Future<Operation> setTarget(TargetReference request, core.String project
, core.String region, core.String forwardingRule) { |
| 1943 var _url = null; |
| 1944 var _queryParams = new core.Map(); |
| 1945 var _uploadMedia = null; |
| 1946 var _uploadOptions = null; |
| 1947 var _downloadOptions = common.DownloadOptions.Metadata; |
| 1948 var _body = null; |
| 1949 |
| 1950 if (request != null) { |
| 1951 _body = convert.JSON.encode((request).toJson()); |
| 1952 } |
| 1953 if (project == null) { |
| 1954 throw new core.ArgumentError("Parameter project is required."); |
| 1955 } |
| 1956 if (region == null) { |
| 1957 throw new core.ArgumentError("Parameter region is required."); |
| 1958 } |
| 1959 if (forwardingRule == null) { |
| 1960 throw new core.ArgumentError("Parameter forwardingRule is required."); |
| 1961 } |
| 1962 |
| 1963 |
| 1964 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/forwardingRules/' + common_int
ernal.Escaper.ecapeVariable('$forwardingRule') + '/setTarget'; |
| 1965 |
| 1966 var _response = _requester.request(_url, |
| 1967 "POST", |
| 1968 body: _body, |
| 1969 queryParams: _queryParams, |
| 1970 uploadOptions: _uploadOptions, |
| 1971 uploadMedia: _uploadMedia, |
| 1972 downloadOptions: _downloadOptions); |
| 1973 return _response.then((data) => new Operation.fromJson(data)); |
| 1974 } |
| 1975 |
| 1976 } |
| 1977 |
| 1978 |
| 1979 /** Not documented yet. */ |
| 1980 class GlobalAddressesResourceApi { |
| 1981 final common_internal.ApiRequester _requester; |
| 1982 |
| 1983 GlobalAddressesResourceApi(common_internal.ApiRequester client) : |
| 1984 _requester = client; |
| 1985 |
| 1986 /** |
| 1987 * Deletes the specified address resource. |
| 1988 * |
| 1989 * Request parameters: |
| 1990 * |
| 1991 * [project] - Name of the project scoping this request. |
| 1992 * Value must have pattern |
| 1993 * "(?:(?:[-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])?))". |
| 1994 * |
| 1995 * [address] - Name of the address resource to delete. |
| 1996 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1997 * |
| 1998 * Completes with a [Operation]. |
| 1999 * |
| 2000 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2001 * error. |
| 2002 * |
| 2003 * If the used [http.Client] completes with an error when making a REST call, |
| 2004 * this method will complete with the same error. |
| 2005 */ |
| 2006 async.Future<Operation> delete(core.String project, core.String address) { |
| 2007 var _url = null; |
| 2008 var _queryParams = new core.Map(); |
| 2009 var _uploadMedia = null; |
| 2010 var _uploadOptions = null; |
| 2011 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2012 var _body = null; |
| 2013 |
| 2014 if (project == null) { |
| 2015 throw new core.ArgumentError("Parameter project is required."); |
| 2016 } |
| 2017 if (address == null) { |
| 2018 throw new core.ArgumentError("Parameter address is required."); |
| 2019 } |
| 2020 |
| 2021 |
| 2022 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/addresse
s/' + common_internal.Escaper.ecapeVariable('$address'); |
| 2023 |
| 2024 var _response = _requester.request(_url, |
| 2025 "DELETE", |
| 2026 body: _body, |
| 2027 queryParams: _queryParams, |
| 2028 uploadOptions: _uploadOptions, |
| 2029 uploadMedia: _uploadMedia, |
| 2030 downloadOptions: _downloadOptions); |
| 2031 return _response.then((data) => new Operation.fromJson(data)); |
| 2032 } |
| 2033 |
| 2034 /** |
| 2035 * Returns the specified address resource. |
| 2036 * |
| 2037 * Request parameters: |
| 2038 * |
| 2039 * [project] - Name of the project scoping this request. |
| 2040 * Value must have pattern |
| 2041 * "(?:(?:[-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])?))". |
| 2042 * |
| 2043 * [address] - Name of the address resource to return. |
| 2044 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2045 * |
| 2046 * Completes with a [Address]. |
| 2047 * |
| 2048 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2049 * error. |
| 2050 * |
| 2051 * If the used [http.Client] completes with an error when making a REST call, |
| 2052 * this method will complete with the same error. |
| 2053 */ |
| 2054 async.Future<Address> get(core.String project, core.String address) { |
| 2055 var _url = null; |
| 2056 var _queryParams = new core.Map(); |
| 2057 var _uploadMedia = null; |
| 2058 var _uploadOptions = null; |
| 2059 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2060 var _body = null; |
| 2061 |
| 2062 if (project == null) { |
| 2063 throw new core.ArgumentError("Parameter project is required."); |
| 2064 } |
| 2065 if (address == null) { |
| 2066 throw new core.ArgumentError("Parameter address is required."); |
| 2067 } |
| 2068 |
| 2069 |
| 2070 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/addresse
s/' + common_internal.Escaper.ecapeVariable('$address'); |
| 2071 |
| 2072 var _response = _requester.request(_url, |
| 2073 "GET", |
| 2074 body: _body, |
| 2075 queryParams: _queryParams, |
| 2076 uploadOptions: _uploadOptions, |
| 2077 uploadMedia: _uploadMedia, |
| 2078 downloadOptions: _downloadOptions); |
| 2079 return _response.then((data) => new Address.fromJson(data)); |
| 2080 } |
| 2081 |
| 2082 /** |
| 2083 * Creates an address resource in the specified project using the data |
| 2084 * included in the request. |
| 2085 * |
| 2086 * [request] - The metadata request object. |
| 2087 * |
| 2088 * Request parameters: |
| 2089 * |
| 2090 * [project] - Name of the project scoping this request. |
| 2091 * Value must have pattern |
| 2092 * "(?:(?:[-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])?))". |
| 2093 * |
| 2094 * Completes with a [Operation]. |
| 2095 * |
| 2096 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2097 * error. |
| 2098 * |
| 2099 * If the used [http.Client] completes with an error when making a REST call, |
| 2100 * this method will complete with the same error. |
| 2101 */ |
| 2102 async.Future<Operation> insert(Address request, core.String project) { |
| 2103 var _url = null; |
| 2104 var _queryParams = new core.Map(); |
| 2105 var _uploadMedia = null; |
| 2106 var _uploadOptions = null; |
| 2107 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2108 var _body = null; |
| 2109 |
| 2110 if (request != null) { |
| 2111 _body = convert.JSON.encode((request).toJson()); |
| 2112 } |
| 2113 if (project == null) { |
| 2114 throw new core.ArgumentError("Parameter project is required."); |
| 2115 } |
| 2116 |
| 2117 |
| 2118 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/addresse
s'; |
| 2119 |
| 2120 var _response = _requester.request(_url, |
| 2121 "POST", |
| 2122 body: _body, |
| 2123 queryParams: _queryParams, |
| 2124 uploadOptions: _uploadOptions, |
| 2125 uploadMedia: _uploadMedia, |
| 2126 downloadOptions: _downloadOptions); |
| 2127 return _response.then((data) => new Operation.fromJson(data)); |
| 2128 } |
| 2129 |
| 2130 /** |
| 2131 * Retrieves the list of global address resources. |
| 2132 * |
| 2133 * Request parameters: |
| 2134 * |
| 2135 * [project] - Name of the project scoping this request. |
| 2136 * Value must have pattern |
| 2137 * "(?:(?:[-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])?))". |
| 2138 * |
| 2139 * [filter] - Optional. Filter expression for filtering listed resources. |
| 2140 * |
| 2141 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 2142 * value is 500 and default value is 500. |
| 2143 * Value must be between "0" and "500". |
| 2144 * |
| 2145 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 2146 * by maxResults. Used to continue a previous list request. |
| 2147 * |
| 2148 * Completes with a [AddressList]. |
| 2149 * |
| 2150 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2151 * error. |
| 2152 * |
| 2153 * If the used [http.Client] completes with an error when making a REST call, |
| 2154 * this method will complete with the same error. |
| 2155 */ |
| 2156 async.Future<AddressList> list(core.String project, {core.String filter, core.
int maxResults, core.String pageToken}) { |
| 2157 var _url = null; |
| 2158 var _queryParams = new core.Map(); |
| 2159 var _uploadMedia = null; |
| 2160 var _uploadOptions = null; |
| 2161 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2162 var _body = null; |
| 2163 |
| 2164 if (project == null) { |
| 2165 throw new core.ArgumentError("Parameter project is required."); |
| 2166 } |
| 2167 if (filter != null) { |
| 2168 _queryParams["filter"] = [filter]; |
| 2169 } |
| 2170 if (maxResults != null) { |
| 2171 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2172 } |
| 2173 if (pageToken != null) { |
| 2174 _queryParams["pageToken"] = [pageToken]; |
| 2175 } |
| 2176 |
| 2177 |
| 2178 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/addresse
s'; |
| 2179 |
| 2180 var _response = _requester.request(_url, |
| 2181 "GET", |
| 2182 body: _body, |
| 2183 queryParams: _queryParams, |
| 2184 uploadOptions: _uploadOptions, |
| 2185 uploadMedia: _uploadMedia, |
| 2186 downloadOptions: _downloadOptions); |
| 2187 return _response.then((data) => new AddressList.fromJson(data)); |
| 2188 } |
| 2189 |
| 2190 } |
| 2191 |
| 2192 |
| 2193 /** Not documented yet. */ |
| 2194 class GlobalForwardingRulesResourceApi { |
| 2195 final common_internal.ApiRequester _requester; |
| 2196 |
| 2197 GlobalForwardingRulesResourceApi(common_internal.ApiRequester client) : |
| 2198 _requester = client; |
| 2199 |
| 2200 /** |
| 2201 * Deletes the specified ForwardingRule resource. |
| 2202 * |
| 2203 * Request parameters: |
| 2204 * |
| 2205 * [project] - Name of the project scoping this request. |
| 2206 * Value must have pattern |
| 2207 * "(?:(?:[-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])?))". |
| 2208 * |
| 2209 * [forwardingRule] - Name of the ForwardingRule resource to delete. |
| 2210 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2211 * |
| 2212 * Completes with a [Operation]. |
| 2213 * |
| 2214 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2215 * error. |
| 2216 * |
| 2217 * If the used [http.Client] completes with an error when making a REST call, |
| 2218 * this method will complete with the same error. |
| 2219 */ |
| 2220 async.Future<Operation> delete(core.String project, core.String forwardingRule
) { |
| 2221 var _url = null; |
| 2222 var _queryParams = new core.Map(); |
| 2223 var _uploadMedia = null; |
| 2224 var _uploadOptions = null; |
| 2225 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2226 var _body = null; |
| 2227 |
| 2228 if (project == null) { |
| 2229 throw new core.ArgumentError("Parameter project is required."); |
| 2230 } |
| 2231 if (forwardingRule == null) { |
| 2232 throw new core.ArgumentError("Parameter forwardingRule is required."); |
| 2233 } |
| 2234 |
| 2235 |
| 2236 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/forwardi
ngRules/' + common_internal.Escaper.ecapeVariable('$forwardingRule'); |
| 2237 |
| 2238 var _response = _requester.request(_url, |
| 2239 "DELETE", |
| 2240 body: _body, |
| 2241 queryParams: _queryParams, |
| 2242 uploadOptions: _uploadOptions, |
| 2243 uploadMedia: _uploadMedia, |
| 2244 downloadOptions: _downloadOptions); |
| 2245 return _response.then((data) => new Operation.fromJson(data)); |
| 2246 } |
| 2247 |
| 2248 /** |
| 2249 * Returns the specified ForwardingRule resource. |
| 2250 * |
| 2251 * Request parameters: |
| 2252 * |
| 2253 * [project] - Name of the project scoping this request. |
| 2254 * Value must have pattern |
| 2255 * "(?:(?:[-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])?))". |
| 2256 * |
| 2257 * [forwardingRule] - Name of the ForwardingRule resource to return. |
| 2258 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2259 * |
| 2260 * Completes with a [ForwardingRule]. |
| 2261 * |
| 2262 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2263 * error. |
| 2264 * |
| 2265 * If the used [http.Client] completes with an error when making a REST call, |
| 2266 * this method will complete with the same error. |
| 2267 */ |
| 2268 async.Future<ForwardingRule> get(core.String project, core.String forwardingRu
le) { |
| 2269 var _url = null; |
| 2270 var _queryParams = new core.Map(); |
| 2271 var _uploadMedia = null; |
| 2272 var _uploadOptions = null; |
| 2273 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2274 var _body = null; |
| 2275 |
| 2276 if (project == null) { |
| 2277 throw new core.ArgumentError("Parameter project is required."); |
| 2278 } |
| 2279 if (forwardingRule == null) { |
| 2280 throw new core.ArgumentError("Parameter forwardingRule is required."); |
| 2281 } |
| 2282 |
| 2283 |
| 2284 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/forwardi
ngRules/' + common_internal.Escaper.ecapeVariable('$forwardingRule'); |
| 2285 |
| 2286 var _response = _requester.request(_url, |
| 2287 "GET", |
| 2288 body: _body, |
| 2289 queryParams: _queryParams, |
| 2290 uploadOptions: _uploadOptions, |
| 2291 uploadMedia: _uploadMedia, |
| 2292 downloadOptions: _downloadOptions); |
| 2293 return _response.then((data) => new ForwardingRule.fromJson(data)); |
| 2294 } |
| 2295 |
| 2296 /** |
| 2297 * Creates a ForwardingRule resource in the specified project and region using |
| 2298 * the data included in the request. |
| 2299 * |
| 2300 * [request] - The metadata request object. |
| 2301 * |
| 2302 * Request parameters: |
| 2303 * |
| 2304 * [project] - Name of the project scoping this request. |
| 2305 * Value must have pattern |
| 2306 * "(?:(?:[-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])?))". |
| 2307 * |
| 2308 * Completes with a [Operation]. |
| 2309 * |
| 2310 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2311 * error. |
| 2312 * |
| 2313 * If the used [http.Client] completes with an error when making a REST call, |
| 2314 * this method will complete with the same error. |
| 2315 */ |
| 2316 async.Future<Operation> insert(ForwardingRule request, core.String project) { |
| 2317 var _url = null; |
| 2318 var _queryParams = new core.Map(); |
| 2319 var _uploadMedia = null; |
| 2320 var _uploadOptions = null; |
| 2321 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2322 var _body = null; |
| 2323 |
| 2324 if (request != null) { |
| 2325 _body = convert.JSON.encode((request).toJson()); |
| 2326 } |
| 2327 if (project == null) { |
| 2328 throw new core.ArgumentError("Parameter project is required."); |
| 2329 } |
| 2330 |
| 2331 |
| 2332 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/forwardi
ngRules'; |
| 2333 |
| 2334 var _response = _requester.request(_url, |
| 2335 "POST", |
| 2336 body: _body, |
| 2337 queryParams: _queryParams, |
| 2338 uploadOptions: _uploadOptions, |
| 2339 uploadMedia: _uploadMedia, |
| 2340 downloadOptions: _downloadOptions); |
| 2341 return _response.then((data) => new Operation.fromJson(data)); |
| 2342 } |
| 2343 |
| 2344 /** |
| 2345 * Retrieves the list of ForwardingRule resources available to the specified |
| 2346 * project. |
| 2347 * |
| 2348 * Request parameters: |
| 2349 * |
| 2350 * [project] - Name of the project scoping this request. |
| 2351 * Value must have pattern |
| 2352 * "(?:(?:[-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])?))". |
| 2353 * |
| 2354 * [filter] - Optional. Filter expression for filtering listed resources. |
| 2355 * |
| 2356 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 2357 * value is 500 and default value is 500. |
| 2358 * Value must be between "0" and "500". |
| 2359 * |
| 2360 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 2361 * by maxResults. Used to continue a previous list request. |
| 2362 * |
| 2363 * Completes with a [ForwardingRuleList]. |
| 2364 * |
| 2365 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2366 * error. |
| 2367 * |
| 2368 * If the used [http.Client] completes with an error when making a REST call, |
| 2369 * this method will complete with the same error. |
| 2370 */ |
| 2371 async.Future<ForwardingRuleList> list(core.String project, {core.String filter
, core.int maxResults, core.String pageToken}) { |
| 2372 var _url = null; |
| 2373 var _queryParams = new core.Map(); |
| 2374 var _uploadMedia = null; |
| 2375 var _uploadOptions = null; |
| 2376 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2377 var _body = null; |
| 2378 |
| 2379 if (project == null) { |
| 2380 throw new core.ArgumentError("Parameter project is required."); |
| 2381 } |
| 2382 if (filter != null) { |
| 2383 _queryParams["filter"] = [filter]; |
| 2384 } |
| 2385 if (maxResults != null) { |
| 2386 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2387 } |
| 2388 if (pageToken != null) { |
| 2389 _queryParams["pageToken"] = [pageToken]; |
| 2390 } |
| 2391 |
| 2392 |
| 2393 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/forwardi
ngRules'; |
| 2394 |
| 2395 var _response = _requester.request(_url, |
| 2396 "GET", |
| 2397 body: _body, |
| 2398 queryParams: _queryParams, |
| 2399 uploadOptions: _uploadOptions, |
| 2400 uploadMedia: _uploadMedia, |
| 2401 downloadOptions: _downloadOptions); |
| 2402 return _response.then((data) => new ForwardingRuleList.fromJson(data)); |
| 2403 } |
| 2404 |
| 2405 /** |
| 2406 * Changes target url for forwarding rule. |
| 2407 * |
| 2408 * [request] - The metadata request object. |
| 2409 * |
| 2410 * Request parameters: |
| 2411 * |
| 2412 * [project] - Name of the project scoping this request. |
| 2413 * Value must have pattern |
| 2414 * "(?:(?:[-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])?))". |
| 2415 * |
| 2416 * [forwardingRule] - Name of the ForwardingRule resource in which target is |
| 2417 * to be set. |
| 2418 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2419 * |
| 2420 * Completes with a [Operation]. |
| 2421 * |
| 2422 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2423 * error. |
| 2424 * |
| 2425 * If the used [http.Client] completes with an error when making a REST call, |
| 2426 * this method will complete with the same error. |
| 2427 */ |
| 2428 async.Future<Operation> setTarget(TargetReference request, core.String project
, core.String forwardingRule) { |
| 2429 var _url = null; |
| 2430 var _queryParams = new core.Map(); |
| 2431 var _uploadMedia = null; |
| 2432 var _uploadOptions = null; |
| 2433 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2434 var _body = null; |
| 2435 |
| 2436 if (request != null) { |
| 2437 _body = convert.JSON.encode((request).toJson()); |
| 2438 } |
| 2439 if (project == null) { |
| 2440 throw new core.ArgumentError("Parameter project is required."); |
| 2441 } |
| 2442 if (forwardingRule == null) { |
| 2443 throw new core.ArgumentError("Parameter forwardingRule is required."); |
| 2444 } |
| 2445 |
| 2446 |
| 2447 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/forwardi
ngRules/' + common_internal.Escaper.ecapeVariable('$forwardingRule') + '/setTarg
et'; |
| 2448 |
| 2449 var _response = _requester.request(_url, |
| 2450 "POST", |
| 2451 body: _body, |
| 2452 queryParams: _queryParams, |
| 2453 uploadOptions: _uploadOptions, |
| 2454 uploadMedia: _uploadMedia, |
| 2455 downloadOptions: _downloadOptions); |
| 2456 return _response.then((data) => new Operation.fromJson(data)); |
| 2457 } |
| 2458 |
| 2459 } |
| 2460 |
| 2461 |
| 2462 /** Not documented yet. */ |
| 2463 class GlobalOperationsResourceApi { |
| 2464 final common_internal.ApiRequester _requester; |
| 2465 |
| 2466 GlobalOperationsResourceApi(common_internal.ApiRequester client) : |
| 2467 _requester = client; |
| 2468 |
| 2469 /** |
| 2470 * Retrieves the list of all operations grouped by scope. |
| 2471 * |
| 2472 * Request parameters: |
| 2473 * |
| 2474 * [project] - Name of the project scoping this request. |
| 2475 * Value must have pattern |
| 2476 * "(?:(?:[-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])?))". |
| 2477 * |
| 2478 * [filter] - Optional. Filter expression for filtering listed resources. |
| 2479 * |
| 2480 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 2481 * value is 500 and default value is 500. |
| 2482 * Value must be between "0" and "500". |
| 2483 * |
| 2484 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 2485 * by maxResults. Used to continue a previous list request. |
| 2486 * |
| 2487 * Completes with a [OperationAggregatedList]. |
| 2488 * |
| 2489 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2490 * error. |
| 2491 * |
| 2492 * If the used [http.Client] completes with an error when making a REST call, |
| 2493 * this method will complete with the same error. |
| 2494 */ |
| 2495 async.Future<OperationAggregatedList> aggregatedList(core.String project, {cor
e.String filter, core.int maxResults, core.String pageToken}) { |
| 2496 var _url = null; |
| 2497 var _queryParams = new core.Map(); |
| 2498 var _uploadMedia = null; |
| 2499 var _uploadOptions = null; |
| 2500 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2501 var _body = null; |
| 2502 |
| 2503 if (project == null) { |
| 2504 throw new core.ArgumentError("Parameter project is required."); |
| 2505 } |
| 2506 if (filter != null) { |
| 2507 _queryParams["filter"] = [filter]; |
| 2508 } |
| 2509 if (maxResults != null) { |
| 2510 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2511 } |
| 2512 if (pageToken != null) { |
| 2513 _queryParams["pageToken"] = [pageToken]; |
| 2514 } |
| 2515 |
| 2516 |
| 2517 _url = common_internal.Escaper.ecapeVariable('$project') + '/aggregated/oper
ations'; |
| 2518 |
| 2519 var _response = _requester.request(_url, |
| 2520 "GET", |
| 2521 body: _body, |
| 2522 queryParams: _queryParams, |
| 2523 uploadOptions: _uploadOptions, |
| 2524 uploadMedia: _uploadMedia, |
| 2525 downloadOptions: _downloadOptions); |
| 2526 return _response.then((data) => new OperationAggregatedList.fromJson(data)); |
| 2527 } |
| 2528 |
| 2529 /** |
| 2530 * Deletes the specified operation resource. |
| 2531 * |
| 2532 * Request parameters: |
| 2533 * |
| 2534 * [project] - Name of the project scoping this request. |
| 2535 * Value must have pattern |
| 2536 * "(?:(?:[-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])?))". |
| 2537 * |
| 2538 * [operation] - Name of the operation resource to delete. |
| 2539 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2540 * |
| 2541 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2542 * error. |
| 2543 * |
| 2544 * If the used [http.Client] completes with an error when making a REST call, |
| 2545 * this method will complete with the same error. |
| 2546 */ |
| 2547 async.Future delete(core.String project, core.String operation) { |
| 2548 var _url = null; |
| 2549 var _queryParams = new core.Map(); |
| 2550 var _uploadMedia = null; |
| 2551 var _uploadOptions = null; |
| 2552 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2553 var _body = null; |
| 2554 |
| 2555 if (project == null) { |
| 2556 throw new core.ArgumentError("Parameter project is required."); |
| 2557 } |
| 2558 if (operation == null) { |
| 2559 throw new core.ArgumentError("Parameter operation is required."); |
| 2560 } |
| 2561 |
| 2562 _downloadOptions = null; |
| 2563 |
| 2564 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/operatio
ns/' + common_internal.Escaper.ecapeVariable('$operation'); |
| 2565 |
| 2566 var _response = _requester.request(_url, |
| 2567 "DELETE", |
| 2568 body: _body, |
| 2569 queryParams: _queryParams, |
| 2570 uploadOptions: _uploadOptions, |
| 2571 uploadMedia: _uploadMedia, |
| 2572 downloadOptions: _downloadOptions); |
| 2573 return _response.then((data) => null); |
| 2574 } |
| 2575 |
| 2576 /** |
| 2577 * Retrieves the specified operation resource. |
| 2578 * |
| 2579 * Request parameters: |
| 2580 * |
| 2581 * [project] - Name of the project scoping this request. |
| 2582 * Value must have pattern |
| 2583 * "(?:(?:[-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])?))". |
| 2584 * |
| 2585 * [operation] - Name of the operation resource to return. |
| 2586 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2587 * |
| 2588 * Completes with a [Operation]. |
| 2589 * |
| 2590 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2591 * error. |
| 2592 * |
| 2593 * If the used [http.Client] completes with an error when making a REST call, |
| 2594 * this method will complete with the same error. |
| 2595 */ |
| 2596 async.Future<Operation> get(core.String project, core.String operation) { |
| 2597 var _url = null; |
| 2598 var _queryParams = new core.Map(); |
| 2599 var _uploadMedia = null; |
| 2600 var _uploadOptions = null; |
| 2601 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2602 var _body = null; |
| 2603 |
| 2604 if (project == null) { |
| 2605 throw new core.ArgumentError("Parameter project is required."); |
| 2606 } |
| 2607 if (operation == null) { |
| 2608 throw new core.ArgumentError("Parameter operation is required."); |
| 2609 } |
| 2610 |
| 2611 |
| 2612 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/operatio
ns/' + common_internal.Escaper.ecapeVariable('$operation'); |
| 2613 |
| 2614 var _response = _requester.request(_url, |
| 2615 "GET", |
| 2616 body: _body, |
| 2617 queryParams: _queryParams, |
| 2618 uploadOptions: _uploadOptions, |
| 2619 uploadMedia: _uploadMedia, |
| 2620 downloadOptions: _downloadOptions); |
| 2621 return _response.then((data) => new Operation.fromJson(data)); |
| 2622 } |
| 2623 |
| 2624 /** |
| 2625 * Retrieves the list of operation resources contained within the specified |
| 2626 * project. |
| 2627 * |
| 2628 * Request parameters: |
| 2629 * |
| 2630 * [project] - Name of the project scoping this request. |
| 2631 * Value must have pattern |
| 2632 * "(?:(?:[-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])?))". |
| 2633 * |
| 2634 * [filter] - Optional. Filter expression for filtering listed resources. |
| 2635 * |
| 2636 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 2637 * value is 500 and default value is 500. |
| 2638 * Value must be between "0" and "500". |
| 2639 * |
| 2640 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 2641 * by maxResults. Used to continue a previous list request. |
| 2642 * |
| 2643 * Completes with a [OperationList]. |
| 2644 * |
| 2645 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2646 * error. |
| 2647 * |
| 2648 * If the used [http.Client] completes with an error when making a REST call, |
| 2649 * this method will complete with the same error. |
| 2650 */ |
| 2651 async.Future<OperationList> list(core.String project, {core.String filter, cor
e.int maxResults, core.String pageToken}) { |
| 2652 var _url = null; |
| 2653 var _queryParams = new core.Map(); |
| 2654 var _uploadMedia = null; |
| 2655 var _uploadOptions = null; |
| 2656 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2657 var _body = null; |
| 2658 |
| 2659 if (project == null) { |
| 2660 throw new core.ArgumentError("Parameter project is required."); |
| 2661 } |
| 2662 if (filter != null) { |
| 2663 _queryParams["filter"] = [filter]; |
| 2664 } |
| 2665 if (maxResults != null) { |
| 2666 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2667 } |
| 2668 if (pageToken != null) { |
| 2669 _queryParams["pageToken"] = [pageToken]; |
| 2670 } |
| 2671 |
| 2672 |
| 2673 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/operatio
ns'; |
| 2674 |
| 2675 var _response = _requester.request(_url, |
| 2676 "GET", |
| 2677 body: _body, |
| 2678 queryParams: _queryParams, |
| 2679 uploadOptions: _uploadOptions, |
| 2680 uploadMedia: _uploadMedia, |
| 2681 downloadOptions: _downloadOptions); |
| 2682 return _response.then((data) => new OperationList.fromJson(data)); |
| 2683 } |
| 2684 |
| 2685 } |
| 2686 |
| 2687 |
| 2688 /** Not documented yet. */ |
| 2689 class HttpHealthChecksResourceApi { |
| 2690 final common_internal.ApiRequester _requester; |
| 2691 |
| 2692 HttpHealthChecksResourceApi(common_internal.ApiRequester client) : |
| 2693 _requester = client; |
| 2694 |
| 2695 /** |
| 2696 * Deletes the specified HttpHealthCheck resource. |
| 2697 * |
| 2698 * Request parameters: |
| 2699 * |
| 2700 * [project] - Name of the project scoping this request. |
| 2701 * Value must have pattern |
| 2702 * "(?:(?:[-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])?))". |
| 2703 * |
| 2704 * [httpHealthCheck] - Name of the HttpHealthCheck resource to delete. |
| 2705 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2706 * |
| 2707 * Completes with a [Operation]. |
| 2708 * |
| 2709 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2710 * error. |
| 2711 * |
| 2712 * If the used [http.Client] completes with an error when making a REST call, |
| 2713 * this method will complete with the same error. |
| 2714 */ |
| 2715 async.Future<Operation> delete(core.String project, core.String httpHealthChec
k) { |
| 2716 var _url = null; |
| 2717 var _queryParams = new core.Map(); |
| 2718 var _uploadMedia = null; |
| 2719 var _uploadOptions = null; |
| 2720 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2721 var _body = null; |
| 2722 |
| 2723 if (project == null) { |
| 2724 throw new core.ArgumentError("Parameter project is required."); |
| 2725 } |
| 2726 if (httpHealthCheck == null) { |
| 2727 throw new core.ArgumentError("Parameter httpHealthCheck is required."); |
| 2728 } |
| 2729 |
| 2730 |
| 2731 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/httpHeal
thChecks/' + common_internal.Escaper.ecapeVariable('$httpHealthCheck'); |
| 2732 |
| 2733 var _response = _requester.request(_url, |
| 2734 "DELETE", |
| 2735 body: _body, |
| 2736 queryParams: _queryParams, |
| 2737 uploadOptions: _uploadOptions, |
| 2738 uploadMedia: _uploadMedia, |
| 2739 downloadOptions: _downloadOptions); |
| 2740 return _response.then((data) => new Operation.fromJson(data)); |
| 2741 } |
| 2742 |
| 2743 /** |
| 2744 * Returns the specified HttpHealthCheck resource. |
| 2745 * |
| 2746 * Request parameters: |
| 2747 * |
| 2748 * [project] - Name of the project scoping this request. |
| 2749 * Value must have pattern |
| 2750 * "(?:(?:[-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])?))". |
| 2751 * |
| 2752 * [httpHealthCheck] - Name of the HttpHealthCheck resource to return. |
| 2753 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2754 * |
| 2755 * Completes with a [HttpHealthCheck]. |
| 2756 * |
| 2757 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2758 * error. |
| 2759 * |
| 2760 * If the used [http.Client] completes with an error when making a REST call, |
| 2761 * this method will complete with the same error. |
| 2762 */ |
| 2763 async.Future<HttpHealthCheck> get(core.String project, core.String httpHealthC
heck) { |
| 2764 var _url = null; |
| 2765 var _queryParams = new core.Map(); |
| 2766 var _uploadMedia = null; |
| 2767 var _uploadOptions = null; |
| 2768 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2769 var _body = null; |
| 2770 |
| 2771 if (project == null) { |
| 2772 throw new core.ArgumentError("Parameter project is required."); |
| 2773 } |
| 2774 if (httpHealthCheck == null) { |
| 2775 throw new core.ArgumentError("Parameter httpHealthCheck is required."); |
| 2776 } |
| 2777 |
| 2778 |
| 2779 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/httpHeal
thChecks/' + common_internal.Escaper.ecapeVariable('$httpHealthCheck'); |
| 2780 |
| 2781 var _response = _requester.request(_url, |
| 2782 "GET", |
| 2783 body: _body, |
| 2784 queryParams: _queryParams, |
| 2785 uploadOptions: _uploadOptions, |
| 2786 uploadMedia: _uploadMedia, |
| 2787 downloadOptions: _downloadOptions); |
| 2788 return _response.then((data) => new HttpHealthCheck.fromJson(data)); |
| 2789 } |
| 2790 |
| 2791 /** |
| 2792 * Creates a HttpHealthCheck resource in the specified project using the data |
| 2793 * included in the request. |
| 2794 * |
| 2795 * [request] - The metadata request object. |
| 2796 * |
| 2797 * Request parameters: |
| 2798 * |
| 2799 * [project] - Name of the project scoping this request. |
| 2800 * Value must have pattern |
| 2801 * "(?:(?:[-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])?))". |
| 2802 * |
| 2803 * Completes with a [Operation]. |
| 2804 * |
| 2805 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2806 * error. |
| 2807 * |
| 2808 * If the used [http.Client] completes with an error when making a REST call, |
| 2809 * this method will complete with the same error. |
| 2810 */ |
| 2811 async.Future<Operation> insert(HttpHealthCheck request, core.String project) { |
| 2812 var _url = null; |
| 2813 var _queryParams = new core.Map(); |
| 2814 var _uploadMedia = null; |
| 2815 var _uploadOptions = null; |
| 2816 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2817 var _body = null; |
| 2818 |
| 2819 if (request != null) { |
| 2820 _body = convert.JSON.encode((request).toJson()); |
| 2821 } |
| 2822 if (project == null) { |
| 2823 throw new core.ArgumentError("Parameter project is required."); |
| 2824 } |
| 2825 |
| 2826 |
| 2827 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/httpHeal
thChecks'; |
| 2828 |
| 2829 var _response = _requester.request(_url, |
| 2830 "POST", |
| 2831 body: _body, |
| 2832 queryParams: _queryParams, |
| 2833 uploadOptions: _uploadOptions, |
| 2834 uploadMedia: _uploadMedia, |
| 2835 downloadOptions: _downloadOptions); |
| 2836 return _response.then((data) => new Operation.fromJson(data)); |
| 2837 } |
| 2838 |
| 2839 /** |
| 2840 * Retrieves the list of HttpHealthCheck resources available to the specified |
| 2841 * project. |
| 2842 * |
| 2843 * Request parameters: |
| 2844 * |
| 2845 * [project] - Name of the project scoping this request. |
| 2846 * Value must have pattern |
| 2847 * "(?:(?:[-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])?))". |
| 2848 * |
| 2849 * [filter] - Optional. Filter expression for filtering listed resources. |
| 2850 * |
| 2851 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 2852 * value is 500 and default value is 500. |
| 2853 * Value must be between "0" and "500". |
| 2854 * |
| 2855 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 2856 * by maxResults. Used to continue a previous list request. |
| 2857 * |
| 2858 * Completes with a [HttpHealthCheckList]. |
| 2859 * |
| 2860 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2861 * error. |
| 2862 * |
| 2863 * If the used [http.Client] completes with an error when making a REST call, |
| 2864 * this method will complete with the same error. |
| 2865 */ |
| 2866 async.Future<HttpHealthCheckList> list(core.String project, {core.String filte
r, core.int maxResults, core.String pageToken}) { |
| 2867 var _url = null; |
| 2868 var _queryParams = new core.Map(); |
| 2869 var _uploadMedia = null; |
| 2870 var _uploadOptions = null; |
| 2871 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2872 var _body = null; |
| 2873 |
| 2874 if (project == null) { |
| 2875 throw new core.ArgumentError("Parameter project is required."); |
| 2876 } |
| 2877 if (filter != null) { |
| 2878 _queryParams["filter"] = [filter]; |
| 2879 } |
| 2880 if (maxResults != null) { |
| 2881 _queryParams["maxResults"] = ["${maxResults}"]; |
| 2882 } |
| 2883 if (pageToken != null) { |
| 2884 _queryParams["pageToken"] = [pageToken]; |
| 2885 } |
| 2886 |
| 2887 |
| 2888 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/httpHeal
thChecks'; |
| 2889 |
| 2890 var _response = _requester.request(_url, |
| 2891 "GET", |
| 2892 body: _body, |
| 2893 queryParams: _queryParams, |
| 2894 uploadOptions: _uploadOptions, |
| 2895 uploadMedia: _uploadMedia, |
| 2896 downloadOptions: _downloadOptions); |
| 2897 return _response.then((data) => new HttpHealthCheckList.fromJson(data)); |
| 2898 } |
| 2899 |
| 2900 /** |
| 2901 * Updates a HttpHealthCheck resource in the specified project using the data |
| 2902 * included in the request. This method supports patch semantics. |
| 2903 * |
| 2904 * [request] - The metadata request object. |
| 2905 * |
| 2906 * Request parameters: |
| 2907 * |
| 2908 * [project] - Name of the project scoping this request. |
| 2909 * Value must have pattern |
| 2910 * "(?:(?:[-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])?))". |
| 2911 * |
| 2912 * [httpHealthCheck] - Name of the HttpHealthCheck resource to update. |
| 2913 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2914 * |
| 2915 * Completes with a [Operation]. |
| 2916 * |
| 2917 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2918 * error. |
| 2919 * |
| 2920 * If the used [http.Client] completes with an error when making a REST call, |
| 2921 * this method will complete with the same error. |
| 2922 */ |
| 2923 async.Future<Operation> patch(HttpHealthCheck request, core.String project, co
re.String httpHealthCheck) { |
| 2924 var _url = null; |
| 2925 var _queryParams = new core.Map(); |
| 2926 var _uploadMedia = null; |
| 2927 var _uploadOptions = null; |
| 2928 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2929 var _body = null; |
| 2930 |
| 2931 if (request != null) { |
| 2932 _body = convert.JSON.encode((request).toJson()); |
| 2933 } |
| 2934 if (project == null) { |
| 2935 throw new core.ArgumentError("Parameter project is required."); |
| 2936 } |
| 2937 if (httpHealthCheck == null) { |
| 2938 throw new core.ArgumentError("Parameter httpHealthCheck is required."); |
| 2939 } |
| 2940 |
| 2941 |
| 2942 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/httpHeal
thChecks/' + common_internal.Escaper.ecapeVariable('$httpHealthCheck'); |
| 2943 |
| 2944 var _response = _requester.request(_url, |
| 2945 "PATCH", |
| 2946 body: _body, |
| 2947 queryParams: _queryParams, |
| 2948 uploadOptions: _uploadOptions, |
| 2949 uploadMedia: _uploadMedia, |
| 2950 downloadOptions: _downloadOptions); |
| 2951 return _response.then((data) => new Operation.fromJson(data)); |
| 2952 } |
| 2953 |
| 2954 /** |
| 2955 * Updates a HttpHealthCheck resource in the specified project using the data |
| 2956 * included in the request. |
| 2957 * |
| 2958 * [request] - The metadata request object. |
| 2959 * |
| 2960 * Request parameters: |
| 2961 * |
| 2962 * [project] - Name of the project scoping this request. |
| 2963 * Value must have pattern |
| 2964 * "(?:(?:[-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])?))". |
| 2965 * |
| 2966 * [httpHealthCheck] - Name of the HttpHealthCheck resource to update. |
| 2967 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2968 * |
| 2969 * Completes with a [Operation]. |
| 2970 * |
| 2971 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 2972 * error. |
| 2973 * |
| 2974 * If the used [http.Client] completes with an error when making a REST call, |
| 2975 * this method will complete with the same error. |
| 2976 */ |
| 2977 async.Future<Operation> update(HttpHealthCheck request, core.String project, c
ore.String httpHealthCheck) { |
| 2978 var _url = null; |
| 2979 var _queryParams = new core.Map(); |
| 2980 var _uploadMedia = null; |
| 2981 var _uploadOptions = null; |
| 2982 var _downloadOptions = common.DownloadOptions.Metadata; |
| 2983 var _body = null; |
| 2984 |
| 2985 if (request != null) { |
| 2986 _body = convert.JSON.encode((request).toJson()); |
| 2987 } |
| 2988 if (project == null) { |
| 2989 throw new core.ArgumentError("Parameter project is required."); |
| 2990 } |
| 2991 if (httpHealthCheck == null) { |
| 2992 throw new core.ArgumentError("Parameter httpHealthCheck is required."); |
| 2993 } |
| 2994 |
| 2995 |
| 2996 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/httpHeal
thChecks/' + common_internal.Escaper.ecapeVariable('$httpHealthCheck'); |
| 2997 |
| 2998 var _response = _requester.request(_url, |
| 2999 "PUT", |
| 3000 body: _body, |
| 3001 queryParams: _queryParams, |
| 3002 uploadOptions: _uploadOptions, |
| 3003 uploadMedia: _uploadMedia, |
| 3004 downloadOptions: _downloadOptions); |
| 3005 return _response.then((data) => new Operation.fromJson(data)); |
| 3006 } |
| 3007 |
| 3008 } |
| 3009 |
| 3010 |
| 3011 /** Not documented yet. */ |
| 3012 class ImagesResourceApi { |
| 3013 final common_internal.ApiRequester _requester; |
| 3014 |
| 3015 ImagesResourceApi(common_internal.ApiRequester client) : |
| 3016 _requester = client; |
| 3017 |
| 3018 /** |
| 3019 * Deletes the specified image resource. |
| 3020 * |
| 3021 * Request parameters: |
| 3022 * |
| 3023 * [project] - Name of the project scoping this request. |
| 3024 * Value must have pattern |
| 3025 * "(?:(?:[-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])?))". |
| 3026 * |
| 3027 * [image] - Name of the image resource to delete. |
| 3028 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3029 * |
| 3030 * Completes with a [Operation]. |
| 3031 * |
| 3032 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3033 * error. |
| 3034 * |
| 3035 * If the used [http.Client] completes with an error when making a REST call, |
| 3036 * this method will complete with the same error. |
| 3037 */ |
| 3038 async.Future<Operation> delete(core.String project, core.String image) { |
| 3039 var _url = null; |
| 3040 var _queryParams = new core.Map(); |
| 3041 var _uploadMedia = null; |
| 3042 var _uploadOptions = null; |
| 3043 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3044 var _body = null; |
| 3045 |
| 3046 if (project == null) { |
| 3047 throw new core.ArgumentError("Parameter project is required."); |
| 3048 } |
| 3049 if (image == null) { |
| 3050 throw new core.ArgumentError("Parameter image is required."); |
| 3051 } |
| 3052 |
| 3053 |
| 3054 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/images/'
+ common_internal.Escaper.ecapeVariable('$image'); |
| 3055 |
| 3056 var _response = _requester.request(_url, |
| 3057 "DELETE", |
| 3058 body: _body, |
| 3059 queryParams: _queryParams, |
| 3060 uploadOptions: _uploadOptions, |
| 3061 uploadMedia: _uploadMedia, |
| 3062 downloadOptions: _downloadOptions); |
| 3063 return _response.then((data) => new Operation.fromJson(data)); |
| 3064 } |
| 3065 |
| 3066 /** |
| 3067 * Sets the deprecation status of an image. If no message body is given, |
| 3068 * clears the deprecation status instead. |
| 3069 * |
| 3070 * [request] - The metadata request object. |
| 3071 * |
| 3072 * Request parameters: |
| 3073 * |
| 3074 * [project] - Name of the project scoping this request. |
| 3075 * Value must have pattern |
| 3076 * "(?:(?:[-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])?))". |
| 3077 * |
| 3078 * [image] - Image name. |
| 3079 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3080 * |
| 3081 * Completes with a [Operation]. |
| 3082 * |
| 3083 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3084 * error. |
| 3085 * |
| 3086 * If the used [http.Client] completes with an error when making a REST call, |
| 3087 * this method will complete with the same error. |
| 3088 */ |
| 3089 async.Future<Operation> deprecate(DeprecationStatus request, core.String proje
ct, core.String image) { |
| 3090 var _url = null; |
| 3091 var _queryParams = new core.Map(); |
| 3092 var _uploadMedia = null; |
| 3093 var _uploadOptions = null; |
| 3094 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3095 var _body = null; |
| 3096 |
| 3097 if (request != null) { |
| 3098 _body = convert.JSON.encode((request).toJson()); |
| 3099 } |
| 3100 if (project == null) { |
| 3101 throw new core.ArgumentError("Parameter project is required."); |
| 3102 } |
| 3103 if (image == null) { |
| 3104 throw new core.ArgumentError("Parameter image is required."); |
| 3105 } |
| 3106 |
| 3107 |
| 3108 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/images/'
+ common_internal.Escaper.ecapeVariable('$image') + '/deprecate'; |
| 3109 |
| 3110 var _response = _requester.request(_url, |
| 3111 "POST", |
| 3112 body: _body, |
| 3113 queryParams: _queryParams, |
| 3114 uploadOptions: _uploadOptions, |
| 3115 uploadMedia: _uploadMedia, |
| 3116 downloadOptions: _downloadOptions); |
| 3117 return _response.then((data) => new Operation.fromJson(data)); |
| 3118 } |
| 3119 |
| 3120 /** |
| 3121 * Returns the specified image resource. |
| 3122 * |
| 3123 * Request parameters: |
| 3124 * |
| 3125 * [project] - Name of the project scoping this request. |
| 3126 * Value must have pattern |
| 3127 * "(?:(?:[-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])?))". |
| 3128 * |
| 3129 * [image] - Name of the image resource to return. |
| 3130 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3131 * |
| 3132 * Completes with a [Image]. |
| 3133 * |
| 3134 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3135 * error. |
| 3136 * |
| 3137 * If the used [http.Client] completes with an error when making a REST call, |
| 3138 * this method will complete with the same error. |
| 3139 */ |
| 3140 async.Future<Image> get(core.String project, core.String image) { |
| 3141 var _url = null; |
| 3142 var _queryParams = new core.Map(); |
| 3143 var _uploadMedia = null; |
| 3144 var _uploadOptions = null; |
| 3145 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3146 var _body = null; |
| 3147 |
| 3148 if (project == null) { |
| 3149 throw new core.ArgumentError("Parameter project is required."); |
| 3150 } |
| 3151 if (image == null) { |
| 3152 throw new core.ArgumentError("Parameter image is required."); |
| 3153 } |
| 3154 |
| 3155 |
| 3156 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/images/'
+ common_internal.Escaper.ecapeVariable('$image'); |
| 3157 |
| 3158 var _response = _requester.request(_url, |
| 3159 "GET", |
| 3160 body: _body, |
| 3161 queryParams: _queryParams, |
| 3162 uploadOptions: _uploadOptions, |
| 3163 uploadMedia: _uploadMedia, |
| 3164 downloadOptions: _downloadOptions); |
| 3165 return _response.then((data) => new Image.fromJson(data)); |
| 3166 } |
| 3167 |
| 3168 /** |
| 3169 * Creates an image resource in the specified project using the data included |
| 3170 * in the request. |
| 3171 * |
| 3172 * [request] - The metadata request object. |
| 3173 * |
| 3174 * Request parameters: |
| 3175 * |
| 3176 * [project] - Name of the project scoping this request. |
| 3177 * Value must have pattern |
| 3178 * "(?:(?:[-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])?))". |
| 3179 * |
| 3180 * Completes with a [Operation]. |
| 3181 * |
| 3182 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3183 * error. |
| 3184 * |
| 3185 * If the used [http.Client] completes with an error when making a REST call, |
| 3186 * this method will complete with the same error. |
| 3187 */ |
| 3188 async.Future<Operation> insert(Image request, core.String project) { |
| 3189 var _url = null; |
| 3190 var _queryParams = new core.Map(); |
| 3191 var _uploadMedia = null; |
| 3192 var _uploadOptions = null; |
| 3193 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3194 var _body = null; |
| 3195 |
| 3196 if (request != null) { |
| 3197 _body = convert.JSON.encode((request).toJson()); |
| 3198 } |
| 3199 if (project == null) { |
| 3200 throw new core.ArgumentError("Parameter project is required."); |
| 3201 } |
| 3202 |
| 3203 |
| 3204 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/images'; |
| 3205 |
| 3206 var _response = _requester.request(_url, |
| 3207 "POST", |
| 3208 body: _body, |
| 3209 queryParams: _queryParams, |
| 3210 uploadOptions: _uploadOptions, |
| 3211 uploadMedia: _uploadMedia, |
| 3212 downloadOptions: _downloadOptions); |
| 3213 return _response.then((data) => new Operation.fromJson(data)); |
| 3214 } |
| 3215 |
| 3216 /** |
| 3217 * Retrieves the list of image resources available to the specified project. |
| 3218 * |
| 3219 * Request parameters: |
| 3220 * |
| 3221 * [project] - Name of the project scoping this request. |
| 3222 * Value must have pattern |
| 3223 * "(?:(?:[-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])?))". |
| 3224 * |
| 3225 * [filter] - Optional. Filter expression for filtering listed resources. |
| 3226 * |
| 3227 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 3228 * value is 500 and default value is 500. |
| 3229 * Value must be between "0" and "500". |
| 3230 * |
| 3231 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 3232 * by maxResults. Used to continue a previous list request. |
| 3233 * |
| 3234 * Completes with a [ImageList]. |
| 3235 * |
| 3236 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3237 * error. |
| 3238 * |
| 3239 * If the used [http.Client] completes with an error when making a REST call, |
| 3240 * this method will complete with the same error. |
| 3241 */ |
| 3242 async.Future<ImageList> list(core.String project, {core.String filter, core.in
t maxResults, core.String pageToken}) { |
| 3243 var _url = null; |
| 3244 var _queryParams = new core.Map(); |
| 3245 var _uploadMedia = null; |
| 3246 var _uploadOptions = null; |
| 3247 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3248 var _body = null; |
| 3249 |
| 3250 if (project == null) { |
| 3251 throw new core.ArgumentError("Parameter project is required."); |
| 3252 } |
| 3253 if (filter != null) { |
| 3254 _queryParams["filter"] = [filter]; |
| 3255 } |
| 3256 if (maxResults != null) { |
| 3257 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3258 } |
| 3259 if (pageToken != null) { |
| 3260 _queryParams["pageToken"] = [pageToken]; |
| 3261 } |
| 3262 |
| 3263 |
| 3264 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/images'; |
| 3265 |
| 3266 var _response = _requester.request(_url, |
| 3267 "GET", |
| 3268 body: _body, |
| 3269 queryParams: _queryParams, |
| 3270 uploadOptions: _uploadOptions, |
| 3271 uploadMedia: _uploadMedia, |
| 3272 downloadOptions: _downloadOptions); |
| 3273 return _response.then((data) => new ImageList.fromJson(data)); |
| 3274 } |
| 3275 |
| 3276 } |
| 3277 |
| 3278 |
| 3279 /** Not documented yet. */ |
| 3280 class InstancesResourceApi { |
| 3281 final common_internal.ApiRequester _requester; |
| 3282 |
| 3283 InstancesResourceApi(common_internal.ApiRequester client) : |
| 3284 _requester = client; |
| 3285 |
| 3286 /** |
| 3287 * Adds an access config to an instance's network interface. |
| 3288 * |
| 3289 * [request] - The metadata request object. |
| 3290 * |
| 3291 * Request parameters: |
| 3292 * |
| 3293 * [project] - Project name. |
| 3294 * Value must have pattern |
| 3295 * "(?:(?:[-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])?))". |
| 3296 * |
| 3297 * [zone] - Name of the zone scoping this request. |
| 3298 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3299 * |
| 3300 * [instance] - Instance name. |
| 3301 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3302 * |
| 3303 * [networkInterface] - Network interface name. |
| 3304 * |
| 3305 * Completes with a [Operation]. |
| 3306 * |
| 3307 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3308 * error. |
| 3309 * |
| 3310 * If the used [http.Client] completes with an error when making a REST call, |
| 3311 * this method will complete with the same error. |
| 3312 */ |
| 3313 async.Future<Operation> addAccessConfig(AccessConfig request, core.String proj
ect, core.String zone, core.String instance, core.String networkInterface) { |
| 3314 var _url = null; |
| 3315 var _queryParams = new core.Map(); |
| 3316 var _uploadMedia = null; |
| 3317 var _uploadOptions = null; |
| 3318 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3319 var _body = null; |
| 3320 |
| 3321 if (request != null) { |
| 3322 _body = convert.JSON.encode((request).toJson()); |
| 3323 } |
| 3324 if (project == null) { |
| 3325 throw new core.ArgumentError("Parameter project is required."); |
| 3326 } |
| 3327 if (zone == null) { |
| 3328 throw new core.ArgumentError("Parameter zone is required."); |
| 3329 } |
| 3330 if (instance == null) { |
| 3331 throw new core.ArgumentError("Parameter instance is required."); |
| 3332 } |
| 3333 if (networkInterface == null) { |
| 3334 throw new core.ArgumentError("Parameter networkInterface is required."); |
| 3335 } |
| 3336 _queryParams["networkInterface"] = [networkInterface]; |
| 3337 |
| 3338 |
| 3339 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance') + '/addAccessConfig'; |
| 3340 |
| 3341 var _response = _requester.request(_url, |
| 3342 "POST", |
| 3343 body: _body, |
| 3344 queryParams: _queryParams, |
| 3345 uploadOptions: _uploadOptions, |
| 3346 uploadMedia: _uploadMedia, |
| 3347 downloadOptions: _downloadOptions); |
| 3348 return _response.then((data) => new Operation.fromJson(data)); |
| 3349 } |
| 3350 |
| 3351 /** |
| 3352 * Not documented yet. |
| 3353 * |
| 3354 * Request parameters: |
| 3355 * |
| 3356 * [project] - Name of the project scoping this request. |
| 3357 * Value must have pattern |
| 3358 * "(?:(?:[-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])?))". |
| 3359 * |
| 3360 * [filter] - Optional. Filter expression for filtering listed resources. |
| 3361 * |
| 3362 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 3363 * value is 500 and default value is 500. |
| 3364 * Value must be between "0" and "500". |
| 3365 * |
| 3366 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 3367 * by maxResults. Used to continue a previous list request. |
| 3368 * |
| 3369 * Completes with a [InstanceAggregatedList]. |
| 3370 * |
| 3371 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3372 * error. |
| 3373 * |
| 3374 * If the used [http.Client] completes with an error when making a REST call, |
| 3375 * this method will complete with the same error. |
| 3376 */ |
| 3377 async.Future<InstanceAggregatedList> aggregatedList(core.String project, {core
.String filter, core.int maxResults, core.String pageToken}) { |
| 3378 var _url = null; |
| 3379 var _queryParams = new core.Map(); |
| 3380 var _uploadMedia = null; |
| 3381 var _uploadOptions = null; |
| 3382 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3383 var _body = null; |
| 3384 |
| 3385 if (project == null) { |
| 3386 throw new core.ArgumentError("Parameter project is required."); |
| 3387 } |
| 3388 if (filter != null) { |
| 3389 _queryParams["filter"] = [filter]; |
| 3390 } |
| 3391 if (maxResults != null) { |
| 3392 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3393 } |
| 3394 if (pageToken != null) { |
| 3395 _queryParams["pageToken"] = [pageToken]; |
| 3396 } |
| 3397 |
| 3398 |
| 3399 _url = common_internal.Escaper.ecapeVariable('$project') + '/aggregated/inst
ances'; |
| 3400 |
| 3401 var _response = _requester.request(_url, |
| 3402 "GET", |
| 3403 body: _body, |
| 3404 queryParams: _queryParams, |
| 3405 uploadOptions: _uploadOptions, |
| 3406 uploadMedia: _uploadMedia, |
| 3407 downloadOptions: _downloadOptions); |
| 3408 return _response.then((data) => new InstanceAggregatedList.fromJson(data)); |
| 3409 } |
| 3410 |
| 3411 /** |
| 3412 * Attaches a disk resource to an instance. |
| 3413 * |
| 3414 * [request] - The metadata request object. |
| 3415 * |
| 3416 * Request parameters: |
| 3417 * |
| 3418 * [project] - Project name. |
| 3419 * Value must have pattern |
| 3420 * "(?:(?:[-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])?))". |
| 3421 * |
| 3422 * [zone] - Name of the zone scoping this request. |
| 3423 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3424 * |
| 3425 * [instance] - Instance name. |
| 3426 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3427 * |
| 3428 * Completes with a [Operation]. |
| 3429 * |
| 3430 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3431 * error. |
| 3432 * |
| 3433 * If the used [http.Client] completes with an error when making a REST call, |
| 3434 * this method will complete with the same error. |
| 3435 */ |
| 3436 async.Future<Operation> attachDisk(AttachedDisk request, core.String project,
core.String zone, core.String instance) { |
| 3437 var _url = null; |
| 3438 var _queryParams = new core.Map(); |
| 3439 var _uploadMedia = null; |
| 3440 var _uploadOptions = null; |
| 3441 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3442 var _body = null; |
| 3443 |
| 3444 if (request != null) { |
| 3445 _body = convert.JSON.encode((request).toJson()); |
| 3446 } |
| 3447 if (project == null) { |
| 3448 throw new core.ArgumentError("Parameter project is required."); |
| 3449 } |
| 3450 if (zone == null) { |
| 3451 throw new core.ArgumentError("Parameter zone is required."); |
| 3452 } |
| 3453 if (instance == null) { |
| 3454 throw new core.ArgumentError("Parameter instance is required."); |
| 3455 } |
| 3456 |
| 3457 |
| 3458 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance') + '/attachDisk'; |
| 3459 |
| 3460 var _response = _requester.request(_url, |
| 3461 "POST", |
| 3462 body: _body, |
| 3463 queryParams: _queryParams, |
| 3464 uploadOptions: _uploadOptions, |
| 3465 uploadMedia: _uploadMedia, |
| 3466 downloadOptions: _downloadOptions); |
| 3467 return _response.then((data) => new Operation.fromJson(data)); |
| 3468 } |
| 3469 |
| 3470 /** |
| 3471 * Deletes the specified instance resource. |
| 3472 * |
| 3473 * Request parameters: |
| 3474 * |
| 3475 * [project] - Name of the project scoping this request. |
| 3476 * Value must have pattern |
| 3477 * "(?:(?:[-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])?))". |
| 3478 * |
| 3479 * [zone] - Name of the zone scoping this request. |
| 3480 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3481 * |
| 3482 * [instance] - Name of the instance resource to delete. |
| 3483 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3484 * |
| 3485 * Completes with a [Operation]. |
| 3486 * |
| 3487 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3488 * error. |
| 3489 * |
| 3490 * If the used [http.Client] completes with an error when making a REST call, |
| 3491 * this method will complete with the same error. |
| 3492 */ |
| 3493 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing instance) { |
| 3494 var _url = null; |
| 3495 var _queryParams = new core.Map(); |
| 3496 var _uploadMedia = null; |
| 3497 var _uploadOptions = null; |
| 3498 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3499 var _body = null; |
| 3500 |
| 3501 if (project == null) { |
| 3502 throw new core.ArgumentError("Parameter project is required."); |
| 3503 } |
| 3504 if (zone == null) { |
| 3505 throw new core.ArgumentError("Parameter zone is required."); |
| 3506 } |
| 3507 if (instance == null) { |
| 3508 throw new core.ArgumentError("Parameter instance is required."); |
| 3509 } |
| 3510 |
| 3511 |
| 3512 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance'); |
| 3513 |
| 3514 var _response = _requester.request(_url, |
| 3515 "DELETE", |
| 3516 body: _body, |
| 3517 queryParams: _queryParams, |
| 3518 uploadOptions: _uploadOptions, |
| 3519 uploadMedia: _uploadMedia, |
| 3520 downloadOptions: _downloadOptions); |
| 3521 return _response.then((data) => new Operation.fromJson(data)); |
| 3522 } |
| 3523 |
| 3524 /** |
| 3525 * Deletes an access config from an instance's network interface. |
| 3526 * |
| 3527 * Request parameters: |
| 3528 * |
| 3529 * [project] - Project name. |
| 3530 * Value must have pattern |
| 3531 * "(?:(?:[-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])?))". |
| 3532 * |
| 3533 * [zone] - Name of the zone scoping this request. |
| 3534 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3535 * |
| 3536 * [instance] - Instance name. |
| 3537 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3538 * |
| 3539 * [accessConfig] - Access config name. |
| 3540 * |
| 3541 * [networkInterface] - Network interface name. |
| 3542 * |
| 3543 * Completes with a [Operation]. |
| 3544 * |
| 3545 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3546 * error. |
| 3547 * |
| 3548 * If the used [http.Client] completes with an error when making a REST call, |
| 3549 * this method will complete with the same error. |
| 3550 */ |
| 3551 async.Future<Operation> deleteAccessConfig(core.String project, core.String zo
ne, core.String instance, core.String accessConfig, core.String networkInterface
) { |
| 3552 var _url = null; |
| 3553 var _queryParams = new core.Map(); |
| 3554 var _uploadMedia = null; |
| 3555 var _uploadOptions = null; |
| 3556 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3557 var _body = null; |
| 3558 |
| 3559 if (project == null) { |
| 3560 throw new core.ArgumentError("Parameter project is required."); |
| 3561 } |
| 3562 if (zone == null) { |
| 3563 throw new core.ArgumentError("Parameter zone is required."); |
| 3564 } |
| 3565 if (instance == null) { |
| 3566 throw new core.ArgumentError("Parameter instance is required."); |
| 3567 } |
| 3568 if (accessConfig == null) { |
| 3569 throw new core.ArgumentError("Parameter accessConfig is required."); |
| 3570 } |
| 3571 _queryParams["accessConfig"] = [accessConfig]; |
| 3572 if (networkInterface == null) { |
| 3573 throw new core.ArgumentError("Parameter networkInterface is required."); |
| 3574 } |
| 3575 _queryParams["networkInterface"] = [networkInterface]; |
| 3576 |
| 3577 |
| 3578 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance') + '/deleteAccessConfig'; |
| 3579 |
| 3580 var _response = _requester.request(_url, |
| 3581 "POST", |
| 3582 body: _body, |
| 3583 queryParams: _queryParams, |
| 3584 uploadOptions: _uploadOptions, |
| 3585 uploadMedia: _uploadMedia, |
| 3586 downloadOptions: _downloadOptions); |
| 3587 return _response.then((data) => new Operation.fromJson(data)); |
| 3588 } |
| 3589 |
| 3590 /** |
| 3591 * Detaches a disk from an instance. |
| 3592 * |
| 3593 * Request parameters: |
| 3594 * |
| 3595 * [project] - Project name. |
| 3596 * Value must have pattern |
| 3597 * "(?:(?:[-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])?))". |
| 3598 * |
| 3599 * [zone] - Name of the zone scoping this request. |
| 3600 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3601 * |
| 3602 * [instance] - Instance name. |
| 3603 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3604 * |
| 3605 * [deviceName] - Disk device name to detach. |
| 3606 * Value must have pattern "\w[\w.-]{0,254}". |
| 3607 * |
| 3608 * Completes with a [Operation]. |
| 3609 * |
| 3610 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3611 * error. |
| 3612 * |
| 3613 * If the used [http.Client] completes with an error when making a REST call, |
| 3614 * this method will complete with the same error. |
| 3615 */ |
| 3616 async.Future<Operation> detachDisk(core.String project, core.String zone, core
.String instance, core.String deviceName) { |
| 3617 var _url = null; |
| 3618 var _queryParams = new core.Map(); |
| 3619 var _uploadMedia = null; |
| 3620 var _uploadOptions = null; |
| 3621 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3622 var _body = null; |
| 3623 |
| 3624 if (project == null) { |
| 3625 throw new core.ArgumentError("Parameter project is required."); |
| 3626 } |
| 3627 if (zone == null) { |
| 3628 throw new core.ArgumentError("Parameter zone is required."); |
| 3629 } |
| 3630 if (instance == null) { |
| 3631 throw new core.ArgumentError("Parameter instance is required."); |
| 3632 } |
| 3633 if (deviceName == null) { |
| 3634 throw new core.ArgumentError("Parameter deviceName is required."); |
| 3635 } |
| 3636 _queryParams["deviceName"] = [deviceName]; |
| 3637 |
| 3638 |
| 3639 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance') + '/detachDisk'; |
| 3640 |
| 3641 var _response = _requester.request(_url, |
| 3642 "POST", |
| 3643 body: _body, |
| 3644 queryParams: _queryParams, |
| 3645 uploadOptions: _uploadOptions, |
| 3646 uploadMedia: _uploadMedia, |
| 3647 downloadOptions: _downloadOptions); |
| 3648 return _response.then((data) => new Operation.fromJson(data)); |
| 3649 } |
| 3650 |
| 3651 /** |
| 3652 * Returns the specified instance resource. |
| 3653 * |
| 3654 * Request parameters: |
| 3655 * |
| 3656 * [project] - Name of the project scoping this request. |
| 3657 * Value must have pattern |
| 3658 * "(?:(?:[-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])?))". |
| 3659 * |
| 3660 * [zone] - Name of the zone scoping this request. |
| 3661 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3662 * |
| 3663 * [instance] - Name of the instance resource to return. |
| 3664 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3665 * |
| 3666 * Completes with a [Instance]. |
| 3667 * |
| 3668 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3669 * error. |
| 3670 * |
| 3671 * If the used [http.Client] completes with an error when making a REST call, |
| 3672 * this method will complete with the same error. |
| 3673 */ |
| 3674 async.Future<Instance> get(core.String project, core.String zone, core.String
instance) { |
| 3675 var _url = null; |
| 3676 var _queryParams = new core.Map(); |
| 3677 var _uploadMedia = null; |
| 3678 var _uploadOptions = null; |
| 3679 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3680 var _body = null; |
| 3681 |
| 3682 if (project == null) { |
| 3683 throw new core.ArgumentError("Parameter project is required."); |
| 3684 } |
| 3685 if (zone == null) { |
| 3686 throw new core.ArgumentError("Parameter zone is required."); |
| 3687 } |
| 3688 if (instance == null) { |
| 3689 throw new core.ArgumentError("Parameter instance is required."); |
| 3690 } |
| 3691 |
| 3692 |
| 3693 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance'); |
| 3694 |
| 3695 var _response = _requester.request(_url, |
| 3696 "GET", |
| 3697 body: _body, |
| 3698 queryParams: _queryParams, |
| 3699 uploadOptions: _uploadOptions, |
| 3700 uploadMedia: _uploadMedia, |
| 3701 downloadOptions: _downloadOptions); |
| 3702 return _response.then((data) => new Instance.fromJson(data)); |
| 3703 } |
| 3704 |
| 3705 /** |
| 3706 * Returns the specified instance's serial port output. |
| 3707 * |
| 3708 * Request parameters: |
| 3709 * |
| 3710 * [project] - Name of the project scoping this request. |
| 3711 * Value must have pattern |
| 3712 * "(?:(?:[-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])?))". |
| 3713 * |
| 3714 * [zone] - Name of the zone scoping this request. |
| 3715 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3716 * |
| 3717 * [instance] - Name of the instance scoping this request. |
| 3718 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3719 * |
| 3720 * Completes with a [SerialPortOutput]. |
| 3721 * |
| 3722 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3723 * error. |
| 3724 * |
| 3725 * If the used [http.Client] completes with an error when making a REST call, |
| 3726 * this method will complete with the same error. |
| 3727 */ |
| 3728 async.Future<SerialPortOutput> getSerialPortOutput(core.String project, core.S
tring zone, core.String instance) { |
| 3729 var _url = null; |
| 3730 var _queryParams = new core.Map(); |
| 3731 var _uploadMedia = null; |
| 3732 var _uploadOptions = null; |
| 3733 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3734 var _body = null; |
| 3735 |
| 3736 if (project == null) { |
| 3737 throw new core.ArgumentError("Parameter project is required."); |
| 3738 } |
| 3739 if (zone == null) { |
| 3740 throw new core.ArgumentError("Parameter zone is required."); |
| 3741 } |
| 3742 if (instance == null) { |
| 3743 throw new core.ArgumentError("Parameter instance is required."); |
| 3744 } |
| 3745 |
| 3746 |
| 3747 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance') + '/serialPort'; |
| 3748 |
| 3749 var _response = _requester.request(_url, |
| 3750 "GET", |
| 3751 body: _body, |
| 3752 queryParams: _queryParams, |
| 3753 uploadOptions: _uploadOptions, |
| 3754 uploadMedia: _uploadMedia, |
| 3755 downloadOptions: _downloadOptions); |
| 3756 return _response.then((data) => new SerialPortOutput.fromJson(data)); |
| 3757 } |
| 3758 |
| 3759 /** |
| 3760 * Creates an instance resource in the specified project using the data |
| 3761 * included in the request. |
| 3762 * |
| 3763 * [request] - The metadata request object. |
| 3764 * |
| 3765 * Request parameters: |
| 3766 * |
| 3767 * [project] - Name of the project scoping this request. |
| 3768 * Value must have pattern |
| 3769 * "(?:(?:[-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])?))". |
| 3770 * |
| 3771 * [zone] - Name of the zone scoping this request. |
| 3772 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3773 * |
| 3774 * Completes with a [Operation]. |
| 3775 * |
| 3776 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3777 * error. |
| 3778 * |
| 3779 * If the used [http.Client] completes with an error when making a REST call, |
| 3780 * this method will complete with the same error. |
| 3781 */ |
| 3782 async.Future<Operation> insert(Instance request, core.String project, core.Str
ing zone) { |
| 3783 var _url = null; |
| 3784 var _queryParams = new core.Map(); |
| 3785 var _uploadMedia = null; |
| 3786 var _uploadOptions = null; |
| 3787 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3788 var _body = null; |
| 3789 |
| 3790 if (request != null) { |
| 3791 _body = convert.JSON.encode((request).toJson()); |
| 3792 } |
| 3793 if (project == null) { |
| 3794 throw new core.ArgumentError("Parameter project is required."); |
| 3795 } |
| 3796 if (zone == null) { |
| 3797 throw new core.ArgumentError("Parameter zone is required."); |
| 3798 } |
| 3799 |
| 3800 |
| 3801 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances'; |
| 3802 |
| 3803 var _response = _requester.request(_url, |
| 3804 "POST", |
| 3805 body: _body, |
| 3806 queryParams: _queryParams, |
| 3807 uploadOptions: _uploadOptions, |
| 3808 uploadMedia: _uploadMedia, |
| 3809 downloadOptions: _downloadOptions); |
| 3810 return _response.then((data) => new Operation.fromJson(data)); |
| 3811 } |
| 3812 |
| 3813 /** |
| 3814 * Retrieves the list of instance resources contained within the specified |
| 3815 * zone. |
| 3816 * |
| 3817 * Request parameters: |
| 3818 * |
| 3819 * [project] - Name of the project scoping this request. |
| 3820 * Value must have pattern |
| 3821 * "(?:(?:[-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])?))". |
| 3822 * |
| 3823 * [zone] - Name of the zone scoping this request. |
| 3824 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3825 * |
| 3826 * [filter] - Optional. Filter expression for filtering listed resources. |
| 3827 * |
| 3828 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 3829 * value is 500 and default value is 500. |
| 3830 * Value must be between "0" and "500". |
| 3831 * |
| 3832 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 3833 * by maxResults. Used to continue a previous list request. |
| 3834 * |
| 3835 * Completes with a [InstanceList]. |
| 3836 * |
| 3837 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3838 * error. |
| 3839 * |
| 3840 * If the used [http.Client] completes with an error when making a REST call, |
| 3841 * this method will complete with the same error. |
| 3842 */ |
| 3843 async.Future<InstanceList> list(core.String project, core.String zone, {core.S
tring filter, core.int maxResults, core.String pageToken}) { |
| 3844 var _url = null; |
| 3845 var _queryParams = new core.Map(); |
| 3846 var _uploadMedia = null; |
| 3847 var _uploadOptions = null; |
| 3848 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3849 var _body = null; |
| 3850 |
| 3851 if (project == null) { |
| 3852 throw new core.ArgumentError("Parameter project is required."); |
| 3853 } |
| 3854 if (zone == null) { |
| 3855 throw new core.ArgumentError("Parameter zone is required."); |
| 3856 } |
| 3857 if (filter != null) { |
| 3858 _queryParams["filter"] = [filter]; |
| 3859 } |
| 3860 if (maxResults != null) { |
| 3861 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3862 } |
| 3863 if (pageToken != null) { |
| 3864 _queryParams["pageToken"] = [pageToken]; |
| 3865 } |
| 3866 |
| 3867 |
| 3868 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances'; |
| 3869 |
| 3870 var _response = _requester.request(_url, |
| 3871 "GET", |
| 3872 body: _body, |
| 3873 queryParams: _queryParams, |
| 3874 uploadOptions: _uploadOptions, |
| 3875 uploadMedia: _uploadMedia, |
| 3876 downloadOptions: _downloadOptions); |
| 3877 return _response.then((data) => new InstanceList.fromJson(data)); |
| 3878 } |
| 3879 |
| 3880 /** |
| 3881 * Performs a hard reset on the instance. |
| 3882 * |
| 3883 * Request parameters: |
| 3884 * |
| 3885 * [project] - Name of the project scoping this request. |
| 3886 * Value must have pattern |
| 3887 * "(?:(?:[-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])?))". |
| 3888 * |
| 3889 * [zone] - Name of the zone scoping this request. |
| 3890 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3891 * |
| 3892 * [instance] - Name of the instance scoping this request. |
| 3893 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3894 * |
| 3895 * Completes with a [Operation]. |
| 3896 * |
| 3897 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3898 * error. |
| 3899 * |
| 3900 * If the used [http.Client] completes with an error when making a REST call, |
| 3901 * this method will complete with the same error. |
| 3902 */ |
| 3903 async.Future<Operation> reset(core.String project, core.String zone, core.Stri
ng instance) { |
| 3904 var _url = null; |
| 3905 var _queryParams = new core.Map(); |
| 3906 var _uploadMedia = null; |
| 3907 var _uploadOptions = null; |
| 3908 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3909 var _body = null; |
| 3910 |
| 3911 if (project == null) { |
| 3912 throw new core.ArgumentError("Parameter project is required."); |
| 3913 } |
| 3914 if (zone == null) { |
| 3915 throw new core.ArgumentError("Parameter zone is required."); |
| 3916 } |
| 3917 if (instance == null) { |
| 3918 throw new core.ArgumentError("Parameter instance is required."); |
| 3919 } |
| 3920 |
| 3921 |
| 3922 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance') + '/reset'; |
| 3923 |
| 3924 var _response = _requester.request(_url, |
| 3925 "POST", |
| 3926 body: _body, |
| 3927 queryParams: _queryParams, |
| 3928 uploadOptions: _uploadOptions, |
| 3929 uploadMedia: _uploadMedia, |
| 3930 downloadOptions: _downloadOptions); |
| 3931 return _response.then((data) => new Operation.fromJson(data)); |
| 3932 } |
| 3933 |
| 3934 /** |
| 3935 * Sets the auto-delete flag for a disk attached to an instance |
| 3936 * |
| 3937 * Request parameters: |
| 3938 * |
| 3939 * [project] - Project name. |
| 3940 * Value must have pattern |
| 3941 * "(?:(?:[-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])?))". |
| 3942 * |
| 3943 * [zone] - Name of the zone scoping this request. |
| 3944 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3945 * |
| 3946 * [instance] - Instance name. |
| 3947 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3948 * |
| 3949 * [autoDelete] - Whether to auto-delete the disk when the instance is |
| 3950 * deleted. |
| 3951 * |
| 3952 * [deviceName] - Disk device name to modify. |
| 3953 * Value must have pattern "\w[\w.-]{0,254}". |
| 3954 * |
| 3955 * Completes with a [Operation]. |
| 3956 * |
| 3957 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 3958 * error. |
| 3959 * |
| 3960 * If the used [http.Client] completes with an error when making a REST call, |
| 3961 * this method will complete with the same error. |
| 3962 */ |
| 3963 async.Future<Operation> setDiskAutoDelete(core.String project, core.String zon
e, core.String instance, core.bool autoDelete, core.String deviceName) { |
| 3964 var _url = null; |
| 3965 var _queryParams = new core.Map(); |
| 3966 var _uploadMedia = null; |
| 3967 var _uploadOptions = null; |
| 3968 var _downloadOptions = common.DownloadOptions.Metadata; |
| 3969 var _body = null; |
| 3970 |
| 3971 if (project == null) { |
| 3972 throw new core.ArgumentError("Parameter project is required."); |
| 3973 } |
| 3974 if (zone == null) { |
| 3975 throw new core.ArgumentError("Parameter zone is required."); |
| 3976 } |
| 3977 if (instance == null) { |
| 3978 throw new core.ArgumentError("Parameter instance is required."); |
| 3979 } |
| 3980 if (autoDelete == null) { |
| 3981 throw new core.ArgumentError("Parameter autoDelete is required."); |
| 3982 } |
| 3983 _queryParams["autoDelete"] = ["${autoDelete}"]; |
| 3984 if (deviceName == null) { |
| 3985 throw new core.ArgumentError("Parameter deviceName is required."); |
| 3986 } |
| 3987 _queryParams["deviceName"] = [deviceName]; |
| 3988 |
| 3989 |
| 3990 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance') + '/setDiskAutoDelete'; |
| 3991 |
| 3992 var _response = _requester.request(_url, |
| 3993 "POST", |
| 3994 body: _body, |
| 3995 queryParams: _queryParams, |
| 3996 uploadOptions: _uploadOptions, |
| 3997 uploadMedia: _uploadMedia, |
| 3998 downloadOptions: _downloadOptions); |
| 3999 return _response.then((data) => new Operation.fromJson(data)); |
| 4000 } |
| 4001 |
| 4002 /** |
| 4003 * Sets metadata for the specified instance to the data included in the |
| 4004 * request. |
| 4005 * |
| 4006 * [request] - The metadata request object. |
| 4007 * |
| 4008 * Request parameters: |
| 4009 * |
| 4010 * [project] - Name of the project scoping this request. |
| 4011 * Value must have pattern |
| 4012 * "(?:(?:[-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])?))". |
| 4013 * |
| 4014 * [zone] - Name of the zone scoping this request. |
| 4015 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4016 * |
| 4017 * [instance] - Name of the instance scoping this request. |
| 4018 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4019 * |
| 4020 * Completes with a [Operation]. |
| 4021 * |
| 4022 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4023 * error. |
| 4024 * |
| 4025 * If the used [http.Client] completes with an error when making a REST call, |
| 4026 * this method will complete with the same error. |
| 4027 */ |
| 4028 async.Future<Operation> setMetadata(Metadata request, core.String project, cor
e.String zone, core.String instance) { |
| 4029 var _url = null; |
| 4030 var _queryParams = new core.Map(); |
| 4031 var _uploadMedia = null; |
| 4032 var _uploadOptions = null; |
| 4033 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4034 var _body = null; |
| 4035 |
| 4036 if (request != null) { |
| 4037 _body = convert.JSON.encode((request).toJson()); |
| 4038 } |
| 4039 if (project == null) { |
| 4040 throw new core.ArgumentError("Parameter project is required."); |
| 4041 } |
| 4042 if (zone == null) { |
| 4043 throw new core.ArgumentError("Parameter zone is required."); |
| 4044 } |
| 4045 if (instance == null) { |
| 4046 throw new core.ArgumentError("Parameter instance is required."); |
| 4047 } |
| 4048 |
| 4049 |
| 4050 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance') + '/setMetadata'; |
| 4051 |
| 4052 var _response = _requester.request(_url, |
| 4053 "POST", |
| 4054 body: _body, |
| 4055 queryParams: _queryParams, |
| 4056 uploadOptions: _uploadOptions, |
| 4057 uploadMedia: _uploadMedia, |
| 4058 downloadOptions: _downloadOptions); |
| 4059 return _response.then((data) => new Operation.fromJson(data)); |
| 4060 } |
| 4061 |
| 4062 /** |
| 4063 * Sets an instance's scheduling options. |
| 4064 * |
| 4065 * [request] - The metadata request object. |
| 4066 * |
| 4067 * Request parameters: |
| 4068 * |
| 4069 * [project] - Project name. |
| 4070 * Value must have pattern |
| 4071 * "(?:(?:[-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])?))". |
| 4072 * |
| 4073 * [zone] - Name of the zone scoping this request. |
| 4074 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4075 * |
| 4076 * [instance] - Instance name. |
| 4077 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4078 * |
| 4079 * Completes with a [Operation]. |
| 4080 * |
| 4081 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4082 * error. |
| 4083 * |
| 4084 * If the used [http.Client] completes with an error when making a REST call, |
| 4085 * this method will complete with the same error. |
| 4086 */ |
| 4087 async.Future<Operation> setScheduling(Scheduling request, core.String project,
core.String zone, core.String instance) { |
| 4088 var _url = null; |
| 4089 var _queryParams = new core.Map(); |
| 4090 var _uploadMedia = null; |
| 4091 var _uploadOptions = null; |
| 4092 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4093 var _body = null; |
| 4094 |
| 4095 if (request != null) { |
| 4096 _body = convert.JSON.encode((request).toJson()); |
| 4097 } |
| 4098 if (project == null) { |
| 4099 throw new core.ArgumentError("Parameter project is required."); |
| 4100 } |
| 4101 if (zone == null) { |
| 4102 throw new core.ArgumentError("Parameter zone is required."); |
| 4103 } |
| 4104 if (instance == null) { |
| 4105 throw new core.ArgumentError("Parameter instance is required."); |
| 4106 } |
| 4107 |
| 4108 |
| 4109 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance') + '/setScheduling'; |
| 4110 |
| 4111 var _response = _requester.request(_url, |
| 4112 "POST", |
| 4113 body: _body, |
| 4114 queryParams: _queryParams, |
| 4115 uploadOptions: _uploadOptions, |
| 4116 uploadMedia: _uploadMedia, |
| 4117 downloadOptions: _downloadOptions); |
| 4118 return _response.then((data) => new Operation.fromJson(data)); |
| 4119 } |
| 4120 |
| 4121 /** |
| 4122 * Sets tags for the specified instance to the data included in the request. |
| 4123 * |
| 4124 * [request] - The metadata request object. |
| 4125 * |
| 4126 * Request parameters: |
| 4127 * |
| 4128 * [project] - Name of the project scoping this request. |
| 4129 * Value must have pattern |
| 4130 * "(?:(?:[-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])?))". |
| 4131 * |
| 4132 * [zone] - Name of the zone scoping this request. |
| 4133 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4134 * |
| 4135 * [instance] - Name of the instance scoping this request. |
| 4136 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4137 * |
| 4138 * Completes with a [Operation]. |
| 4139 * |
| 4140 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4141 * error. |
| 4142 * |
| 4143 * If the used [http.Client] completes with an error when making a REST call, |
| 4144 * this method will complete with the same error. |
| 4145 */ |
| 4146 async.Future<Operation> setTags(Tags request, core.String project, core.String
zone, core.String instance) { |
| 4147 var _url = null; |
| 4148 var _queryParams = new core.Map(); |
| 4149 var _uploadMedia = null; |
| 4150 var _uploadOptions = null; |
| 4151 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4152 var _body = null; |
| 4153 |
| 4154 if (request != null) { |
| 4155 _body = convert.JSON.encode((request).toJson()); |
| 4156 } |
| 4157 if (project == null) { |
| 4158 throw new core.ArgumentError("Parameter project is required."); |
| 4159 } |
| 4160 if (zone == null) { |
| 4161 throw new core.ArgumentError("Parameter zone is required."); |
| 4162 } |
| 4163 if (instance == null) { |
| 4164 throw new core.ArgumentError("Parameter instance is required."); |
| 4165 } |
| 4166 |
| 4167 |
| 4168 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instances/' + common_internal.Esca
per.ecapeVariable('$instance') + '/setTags'; |
| 4169 |
| 4170 var _response = _requester.request(_url, |
| 4171 "POST", |
| 4172 body: _body, |
| 4173 queryParams: _queryParams, |
| 4174 uploadOptions: _uploadOptions, |
| 4175 uploadMedia: _uploadMedia, |
| 4176 downloadOptions: _downloadOptions); |
| 4177 return _response.then((data) => new Operation.fromJson(data)); |
| 4178 } |
| 4179 |
| 4180 } |
| 4181 |
| 4182 |
| 4183 /** Not documented yet. */ |
| 4184 class LicensesResourceApi { |
| 4185 final common_internal.ApiRequester _requester; |
| 4186 |
| 4187 LicensesResourceApi(common_internal.ApiRequester client) : |
| 4188 _requester = client; |
| 4189 |
| 4190 /** |
| 4191 * Returns the specified license resource. |
| 4192 * |
| 4193 * Request parameters: |
| 4194 * |
| 4195 * [project] - Name of the project scoping this request. |
| 4196 * Value must have pattern |
| 4197 * "(?:(?:[-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])?))". |
| 4198 * |
| 4199 * [license] - Name of the license resource to return. |
| 4200 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4201 * |
| 4202 * Completes with a [License]. |
| 4203 * |
| 4204 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4205 * error. |
| 4206 * |
| 4207 * If the used [http.Client] completes with an error when making a REST call, |
| 4208 * this method will complete with the same error. |
| 4209 */ |
| 4210 async.Future<License> get(core.String project, core.String license) { |
| 4211 var _url = null; |
| 4212 var _queryParams = new core.Map(); |
| 4213 var _uploadMedia = null; |
| 4214 var _uploadOptions = null; |
| 4215 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4216 var _body = null; |
| 4217 |
| 4218 if (project == null) { |
| 4219 throw new core.ArgumentError("Parameter project is required."); |
| 4220 } |
| 4221 if (license == null) { |
| 4222 throw new core.ArgumentError("Parameter license is required."); |
| 4223 } |
| 4224 |
| 4225 |
| 4226 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/licenses
/' + common_internal.Escaper.ecapeVariable('$license'); |
| 4227 |
| 4228 var _response = _requester.request(_url, |
| 4229 "GET", |
| 4230 body: _body, |
| 4231 queryParams: _queryParams, |
| 4232 uploadOptions: _uploadOptions, |
| 4233 uploadMedia: _uploadMedia, |
| 4234 downloadOptions: _downloadOptions); |
| 4235 return _response.then((data) => new License.fromJson(data)); |
| 4236 } |
| 4237 |
| 4238 } |
| 4239 |
| 4240 |
| 4241 /** Not documented yet. */ |
| 4242 class MachineTypesResourceApi { |
| 4243 final common_internal.ApiRequester _requester; |
| 4244 |
| 4245 MachineTypesResourceApi(common_internal.ApiRequester client) : |
| 4246 _requester = client; |
| 4247 |
| 4248 /** |
| 4249 * Retrieves the list of machine type resources grouped by scope. |
| 4250 * |
| 4251 * Request parameters: |
| 4252 * |
| 4253 * [project] - Name of the project scoping this request. |
| 4254 * Value must have pattern |
| 4255 * "(?:(?:[-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])?))". |
| 4256 * |
| 4257 * [filter] - Optional. Filter expression for filtering listed resources. |
| 4258 * |
| 4259 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 4260 * value is 500 and default value is 500. |
| 4261 * Value must be between "0" and "500". |
| 4262 * |
| 4263 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 4264 * by maxResults. Used to continue a previous list request. |
| 4265 * |
| 4266 * Completes with a [MachineTypeAggregatedList]. |
| 4267 * |
| 4268 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4269 * error. |
| 4270 * |
| 4271 * If the used [http.Client] completes with an error when making a REST call, |
| 4272 * this method will complete with the same error. |
| 4273 */ |
| 4274 async.Future<MachineTypeAggregatedList> aggregatedList(core.String project, {c
ore.String filter, core.int maxResults, core.String pageToken}) { |
| 4275 var _url = null; |
| 4276 var _queryParams = new core.Map(); |
| 4277 var _uploadMedia = null; |
| 4278 var _uploadOptions = null; |
| 4279 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4280 var _body = null; |
| 4281 |
| 4282 if (project == null) { |
| 4283 throw new core.ArgumentError("Parameter project is required."); |
| 4284 } |
| 4285 if (filter != null) { |
| 4286 _queryParams["filter"] = [filter]; |
| 4287 } |
| 4288 if (maxResults != null) { |
| 4289 _queryParams["maxResults"] = ["${maxResults}"]; |
| 4290 } |
| 4291 if (pageToken != null) { |
| 4292 _queryParams["pageToken"] = [pageToken]; |
| 4293 } |
| 4294 |
| 4295 |
| 4296 _url = common_internal.Escaper.ecapeVariable('$project') + '/aggregated/mach
ineTypes'; |
| 4297 |
| 4298 var _response = _requester.request(_url, |
| 4299 "GET", |
| 4300 body: _body, |
| 4301 queryParams: _queryParams, |
| 4302 uploadOptions: _uploadOptions, |
| 4303 uploadMedia: _uploadMedia, |
| 4304 downloadOptions: _downloadOptions); |
| 4305 return _response.then((data) => new MachineTypeAggregatedList.fromJson(data)
); |
| 4306 } |
| 4307 |
| 4308 /** |
| 4309 * Returns the specified machine type resource. |
| 4310 * |
| 4311 * Request parameters: |
| 4312 * |
| 4313 * [project] - Name of the project scoping this request. |
| 4314 * Value must have pattern |
| 4315 * "(?:(?:[-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])?))". |
| 4316 * |
| 4317 * [zone] - Name of the zone scoping this request. |
| 4318 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4319 * |
| 4320 * [machineType] - Name of the machine type resource to return. |
| 4321 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4322 * |
| 4323 * Completes with a [MachineType]. |
| 4324 * |
| 4325 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4326 * error. |
| 4327 * |
| 4328 * If the used [http.Client] completes with an error when making a REST call, |
| 4329 * this method will complete with the same error. |
| 4330 */ |
| 4331 async.Future<MachineType> get(core.String project, core.String zone, core.Stri
ng machineType) { |
| 4332 var _url = null; |
| 4333 var _queryParams = new core.Map(); |
| 4334 var _uploadMedia = null; |
| 4335 var _uploadOptions = null; |
| 4336 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4337 var _body = null; |
| 4338 |
| 4339 if (project == null) { |
| 4340 throw new core.ArgumentError("Parameter project is required."); |
| 4341 } |
| 4342 if (zone == null) { |
| 4343 throw new core.ArgumentError("Parameter zone is required."); |
| 4344 } |
| 4345 if (machineType == null) { |
| 4346 throw new core.ArgumentError("Parameter machineType is required."); |
| 4347 } |
| 4348 |
| 4349 |
| 4350 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/machineTypes/' + common_internal.E
scaper.ecapeVariable('$machineType'); |
| 4351 |
| 4352 var _response = _requester.request(_url, |
| 4353 "GET", |
| 4354 body: _body, |
| 4355 queryParams: _queryParams, |
| 4356 uploadOptions: _uploadOptions, |
| 4357 uploadMedia: _uploadMedia, |
| 4358 downloadOptions: _downloadOptions); |
| 4359 return _response.then((data) => new MachineType.fromJson(data)); |
| 4360 } |
| 4361 |
| 4362 /** |
| 4363 * Retrieves the list of machine type resources available to the specified |
| 4364 * project. |
| 4365 * |
| 4366 * Request parameters: |
| 4367 * |
| 4368 * [project] - Name of the project scoping this request. |
| 4369 * Value must have pattern |
| 4370 * "(?:(?:[-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])?))". |
| 4371 * |
| 4372 * [zone] - Name of the zone scoping this request. |
| 4373 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4374 * |
| 4375 * [filter] - Optional. Filter expression for filtering listed resources. |
| 4376 * |
| 4377 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 4378 * value is 500 and default value is 500. |
| 4379 * Value must be between "0" and "500". |
| 4380 * |
| 4381 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 4382 * by maxResults. Used to continue a previous list request. |
| 4383 * |
| 4384 * Completes with a [MachineTypeList]. |
| 4385 * |
| 4386 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4387 * error. |
| 4388 * |
| 4389 * If the used [http.Client] completes with an error when making a REST call, |
| 4390 * this method will complete with the same error. |
| 4391 */ |
| 4392 async.Future<MachineTypeList> list(core.String project, core.String zone, {cor
e.String filter, core.int maxResults, core.String pageToken}) { |
| 4393 var _url = null; |
| 4394 var _queryParams = new core.Map(); |
| 4395 var _uploadMedia = null; |
| 4396 var _uploadOptions = null; |
| 4397 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4398 var _body = null; |
| 4399 |
| 4400 if (project == null) { |
| 4401 throw new core.ArgumentError("Parameter project is required."); |
| 4402 } |
| 4403 if (zone == null) { |
| 4404 throw new core.ArgumentError("Parameter zone is required."); |
| 4405 } |
| 4406 if (filter != null) { |
| 4407 _queryParams["filter"] = [filter]; |
| 4408 } |
| 4409 if (maxResults != null) { |
| 4410 _queryParams["maxResults"] = ["${maxResults}"]; |
| 4411 } |
| 4412 if (pageToken != null) { |
| 4413 _queryParams["pageToken"] = [pageToken]; |
| 4414 } |
| 4415 |
| 4416 |
| 4417 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/machineTypes'; |
| 4418 |
| 4419 var _response = _requester.request(_url, |
| 4420 "GET", |
| 4421 body: _body, |
| 4422 queryParams: _queryParams, |
| 4423 uploadOptions: _uploadOptions, |
| 4424 uploadMedia: _uploadMedia, |
| 4425 downloadOptions: _downloadOptions); |
| 4426 return _response.then((data) => new MachineTypeList.fromJson(data)); |
| 4427 } |
| 4428 |
| 4429 } |
| 4430 |
| 4431 |
| 4432 /** Not documented yet. */ |
| 4433 class NetworksResourceApi { |
| 4434 final common_internal.ApiRequester _requester; |
| 4435 |
| 4436 NetworksResourceApi(common_internal.ApiRequester client) : |
| 4437 _requester = client; |
| 4438 |
| 4439 /** |
| 4440 * Deletes the specified network resource. |
| 4441 * |
| 4442 * Request parameters: |
| 4443 * |
| 4444 * [project] - Name of the project scoping this request. |
| 4445 * Value must have pattern |
| 4446 * "(?:(?:[-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])?))". |
| 4447 * |
| 4448 * [network] - Name of the network resource to delete. |
| 4449 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4450 * |
| 4451 * Completes with a [Operation]. |
| 4452 * |
| 4453 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4454 * error. |
| 4455 * |
| 4456 * If the used [http.Client] completes with an error when making a REST call, |
| 4457 * this method will complete with the same error. |
| 4458 */ |
| 4459 async.Future<Operation> delete(core.String project, core.String network) { |
| 4460 var _url = null; |
| 4461 var _queryParams = new core.Map(); |
| 4462 var _uploadMedia = null; |
| 4463 var _uploadOptions = null; |
| 4464 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4465 var _body = null; |
| 4466 |
| 4467 if (project == null) { |
| 4468 throw new core.ArgumentError("Parameter project is required."); |
| 4469 } |
| 4470 if (network == null) { |
| 4471 throw new core.ArgumentError("Parameter network is required."); |
| 4472 } |
| 4473 |
| 4474 |
| 4475 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/networks
/' + common_internal.Escaper.ecapeVariable('$network'); |
| 4476 |
| 4477 var _response = _requester.request(_url, |
| 4478 "DELETE", |
| 4479 body: _body, |
| 4480 queryParams: _queryParams, |
| 4481 uploadOptions: _uploadOptions, |
| 4482 uploadMedia: _uploadMedia, |
| 4483 downloadOptions: _downloadOptions); |
| 4484 return _response.then((data) => new Operation.fromJson(data)); |
| 4485 } |
| 4486 |
| 4487 /** |
| 4488 * Returns the specified network resource. |
| 4489 * |
| 4490 * Request parameters: |
| 4491 * |
| 4492 * [project] - Name of the project scoping this request. |
| 4493 * Value must have pattern |
| 4494 * "(?:(?:[-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])?))". |
| 4495 * |
| 4496 * [network] - Name of the network resource to return. |
| 4497 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4498 * |
| 4499 * Completes with a [Network]. |
| 4500 * |
| 4501 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4502 * error. |
| 4503 * |
| 4504 * If the used [http.Client] completes with an error when making a REST call, |
| 4505 * this method will complete with the same error. |
| 4506 */ |
| 4507 async.Future<Network> get(core.String project, core.String network) { |
| 4508 var _url = null; |
| 4509 var _queryParams = new core.Map(); |
| 4510 var _uploadMedia = null; |
| 4511 var _uploadOptions = null; |
| 4512 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4513 var _body = null; |
| 4514 |
| 4515 if (project == null) { |
| 4516 throw new core.ArgumentError("Parameter project is required."); |
| 4517 } |
| 4518 if (network == null) { |
| 4519 throw new core.ArgumentError("Parameter network is required."); |
| 4520 } |
| 4521 |
| 4522 |
| 4523 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/networks
/' + common_internal.Escaper.ecapeVariable('$network'); |
| 4524 |
| 4525 var _response = _requester.request(_url, |
| 4526 "GET", |
| 4527 body: _body, |
| 4528 queryParams: _queryParams, |
| 4529 uploadOptions: _uploadOptions, |
| 4530 uploadMedia: _uploadMedia, |
| 4531 downloadOptions: _downloadOptions); |
| 4532 return _response.then((data) => new Network.fromJson(data)); |
| 4533 } |
| 4534 |
| 4535 /** |
| 4536 * Creates a network resource in the specified project using the data included |
| 4537 * in the request. |
| 4538 * |
| 4539 * [request] - The metadata request object. |
| 4540 * |
| 4541 * Request parameters: |
| 4542 * |
| 4543 * [project] - Name of the project scoping this request. |
| 4544 * Value must have pattern |
| 4545 * "(?:(?:[-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])?))". |
| 4546 * |
| 4547 * Completes with a [Operation]. |
| 4548 * |
| 4549 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4550 * error. |
| 4551 * |
| 4552 * If the used [http.Client] completes with an error when making a REST call, |
| 4553 * this method will complete with the same error. |
| 4554 */ |
| 4555 async.Future<Operation> insert(Network request, core.String project) { |
| 4556 var _url = null; |
| 4557 var _queryParams = new core.Map(); |
| 4558 var _uploadMedia = null; |
| 4559 var _uploadOptions = null; |
| 4560 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4561 var _body = null; |
| 4562 |
| 4563 if (request != null) { |
| 4564 _body = convert.JSON.encode((request).toJson()); |
| 4565 } |
| 4566 if (project == null) { |
| 4567 throw new core.ArgumentError("Parameter project is required."); |
| 4568 } |
| 4569 |
| 4570 |
| 4571 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/networks
'; |
| 4572 |
| 4573 var _response = _requester.request(_url, |
| 4574 "POST", |
| 4575 body: _body, |
| 4576 queryParams: _queryParams, |
| 4577 uploadOptions: _uploadOptions, |
| 4578 uploadMedia: _uploadMedia, |
| 4579 downloadOptions: _downloadOptions); |
| 4580 return _response.then((data) => new Operation.fromJson(data)); |
| 4581 } |
| 4582 |
| 4583 /** |
| 4584 * Retrieves the list of network resources available to the specified project. |
| 4585 * |
| 4586 * Request parameters: |
| 4587 * |
| 4588 * [project] - Name of the project scoping this request. |
| 4589 * Value must have pattern |
| 4590 * "(?:(?:[-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])?))". |
| 4591 * |
| 4592 * [filter] - Optional. Filter expression for filtering listed resources. |
| 4593 * |
| 4594 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 4595 * value is 500 and default value is 500. |
| 4596 * Value must be between "0" and "500". |
| 4597 * |
| 4598 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 4599 * by maxResults. Used to continue a previous list request. |
| 4600 * |
| 4601 * Completes with a [NetworkList]. |
| 4602 * |
| 4603 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4604 * error. |
| 4605 * |
| 4606 * If the used [http.Client] completes with an error when making a REST call, |
| 4607 * this method will complete with the same error. |
| 4608 */ |
| 4609 async.Future<NetworkList> list(core.String project, {core.String filter, core.
int maxResults, core.String pageToken}) { |
| 4610 var _url = null; |
| 4611 var _queryParams = new core.Map(); |
| 4612 var _uploadMedia = null; |
| 4613 var _uploadOptions = null; |
| 4614 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4615 var _body = null; |
| 4616 |
| 4617 if (project == null) { |
| 4618 throw new core.ArgumentError("Parameter project is required."); |
| 4619 } |
| 4620 if (filter != null) { |
| 4621 _queryParams["filter"] = [filter]; |
| 4622 } |
| 4623 if (maxResults != null) { |
| 4624 _queryParams["maxResults"] = ["${maxResults}"]; |
| 4625 } |
| 4626 if (pageToken != null) { |
| 4627 _queryParams["pageToken"] = [pageToken]; |
| 4628 } |
| 4629 |
| 4630 |
| 4631 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/networks
'; |
| 4632 |
| 4633 var _response = _requester.request(_url, |
| 4634 "GET", |
| 4635 body: _body, |
| 4636 queryParams: _queryParams, |
| 4637 uploadOptions: _uploadOptions, |
| 4638 uploadMedia: _uploadMedia, |
| 4639 downloadOptions: _downloadOptions); |
| 4640 return _response.then((data) => new NetworkList.fromJson(data)); |
| 4641 } |
| 4642 |
| 4643 } |
| 4644 |
| 4645 |
| 4646 /** Not documented yet. */ |
| 4647 class ProjectsResourceApi { |
| 4648 final common_internal.ApiRequester _requester; |
| 4649 |
| 4650 ProjectsResourceApi(common_internal.ApiRequester client) : |
| 4651 _requester = client; |
| 4652 |
| 4653 /** |
| 4654 * Returns the specified project resource. |
| 4655 * |
| 4656 * Request parameters: |
| 4657 * |
| 4658 * [project] - Name of the project resource to retrieve. |
| 4659 * Value must have pattern |
| 4660 * "(?:(?:[-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])?))". |
| 4661 * |
| 4662 * Completes with a [Project]. |
| 4663 * |
| 4664 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4665 * error. |
| 4666 * |
| 4667 * If the used [http.Client] completes with an error when making a REST call, |
| 4668 * this method will complete with the same error. |
| 4669 */ |
| 4670 async.Future<Project> get(core.String project) { |
| 4671 var _url = null; |
| 4672 var _queryParams = new core.Map(); |
| 4673 var _uploadMedia = null; |
| 4674 var _uploadOptions = null; |
| 4675 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4676 var _body = null; |
| 4677 |
| 4678 if (project == null) { |
| 4679 throw new core.ArgumentError("Parameter project is required."); |
| 4680 } |
| 4681 |
| 4682 |
| 4683 _url = common_internal.Escaper.ecapeVariable('$project'); |
| 4684 |
| 4685 var _response = _requester.request(_url, |
| 4686 "GET", |
| 4687 body: _body, |
| 4688 queryParams: _queryParams, |
| 4689 uploadOptions: _uploadOptions, |
| 4690 uploadMedia: _uploadMedia, |
| 4691 downloadOptions: _downloadOptions); |
| 4692 return _response.then((data) => new Project.fromJson(data)); |
| 4693 } |
| 4694 |
| 4695 /** |
| 4696 * Sets metadata common to all instances within the specified project using |
| 4697 * the data included in the request. |
| 4698 * |
| 4699 * [request] - The metadata request object. |
| 4700 * |
| 4701 * Request parameters: |
| 4702 * |
| 4703 * [project] - Name of the project scoping this request. |
| 4704 * Value must have pattern |
| 4705 * "(?:(?:[-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])?))". |
| 4706 * |
| 4707 * Completes with a [Operation]. |
| 4708 * |
| 4709 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4710 * error. |
| 4711 * |
| 4712 * If the used [http.Client] completes with an error when making a REST call, |
| 4713 * this method will complete with the same error. |
| 4714 */ |
| 4715 async.Future<Operation> setCommonInstanceMetadata(Metadata request, core.Strin
g project) { |
| 4716 var _url = null; |
| 4717 var _queryParams = new core.Map(); |
| 4718 var _uploadMedia = null; |
| 4719 var _uploadOptions = null; |
| 4720 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4721 var _body = null; |
| 4722 |
| 4723 if (request != null) { |
| 4724 _body = convert.JSON.encode((request).toJson()); |
| 4725 } |
| 4726 if (project == null) { |
| 4727 throw new core.ArgumentError("Parameter project is required."); |
| 4728 } |
| 4729 |
| 4730 |
| 4731 _url = common_internal.Escaper.ecapeVariable('$project') + '/setCommonInstan
ceMetadata'; |
| 4732 |
| 4733 var _response = _requester.request(_url, |
| 4734 "POST", |
| 4735 body: _body, |
| 4736 queryParams: _queryParams, |
| 4737 uploadOptions: _uploadOptions, |
| 4738 uploadMedia: _uploadMedia, |
| 4739 downloadOptions: _downloadOptions); |
| 4740 return _response.then((data) => new Operation.fromJson(data)); |
| 4741 } |
| 4742 |
| 4743 /** |
| 4744 * Sets usage export location |
| 4745 * |
| 4746 * [request] - The metadata request object. |
| 4747 * |
| 4748 * Request parameters: |
| 4749 * |
| 4750 * [project] - Name of the project scoping this request. |
| 4751 * Value must have pattern |
| 4752 * "(?:(?:[-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])?))". |
| 4753 * |
| 4754 * Completes with a [Operation]. |
| 4755 * |
| 4756 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4757 * error. |
| 4758 * |
| 4759 * If the used [http.Client] completes with an error when making a REST call, |
| 4760 * this method will complete with the same error. |
| 4761 */ |
| 4762 async.Future<Operation> setUsageExportBucket(UsageExportLocation request, core
.String project) { |
| 4763 var _url = null; |
| 4764 var _queryParams = new core.Map(); |
| 4765 var _uploadMedia = null; |
| 4766 var _uploadOptions = null; |
| 4767 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4768 var _body = null; |
| 4769 |
| 4770 if (request != null) { |
| 4771 _body = convert.JSON.encode((request).toJson()); |
| 4772 } |
| 4773 if (project == null) { |
| 4774 throw new core.ArgumentError("Parameter project is required."); |
| 4775 } |
| 4776 |
| 4777 |
| 4778 _url = common_internal.Escaper.ecapeVariable('$project') + '/setUsageExportB
ucket'; |
| 4779 |
| 4780 var _response = _requester.request(_url, |
| 4781 "POST", |
| 4782 body: _body, |
| 4783 queryParams: _queryParams, |
| 4784 uploadOptions: _uploadOptions, |
| 4785 uploadMedia: _uploadMedia, |
| 4786 downloadOptions: _downloadOptions); |
| 4787 return _response.then((data) => new Operation.fromJson(data)); |
| 4788 } |
| 4789 |
| 4790 } |
| 4791 |
| 4792 |
| 4793 /** Not documented yet. */ |
| 4794 class RegionOperationsResourceApi { |
| 4795 final common_internal.ApiRequester _requester; |
| 4796 |
| 4797 RegionOperationsResourceApi(common_internal.ApiRequester client) : |
| 4798 _requester = client; |
| 4799 |
| 4800 /** |
| 4801 * Deletes the specified region-specific operation resource. |
| 4802 * |
| 4803 * Request parameters: |
| 4804 * |
| 4805 * [project] - Name of the project scoping this request. |
| 4806 * Value must have pattern |
| 4807 * "(?:(?:[-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])?))". |
| 4808 * |
| 4809 * [region] - Name of the region scoping this request. |
| 4810 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4811 * |
| 4812 * [operation] - Name of the operation resource to delete. |
| 4813 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4814 * |
| 4815 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4816 * error. |
| 4817 * |
| 4818 * If the used [http.Client] completes with an error when making a REST call, |
| 4819 * this method will complete with the same error. |
| 4820 */ |
| 4821 async.Future delete(core.String project, core.String region, core.String opera
tion) { |
| 4822 var _url = null; |
| 4823 var _queryParams = new core.Map(); |
| 4824 var _uploadMedia = null; |
| 4825 var _uploadOptions = null; |
| 4826 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4827 var _body = null; |
| 4828 |
| 4829 if (project == null) { |
| 4830 throw new core.ArgumentError("Parameter project is required."); |
| 4831 } |
| 4832 if (region == null) { |
| 4833 throw new core.ArgumentError("Parameter region is required."); |
| 4834 } |
| 4835 if (operation == null) { |
| 4836 throw new core.ArgumentError("Parameter operation is required."); |
| 4837 } |
| 4838 |
| 4839 _downloadOptions = null; |
| 4840 |
| 4841 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/operations/' + common_internal
.Escaper.ecapeVariable('$operation'); |
| 4842 |
| 4843 var _response = _requester.request(_url, |
| 4844 "DELETE", |
| 4845 body: _body, |
| 4846 queryParams: _queryParams, |
| 4847 uploadOptions: _uploadOptions, |
| 4848 uploadMedia: _uploadMedia, |
| 4849 downloadOptions: _downloadOptions); |
| 4850 return _response.then((data) => null); |
| 4851 } |
| 4852 |
| 4853 /** |
| 4854 * Retrieves the specified region-specific operation resource. |
| 4855 * |
| 4856 * Request parameters: |
| 4857 * |
| 4858 * [project] - Name of the project scoping this request. |
| 4859 * Value must have pattern |
| 4860 * "(?:(?:[-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])?))". |
| 4861 * |
| 4862 * [region] - Name of the zone scoping this request. |
| 4863 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4864 * |
| 4865 * [operation] - Name of the operation resource to return. |
| 4866 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4867 * |
| 4868 * Completes with a [Operation]. |
| 4869 * |
| 4870 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4871 * error. |
| 4872 * |
| 4873 * If the used [http.Client] completes with an error when making a REST call, |
| 4874 * this method will complete with the same error. |
| 4875 */ |
| 4876 async.Future<Operation> get(core.String project, core.String region, core.Stri
ng operation) { |
| 4877 var _url = null; |
| 4878 var _queryParams = new core.Map(); |
| 4879 var _uploadMedia = null; |
| 4880 var _uploadOptions = null; |
| 4881 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4882 var _body = null; |
| 4883 |
| 4884 if (project == null) { |
| 4885 throw new core.ArgumentError("Parameter project is required."); |
| 4886 } |
| 4887 if (region == null) { |
| 4888 throw new core.ArgumentError("Parameter region is required."); |
| 4889 } |
| 4890 if (operation == null) { |
| 4891 throw new core.ArgumentError("Parameter operation is required."); |
| 4892 } |
| 4893 |
| 4894 |
| 4895 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/operations/' + common_internal
.Escaper.ecapeVariable('$operation'); |
| 4896 |
| 4897 var _response = _requester.request(_url, |
| 4898 "GET", |
| 4899 body: _body, |
| 4900 queryParams: _queryParams, |
| 4901 uploadOptions: _uploadOptions, |
| 4902 uploadMedia: _uploadMedia, |
| 4903 downloadOptions: _downloadOptions); |
| 4904 return _response.then((data) => new Operation.fromJson(data)); |
| 4905 } |
| 4906 |
| 4907 /** |
| 4908 * Retrieves the list of operation resources contained within the specified |
| 4909 * region. |
| 4910 * |
| 4911 * Request parameters: |
| 4912 * |
| 4913 * [project] - Name of the project scoping this request. |
| 4914 * Value must have pattern |
| 4915 * "(?:(?:[-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])?))". |
| 4916 * |
| 4917 * [region] - Name of the region scoping this request. |
| 4918 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4919 * |
| 4920 * [filter] - Optional. Filter expression for filtering listed resources. |
| 4921 * |
| 4922 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 4923 * value is 500 and default value is 500. |
| 4924 * Value must be between "0" and "500". |
| 4925 * |
| 4926 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 4927 * by maxResults. Used to continue a previous list request. |
| 4928 * |
| 4929 * Completes with a [OperationList]. |
| 4930 * |
| 4931 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4932 * error. |
| 4933 * |
| 4934 * If the used [http.Client] completes with an error when making a REST call, |
| 4935 * this method will complete with the same error. |
| 4936 */ |
| 4937 async.Future<OperationList> list(core.String project, core.String region, {cor
e.String filter, core.int maxResults, core.String pageToken}) { |
| 4938 var _url = null; |
| 4939 var _queryParams = new core.Map(); |
| 4940 var _uploadMedia = null; |
| 4941 var _uploadOptions = null; |
| 4942 var _downloadOptions = common.DownloadOptions.Metadata; |
| 4943 var _body = null; |
| 4944 |
| 4945 if (project == null) { |
| 4946 throw new core.ArgumentError("Parameter project is required."); |
| 4947 } |
| 4948 if (region == null) { |
| 4949 throw new core.ArgumentError("Parameter region is required."); |
| 4950 } |
| 4951 if (filter != null) { |
| 4952 _queryParams["filter"] = [filter]; |
| 4953 } |
| 4954 if (maxResults != null) { |
| 4955 _queryParams["maxResults"] = ["${maxResults}"]; |
| 4956 } |
| 4957 if (pageToken != null) { |
| 4958 _queryParams["pageToken"] = [pageToken]; |
| 4959 } |
| 4960 |
| 4961 |
| 4962 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/operations'; |
| 4963 |
| 4964 var _response = _requester.request(_url, |
| 4965 "GET", |
| 4966 body: _body, |
| 4967 queryParams: _queryParams, |
| 4968 uploadOptions: _uploadOptions, |
| 4969 uploadMedia: _uploadMedia, |
| 4970 downloadOptions: _downloadOptions); |
| 4971 return _response.then((data) => new OperationList.fromJson(data)); |
| 4972 } |
| 4973 |
| 4974 } |
| 4975 |
| 4976 |
| 4977 /** Not documented yet. */ |
| 4978 class RegionsResourceApi { |
| 4979 final common_internal.ApiRequester _requester; |
| 4980 |
| 4981 RegionsResourceApi(common_internal.ApiRequester client) : |
| 4982 _requester = client; |
| 4983 |
| 4984 /** |
| 4985 * Returns the specified region resource. |
| 4986 * |
| 4987 * Request parameters: |
| 4988 * |
| 4989 * [project] - Name of the project scoping this request. |
| 4990 * Value must have pattern |
| 4991 * "(?:(?:[-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])?))". |
| 4992 * |
| 4993 * [region] - Name of the region resource to return. |
| 4994 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 4995 * |
| 4996 * Completes with a [Region]. |
| 4997 * |
| 4998 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 4999 * error. |
| 5000 * |
| 5001 * If the used [http.Client] completes with an error when making a REST call, |
| 5002 * this method will complete with the same error. |
| 5003 */ |
| 5004 async.Future<Region> get(core.String project, core.String region) { |
| 5005 var _url = null; |
| 5006 var _queryParams = new core.Map(); |
| 5007 var _uploadMedia = null; |
| 5008 var _uploadOptions = null; |
| 5009 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5010 var _body = null; |
| 5011 |
| 5012 if (project == null) { |
| 5013 throw new core.ArgumentError("Parameter project is required."); |
| 5014 } |
| 5015 if (region == null) { |
| 5016 throw new core.ArgumentError("Parameter region is required."); |
| 5017 } |
| 5018 |
| 5019 |
| 5020 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region'); |
| 5021 |
| 5022 var _response = _requester.request(_url, |
| 5023 "GET", |
| 5024 body: _body, |
| 5025 queryParams: _queryParams, |
| 5026 uploadOptions: _uploadOptions, |
| 5027 uploadMedia: _uploadMedia, |
| 5028 downloadOptions: _downloadOptions); |
| 5029 return _response.then((data) => new Region.fromJson(data)); |
| 5030 } |
| 5031 |
| 5032 /** |
| 5033 * Retrieves the list of region resources available to the specified project. |
| 5034 * |
| 5035 * Request parameters: |
| 5036 * |
| 5037 * [project] - Name of the project scoping this request. |
| 5038 * Value must have pattern |
| 5039 * "(?:(?:[-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])?))". |
| 5040 * |
| 5041 * [filter] - Optional. Filter expression for filtering listed resources. |
| 5042 * |
| 5043 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 5044 * value is 500 and default value is 500. |
| 5045 * Value must be between "0" and "500". |
| 5046 * |
| 5047 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 5048 * by maxResults. Used to continue a previous list request. |
| 5049 * |
| 5050 * Completes with a [RegionList]. |
| 5051 * |
| 5052 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5053 * error. |
| 5054 * |
| 5055 * If the used [http.Client] completes with an error when making a REST call, |
| 5056 * this method will complete with the same error. |
| 5057 */ |
| 5058 async.Future<RegionList> list(core.String project, {core.String filter, core.i
nt maxResults, core.String pageToken}) { |
| 5059 var _url = null; |
| 5060 var _queryParams = new core.Map(); |
| 5061 var _uploadMedia = null; |
| 5062 var _uploadOptions = null; |
| 5063 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5064 var _body = null; |
| 5065 |
| 5066 if (project == null) { |
| 5067 throw new core.ArgumentError("Parameter project is required."); |
| 5068 } |
| 5069 if (filter != null) { |
| 5070 _queryParams["filter"] = [filter]; |
| 5071 } |
| 5072 if (maxResults != null) { |
| 5073 _queryParams["maxResults"] = ["${maxResults}"]; |
| 5074 } |
| 5075 if (pageToken != null) { |
| 5076 _queryParams["pageToken"] = [pageToken]; |
| 5077 } |
| 5078 |
| 5079 |
| 5080 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions'; |
| 5081 |
| 5082 var _response = _requester.request(_url, |
| 5083 "GET", |
| 5084 body: _body, |
| 5085 queryParams: _queryParams, |
| 5086 uploadOptions: _uploadOptions, |
| 5087 uploadMedia: _uploadMedia, |
| 5088 downloadOptions: _downloadOptions); |
| 5089 return _response.then((data) => new RegionList.fromJson(data)); |
| 5090 } |
| 5091 |
| 5092 } |
| 5093 |
| 5094 |
| 5095 /** Not documented yet. */ |
| 5096 class RoutesResourceApi { |
| 5097 final common_internal.ApiRequester _requester; |
| 5098 |
| 5099 RoutesResourceApi(common_internal.ApiRequester client) : |
| 5100 _requester = client; |
| 5101 |
| 5102 /** |
| 5103 * Deletes the specified route resource. |
| 5104 * |
| 5105 * Request parameters: |
| 5106 * |
| 5107 * [project] - Name of the project scoping this request. |
| 5108 * Value must have pattern |
| 5109 * "(?:(?:[-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])?))". |
| 5110 * |
| 5111 * [route] - Name of the route resource to delete. |
| 5112 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5113 * |
| 5114 * Completes with a [Operation]. |
| 5115 * |
| 5116 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5117 * error. |
| 5118 * |
| 5119 * If the used [http.Client] completes with an error when making a REST call, |
| 5120 * this method will complete with the same error. |
| 5121 */ |
| 5122 async.Future<Operation> delete(core.String project, core.String route) { |
| 5123 var _url = null; |
| 5124 var _queryParams = new core.Map(); |
| 5125 var _uploadMedia = null; |
| 5126 var _uploadOptions = null; |
| 5127 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5128 var _body = null; |
| 5129 |
| 5130 if (project == null) { |
| 5131 throw new core.ArgumentError("Parameter project is required."); |
| 5132 } |
| 5133 if (route == null) { |
| 5134 throw new core.ArgumentError("Parameter route is required."); |
| 5135 } |
| 5136 |
| 5137 |
| 5138 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/routes/'
+ common_internal.Escaper.ecapeVariable('$route'); |
| 5139 |
| 5140 var _response = _requester.request(_url, |
| 5141 "DELETE", |
| 5142 body: _body, |
| 5143 queryParams: _queryParams, |
| 5144 uploadOptions: _uploadOptions, |
| 5145 uploadMedia: _uploadMedia, |
| 5146 downloadOptions: _downloadOptions); |
| 5147 return _response.then((data) => new Operation.fromJson(data)); |
| 5148 } |
| 5149 |
| 5150 /** |
| 5151 * Returns the specified route resource. |
| 5152 * |
| 5153 * Request parameters: |
| 5154 * |
| 5155 * [project] - Name of the project scoping this request. |
| 5156 * Value must have pattern |
| 5157 * "(?:(?:[-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])?))". |
| 5158 * |
| 5159 * [route] - Name of the route resource to return. |
| 5160 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5161 * |
| 5162 * Completes with a [Route]. |
| 5163 * |
| 5164 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5165 * error. |
| 5166 * |
| 5167 * If the used [http.Client] completes with an error when making a REST call, |
| 5168 * this method will complete with the same error. |
| 5169 */ |
| 5170 async.Future<Route> get(core.String project, core.String route) { |
| 5171 var _url = null; |
| 5172 var _queryParams = new core.Map(); |
| 5173 var _uploadMedia = null; |
| 5174 var _uploadOptions = null; |
| 5175 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5176 var _body = null; |
| 5177 |
| 5178 if (project == null) { |
| 5179 throw new core.ArgumentError("Parameter project is required."); |
| 5180 } |
| 5181 if (route == null) { |
| 5182 throw new core.ArgumentError("Parameter route is required."); |
| 5183 } |
| 5184 |
| 5185 |
| 5186 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/routes/'
+ common_internal.Escaper.ecapeVariable('$route'); |
| 5187 |
| 5188 var _response = _requester.request(_url, |
| 5189 "GET", |
| 5190 body: _body, |
| 5191 queryParams: _queryParams, |
| 5192 uploadOptions: _uploadOptions, |
| 5193 uploadMedia: _uploadMedia, |
| 5194 downloadOptions: _downloadOptions); |
| 5195 return _response.then((data) => new Route.fromJson(data)); |
| 5196 } |
| 5197 |
| 5198 /** |
| 5199 * Creates a route resource in the specified project using the data included |
| 5200 * in the request. |
| 5201 * |
| 5202 * [request] - The metadata request object. |
| 5203 * |
| 5204 * Request parameters: |
| 5205 * |
| 5206 * [project] - Name of the project scoping this request. |
| 5207 * Value must have pattern |
| 5208 * "(?:(?:[-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])?))". |
| 5209 * |
| 5210 * Completes with a [Operation]. |
| 5211 * |
| 5212 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5213 * error. |
| 5214 * |
| 5215 * If the used [http.Client] completes with an error when making a REST call, |
| 5216 * this method will complete with the same error. |
| 5217 */ |
| 5218 async.Future<Operation> insert(Route request, core.String project) { |
| 5219 var _url = null; |
| 5220 var _queryParams = new core.Map(); |
| 5221 var _uploadMedia = null; |
| 5222 var _uploadOptions = null; |
| 5223 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5224 var _body = null; |
| 5225 |
| 5226 if (request != null) { |
| 5227 _body = convert.JSON.encode((request).toJson()); |
| 5228 } |
| 5229 if (project == null) { |
| 5230 throw new core.ArgumentError("Parameter project is required."); |
| 5231 } |
| 5232 |
| 5233 |
| 5234 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/routes'; |
| 5235 |
| 5236 var _response = _requester.request(_url, |
| 5237 "POST", |
| 5238 body: _body, |
| 5239 queryParams: _queryParams, |
| 5240 uploadOptions: _uploadOptions, |
| 5241 uploadMedia: _uploadMedia, |
| 5242 downloadOptions: _downloadOptions); |
| 5243 return _response.then((data) => new Operation.fromJson(data)); |
| 5244 } |
| 5245 |
| 5246 /** |
| 5247 * Retrieves the list of route resources available to the specified project. |
| 5248 * |
| 5249 * Request parameters: |
| 5250 * |
| 5251 * [project] - Name of the project scoping this request. |
| 5252 * Value must have pattern |
| 5253 * "(?:(?:[-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])?))". |
| 5254 * |
| 5255 * [filter] - Optional. Filter expression for filtering listed resources. |
| 5256 * |
| 5257 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 5258 * value is 500 and default value is 500. |
| 5259 * Value must be between "0" and "500". |
| 5260 * |
| 5261 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 5262 * by maxResults. Used to continue a previous list request. |
| 5263 * |
| 5264 * Completes with a [RouteList]. |
| 5265 * |
| 5266 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5267 * error. |
| 5268 * |
| 5269 * If the used [http.Client] completes with an error when making a REST call, |
| 5270 * this method will complete with the same error. |
| 5271 */ |
| 5272 async.Future<RouteList> list(core.String project, {core.String filter, core.in
t maxResults, core.String pageToken}) { |
| 5273 var _url = null; |
| 5274 var _queryParams = new core.Map(); |
| 5275 var _uploadMedia = null; |
| 5276 var _uploadOptions = null; |
| 5277 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5278 var _body = null; |
| 5279 |
| 5280 if (project == null) { |
| 5281 throw new core.ArgumentError("Parameter project is required."); |
| 5282 } |
| 5283 if (filter != null) { |
| 5284 _queryParams["filter"] = [filter]; |
| 5285 } |
| 5286 if (maxResults != null) { |
| 5287 _queryParams["maxResults"] = ["${maxResults}"]; |
| 5288 } |
| 5289 if (pageToken != null) { |
| 5290 _queryParams["pageToken"] = [pageToken]; |
| 5291 } |
| 5292 |
| 5293 |
| 5294 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/routes'; |
| 5295 |
| 5296 var _response = _requester.request(_url, |
| 5297 "GET", |
| 5298 body: _body, |
| 5299 queryParams: _queryParams, |
| 5300 uploadOptions: _uploadOptions, |
| 5301 uploadMedia: _uploadMedia, |
| 5302 downloadOptions: _downloadOptions); |
| 5303 return _response.then((data) => new RouteList.fromJson(data)); |
| 5304 } |
| 5305 |
| 5306 } |
| 5307 |
| 5308 |
| 5309 /** Not documented yet. */ |
| 5310 class SnapshotsResourceApi { |
| 5311 final common_internal.ApiRequester _requester; |
| 5312 |
| 5313 SnapshotsResourceApi(common_internal.ApiRequester client) : |
| 5314 _requester = client; |
| 5315 |
| 5316 /** |
| 5317 * Deletes the specified persistent disk snapshot resource. |
| 5318 * |
| 5319 * Request parameters: |
| 5320 * |
| 5321 * [project] - Name of the project scoping this request. |
| 5322 * Value must have pattern |
| 5323 * "(?:(?:[-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])?))". |
| 5324 * |
| 5325 * [snapshot] - Name of the persistent disk snapshot resource to delete. |
| 5326 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5327 * |
| 5328 * Completes with a [Operation]. |
| 5329 * |
| 5330 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5331 * error. |
| 5332 * |
| 5333 * If the used [http.Client] completes with an error when making a REST call, |
| 5334 * this method will complete with the same error. |
| 5335 */ |
| 5336 async.Future<Operation> delete(core.String project, core.String snapshot) { |
| 5337 var _url = null; |
| 5338 var _queryParams = new core.Map(); |
| 5339 var _uploadMedia = null; |
| 5340 var _uploadOptions = null; |
| 5341 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5342 var _body = null; |
| 5343 |
| 5344 if (project == null) { |
| 5345 throw new core.ArgumentError("Parameter project is required."); |
| 5346 } |
| 5347 if (snapshot == null) { |
| 5348 throw new core.ArgumentError("Parameter snapshot is required."); |
| 5349 } |
| 5350 |
| 5351 |
| 5352 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/snapshot
s/' + common_internal.Escaper.ecapeVariable('$snapshot'); |
| 5353 |
| 5354 var _response = _requester.request(_url, |
| 5355 "DELETE", |
| 5356 body: _body, |
| 5357 queryParams: _queryParams, |
| 5358 uploadOptions: _uploadOptions, |
| 5359 uploadMedia: _uploadMedia, |
| 5360 downloadOptions: _downloadOptions); |
| 5361 return _response.then((data) => new Operation.fromJson(data)); |
| 5362 } |
| 5363 |
| 5364 /** |
| 5365 * Returns the specified persistent disk snapshot resource. |
| 5366 * |
| 5367 * Request parameters: |
| 5368 * |
| 5369 * [project] - Name of the project scoping this request. |
| 5370 * Value must have pattern |
| 5371 * "(?:(?:[-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])?))". |
| 5372 * |
| 5373 * [snapshot] - Name of the persistent disk snapshot resource to return. |
| 5374 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5375 * |
| 5376 * Completes with a [Snapshot]. |
| 5377 * |
| 5378 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5379 * error. |
| 5380 * |
| 5381 * If the used [http.Client] completes with an error when making a REST call, |
| 5382 * this method will complete with the same error. |
| 5383 */ |
| 5384 async.Future<Snapshot> get(core.String project, core.String snapshot) { |
| 5385 var _url = null; |
| 5386 var _queryParams = new core.Map(); |
| 5387 var _uploadMedia = null; |
| 5388 var _uploadOptions = null; |
| 5389 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5390 var _body = null; |
| 5391 |
| 5392 if (project == null) { |
| 5393 throw new core.ArgumentError("Parameter project is required."); |
| 5394 } |
| 5395 if (snapshot == null) { |
| 5396 throw new core.ArgumentError("Parameter snapshot is required."); |
| 5397 } |
| 5398 |
| 5399 |
| 5400 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/snapshot
s/' + common_internal.Escaper.ecapeVariable('$snapshot'); |
| 5401 |
| 5402 var _response = _requester.request(_url, |
| 5403 "GET", |
| 5404 body: _body, |
| 5405 queryParams: _queryParams, |
| 5406 uploadOptions: _uploadOptions, |
| 5407 uploadMedia: _uploadMedia, |
| 5408 downloadOptions: _downloadOptions); |
| 5409 return _response.then((data) => new Snapshot.fromJson(data)); |
| 5410 } |
| 5411 |
| 5412 /** |
| 5413 * Retrieves the list of persistent disk snapshot resources contained within |
| 5414 * the specified project. |
| 5415 * |
| 5416 * Request parameters: |
| 5417 * |
| 5418 * [project] - Name of the project scoping this request. |
| 5419 * Value must have pattern |
| 5420 * "(?:(?:[-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])?))". |
| 5421 * |
| 5422 * [filter] - Optional. Filter expression for filtering listed resources. |
| 5423 * |
| 5424 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 5425 * value is 500 and default value is 500. |
| 5426 * Value must be between "0" and "500". |
| 5427 * |
| 5428 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 5429 * by maxResults. Used to continue a previous list request. |
| 5430 * |
| 5431 * Completes with a [SnapshotList]. |
| 5432 * |
| 5433 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5434 * error. |
| 5435 * |
| 5436 * If the used [http.Client] completes with an error when making a REST call, |
| 5437 * this method will complete with the same error. |
| 5438 */ |
| 5439 async.Future<SnapshotList> list(core.String project, {core.String filter, core
.int maxResults, core.String pageToken}) { |
| 5440 var _url = null; |
| 5441 var _queryParams = new core.Map(); |
| 5442 var _uploadMedia = null; |
| 5443 var _uploadOptions = null; |
| 5444 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5445 var _body = null; |
| 5446 |
| 5447 if (project == null) { |
| 5448 throw new core.ArgumentError("Parameter project is required."); |
| 5449 } |
| 5450 if (filter != null) { |
| 5451 _queryParams["filter"] = [filter]; |
| 5452 } |
| 5453 if (maxResults != null) { |
| 5454 _queryParams["maxResults"] = ["${maxResults}"]; |
| 5455 } |
| 5456 if (pageToken != null) { |
| 5457 _queryParams["pageToken"] = [pageToken]; |
| 5458 } |
| 5459 |
| 5460 |
| 5461 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/snapshot
s'; |
| 5462 |
| 5463 var _response = _requester.request(_url, |
| 5464 "GET", |
| 5465 body: _body, |
| 5466 queryParams: _queryParams, |
| 5467 uploadOptions: _uploadOptions, |
| 5468 uploadMedia: _uploadMedia, |
| 5469 downloadOptions: _downloadOptions); |
| 5470 return _response.then((data) => new SnapshotList.fromJson(data)); |
| 5471 } |
| 5472 |
| 5473 } |
| 5474 |
| 5475 |
| 5476 /** Not documented yet. */ |
| 5477 class TargetHttpProxiesResourceApi { |
| 5478 final common_internal.ApiRequester _requester; |
| 5479 |
| 5480 TargetHttpProxiesResourceApi(common_internal.ApiRequester client) : |
| 5481 _requester = client; |
| 5482 |
| 5483 /** |
| 5484 * Deletes the specified TargetHttpProxy resource. |
| 5485 * |
| 5486 * Request parameters: |
| 5487 * |
| 5488 * [project] - Name of the project scoping this request. |
| 5489 * Value must have pattern |
| 5490 * "(?:(?:[-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])?))". |
| 5491 * |
| 5492 * [targetHttpProxy] - Name of the TargetHttpProxy resource to delete. |
| 5493 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5494 * |
| 5495 * Completes with a [Operation]. |
| 5496 * |
| 5497 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5498 * error. |
| 5499 * |
| 5500 * If the used [http.Client] completes with an error when making a REST call, |
| 5501 * this method will complete with the same error. |
| 5502 */ |
| 5503 async.Future<Operation> delete(core.String project, core.String targetHttpProx
y) { |
| 5504 var _url = null; |
| 5505 var _queryParams = new core.Map(); |
| 5506 var _uploadMedia = null; |
| 5507 var _uploadOptions = null; |
| 5508 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5509 var _body = null; |
| 5510 |
| 5511 if (project == null) { |
| 5512 throw new core.ArgumentError("Parameter project is required."); |
| 5513 } |
| 5514 if (targetHttpProxy == null) { |
| 5515 throw new core.ArgumentError("Parameter targetHttpProxy is required."); |
| 5516 } |
| 5517 |
| 5518 |
| 5519 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/targetHt
tpProxies/' + common_internal.Escaper.ecapeVariable('$targetHttpProxy'); |
| 5520 |
| 5521 var _response = _requester.request(_url, |
| 5522 "DELETE", |
| 5523 body: _body, |
| 5524 queryParams: _queryParams, |
| 5525 uploadOptions: _uploadOptions, |
| 5526 uploadMedia: _uploadMedia, |
| 5527 downloadOptions: _downloadOptions); |
| 5528 return _response.then((data) => new Operation.fromJson(data)); |
| 5529 } |
| 5530 |
| 5531 /** |
| 5532 * Returns the specified TargetHttpProxy resource. |
| 5533 * |
| 5534 * Request parameters: |
| 5535 * |
| 5536 * [project] - Name of the project scoping this request. |
| 5537 * Value must have pattern |
| 5538 * "(?:(?:[-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])?))". |
| 5539 * |
| 5540 * [targetHttpProxy] - Name of the TargetHttpProxy resource to return. |
| 5541 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5542 * |
| 5543 * Completes with a [TargetHttpProxy]. |
| 5544 * |
| 5545 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5546 * error. |
| 5547 * |
| 5548 * If the used [http.Client] completes with an error when making a REST call, |
| 5549 * this method will complete with the same error. |
| 5550 */ |
| 5551 async.Future<TargetHttpProxy> get(core.String project, core.String targetHttpP
roxy) { |
| 5552 var _url = null; |
| 5553 var _queryParams = new core.Map(); |
| 5554 var _uploadMedia = null; |
| 5555 var _uploadOptions = null; |
| 5556 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5557 var _body = null; |
| 5558 |
| 5559 if (project == null) { |
| 5560 throw new core.ArgumentError("Parameter project is required."); |
| 5561 } |
| 5562 if (targetHttpProxy == null) { |
| 5563 throw new core.ArgumentError("Parameter targetHttpProxy is required."); |
| 5564 } |
| 5565 |
| 5566 |
| 5567 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/targetHt
tpProxies/' + common_internal.Escaper.ecapeVariable('$targetHttpProxy'); |
| 5568 |
| 5569 var _response = _requester.request(_url, |
| 5570 "GET", |
| 5571 body: _body, |
| 5572 queryParams: _queryParams, |
| 5573 uploadOptions: _uploadOptions, |
| 5574 uploadMedia: _uploadMedia, |
| 5575 downloadOptions: _downloadOptions); |
| 5576 return _response.then((data) => new TargetHttpProxy.fromJson(data)); |
| 5577 } |
| 5578 |
| 5579 /** |
| 5580 * Creates a TargetHttpProxy resource in the specified project using the data |
| 5581 * included in the request. |
| 5582 * |
| 5583 * [request] - The metadata request object. |
| 5584 * |
| 5585 * Request parameters: |
| 5586 * |
| 5587 * [project] - Name of the project scoping this request. |
| 5588 * Value must have pattern |
| 5589 * "(?:(?:[-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])?))". |
| 5590 * |
| 5591 * Completes with a [Operation]. |
| 5592 * |
| 5593 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5594 * error. |
| 5595 * |
| 5596 * If the used [http.Client] completes with an error when making a REST call, |
| 5597 * this method will complete with the same error. |
| 5598 */ |
| 5599 async.Future<Operation> insert(TargetHttpProxy request, core.String project) { |
| 5600 var _url = null; |
| 5601 var _queryParams = new core.Map(); |
| 5602 var _uploadMedia = null; |
| 5603 var _uploadOptions = null; |
| 5604 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5605 var _body = null; |
| 5606 |
| 5607 if (request != null) { |
| 5608 _body = convert.JSON.encode((request).toJson()); |
| 5609 } |
| 5610 if (project == null) { |
| 5611 throw new core.ArgumentError("Parameter project is required."); |
| 5612 } |
| 5613 |
| 5614 |
| 5615 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/targetHt
tpProxies'; |
| 5616 |
| 5617 var _response = _requester.request(_url, |
| 5618 "POST", |
| 5619 body: _body, |
| 5620 queryParams: _queryParams, |
| 5621 uploadOptions: _uploadOptions, |
| 5622 uploadMedia: _uploadMedia, |
| 5623 downloadOptions: _downloadOptions); |
| 5624 return _response.then((data) => new Operation.fromJson(data)); |
| 5625 } |
| 5626 |
| 5627 /** |
| 5628 * Retrieves the list of TargetHttpProxy resources available to the specified |
| 5629 * project. |
| 5630 * |
| 5631 * Request parameters: |
| 5632 * |
| 5633 * [project] - Name of the project scoping this request. |
| 5634 * Value must have pattern |
| 5635 * "(?:(?:[-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])?))". |
| 5636 * |
| 5637 * [filter] - Optional. Filter expression for filtering listed resources. |
| 5638 * |
| 5639 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 5640 * value is 500 and default value is 500. |
| 5641 * Value must be between "0" and "500". |
| 5642 * |
| 5643 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 5644 * by maxResults. Used to continue a previous list request. |
| 5645 * |
| 5646 * Completes with a [TargetHttpProxyList]. |
| 5647 * |
| 5648 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5649 * error. |
| 5650 * |
| 5651 * If the used [http.Client] completes with an error when making a REST call, |
| 5652 * this method will complete with the same error. |
| 5653 */ |
| 5654 async.Future<TargetHttpProxyList> list(core.String project, {core.String filte
r, core.int maxResults, core.String pageToken}) { |
| 5655 var _url = null; |
| 5656 var _queryParams = new core.Map(); |
| 5657 var _uploadMedia = null; |
| 5658 var _uploadOptions = null; |
| 5659 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5660 var _body = null; |
| 5661 |
| 5662 if (project == null) { |
| 5663 throw new core.ArgumentError("Parameter project is required."); |
| 5664 } |
| 5665 if (filter != null) { |
| 5666 _queryParams["filter"] = [filter]; |
| 5667 } |
| 5668 if (maxResults != null) { |
| 5669 _queryParams["maxResults"] = ["${maxResults}"]; |
| 5670 } |
| 5671 if (pageToken != null) { |
| 5672 _queryParams["pageToken"] = [pageToken]; |
| 5673 } |
| 5674 |
| 5675 |
| 5676 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/targetHt
tpProxies'; |
| 5677 |
| 5678 var _response = _requester.request(_url, |
| 5679 "GET", |
| 5680 body: _body, |
| 5681 queryParams: _queryParams, |
| 5682 uploadOptions: _uploadOptions, |
| 5683 uploadMedia: _uploadMedia, |
| 5684 downloadOptions: _downloadOptions); |
| 5685 return _response.then((data) => new TargetHttpProxyList.fromJson(data)); |
| 5686 } |
| 5687 |
| 5688 /** |
| 5689 * Changes the URL map for TargetHttpProxy. |
| 5690 * |
| 5691 * [request] - The metadata request object. |
| 5692 * |
| 5693 * Request parameters: |
| 5694 * |
| 5695 * [project] - Name of the project scoping this request. |
| 5696 * Value must have pattern |
| 5697 * "(?:(?:[-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])?))". |
| 5698 * |
| 5699 * [targetHttpProxy] - Name of the TargetHttpProxy resource whose URL map is |
| 5700 * to be set. |
| 5701 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5702 * |
| 5703 * Completes with a [Operation]. |
| 5704 * |
| 5705 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5706 * error. |
| 5707 * |
| 5708 * If the used [http.Client] completes with an error when making a REST call, |
| 5709 * this method will complete with the same error. |
| 5710 */ |
| 5711 async.Future<Operation> setUrlMap(UrlMapReference request, core.String project
, core.String targetHttpProxy) { |
| 5712 var _url = null; |
| 5713 var _queryParams = new core.Map(); |
| 5714 var _uploadMedia = null; |
| 5715 var _uploadOptions = null; |
| 5716 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5717 var _body = null; |
| 5718 |
| 5719 if (request != null) { |
| 5720 _body = convert.JSON.encode((request).toJson()); |
| 5721 } |
| 5722 if (project == null) { |
| 5723 throw new core.ArgumentError("Parameter project is required."); |
| 5724 } |
| 5725 if (targetHttpProxy == null) { |
| 5726 throw new core.ArgumentError("Parameter targetHttpProxy is required."); |
| 5727 } |
| 5728 |
| 5729 |
| 5730 _url = common_internal.Escaper.ecapeVariable('$project') + '/targetHttpProxi
es/' + common_internal.Escaper.ecapeVariable('$targetHttpProxy') + '/setUrlMap'; |
| 5731 |
| 5732 var _response = _requester.request(_url, |
| 5733 "POST", |
| 5734 body: _body, |
| 5735 queryParams: _queryParams, |
| 5736 uploadOptions: _uploadOptions, |
| 5737 uploadMedia: _uploadMedia, |
| 5738 downloadOptions: _downloadOptions); |
| 5739 return _response.then((data) => new Operation.fromJson(data)); |
| 5740 } |
| 5741 |
| 5742 } |
| 5743 |
| 5744 |
| 5745 /** Not documented yet. */ |
| 5746 class TargetInstancesResourceApi { |
| 5747 final common_internal.ApiRequester _requester; |
| 5748 |
| 5749 TargetInstancesResourceApi(common_internal.ApiRequester client) : |
| 5750 _requester = client; |
| 5751 |
| 5752 /** |
| 5753 * Retrieves the list of target instances grouped by scope. |
| 5754 * |
| 5755 * Request parameters: |
| 5756 * |
| 5757 * [project] - Name of the project scoping this request. |
| 5758 * Value must have pattern |
| 5759 * "(?:(?:[-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])?))". |
| 5760 * |
| 5761 * [filter] - Optional. Filter expression for filtering listed resources. |
| 5762 * |
| 5763 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 5764 * value is 500 and default value is 500. |
| 5765 * Value must be between "0" and "500". |
| 5766 * |
| 5767 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 5768 * by maxResults. Used to continue a previous list request. |
| 5769 * |
| 5770 * Completes with a [TargetInstanceAggregatedList]. |
| 5771 * |
| 5772 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5773 * error. |
| 5774 * |
| 5775 * If the used [http.Client] completes with an error when making a REST call, |
| 5776 * this method will complete with the same error. |
| 5777 */ |
| 5778 async.Future<TargetInstanceAggregatedList> aggregatedList(core.String project,
{core.String filter, core.int maxResults, core.String pageToken}) { |
| 5779 var _url = null; |
| 5780 var _queryParams = new core.Map(); |
| 5781 var _uploadMedia = null; |
| 5782 var _uploadOptions = null; |
| 5783 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5784 var _body = null; |
| 5785 |
| 5786 if (project == null) { |
| 5787 throw new core.ArgumentError("Parameter project is required."); |
| 5788 } |
| 5789 if (filter != null) { |
| 5790 _queryParams["filter"] = [filter]; |
| 5791 } |
| 5792 if (maxResults != null) { |
| 5793 _queryParams["maxResults"] = ["${maxResults}"]; |
| 5794 } |
| 5795 if (pageToken != null) { |
| 5796 _queryParams["pageToken"] = [pageToken]; |
| 5797 } |
| 5798 |
| 5799 |
| 5800 _url = common_internal.Escaper.ecapeVariable('$project') + '/aggregated/targ
etInstances'; |
| 5801 |
| 5802 var _response = _requester.request(_url, |
| 5803 "GET", |
| 5804 body: _body, |
| 5805 queryParams: _queryParams, |
| 5806 uploadOptions: _uploadOptions, |
| 5807 uploadMedia: _uploadMedia, |
| 5808 downloadOptions: _downloadOptions); |
| 5809 return _response.then((data) => new TargetInstanceAggregatedList.fromJson(da
ta)); |
| 5810 } |
| 5811 |
| 5812 /** |
| 5813 * Deletes the specified TargetInstance resource. |
| 5814 * |
| 5815 * Request parameters: |
| 5816 * |
| 5817 * [project] - Name of the project scoping this request. |
| 5818 * Value must have pattern |
| 5819 * "(?:(?:[-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])?))". |
| 5820 * |
| 5821 * [zone] - Name of the zone scoping this request. |
| 5822 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5823 * |
| 5824 * [targetInstance] - Name of the TargetInstance resource to delete. |
| 5825 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5826 * |
| 5827 * Completes with a [Operation]. |
| 5828 * |
| 5829 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5830 * error. |
| 5831 * |
| 5832 * If the used [http.Client] completes with an error when making a REST call, |
| 5833 * this method will complete with the same error. |
| 5834 */ |
| 5835 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing targetInstance) { |
| 5836 var _url = null; |
| 5837 var _queryParams = new core.Map(); |
| 5838 var _uploadMedia = null; |
| 5839 var _uploadOptions = null; |
| 5840 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5841 var _body = null; |
| 5842 |
| 5843 if (project == null) { |
| 5844 throw new core.ArgumentError("Parameter project is required."); |
| 5845 } |
| 5846 if (zone == null) { |
| 5847 throw new core.ArgumentError("Parameter zone is required."); |
| 5848 } |
| 5849 if (targetInstance == null) { |
| 5850 throw new core.ArgumentError("Parameter targetInstance is required."); |
| 5851 } |
| 5852 |
| 5853 |
| 5854 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/targetInstances/' + common_interna
l.Escaper.ecapeVariable('$targetInstance'); |
| 5855 |
| 5856 var _response = _requester.request(_url, |
| 5857 "DELETE", |
| 5858 body: _body, |
| 5859 queryParams: _queryParams, |
| 5860 uploadOptions: _uploadOptions, |
| 5861 uploadMedia: _uploadMedia, |
| 5862 downloadOptions: _downloadOptions); |
| 5863 return _response.then((data) => new Operation.fromJson(data)); |
| 5864 } |
| 5865 |
| 5866 /** |
| 5867 * Returns the specified TargetInstance resource. |
| 5868 * |
| 5869 * Request parameters: |
| 5870 * |
| 5871 * [project] - Name of the project scoping this request. |
| 5872 * Value must have pattern |
| 5873 * "(?:(?:[-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])?))". |
| 5874 * |
| 5875 * [zone] - Name of the zone scoping this request. |
| 5876 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5877 * |
| 5878 * [targetInstance] - Name of the TargetInstance resource to return. |
| 5879 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5880 * |
| 5881 * Completes with a [TargetInstance]. |
| 5882 * |
| 5883 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5884 * error. |
| 5885 * |
| 5886 * If the used [http.Client] completes with an error when making a REST call, |
| 5887 * this method will complete with the same error. |
| 5888 */ |
| 5889 async.Future<TargetInstance> get(core.String project, core.String zone, core.S
tring targetInstance) { |
| 5890 var _url = null; |
| 5891 var _queryParams = new core.Map(); |
| 5892 var _uploadMedia = null; |
| 5893 var _uploadOptions = null; |
| 5894 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5895 var _body = null; |
| 5896 |
| 5897 if (project == null) { |
| 5898 throw new core.ArgumentError("Parameter project is required."); |
| 5899 } |
| 5900 if (zone == null) { |
| 5901 throw new core.ArgumentError("Parameter zone is required."); |
| 5902 } |
| 5903 if (targetInstance == null) { |
| 5904 throw new core.ArgumentError("Parameter targetInstance is required."); |
| 5905 } |
| 5906 |
| 5907 |
| 5908 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/targetInstances/' + common_interna
l.Escaper.ecapeVariable('$targetInstance'); |
| 5909 |
| 5910 var _response = _requester.request(_url, |
| 5911 "GET", |
| 5912 body: _body, |
| 5913 queryParams: _queryParams, |
| 5914 uploadOptions: _uploadOptions, |
| 5915 uploadMedia: _uploadMedia, |
| 5916 downloadOptions: _downloadOptions); |
| 5917 return _response.then((data) => new TargetInstance.fromJson(data)); |
| 5918 } |
| 5919 |
| 5920 /** |
| 5921 * Creates a TargetInstance resource in the specified project and zone using |
| 5922 * the data included in the request. |
| 5923 * |
| 5924 * [request] - The metadata request object. |
| 5925 * |
| 5926 * Request parameters: |
| 5927 * |
| 5928 * [project] - Name of the project scoping this request. |
| 5929 * Value must have pattern |
| 5930 * "(?:(?:[-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])?))". |
| 5931 * |
| 5932 * [zone] - Name of the zone scoping this request. |
| 5933 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5934 * |
| 5935 * Completes with a [Operation]. |
| 5936 * |
| 5937 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5938 * error. |
| 5939 * |
| 5940 * If the used [http.Client] completes with an error when making a REST call, |
| 5941 * this method will complete with the same error. |
| 5942 */ |
| 5943 async.Future<Operation> insert(TargetInstance request, core.String project, co
re.String zone) { |
| 5944 var _url = null; |
| 5945 var _queryParams = new core.Map(); |
| 5946 var _uploadMedia = null; |
| 5947 var _uploadOptions = null; |
| 5948 var _downloadOptions = common.DownloadOptions.Metadata; |
| 5949 var _body = null; |
| 5950 |
| 5951 if (request != null) { |
| 5952 _body = convert.JSON.encode((request).toJson()); |
| 5953 } |
| 5954 if (project == null) { |
| 5955 throw new core.ArgumentError("Parameter project is required."); |
| 5956 } |
| 5957 if (zone == null) { |
| 5958 throw new core.ArgumentError("Parameter zone is required."); |
| 5959 } |
| 5960 |
| 5961 |
| 5962 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/targetInstances'; |
| 5963 |
| 5964 var _response = _requester.request(_url, |
| 5965 "POST", |
| 5966 body: _body, |
| 5967 queryParams: _queryParams, |
| 5968 uploadOptions: _uploadOptions, |
| 5969 uploadMedia: _uploadMedia, |
| 5970 downloadOptions: _downloadOptions); |
| 5971 return _response.then((data) => new Operation.fromJson(data)); |
| 5972 } |
| 5973 |
| 5974 /** |
| 5975 * Retrieves the list of TargetInstance resources available to the specified |
| 5976 * project and zone. |
| 5977 * |
| 5978 * Request parameters: |
| 5979 * |
| 5980 * [project] - Name of the project scoping this request. |
| 5981 * Value must have pattern |
| 5982 * "(?:(?:[-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])?))". |
| 5983 * |
| 5984 * [zone] - Name of the zone scoping this request. |
| 5985 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5986 * |
| 5987 * [filter] - Optional. Filter expression for filtering listed resources. |
| 5988 * |
| 5989 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 5990 * value is 500 and default value is 500. |
| 5991 * Value must be between "0" and "500". |
| 5992 * |
| 5993 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 5994 * by maxResults. Used to continue a previous list request. |
| 5995 * |
| 5996 * Completes with a [TargetInstanceList]. |
| 5997 * |
| 5998 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 5999 * error. |
| 6000 * |
| 6001 * If the used [http.Client] completes with an error when making a REST call, |
| 6002 * this method will complete with the same error. |
| 6003 */ |
| 6004 async.Future<TargetInstanceList> list(core.String project, core.String zone, {
core.String filter, core.int maxResults, core.String pageToken}) { |
| 6005 var _url = null; |
| 6006 var _queryParams = new core.Map(); |
| 6007 var _uploadMedia = null; |
| 6008 var _uploadOptions = null; |
| 6009 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6010 var _body = null; |
| 6011 |
| 6012 if (project == null) { |
| 6013 throw new core.ArgumentError("Parameter project is required."); |
| 6014 } |
| 6015 if (zone == null) { |
| 6016 throw new core.ArgumentError("Parameter zone is required."); |
| 6017 } |
| 6018 if (filter != null) { |
| 6019 _queryParams["filter"] = [filter]; |
| 6020 } |
| 6021 if (maxResults != null) { |
| 6022 _queryParams["maxResults"] = ["${maxResults}"]; |
| 6023 } |
| 6024 if (pageToken != null) { |
| 6025 _queryParams["pageToken"] = [pageToken]; |
| 6026 } |
| 6027 |
| 6028 |
| 6029 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/targetInstances'; |
| 6030 |
| 6031 var _response = _requester.request(_url, |
| 6032 "GET", |
| 6033 body: _body, |
| 6034 queryParams: _queryParams, |
| 6035 uploadOptions: _uploadOptions, |
| 6036 uploadMedia: _uploadMedia, |
| 6037 downloadOptions: _downloadOptions); |
| 6038 return _response.then((data) => new TargetInstanceList.fromJson(data)); |
| 6039 } |
| 6040 |
| 6041 } |
| 6042 |
| 6043 |
| 6044 /** Not documented yet. */ |
| 6045 class TargetPoolsResourceApi { |
| 6046 final common_internal.ApiRequester _requester; |
| 6047 |
| 6048 TargetPoolsResourceApi(common_internal.ApiRequester client) : |
| 6049 _requester = client; |
| 6050 |
| 6051 /** |
| 6052 * Adds health check URL to targetPool. |
| 6053 * |
| 6054 * [request] - The metadata request object. |
| 6055 * |
| 6056 * Request parameters: |
| 6057 * |
| 6058 * [project] - null |
| 6059 * Value must have pattern |
| 6060 * "(?:(?:[-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])?))". |
| 6061 * |
| 6062 * [region] - Name of the region scoping this request. |
| 6063 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6064 * |
| 6065 * [targetPool] - Name of the TargetPool resource to which health_check_url is |
| 6066 * to be added. |
| 6067 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6068 * |
| 6069 * Completes with a [Operation]. |
| 6070 * |
| 6071 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6072 * error. |
| 6073 * |
| 6074 * If the used [http.Client] completes with an error when making a REST call, |
| 6075 * this method will complete with the same error. |
| 6076 */ |
| 6077 async.Future<Operation> addHealthCheck(TargetPoolsAddHealthCheckRequest reques
t, core.String project, core.String region, core.String targetPool) { |
| 6078 var _url = null; |
| 6079 var _queryParams = new core.Map(); |
| 6080 var _uploadMedia = null; |
| 6081 var _uploadOptions = null; |
| 6082 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6083 var _body = null; |
| 6084 |
| 6085 if (request != null) { |
| 6086 _body = convert.JSON.encode((request).toJson()); |
| 6087 } |
| 6088 if (project == null) { |
| 6089 throw new core.ArgumentError("Parameter project is required."); |
| 6090 } |
| 6091 if (region == null) { |
| 6092 throw new core.ArgumentError("Parameter region is required."); |
| 6093 } |
| 6094 if (targetPool == null) { |
| 6095 throw new core.ArgumentError("Parameter targetPool is required."); |
| 6096 } |
| 6097 |
| 6098 |
| 6099 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/targetPools/' + common_interna
l.Escaper.ecapeVariable('$targetPool') + '/addHealthCheck'; |
| 6100 |
| 6101 var _response = _requester.request(_url, |
| 6102 "POST", |
| 6103 body: _body, |
| 6104 queryParams: _queryParams, |
| 6105 uploadOptions: _uploadOptions, |
| 6106 uploadMedia: _uploadMedia, |
| 6107 downloadOptions: _downloadOptions); |
| 6108 return _response.then((data) => new Operation.fromJson(data)); |
| 6109 } |
| 6110 |
| 6111 /** |
| 6112 * Adds instance url to targetPool. |
| 6113 * |
| 6114 * [request] - The metadata request object. |
| 6115 * |
| 6116 * Request parameters: |
| 6117 * |
| 6118 * [project] - null |
| 6119 * Value must have pattern |
| 6120 * "(?:(?:[-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])?))". |
| 6121 * |
| 6122 * [region] - Name of the region scoping this request. |
| 6123 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6124 * |
| 6125 * [targetPool] - Name of the TargetPool resource to which instance_url is to |
| 6126 * be added. |
| 6127 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6128 * |
| 6129 * Completes with a [Operation]. |
| 6130 * |
| 6131 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6132 * error. |
| 6133 * |
| 6134 * If the used [http.Client] completes with an error when making a REST call, |
| 6135 * this method will complete with the same error. |
| 6136 */ |
| 6137 async.Future<Operation> addInstance(TargetPoolsAddInstanceRequest request, cor
e.String project, core.String region, core.String targetPool) { |
| 6138 var _url = null; |
| 6139 var _queryParams = new core.Map(); |
| 6140 var _uploadMedia = null; |
| 6141 var _uploadOptions = null; |
| 6142 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6143 var _body = null; |
| 6144 |
| 6145 if (request != null) { |
| 6146 _body = convert.JSON.encode((request).toJson()); |
| 6147 } |
| 6148 if (project == null) { |
| 6149 throw new core.ArgumentError("Parameter project is required."); |
| 6150 } |
| 6151 if (region == null) { |
| 6152 throw new core.ArgumentError("Parameter region is required."); |
| 6153 } |
| 6154 if (targetPool == null) { |
| 6155 throw new core.ArgumentError("Parameter targetPool is required."); |
| 6156 } |
| 6157 |
| 6158 |
| 6159 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/targetPools/' + common_interna
l.Escaper.ecapeVariable('$targetPool') + '/addInstance'; |
| 6160 |
| 6161 var _response = _requester.request(_url, |
| 6162 "POST", |
| 6163 body: _body, |
| 6164 queryParams: _queryParams, |
| 6165 uploadOptions: _uploadOptions, |
| 6166 uploadMedia: _uploadMedia, |
| 6167 downloadOptions: _downloadOptions); |
| 6168 return _response.then((data) => new Operation.fromJson(data)); |
| 6169 } |
| 6170 |
| 6171 /** |
| 6172 * Retrieves the list of target pools grouped by scope. |
| 6173 * |
| 6174 * Request parameters: |
| 6175 * |
| 6176 * [project] - Name of the project scoping this request. |
| 6177 * Value must have pattern |
| 6178 * "(?:(?:[-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])?))". |
| 6179 * |
| 6180 * [filter] - Optional. Filter expression for filtering listed resources. |
| 6181 * |
| 6182 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 6183 * value is 500 and default value is 500. |
| 6184 * Value must be between "0" and "500". |
| 6185 * |
| 6186 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 6187 * by maxResults. Used to continue a previous list request. |
| 6188 * |
| 6189 * Completes with a [TargetPoolAggregatedList]. |
| 6190 * |
| 6191 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6192 * error. |
| 6193 * |
| 6194 * If the used [http.Client] completes with an error when making a REST call, |
| 6195 * this method will complete with the same error. |
| 6196 */ |
| 6197 async.Future<TargetPoolAggregatedList> aggregatedList(core.String project, {co
re.String filter, core.int maxResults, core.String pageToken}) { |
| 6198 var _url = null; |
| 6199 var _queryParams = new core.Map(); |
| 6200 var _uploadMedia = null; |
| 6201 var _uploadOptions = null; |
| 6202 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6203 var _body = null; |
| 6204 |
| 6205 if (project == null) { |
| 6206 throw new core.ArgumentError("Parameter project is required."); |
| 6207 } |
| 6208 if (filter != null) { |
| 6209 _queryParams["filter"] = [filter]; |
| 6210 } |
| 6211 if (maxResults != null) { |
| 6212 _queryParams["maxResults"] = ["${maxResults}"]; |
| 6213 } |
| 6214 if (pageToken != null) { |
| 6215 _queryParams["pageToken"] = [pageToken]; |
| 6216 } |
| 6217 |
| 6218 |
| 6219 _url = common_internal.Escaper.ecapeVariable('$project') + '/aggregated/targ
etPools'; |
| 6220 |
| 6221 var _response = _requester.request(_url, |
| 6222 "GET", |
| 6223 body: _body, |
| 6224 queryParams: _queryParams, |
| 6225 uploadOptions: _uploadOptions, |
| 6226 uploadMedia: _uploadMedia, |
| 6227 downloadOptions: _downloadOptions); |
| 6228 return _response.then((data) => new TargetPoolAggregatedList.fromJson(data))
; |
| 6229 } |
| 6230 |
| 6231 /** |
| 6232 * Deletes the specified TargetPool resource. |
| 6233 * |
| 6234 * Request parameters: |
| 6235 * |
| 6236 * [project] - Name of the project scoping this request. |
| 6237 * Value must have pattern |
| 6238 * "(?:(?:[-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])?))". |
| 6239 * |
| 6240 * [region] - Name of the region scoping this request. |
| 6241 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6242 * |
| 6243 * [targetPool] - Name of the TargetPool resource to delete. |
| 6244 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6245 * |
| 6246 * Completes with a [Operation]. |
| 6247 * |
| 6248 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6249 * error. |
| 6250 * |
| 6251 * If the used [http.Client] completes with an error when making a REST call, |
| 6252 * this method will complete with the same error. |
| 6253 */ |
| 6254 async.Future<Operation> delete(core.String project, core.String region, core.S
tring targetPool) { |
| 6255 var _url = null; |
| 6256 var _queryParams = new core.Map(); |
| 6257 var _uploadMedia = null; |
| 6258 var _uploadOptions = null; |
| 6259 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6260 var _body = null; |
| 6261 |
| 6262 if (project == null) { |
| 6263 throw new core.ArgumentError("Parameter project is required."); |
| 6264 } |
| 6265 if (region == null) { |
| 6266 throw new core.ArgumentError("Parameter region is required."); |
| 6267 } |
| 6268 if (targetPool == null) { |
| 6269 throw new core.ArgumentError("Parameter targetPool is required."); |
| 6270 } |
| 6271 |
| 6272 |
| 6273 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/targetPools/' + common_interna
l.Escaper.ecapeVariable('$targetPool'); |
| 6274 |
| 6275 var _response = _requester.request(_url, |
| 6276 "DELETE", |
| 6277 body: _body, |
| 6278 queryParams: _queryParams, |
| 6279 uploadOptions: _uploadOptions, |
| 6280 uploadMedia: _uploadMedia, |
| 6281 downloadOptions: _downloadOptions); |
| 6282 return _response.then((data) => new Operation.fromJson(data)); |
| 6283 } |
| 6284 |
| 6285 /** |
| 6286 * Returns the specified TargetPool resource. |
| 6287 * |
| 6288 * Request parameters: |
| 6289 * |
| 6290 * [project] - Name of the project scoping this request. |
| 6291 * Value must have pattern |
| 6292 * "(?:(?:[-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])?))". |
| 6293 * |
| 6294 * [region] - Name of the region scoping this request. |
| 6295 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6296 * |
| 6297 * [targetPool] - Name of the TargetPool resource to return. |
| 6298 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6299 * |
| 6300 * Completes with a [TargetPool]. |
| 6301 * |
| 6302 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6303 * error. |
| 6304 * |
| 6305 * If the used [http.Client] completes with an error when making a REST call, |
| 6306 * this method will complete with the same error. |
| 6307 */ |
| 6308 async.Future<TargetPool> get(core.String project, core.String region, core.Str
ing targetPool) { |
| 6309 var _url = null; |
| 6310 var _queryParams = new core.Map(); |
| 6311 var _uploadMedia = null; |
| 6312 var _uploadOptions = null; |
| 6313 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6314 var _body = null; |
| 6315 |
| 6316 if (project == null) { |
| 6317 throw new core.ArgumentError("Parameter project is required."); |
| 6318 } |
| 6319 if (region == null) { |
| 6320 throw new core.ArgumentError("Parameter region is required."); |
| 6321 } |
| 6322 if (targetPool == null) { |
| 6323 throw new core.ArgumentError("Parameter targetPool is required."); |
| 6324 } |
| 6325 |
| 6326 |
| 6327 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/targetPools/' + common_interna
l.Escaper.ecapeVariable('$targetPool'); |
| 6328 |
| 6329 var _response = _requester.request(_url, |
| 6330 "GET", |
| 6331 body: _body, |
| 6332 queryParams: _queryParams, |
| 6333 uploadOptions: _uploadOptions, |
| 6334 uploadMedia: _uploadMedia, |
| 6335 downloadOptions: _downloadOptions); |
| 6336 return _response.then((data) => new TargetPool.fromJson(data)); |
| 6337 } |
| 6338 |
| 6339 /** |
| 6340 * Gets the most recent health check results for each IP for the given |
| 6341 * instance that is referenced by given TargetPool. |
| 6342 * |
| 6343 * [request] - The metadata request object. |
| 6344 * |
| 6345 * Request parameters: |
| 6346 * |
| 6347 * [project] - null |
| 6348 * Value must have pattern |
| 6349 * "(?:(?:[-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])?))". |
| 6350 * |
| 6351 * [region] - Name of the region scoping this request. |
| 6352 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6353 * |
| 6354 * [targetPool] - Name of the TargetPool resource to which the queried |
| 6355 * instance belongs. |
| 6356 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6357 * |
| 6358 * Completes with a [TargetPoolInstanceHealth]. |
| 6359 * |
| 6360 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6361 * error. |
| 6362 * |
| 6363 * If the used [http.Client] completes with an error when making a REST call, |
| 6364 * this method will complete with the same error. |
| 6365 */ |
| 6366 async.Future<TargetPoolInstanceHealth> getHealth(InstanceReference request, co
re.String project, core.String region, core.String targetPool) { |
| 6367 var _url = null; |
| 6368 var _queryParams = new core.Map(); |
| 6369 var _uploadMedia = null; |
| 6370 var _uploadOptions = null; |
| 6371 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6372 var _body = null; |
| 6373 |
| 6374 if (request != null) { |
| 6375 _body = convert.JSON.encode((request).toJson()); |
| 6376 } |
| 6377 if (project == null) { |
| 6378 throw new core.ArgumentError("Parameter project is required."); |
| 6379 } |
| 6380 if (region == null) { |
| 6381 throw new core.ArgumentError("Parameter region is required."); |
| 6382 } |
| 6383 if (targetPool == null) { |
| 6384 throw new core.ArgumentError("Parameter targetPool is required."); |
| 6385 } |
| 6386 |
| 6387 |
| 6388 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/targetPools/' + common_interna
l.Escaper.ecapeVariable('$targetPool') + '/getHealth'; |
| 6389 |
| 6390 var _response = _requester.request(_url, |
| 6391 "POST", |
| 6392 body: _body, |
| 6393 queryParams: _queryParams, |
| 6394 uploadOptions: _uploadOptions, |
| 6395 uploadMedia: _uploadMedia, |
| 6396 downloadOptions: _downloadOptions); |
| 6397 return _response.then((data) => new TargetPoolInstanceHealth.fromJson(data))
; |
| 6398 } |
| 6399 |
| 6400 /** |
| 6401 * Creates a TargetPool resource in the specified project and region using the |
| 6402 * data included in the request. |
| 6403 * |
| 6404 * [request] - The metadata request object. |
| 6405 * |
| 6406 * Request parameters: |
| 6407 * |
| 6408 * [project] - Name of the project scoping this request. |
| 6409 * Value must have pattern |
| 6410 * "(?:(?:[-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])?))". |
| 6411 * |
| 6412 * [region] - Name of the region scoping this request. |
| 6413 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6414 * |
| 6415 * Completes with a [Operation]. |
| 6416 * |
| 6417 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6418 * error. |
| 6419 * |
| 6420 * If the used [http.Client] completes with an error when making a REST call, |
| 6421 * this method will complete with the same error. |
| 6422 */ |
| 6423 async.Future<Operation> insert(TargetPool request, core.String project, core.S
tring region) { |
| 6424 var _url = null; |
| 6425 var _queryParams = new core.Map(); |
| 6426 var _uploadMedia = null; |
| 6427 var _uploadOptions = null; |
| 6428 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6429 var _body = null; |
| 6430 |
| 6431 if (request != null) { |
| 6432 _body = convert.JSON.encode((request).toJson()); |
| 6433 } |
| 6434 if (project == null) { |
| 6435 throw new core.ArgumentError("Parameter project is required."); |
| 6436 } |
| 6437 if (region == null) { |
| 6438 throw new core.ArgumentError("Parameter region is required."); |
| 6439 } |
| 6440 |
| 6441 |
| 6442 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/targetPools'; |
| 6443 |
| 6444 var _response = _requester.request(_url, |
| 6445 "POST", |
| 6446 body: _body, |
| 6447 queryParams: _queryParams, |
| 6448 uploadOptions: _uploadOptions, |
| 6449 uploadMedia: _uploadMedia, |
| 6450 downloadOptions: _downloadOptions); |
| 6451 return _response.then((data) => new Operation.fromJson(data)); |
| 6452 } |
| 6453 |
| 6454 /** |
| 6455 * Retrieves the list of TargetPool resources available to the specified |
| 6456 * project and region. |
| 6457 * |
| 6458 * Request parameters: |
| 6459 * |
| 6460 * [project] - Name of the project scoping this request. |
| 6461 * Value must have pattern |
| 6462 * "(?:(?:[-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])?))". |
| 6463 * |
| 6464 * [region] - Name of the region scoping this request. |
| 6465 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6466 * |
| 6467 * [filter] - Optional. Filter expression for filtering listed resources. |
| 6468 * |
| 6469 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 6470 * value is 500 and default value is 500. |
| 6471 * Value must be between "0" and "500". |
| 6472 * |
| 6473 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 6474 * by maxResults. Used to continue a previous list request. |
| 6475 * |
| 6476 * Completes with a [TargetPoolList]. |
| 6477 * |
| 6478 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6479 * error. |
| 6480 * |
| 6481 * If the used [http.Client] completes with an error when making a REST call, |
| 6482 * this method will complete with the same error. |
| 6483 */ |
| 6484 async.Future<TargetPoolList> list(core.String project, core.String region, {co
re.String filter, core.int maxResults, core.String pageToken}) { |
| 6485 var _url = null; |
| 6486 var _queryParams = new core.Map(); |
| 6487 var _uploadMedia = null; |
| 6488 var _uploadOptions = null; |
| 6489 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6490 var _body = null; |
| 6491 |
| 6492 if (project == null) { |
| 6493 throw new core.ArgumentError("Parameter project is required."); |
| 6494 } |
| 6495 if (region == null) { |
| 6496 throw new core.ArgumentError("Parameter region is required."); |
| 6497 } |
| 6498 if (filter != null) { |
| 6499 _queryParams["filter"] = [filter]; |
| 6500 } |
| 6501 if (maxResults != null) { |
| 6502 _queryParams["maxResults"] = ["${maxResults}"]; |
| 6503 } |
| 6504 if (pageToken != null) { |
| 6505 _queryParams["pageToken"] = [pageToken]; |
| 6506 } |
| 6507 |
| 6508 |
| 6509 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/targetPools'; |
| 6510 |
| 6511 var _response = _requester.request(_url, |
| 6512 "GET", |
| 6513 body: _body, |
| 6514 queryParams: _queryParams, |
| 6515 uploadOptions: _uploadOptions, |
| 6516 uploadMedia: _uploadMedia, |
| 6517 downloadOptions: _downloadOptions); |
| 6518 return _response.then((data) => new TargetPoolList.fromJson(data)); |
| 6519 } |
| 6520 |
| 6521 /** |
| 6522 * Removes health check URL from targetPool. |
| 6523 * |
| 6524 * [request] - The metadata request object. |
| 6525 * |
| 6526 * Request parameters: |
| 6527 * |
| 6528 * [project] - null |
| 6529 * Value must have pattern |
| 6530 * "(?:(?:[-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])?))". |
| 6531 * |
| 6532 * [region] - Name of the region scoping this request. |
| 6533 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6534 * |
| 6535 * [targetPool] - Name of the TargetPool resource to which health_check_url is |
| 6536 * to be removed. |
| 6537 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6538 * |
| 6539 * Completes with a [Operation]. |
| 6540 * |
| 6541 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6542 * error. |
| 6543 * |
| 6544 * If the used [http.Client] completes with an error when making a REST call, |
| 6545 * this method will complete with the same error. |
| 6546 */ |
| 6547 async.Future<Operation> removeHealthCheck(TargetPoolsRemoveHealthCheckRequest
request, core.String project, core.String region, core.String targetPool) { |
| 6548 var _url = null; |
| 6549 var _queryParams = new core.Map(); |
| 6550 var _uploadMedia = null; |
| 6551 var _uploadOptions = null; |
| 6552 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6553 var _body = null; |
| 6554 |
| 6555 if (request != null) { |
| 6556 _body = convert.JSON.encode((request).toJson()); |
| 6557 } |
| 6558 if (project == null) { |
| 6559 throw new core.ArgumentError("Parameter project is required."); |
| 6560 } |
| 6561 if (region == null) { |
| 6562 throw new core.ArgumentError("Parameter region is required."); |
| 6563 } |
| 6564 if (targetPool == null) { |
| 6565 throw new core.ArgumentError("Parameter targetPool is required."); |
| 6566 } |
| 6567 |
| 6568 |
| 6569 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/targetPools/' + common_interna
l.Escaper.ecapeVariable('$targetPool') + '/removeHealthCheck'; |
| 6570 |
| 6571 var _response = _requester.request(_url, |
| 6572 "POST", |
| 6573 body: _body, |
| 6574 queryParams: _queryParams, |
| 6575 uploadOptions: _uploadOptions, |
| 6576 uploadMedia: _uploadMedia, |
| 6577 downloadOptions: _downloadOptions); |
| 6578 return _response.then((data) => new Operation.fromJson(data)); |
| 6579 } |
| 6580 |
| 6581 /** |
| 6582 * Removes instance URL from targetPool. |
| 6583 * |
| 6584 * [request] - The metadata request object. |
| 6585 * |
| 6586 * Request parameters: |
| 6587 * |
| 6588 * [project] - null |
| 6589 * Value must have pattern |
| 6590 * "(?:(?:[-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])?))". |
| 6591 * |
| 6592 * [region] - Name of the region scoping this request. |
| 6593 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6594 * |
| 6595 * [targetPool] - Name of the TargetPool resource to which instance_url is to |
| 6596 * be removed. |
| 6597 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6598 * |
| 6599 * Completes with a [Operation]. |
| 6600 * |
| 6601 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6602 * error. |
| 6603 * |
| 6604 * If the used [http.Client] completes with an error when making a REST call, |
| 6605 * this method will complete with the same error. |
| 6606 */ |
| 6607 async.Future<Operation> removeInstance(TargetPoolsRemoveInstanceRequest reques
t, core.String project, core.String region, core.String targetPool) { |
| 6608 var _url = null; |
| 6609 var _queryParams = new core.Map(); |
| 6610 var _uploadMedia = null; |
| 6611 var _uploadOptions = null; |
| 6612 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6613 var _body = null; |
| 6614 |
| 6615 if (request != null) { |
| 6616 _body = convert.JSON.encode((request).toJson()); |
| 6617 } |
| 6618 if (project == null) { |
| 6619 throw new core.ArgumentError("Parameter project is required."); |
| 6620 } |
| 6621 if (region == null) { |
| 6622 throw new core.ArgumentError("Parameter region is required."); |
| 6623 } |
| 6624 if (targetPool == null) { |
| 6625 throw new core.ArgumentError("Parameter targetPool is required."); |
| 6626 } |
| 6627 |
| 6628 |
| 6629 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/targetPools/' + common_interna
l.Escaper.ecapeVariable('$targetPool') + '/removeInstance'; |
| 6630 |
| 6631 var _response = _requester.request(_url, |
| 6632 "POST", |
| 6633 body: _body, |
| 6634 queryParams: _queryParams, |
| 6635 uploadOptions: _uploadOptions, |
| 6636 uploadMedia: _uploadMedia, |
| 6637 downloadOptions: _downloadOptions); |
| 6638 return _response.then((data) => new Operation.fromJson(data)); |
| 6639 } |
| 6640 |
| 6641 /** |
| 6642 * Changes backup pool configurations. |
| 6643 * |
| 6644 * [request] - The metadata request object. |
| 6645 * |
| 6646 * Request parameters: |
| 6647 * |
| 6648 * [project] - Name of the project scoping this request. |
| 6649 * Value must have pattern |
| 6650 * "(?:(?:[-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])?))". |
| 6651 * |
| 6652 * [region] - Name of the region scoping this request. |
| 6653 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6654 * |
| 6655 * [targetPool] - Name of the TargetPool resource for which the backup is to |
| 6656 * be set. |
| 6657 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6658 * |
| 6659 * [failoverRatio] - New failoverRatio value for the containing target pool. |
| 6660 * |
| 6661 * Completes with a [Operation]. |
| 6662 * |
| 6663 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6664 * error. |
| 6665 * |
| 6666 * If the used [http.Client] completes with an error when making a REST call, |
| 6667 * this method will complete with the same error. |
| 6668 */ |
| 6669 async.Future<Operation> setBackup(TargetReference request, core.String project
, core.String region, core.String targetPool, {core.double failoverRatio}) { |
| 6670 var _url = null; |
| 6671 var _queryParams = new core.Map(); |
| 6672 var _uploadMedia = null; |
| 6673 var _uploadOptions = null; |
| 6674 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6675 var _body = null; |
| 6676 |
| 6677 if (request != null) { |
| 6678 _body = convert.JSON.encode((request).toJson()); |
| 6679 } |
| 6680 if (project == null) { |
| 6681 throw new core.ArgumentError("Parameter project is required."); |
| 6682 } |
| 6683 if (region == null) { |
| 6684 throw new core.ArgumentError("Parameter region is required."); |
| 6685 } |
| 6686 if (targetPool == null) { |
| 6687 throw new core.ArgumentError("Parameter targetPool is required."); |
| 6688 } |
| 6689 if (failoverRatio != null) { |
| 6690 _queryParams["failoverRatio"] = ["${failoverRatio}"]; |
| 6691 } |
| 6692 |
| 6693 |
| 6694 _url = common_internal.Escaper.ecapeVariable('$project') + '/regions/' + com
mon_internal.Escaper.ecapeVariable('$region') + '/targetPools/' + common_interna
l.Escaper.ecapeVariable('$targetPool') + '/setBackup'; |
| 6695 |
| 6696 var _response = _requester.request(_url, |
| 6697 "POST", |
| 6698 body: _body, |
| 6699 queryParams: _queryParams, |
| 6700 uploadOptions: _uploadOptions, |
| 6701 uploadMedia: _uploadMedia, |
| 6702 downloadOptions: _downloadOptions); |
| 6703 return _response.then((data) => new Operation.fromJson(data)); |
| 6704 } |
| 6705 |
| 6706 } |
| 6707 |
| 6708 |
| 6709 /** Not documented yet. */ |
| 6710 class UrlMapsResourceApi { |
| 6711 final common_internal.ApiRequester _requester; |
| 6712 |
| 6713 UrlMapsResourceApi(common_internal.ApiRequester client) : |
| 6714 _requester = client; |
| 6715 |
| 6716 /** |
| 6717 * Deletes the specified UrlMap resource. |
| 6718 * |
| 6719 * Request parameters: |
| 6720 * |
| 6721 * [project] - Name of the project scoping this request. |
| 6722 * Value must have pattern |
| 6723 * "(?:(?:[-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])?))". |
| 6724 * |
| 6725 * [urlMap] - Name of the UrlMap resource to delete. |
| 6726 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6727 * |
| 6728 * Completes with a [Operation]. |
| 6729 * |
| 6730 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6731 * error. |
| 6732 * |
| 6733 * If the used [http.Client] completes with an error when making a REST call, |
| 6734 * this method will complete with the same error. |
| 6735 */ |
| 6736 async.Future<Operation> delete(core.String project, core.String urlMap) { |
| 6737 var _url = null; |
| 6738 var _queryParams = new core.Map(); |
| 6739 var _uploadMedia = null; |
| 6740 var _uploadOptions = null; |
| 6741 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6742 var _body = null; |
| 6743 |
| 6744 if (project == null) { |
| 6745 throw new core.ArgumentError("Parameter project is required."); |
| 6746 } |
| 6747 if (urlMap == null) { |
| 6748 throw new core.ArgumentError("Parameter urlMap is required."); |
| 6749 } |
| 6750 |
| 6751 |
| 6752 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/urlMaps/
' + common_internal.Escaper.ecapeVariable('$urlMap'); |
| 6753 |
| 6754 var _response = _requester.request(_url, |
| 6755 "DELETE", |
| 6756 body: _body, |
| 6757 queryParams: _queryParams, |
| 6758 uploadOptions: _uploadOptions, |
| 6759 uploadMedia: _uploadMedia, |
| 6760 downloadOptions: _downloadOptions); |
| 6761 return _response.then((data) => new Operation.fromJson(data)); |
| 6762 } |
| 6763 |
| 6764 /** |
| 6765 * Returns the specified UrlMap resource. |
| 6766 * |
| 6767 * Request parameters: |
| 6768 * |
| 6769 * [project] - Name of the project scoping this request. |
| 6770 * Value must have pattern |
| 6771 * "(?:(?:[-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])?))". |
| 6772 * |
| 6773 * [urlMap] - Name of the UrlMap resource to return. |
| 6774 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6775 * |
| 6776 * Completes with a [UrlMap]. |
| 6777 * |
| 6778 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6779 * error. |
| 6780 * |
| 6781 * If the used [http.Client] completes with an error when making a REST call, |
| 6782 * this method will complete with the same error. |
| 6783 */ |
| 6784 async.Future<UrlMap> get(core.String project, core.String urlMap) { |
| 6785 var _url = null; |
| 6786 var _queryParams = new core.Map(); |
| 6787 var _uploadMedia = null; |
| 6788 var _uploadOptions = null; |
| 6789 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6790 var _body = null; |
| 6791 |
| 6792 if (project == null) { |
| 6793 throw new core.ArgumentError("Parameter project is required."); |
| 6794 } |
| 6795 if (urlMap == null) { |
| 6796 throw new core.ArgumentError("Parameter urlMap is required."); |
| 6797 } |
| 6798 |
| 6799 |
| 6800 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/urlMaps/
' + common_internal.Escaper.ecapeVariable('$urlMap'); |
| 6801 |
| 6802 var _response = _requester.request(_url, |
| 6803 "GET", |
| 6804 body: _body, |
| 6805 queryParams: _queryParams, |
| 6806 uploadOptions: _uploadOptions, |
| 6807 uploadMedia: _uploadMedia, |
| 6808 downloadOptions: _downloadOptions); |
| 6809 return _response.then((data) => new UrlMap.fromJson(data)); |
| 6810 } |
| 6811 |
| 6812 /** |
| 6813 * Creates a UrlMap resource in the specified project using the data included |
| 6814 * in the request. |
| 6815 * |
| 6816 * [request] - The metadata request object. |
| 6817 * |
| 6818 * Request parameters: |
| 6819 * |
| 6820 * [project] - Name of the project scoping this request. |
| 6821 * Value must have pattern |
| 6822 * "(?:(?:[-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])?))". |
| 6823 * |
| 6824 * Completes with a [Operation]. |
| 6825 * |
| 6826 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6827 * error. |
| 6828 * |
| 6829 * If the used [http.Client] completes with an error when making a REST call, |
| 6830 * this method will complete with the same error. |
| 6831 */ |
| 6832 async.Future<Operation> insert(UrlMap request, core.String project) { |
| 6833 var _url = null; |
| 6834 var _queryParams = new core.Map(); |
| 6835 var _uploadMedia = null; |
| 6836 var _uploadOptions = null; |
| 6837 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6838 var _body = null; |
| 6839 |
| 6840 if (request != null) { |
| 6841 _body = convert.JSON.encode((request).toJson()); |
| 6842 } |
| 6843 if (project == null) { |
| 6844 throw new core.ArgumentError("Parameter project is required."); |
| 6845 } |
| 6846 |
| 6847 |
| 6848 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/urlMaps'
; |
| 6849 |
| 6850 var _response = _requester.request(_url, |
| 6851 "POST", |
| 6852 body: _body, |
| 6853 queryParams: _queryParams, |
| 6854 uploadOptions: _uploadOptions, |
| 6855 uploadMedia: _uploadMedia, |
| 6856 downloadOptions: _downloadOptions); |
| 6857 return _response.then((data) => new Operation.fromJson(data)); |
| 6858 } |
| 6859 |
| 6860 /** |
| 6861 * Retrieves the list of UrlMap resources available to the specified project. |
| 6862 * |
| 6863 * Request parameters: |
| 6864 * |
| 6865 * [project] - Name of the project scoping this request. |
| 6866 * Value must have pattern |
| 6867 * "(?:(?:[-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])?))". |
| 6868 * |
| 6869 * [filter] - Optional. Filter expression for filtering listed resources. |
| 6870 * |
| 6871 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 6872 * value is 500 and default value is 500. |
| 6873 * Value must be between "0" and "500". |
| 6874 * |
| 6875 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 6876 * by maxResults. Used to continue a previous list request. |
| 6877 * |
| 6878 * Completes with a [UrlMapList]. |
| 6879 * |
| 6880 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6881 * error. |
| 6882 * |
| 6883 * If the used [http.Client] completes with an error when making a REST call, |
| 6884 * this method will complete with the same error. |
| 6885 */ |
| 6886 async.Future<UrlMapList> list(core.String project, {core.String filter, core.i
nt maxResults, core.String pageToken}) { |
| 6887 var _url = null; |
| 6888 var _queryParams = new core.Map(); |
| 6889 var _uploadMedia = null; |
| 6890 var _uploadOptions = null; |
| 6891 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6892 var _body = null; |
| 6893 |
| 6894 if (project == null) { |
| 6895 throw new core.ArgumentError("Parameter project is required."); |
| 6896 } |
| 6897 if (filter != null) { |
| 6898 _queryParams["filter"] = [filter]; |
| 6899 } |
| 6900 if (maxResults != null) { |
| 6901 _queryParams["maxResults"] = ["${maxResults}"]; |
| 6902 } |
| 6903 if (pageToken != null) { |
| 6904 _queryParams["pageToken"] = [pageToken]; |
| 6905 } |
| 6906 |
| 6907 |
| 6908 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/urlMaps'
; |
| 6909 |
| 6910 var _response = _requester.request(_url, |
| 6911 "GET", |
| 6912 body: _body, |
| 6913 queryParams: _queryParams, |
| 6914 uploadOptions: _uploadOptions, |
| 6915 uploadMedia: _uploadMedia, |
| 6916 downloadOptions: _downloadOptions); |
| 6917 return _response.then((data) => new UrlMapList.fromJson(data)); |
| 6918 } |
| 6919 |
| 6920 /** |
| 6921 * Update the entire content of the UrlMap resource. This method supports |
| 6922 * patch semantics. |
| 6923 * |
| 6924 * [request] - The metadata request object. |
| 6925 * |
| 6926 * Request parameters: |
| 6927 * |
| 6928 * [project] - Name of the project scoping this request. |
| 6929 * Value must have pattern |
| 6930 * "(?:(?:[-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])?))". |
| 6931 * |
| 6932 * [urlMap] - Name of the UrlMap resource to update. |
| 6933 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6934 * |
| 6935 * Completes with a [Operation]. |
| 6936 * |
| 6937 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6938 * error. |
| 6939 * |
| 6940 * If the used [http.Client] completes with an error when making a REST call, |
| 6941 * this method will complete with the same error. |
| 6942 */ |
| 6943 async.Future<Operation> patch(UrlMap request, core.String project, core.String
urlMap) { |
| 6944 var _url = null; |
| 6945 var _queryParams = new core.Map(); |
| 6946 var _uploadMedia = null; |
| 6947 var _uploadOptions = null; |
| 6948 var _downloadOptions = common.DownloadOptions.Metadata; |
| 6949 var _body = null; |
| 6950 |
| 6951 if (request != null) { |
| 6952 _body = convert.JSON.encode((request).toJson()); |
| 6953 } |
| 6954 if (project == null) { |
| 6955 throw new core.ArgumentError("Parameter project is required."); |
| 6956 } |
| 6957 if (urlMap == null) { |
| 6958 throw new core.ArgumentError("Parameter urlMap is required."); |
| 6959 } |
| 6960 |
| 6961 |
| 6962 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/urlMaps/
' + common_internal.Escaper.ecapeVariable('$urlMap'); |
| 6963 |
| 6964 var _response = _requester.request(_url, |
| 6965 "PATCH", |
| 6966 body: _body, |
| 6967 queryParams: _queryParams, |
| 6968 uploadOptions: _uploadOptions, |
| 6969 uploadMedia: _uploadMedia, |
| 6970 downloadOptions: _downloadOptions); |
| 6971 return _response.then((data) => new Operation.fromJson(data)); |
| 6972 } |
| 6973 |
| 6974 /** |
| 6975 * Update the entire content of the UrlMap resource. |
| 6976 * |
| 6977 * [request] - The metadata request object. |
| 6978 * |
| 6979 * Request parameters: |
| 6980 * |
| 6981 * [project] - Name of the project scoping this request. |
| 6982 * Value must have pattern |
| 6983 * "(?:(?:[-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])?))". |
| 6984 * |
| 6985 * [urlMap] - Name of the UrlMap resource to update. |
| 6986 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6987 * |
| 6988 * Completes with a [Operation]. |
| 6989 * |
| 6990 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 6991 * error. |
| 6992 * |
| 6993 * If the used [http.Client] completes with an error when making a REST call, |
| 6994 * this method will complete with the same error. |
| 6995 */ |
| 6996 async.Future<Operation> update(UrlMap request, core.String project, core.Strin
g urlMap) { |
| 6997 var _url = null; |
| 6998 var _queryParams = new core.Map(); |
| 6999 var _uploadMedia = null; |
| 7000 var _uploadOptions = null; |
| 7001 var _downloadOptions = common.DownloadOptions.Metadata; |
| 7002 var _body = null; |
| 7003 |
| 7004 if (request != null) { |
| 7005 _body = convert.JSON.encode((request).toJson()); |
| 7006 } |
| 7007 if (project == null) { |
| 7008 throw new core.ArgumentError("Parameter project is required."); |
| 7009 } |
| 7010 if (urlMap == null) { |
| 7011 throw new core.ArgumentError("Parameter urlMap is required."); |
| 7012 } |
| 7013 |
| 7014 |
| 7015 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/urlMaps/
' + common_internal.Escaper.ecapeVariable('$urlMap'); |
| 7016 |
| 7017 var _response = _requester.request(_url, |
| 7018 "PUT", |
| 7019 body: _body, |
| 7020 queryParams: _queryParams, |
| 7021 uploadOptions: _uploadOptions, |
| 7022 uploadMedia: _uploadMedia, |
| 7023 downloadOptions: _downloadOptions); |
| 7024 return _response.then((data) => new Operation.fromJson(data)); |
| 7025 } |
| 7026 |
| 7027 /** |
| 7028 * Run static validation for the UrlMap. In particular, the tests of the |
| 7029 * provided UrlMap will be run. Calling this method does NOT create the |
| 7030 * UrlMap. |
| 7031 * |
| 7032 * [request] - The metadata request object. |
| 7033 * |
| 7034 * Request parameters: |
| 7035 * |
| 7036 * [project] - Name of the project scoping this request. |
| 7037 * Value must have pattern |
| 7038 * "(?:(?:[-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])?))". |
| 7039 * |
| 7040 * [urlMap] - Name of the UrlMap resource to be validated as. |
| 7041 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 7042 * |
| 7043 * Completes with a [UrlMapsValidateResponse]. |
| 7044 * |
| 7045 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 7046 * error. |
| 7047 * |
| 7048 * If the used [http.Client] completes with an error when making a REST call, |
| 7049 * this method will complete with the same error. |
| 7050 */ |
| 7051 async.Future<UrlMapsValidateResponse> validate(UrlMapsValidateRequest request,
core.String project, core.String urlMap) { |
| 7052 var _url = null; |
| 7053 var _queryParams = new core.Map(); |
| 7054 var _uploadMedia = null; |
| 7055 var _uploadOptions = null; |
| 7056 var _downloadOptions = common.DownloadOptions.Metadata; |
| 7057 var _body = null; |
| 7058 |
| 7059 if (request != null) { |
| 7060 _body = convert.JSON.encode((request).toJson()); |
| 7061 } |
| 7062 if (project == null) { |
| 7063 throw new core.ArgumentError("Parameter project is required."); |
| 7064 } |
| 7065 if (urlMap == null) { |
| 7066 throw new core.ArgumentError("Parameter urlMap is required."); |
| 7067 } |
| 7068 |
| 7069 |
| 7070 _url = common_internal.Escaper.ecapeVariable('$project') + '/global/urlMaps/
' + common_internal.Escaper.ecapeVariable('$urlMap') + '/validate'; |
| 7071 |
| 7072 var _response = _requester.request(_url, |
| 7073 "POST", |
| 7074 body: _body, |
| 7075 queryParams: _queryParams, |
| 7076 uploadOptions: _uploadOptions, |
| 7077 uploadMedia: _uploadMedia, |
| 7078 downloadOptions: _downloadOptions); |
| 7079 return _response.then((data) => new UrlMapsValidateResponse.fromJson(data)); |
| 7080 } |
| 7081 |
| 7082 } |
| 7083 |
| 7084 |
| 7085 /** Not documented yet. */ |
| 7086 class ZoneOperationsResourceApi { |
| 7087 final common_internal.ApiRequester _requester; |
| 7088 |
| 7089 ZoneOperationsResourceApi(common_internal.ApiRequester client) : |
| 7090 _requester = client; |
| 7091 |
| 7092 /** |
| 7093 * Deletes the specified zone-specific operation resource. |
| 7094 * |
| 7095 * Request parameters: |
| 7096 * |
| 7097 * [project] - Name of the project scoping this request. |
| 7098 * Value must have pattern |
| 7099 * "(?:(?:[-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])?))". |
| 7100 * |
| 7101 * [zone] - Name of the zone scoping this request. |
| 7102 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 7103 * |
| 7104 * [operation] - Name of the operation resource to delete. |
| 7105 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 7106 * |
| 7107 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 7108 * error. |
| 7109 * |
| 7110 * If the used [http.Client] completes with an error when making a REST call, |
| 7111 * this method will complete with the same error. |
| 7112 */ |
| 7113 async.Future delete(core.String project, core.String zone, core.String operati
on) { |
| 7114 var _url = null; |
| 7115 var _queryParams = new core.Map(); |
| 7116 var _uploadMedia = null; |
| 7117 var _uploadOptions = null; |
| 7118 var _downloadOptions = common.DownloadOptions.Metadata; |
| 7119 var _body = null; |
| 7120 |
| 7121 if (project == null) { |
| 7122 throw new core.ArgumentError("Parameter project is required."); |
| 7123 } |
| 7124 if (zone == null) { |
| 7125 throw new core.ArgumentError("Parameter zone is required."); |
| 7126 } |
| 7127 if (operation == null) { |
| 7128 throw new core.ArgumentError("Parameter operation is required."); |
| 7129 } |
| 7130 |
| 7131 _downloadOptions = null; |
| 7132 |
| 7133 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations/' + common_internal.Esc
aper.ecapeVariable('$operation'); |
| 7134 |
| 7135 var _response = _requester.request(_url, |
| 7136 "DELETE", |
| 7137 body: _body, |
| 7138 queryParams: _queryParams, |
| 7139 uploadOptions: _uploadOptions, |
| 7140 uploadMedia: _uploadMedia, |
| 7141 downloadOptions: _downloadOptions); |
| 7142 return _response.then((data) => null); |
| 7143 } |
| 7144 |
| 7145 /** |
| 7146 * Retrieves the specified zone-specific operation resource. |
| 7147 * |
| 7148 * Request parameters: |
| 7149 * |
| 7150 * [project] - Name of the project scoping this request. |
| 7151 * Value must have pattern |
| 7152 * "(?:(?:[-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])?))". |
| 7153 * |
| 7154 * [zone] - Name of the zone scoping this request. |
| 7155 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 7156 * |
| 7157 * [operation] - Name of the operation resource to return. |
| 7158 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 7159 * |
| 7160 * Completes with a [Operation]. |
| 7161 * |
| 7162 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 7163 * error. |
| 7164 * |
| 7165 * If the used [http.Client] completes with an error when making a REST call, |
| 7166 * this method will complete with the same error. |
| 7167 */ |
| 7168 async.Future<Operation> get(core.String project, core.String zone, core.String
operation) { |
| 7169 var _url = null; |
| 7170 var _queryParams = new core.Map(); |
| 7171 var _uploadMedia = null; |
| 7172 var _uploadOptions = null; |
| 7173 var _downloadOptions = common.DownloadOptions.Metadata; |
| 7174 var _body = null; |
| 7175 |
| 7176 if (project == null) { |
| 7177 throw new core.ArgumentError("Parameter project is required."); |
| 7178 } |
| 7179 if (zone == null) { |
| 7180 throw new core.ArgumentError("Parameter zone is required."); |
| 7181 } |
| 7182 if (operation == null) { |
| 7183 throw new core.ArgumentError("Parameter operation is required."); |
| 7184 } |
| 7185 |
| 7186 |
| 7187 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations/' + common_internal.Esc
aper.ecapeVariable('$operation'); |
| 7188 |
| 7189 var _response = _requester.request(_url, |
| 7190 "GET", |
| 7191 body: _body, |
| 7192 queryParams: _queryParams, |
| 7193 uploadOptions: _uploadOptions, |
| 7194 uploadMedia: _uploadMedia, |
| 7195 downloadOptions: _downloadOptions); |
| 7196 return _response.then((data) => new Operation.fromJson(data)); |
| 7197 } |
| 7198 |
| 7199 /** |
| 7200 * Retrieves the list of operation resources contained within the specified |
| 7201 * zone. |
| 7202 * |
| 7203 * Request parameters: |
| 7204 * |
| 7205 * [project] - Name of the project scoping this request. |
| 7206 * Value must have pattern |
| 7207 * "(?:(?:[-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])?))". |
| 7208 * |
| 7209 * [zone] - Name of the zone scoping this request. |
| 7210 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 7211 * |
| 7212 * [filter] - Optional. Filter expression for filtering listed resources. |
| 7213 * |
| 7214 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 7215 * value is 500 and default value is 500. |
| 7216 * Value must be between "0" and "500". |
| 7217 * |
| 7218 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 7219 * by maxResults. Used to continue a previous list request. |
| 7220 * |
| 7221 * Completes with a [OperationList]. |
| 7222 * |
| 7223 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 7224 * error. |
| 7225 * |
| 7226 * If the used [http.Client] completes with an error when making a REST call, |
| 7227 * this method will complete with the same error. |
| 7228 */ |
| 7229 async.Future<OperationList> list(core.String project, core.String zone, {core.
String filter, core.int maxResults, core.String pageToken}) { |
| 7230 var _url = null; |
| 7231 var _queryParams = new core.Map(); |
| 7232 var _uploadMedia = null; |
| 7233 var _uploadOptions = null; |
| 7234 var _downloadOptions = common.DownloadOptions.Metadata; |
| 7235 var _body = null; |
| 7236 |
| 7237 if (project == null) { |
| 7238 throw new core.ArgumentError("Parameter project is required."); |
| 7239 } |
| 7240 if (zone == null) { |
| 7241 throw new core.ArgumentError("Parameter zone is required."); |
| 7242 } |
| 7243 if (filter != null) { |
| 7244 _queryParams["filter"] = [filter]; |
| 7245 } |
| 7246 if (maxResults != null) { |
| 7247 _queryParams["maxResults"] = ["${maxResults}"]; |
| 7248 } |
| 7249 if (pageToken != null) { |
| 7250 _queryParams["pageToken"] = [pageToken]; |
| 7251 } |
| 7252 |
| 7253 |
| 7254 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/operations'; |
| 7255 |
| 7256 var _response = _requester.request(_url, |
| 7257 "GET", |
| 7258 body: _body, |
| 7259 queryParams: _queryParams, |
| 7260 uploadOptions: _uploadOptions, |
| 7261 uploadMedia: _uploadMedia, |
| 7262 downloadOptions: _downloadOptions); |
| 7263 return _response.then((data) => new OperationList.fromJson(data)); |
| 7264 } |
| 7265 |
| 7266 } |
| 7267 |
| 7268 |
| 7269 /** Not documented yet. */ |
| 7270 class ZonesResourceApi { |
| 7271 final common_internal.ApiRequester _requester; |
| 7272 |
| 7273 ZonesResourceApi(common_internal.ApiRequester client) : |
| 7274 _requester = client; |
| 7275 |
| 7276 /** |
| 7277 * Returns the specified zone resource. |
| 7278 * |
| 7279 * Request parameters: |
| 7280 * |
| 7281 * [project] - Name of the project scoping this request. |
| 7282 * Value must have pattern |
| 7283 * "(?:(?:[-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])?))". |
| 7284 * |
| 7285 * [zone] - Name of the zone resource to return. |
| 7286 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 7287 * |
| 7288 * Completes with a [Zone]. |
| 7289 * |
| 7290 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 7291 * error. |
| 7292 * |
| 7293 * If the used [http.Client] completes with an error when making a REST call, |
| 7294 * this method will complete with the same error. |
| 7295 */ |
| 7296 async.Future<Zone> get(core.String project, core.String zone) { |
| 7297 var _url = null; |
| 7298 var _queryParams = new core.Map(); |
| 7299 var _uploadMedia = null; |
| 7300 var _uploadOptions = null; |
| 7301 var _downloadOptions = common.DownloadOptions.Metadata; |
| 7302 var _body = null; |
| 7303 |
| 7304 if (project == null) { |
| 7305 throw new core.ArgumentError("Parameter project is required."); |
| 7306 } |
| 7307 if (zone == null) { |
| 7308 throw new core.ArgumentError("Parameter zone is required."); |
| 7309 } |
| 7310 |
| 7311 |
| 7312 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone'); |
| 7313 |
| 7314 var _response = _requester.request(_url, |
| 7315 "GET", |
| 7316 body: _body, |
| 7317 queryParams: _queryParams, |
| 7318 uploadOptions: _uploadOptions, |
| 7319 uploadMedia: _uploadMedia, |
| 7320 downloadOptions: _downloadOptions); |
| 7321 return _response.then((data) => new Zone.fromJson(data)); |
| 7322 } |
| 7323 |
| 7324 /** |
| 7325 * Retrieves the list of zone resources available to the specified project. |
| 7326 * |
| 7327 * Request parameters: |
| 7328 * |
| 7329 * [project] - Name of the project scoping this request. |
| 7330 * Value must have pattern |
| 7331 * "(?:(?:[-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])?))". |
| 7332 * |
| 7333 * [filter] - Optional. Filter expression for filtering listed resources. |
| 7334 * |
| 7335 * [maxResults] - Optional. Maximum count of results to be returned. Maximum |
| 7336 * value is 500 and default value is 500. |
| 7337 * Value must be between "0" and "500". |
| 7338 * |
| 7339 * [pageToken] - Optional. Tag returned by a previous list request truncated |
| 7340 * by maxResults. Used to continue a previous list request. |
| 7341 * |
| 7342 * Completes with a [ZoneList]. |
| 7343 * |
| 7344 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 7345 * error. |
| 7346 * |
| 7347 * If the used [http.Client] completes with an error when making a REST call, |
| 7348 * this method will complete with the same error. |
| 7349 */ |
| 7350 async.Future<ZoneList> list(core.String project, {core.String filter, core.int
maxResults, core.String pageToken}) { |
| 7351 var _url = null; |
| 7352 var _queryParams = new core.Map(); |
| 7353 var _uploadMedia = null; |
| 7354 var _uploadOptions = null; |
| 7355 var _downloadOptions = common.DownloadOptions.Metadata; |
| 7356 var _body = null; |
| 7357 |
| 7358 if (project == null) { |
| 7359 throw new core.ArgumentError("Parameter project is required."); |
| 7360 } |
| 7361 if (filter != null) { |
| 7362 _queryParams["filter"] = [filter]; |
| 7363 } |
| 7364 if (maxResults != null) { |
| 7365 _queryParams["maxResults"] = ["${maxResults}"]; |
| 7366 } |
| 7367 if (pageToken != null) { |
| 7368 _queryParams["pageToken"] = [pageToken]; |
| 7369 } |
| 7370 |
| 7371 |
| 7372 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones'; |
| 7373 |
| 7374 var _response = _requester.request(_url, |
| 7375 "GET", |
| 7376 body: _body, |
| 7377 queryParams: _queryParams, |
| 7378 uploadOptions: _uploadOptions, |
| 7379 uploadMedia: _uploadMedia, |
| 7380 downloadOptions: _downloadOptions); |
| 7381 return _response.then((data) => new ZoneList.fromJson(data)); |
| 7382 } |
| 7383 |
| 7384 } |
| 7385 |
| 7386 |
| 7387 |
| 7388 /** An access configuration attached to an instance's network interface. */ |
| 7389 class AccessConfig { |
| 7390 /** Type of the resource. */ |
| 7391 core.String kind; |
| 7392 |
| 7393 /** Name of this access configuration. */ |
| 7394 core.String name; |
| 7395 |
| 7396 /** |
| 7397 * An external IP address associated with this instance. Specify an unused |
| 7398 * static IP address available to the project. If not specified, the external |
| 7399 * IP will be drawn from a shared ephemeral pool. |
| 7400 */ |
| 7401 core.String natIP; |
| 7402 |
| 7403 /** |
| 7404 * Type of configuration. Must be set to "ONE_TO_ONE_NAT". This configures |
| 7405 * port-for-port NAT to the internet. |
| 7406 * Possible string values are: |
| 7407 * - "ONE_TO_ONE_NAT" |
| 7408 */ |
| 7409 core.String type; |
| 7410 |
| 7411 |
| 7412 AccessConfig(); |
| 7413 |
| 7414 AccessConfig.fromJson(core.Map _json) { |
| 7415 if (_json.containsKey("kind")) { |
| 7416 kind = _json["kind"]; |
| 7417 } |
| 7418 if (_json.containsKey("name")) { |
| 7419 name = _json["name"]; |
| 7420 } |
| 7421 if (_json.containsKey("natIP")) { |
| 7422 natIP = _json["natIP"]; |
| 7423 } |
| 7424 if (_json.containsKey("type")) { |
| 7425 type = _json["type"]; |
| 7426 } |
| 7427 } |
| 7428 |
| 7429 core.Map toJson() { |
| 7430 var _json = new core.Map(); |
| 7431 if (kind != null) { |
| 7432 _json["kind"] = kind; |
| 7433 } |
| 7434 if (name != null) { |
| 7435 _json["name"] = name; |
| 7436 } |
| 7437 if (natIP != null) { |
| 7438 _json["natIP"] = natIP; |
| 7439 } |
| 7440 if (type != null) { |
| 7441 _json["type"] = type; |
| 7442 } |
| 7443 return _json; |
| 7444 } |
| 7445 } |
| 7446 |
| 7447 |
| 7448 /** A reserved address resource. */ |
| 7449 class Address { |
| 7450 /** The IP address represented by this resource. */ |
| 7451 core.String address; |
| 7452 |
| 7453 /** Creation timestamp in RFC3339 text format (output only). */ |
| 7454 core.String creationTimestamp; |
| 7455 |
| 7456 /** |
| 7457 * An optional textual description of the resource; provided by the client |
| 7458 * when the resource is created. |
| 7459 */ |
| 7460 core.String description; |
| 7461 |
| 7462 /** |
| 7463 * Unique identifier for the resource; defined by the server (output only). |
| 7464 */ |
| 7465 core.String id; |
| 7466 |
| 7467 /** Type of the resource. */ |
| 7468 core.String kind; |
| 7469 |
| 7470 /** |
| 7471 * Name of the resource; provided by the client when the resource is created. |
| 7472 * The name must be 1-63 characters long, and comply with RFC1035. |
| 7473 */ |
| 7474 core.String name; |
| 7475 |
| 7476 /** |
| 7477 * URL of the region where the regional address resides (output only). This |
| 7478 * field is not applicable to global addresses. |
| 7479 */ |
| 7480 core.String region; |
| 7481 |
| 7482 /** Server defined URL for the resource (output only). */ |
| 7483 core.String selfLink; |
| 7484 |
| 7485 /** |
| 7486 * The status of the address (output only). |
| 7487 * Possible string values are: |
| 7488 * - "IN_USE" |
| 7489 * - "RESERVED" |
| 7490 */ |
| 7491 core.String status; |
| 7492 |
| 7493 /** The resources that are using this address resource. */ |
| 7494 core.List<core.String> users; |
| 7495 |
| 7496 |
| 7497 Address(); |
| 7498 |
| 7499 Address.fromJson(core.Map _json) { |
| 7500 if (_json.containsKey("address")) { |
| 7501 address = _json["address"]; |
| 7502 } |
| 7503 if (_json.containsKey("creationTimestamp")) { |
| 7504 creationTimestamp = _json["creationTimestamp"]; |
| 7505 } |
| 7506 if (_json.containsKey("description")) { |
| 7507 description = _json["description"]; |
| 7508 } |
| 7509 if (_json.containsKey("id")) { |
| 7510 id = _json["id"]; |
| 7511 } |
| 7512 if (_json.containsKey("kind")) { |
| 7513 kind = _json["kind"]; |
| 7514 } |
| 7515 if (_json.containsKey("name")) { |
| 7516 name = _json["name"]; |
| 7517 } |
| 7518 if (_json.containsKey("region")) { |
| 7519 region = _json["region"]; |
| 7520 } |
| 7521 if (_json.containsKey("selfLink")) { |
| 7522 selfLink = _json["selfLink"]; |
| 7523 } |
| 7524 if (_json.containsKey("status")) { |
| 7525 status = _json["status"]; |
| 7526 } |
| 7527 if (_json.containsKey("users")) { |
| 7528 users = _json["users"]; |
| 7529 } |
| 7530 } |
| 7531 |
| 7532 core.Map toJson() { |
| 7533 var _json = new core.Map(); |
| 7534 if (address != null) { |
| 7535 _json["address"] = address; |
| 7536 } |
| 7537 if (creationTimestamp != null) { |
| 7538 _json["creationTimestamp"] = creationTimestamp; |
| 7539 } |
| 7540 if (description != null) { |
| 7541 _json["description"] = description; |
| 7542 } |
| 7543 if (id != null) { |
| 7544 _json["id"] = id; |
| 7545 } |
| 7546 if (kind != null) { |
| 7547 _json["kind"] = kind; |
| 7548 } |
| 7549 if (name != null) { |
| 7550 _json["name"] = name; |
| 7551 } |
| 7552 if (region != null) { |
| 7553 _json["region"] = region; |
| 7554 } |
| 7555 if (selfLink != null) { |
| 7556 _json["selfLink"] = selfLink; |
| 7557 } |
| 7558 if (status != null) { |
| 7559 _json["status"] = status; |
| 7560 } |
| 7561 if (users != null) { |
| 7562 _json["users"] = users; |
| 7563 } |
| 7564 return _json; |
| 7565 } |
| 7566 } |
| 7567 |
| 7568 |
| 7569 /** Not documented yet. */ |
| 7570 class AddressAggregatedList { |
| 7571 /** |
| 7572 * Unique identifier for the resource; defined by the server (output only). |
| 7573 */ |
| 7574 core.String id; |
| 7575 |
| 7576 /** A map of scoped address lists. */ |
| 7577 core.Map<core.String, AddressesScopedList> items; |
| 7578 |
| 7579 /** Type of resource. */ |
| 7580 core.String kind; |
| 7581 |
| 7582 /** A token used to continue a truncated list request (output only). */ |
| 7583 core.String nextPageToken; |
| 7584 |
| 7585 /** Server defined URL for this resource (output only). */ |
| 7586 core.String selfLink; |
| 7587 |
| 7588 |
| 7589 AddressAggregatedList(); |
| 7590 |
| 7591 AddressAggregatedList.fromJson(core.Map _json) { |
| 7592 if (_json.containsKey("id")) { |
| 7593 id = _json["id"]; |
| 7594 } |
| 7595 if (_json.containsKey("items")) { |
| 7596 items = common_internal.mapMap(_json["items"], (item) => new AddressesScop
edList.fromJson(item)); |
| 7597 } |
| 7598 if (_json.containsKey("kind")) { |
| 7599 kind = _json["kind"]; |
| 7600 } |
| 7601 if (_json.containsKey("nextPageToken")) { |
| 7602 nextPageToken = _json["nextPageToken"]; |
| 7603 } |
| 7604 if (_json.containsKey("selfLink")) { |
| 7605 selfLink = _json["selfLink"]; |
| 7606 } |
| 7607 } |
| 7608 |
| 7609 core.Map toJson() { |
| 7610 var _json = new core.Map(); |
| 7611 if (id != null) { |
| 7612 _json["id"] = id; |
| 7613 } |
| 7614 if (items != null) { |
| 7615 _json["items"] = common_internal.mapMap(items, (item) => (item).toJson()); |
| 7616 } |
| 7617 if (kind != null) { |
| 7618 _json["kind"] = kind; |
| 7619 } |
| 7620 if (nextPageToken != null) { |
| 7621 _json["nextPageToken"] = nextPageToken; |
| 7622 } |
| 7623 if (selfLink != null) { |
| 7624 _json["selfLink"] = selfLink; |
| 7625 } |
| 7626 return _json; |
| 7627 } |
| 7628 } |
| 7629 |
| 7630 |
| 7631 /** Contains a list of address resources. */ |
| 7632 class AddressList { |
| 7633 /** |
| 7634 * Unique identifier for the resource; defined by the server (output only). |
| 7635 */ |
| 7636 core.String id; |
| 7637 |
| 7638 /** The address resources. */ |
| 7639 core.List<Address> items; |
| 7640 |
| 7641 /** Type of resource. */ |
| 7642 core.String kind; |
| 7643 |
| 7644 /** A token used to continue a truncated list request (output only). */ |
| 7645 core.String nextPageToken; |
| 7646 |
| 7647 /** Server defined URL for the resource (output only). */ |
| 7648 core.String selfLink; |
| 7649 |
| 7650 |
| 7651 AddressList(); |
| 7652 |
| 7653 AddressList.fromJson(core.Map _json) { |
| 7654 if (_json.containsKey("id")) { |
| 7655 id = _json["id"]; |
| 7656 } |
| 7657 if (_json.containsKey("items")) { |
| 7658 items = _json["items"].map((value) => new Address.fromJson(value)).toList(
); |
| 7659 } |
| 7660 if (_json.containsKey("kind")) { |
| 7661 kind = _json["kind"]; |
| 7662 } |
| 7663 if (_json.containsKey("nextPageToken")) { |
| 7664 nextPageToken = _json["nextPageToken"]; |
| 7665 } |
| 7666 if (_json.containsKey("selfLink")) { |
| 7667 selfLink = _json["selfLink"]; |
| 7668 } |
| 7669 } |
| 7670 |
| 7671 core.Map toJson() { |
| 7672 var _json = new core.Map(); |
| 7673 if (id != null) { |
| 7674 _json["id"] = id; |
| 7675 } |
| 7676 if (items != null) { |
| 7677 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 7678 } |
| 7679 if (kind != null) { |
| 7680 _json["kind"] = kind; |
| 7681 } |
| 7682 if (nextPageToken != null) { |
| 7683 _json["nextPageToken"] = nextPageToken; |
| 7684 } |
| 7685 if (selfLink != null) { |
| 7686 _json["selfLink"] = selfLink; |
| 7687 } |
| 7688 return _json; |
| 7689 } |
| 7690 } |
| 7691 |
| 7692 |
| 7693 /** Not documented yet. */ |
| 7694 class AddressesScopedListWarningData { |
| 7695 /** A key for the warning data. */ |
| 7696 core.String key; |
| 7697 |
| 7698 /** A warning data value corresponding to the key. */ |
| 7699 core.String value; |
| 7700 |
| 7701 |
| 7702 AddressesScopedListWarningData(); |
| 7703 |
| 7704 AddressesScopedListWarningData.fromJson(core.Map _json) { |
| 7705 if (_json.containsKey("key")) { |
| 7706 key = _json["key"]; |
| 7707 } |
| 7708 if (_json.containsKey("value")) { |
| 7709 value = _json["value"]; |
| 7710 } |
| 7711 } |
| 7712 |
| 7713 core.Map toJson() { |
| 7714 var _json = new core.Map(); |
| 7715 if (key != null) { |
| 7716 _json["key"] = key; |
| 7717 } |
| 7718 if (value != null) { |
| 7719 _json["value"] = value; |
| 7720 } |
| 7721 return _json; |
| 7722 } |
| 7723 } |
| 7724 |
| 7725 |
| 7726 /** |
| 7727 * Informational warning which replaces the list of addresses when the list is |
| 7728 * empty. |
| 7729 */ |
| 7730 class AddressesScopedListWarning { |
| 7731 /** |
| 7732 * The warning type identifier for this warning. |
| 7733 * Possible string values are: |
| 7734 * - "DEPRECATED_RESOURCE_USED" |
| 7735 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 7736 * - "INJECTED_KERNELS_DEPRECATED" |
| 7737 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 7738 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 7739 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 7740 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 7741 * - "NEXT_HOP_NOT_RUNNING" |
| 7742 * - "NO_RESULTS_ON_PAGE" |
| 7743 * - "REQUIRED_TOS_AGREEMENT" |
| 7744 * - "RESOURCE_NOT_DELETED" |
| 7745 * - "UNREACHABLE" |
| 7746 */ |
| 7747 core.String code; |
| 7748 |
| 7749 /** Metadata for this warning in 'key: value' format. */ |
| 7750 core.List<AddressesScopedListWarningData> data; |
| 7751 |
| 7752 /** Optional human-readable details for this warning. */ |
| 7753 core.String message; |
| 7754 |
| 7755 |
| 7756 AddressesScopedListWarning(); |
| 7757 |
| 7758 AddressesScopedListWarning.fromJson(core.Map _json) { |
| 7759 if (_json.containsKey("code")) { |
| 7760 code = _json["code"]; |
| 7761 } |
| 7762 if (_json.containsKey("data")) { |
| 7763 data = _json["data"].map((value) => new AddressesScopedListWarningData.fro
mJson(value)).toList(); |
| 7764 } |
| 7765 if (_json.containsKey("message")) { |
| 7766 message = _json["message"]; |
| 7767 } |
| 7768 } |
| 7769 |
| 7770 core.Map toJson() { |
| 7771 var _json = new core.Map(); |
| 7772 if (code != null) { |
| 7773 _json["code"] = code; |
| 7774 } |
| 7775 if (data != null) { |
| 7776 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 7777 } |
| 7778 if (message != null) { |
| 7779 _json["message"] = message; |
| 7780 } |
| 7781 return _json; |
| 7782 } |
| 7783 } |
| 7784 |
| 7785 |
| 7786 /** Not documented yet. */ |
| 7787 class AddressesScopedList { |
| 7788 /** List of addresses contained in this scope. */ |
| 7789 core.List<Address> addresses; |
| 7790 |
| 7791 /** |
| 7792 * Informational warning which replaces the list of addresses when the list is |
| 7793 * empty. |
| 7794 */ |
| 7795 AddressesScopedListWarning warning; |
| 7796 |
| 7797 |
| 7798 AddressesScopedList(); |
| 7799 |
| 7800 AddressesScopedList.fromJson(core.Map _json) { |
| 7801 if (_json.containsKey("addresses")) { |
| 7802 addresses = _json["addresses"].map((value) => new Address.fromJson(value))
.toList(); |
| 7803 } |
| 7804 if (_json.containsKey("warning")) { |
| 7805 warning = new AddressesScopedListWarning.fromJson(_json["warning"]); |
| 7806 } |
| 7807 } |
| 7808 |
| 7809 core.Map toJson() { |
| 7810 var _json = new core.Map(); |
| 7811 if (addresses != null) { |
| 7812 _json["addresses"] = addresses.map((value) => (value).toJson()).toList(); |
| 7813 } |
| 7814 if (warning != null) { |
| 7815 _json["warning"] = (warning).toJson(); |
| 7816 } |
| 7817 return _json; |
| 7818 } |
| 7819 } |
| 7820 |
| 7821 |
| 7822 /** An instance-attached disk resource. */ |
| 7823 class AttachedDisk { |
| 7824 /** |
| 7825 * Whether the disk will be auto-deleted when the instance is deleted (but not |
| 7826 * when the disk is detached from the instance). |
| 7827 */ |
| 7828 core.bool autoDelete; |
| 7829 |
| 7830 /** |
| 7831 * Indicates that this is a boot disk. VM will use the first partition of the |
| 7832 * disk for its root filesystem. |
| 7833 */ |
| 7834 core.bool boot; |
| 7835 |
| 7836 /** |
| 7837 * Persistent disk only; must be unique within the instance when specified. |
| 7838 * This represents a unique device name that is reflected into the /dev/ tree |
| 7839 * of a Linux operating system running within the instance. If not specified, |
| 7840 * a default will be chosen by the system. |
| 7841 */ |
| 7842 core.String deviceName; |
| 7843 |
| 7844 /** |
| 7845 * A zero-based index to assign to this disk, where 0 is reserved for the boot |
| 7846 * disk. If not specified, the server will choose an appropriate value (output |
| 7847 * only). |
| 7848 */ |
| 7849 core.int index; |
| 7850 |
| 7851 /** Initialization parameters. */ |
| 7852 AttachedDiskInitializeParams initializeParams; |
| 7853 |
| 7854 /** Type of the resource. */ |
| 7855 core.String kind; |
| 7856 |
| 7857 /** Public visible licenses. */ |
| 7858 core.List<core.String> licenses; |
| 7859 |
| 7860 /** |
| 7861 * The mode in which to attach this disk, either "READ_WRITE" or "READ_ONLY". |
| 7862 * Possible string values are: |
| 7863 * - "READ_ONLY" |
| 7864 * - "READ_WRITE" |
| 7865 */ |
| 7866 core.String mode; |
| 7867 |
| 7868 /** Persistent disk only; the URL of the persistent disk resource. */ |
| 7869 core.String source; |
| 7870 |
| 7871 /** |
| 7872 * Type of the disk, either "SCRATCH" or "PERSISTENT". Note that persistent |
| 7873 * disks must be created before you can specify them here. |
| 7874 * Possible string values are: |
| 7875 * - "PERSISTENT" |
| 7876 * - "SCRATCH" |
| 7877 */ |
| 7878 core.String type; |
| 7879 |
| 7880 |
| 7881 AttachedDisk(); |
| 7882 |
| 7883 AttachedDisk.fromJson(core.Map _json) { |
| 7884 if (_json.containsKey("autoDelete")) { |
| 7885 autoDelete = _json["autoDelete"]; |
| 7886 } |
| 7887 if (_json.containsKey("boot")) { |
| 7888 boot = _json["boot"]; |
| 7889 } |
| 7890 if (_json.containsKey("deviceName")) { |
| 7891 deviceName = _json["deviceName"]; |
| 7892 } |
| 7893 if (_json.containsKey("index")) { |
| 7894 index = _json["index"]; |
| 7895 } |
| 7896 if (_json.containsKey("initializeParams")) { |
| 7897 initializeParams = new AttachedDiskInitializeParams.fromJson(_json["initia
lizeParams"]); |
| 7898 } |
| 7899 if (_json.containsKey("kind")) { |
| 7900 kind = _json["kind"]; |
| 7901 } |
| 7902 if (_json.containsKey("licenses")) { |
| 7903 licenses = _json["licenses"]; |
| 7904 } |
| 7905 if (_json.containsKey("mode")) { |
| 7906 mode = _json["mode"]; |
| 7907 } |
| 7908 if (_json.containsKey("source")) { |
| 7909 source = _json["source"]; |
| 7910 } |
| 7911 if (_json.containsKey("type")) { |
| 7912 type = _json["type"]; |
| 7913 } |
| 7914 } |
| 7915 |
| 7916 core.Map toJson() { |
| 7917 var _json = new core.Map(); |
| 7918 if (autoDelete != null) { |
| 7919 _json["autoDelete"] = autoDelete; |
| 7920 } |
| 7921 if (boot != null) { |
| 7922 _json["boot"] = boot; |
| 7923 } |
| 7924 if (deviceName != null) { |
| 7925 _json["deviceName"] = deviceName; |
| 7926 } |
| 7927 if (index != null) { |
| 7928 _json["index"] = index; |
| 7929 } |
| 7930 if (initializeParams != null) { |
| 7931 _json["initializeParams"] = (initializeParams).toJson(); |
| 7932 } |
| 7933 if (kind != null) { |
| 7934 _json["kind"] = kind; |
| 7935 } |
| 7936 if (licenses != null) { |
| 7937 _json["licenses"] = licenses; |
| 7938 } |
| 7939 if (mode != null) { |
| 7940 _json["mode"] = mode; |
| 7941 } |
| 7942 if (source != null) { |
| 7943 _json["source"] = source; |
| 7944 } |
| 7945 if (type != null) { |
| 7946 _json["type"] = type; |
| 7947 } |
| 7948 return _json; |
| 7949 } |
| 7950 } |
| 7951 |
| 7952 |
| 7953 /** |
| 7954 * Initialization parameters for the new disk (input-only). Can only be |
| 7955 * specified on the boot disk or local SSDs. Mutually exclusive with 'source'. |
| 7956 */ |
| 7957 class AttachedDiskInitializeParams { |
| 7958 /** |
| 7959 * Name of the disk (when not provided defaults to the name of the instance). |
| 7960 */ |
| 7961 core.String diskName; |
| 7962 |
| 7963 /** Size of the disk in base-2 GB. */ |
| 7964 core.String diskSizeGb; |
| 7965 |
| 7966 /** |
| 7967 * URL of the disk type resource describing which disk type to use to create |
| 7968 * the disk; provided by the client when the disk is created. |
| 7969 */ |
| 7970 core.String diskType; |
| 7971 |
| 7972 /** The source image used to create this disk. */ |
| 7973 core.String sourceImage; |
| 7974 |
| 7975 |
| 7976 AttachedDiskInitializeParams(); |
| 7977 |
| 7978 AttachedDiskInitializeParams.fromJson(core.Map _json) { |
| 7979 if (_json.containsKey("diskName")) { |
| 7980 diskName = _json["diskName"]; |
| 7981 } |
| 7982 if (_json.containsKey("diskSizeGb")) { |
| 7983 diskSizeGb = _json["diskSizeGb"]; |
| 7984 } |
| 7985 if (_json.containsKey("diskType")) { |
| 7986 diskType = _json["diskType"]; |
| 7987 } |
| 7988 if (_json.containsKey("sourceImage")) { |
| 7989 sourceImage = _json["sourceImage"]; |
| 7990 } |
| 7991 } |
| 7992 |
| 7993 core.Map toJson() { |
| 7994 var _json = new core.Map(); |
| 7995 if (diskName != null) { |
| 7996 _json["diskName"] = diskName; |
| 7997 } |
| 7998 if (diskSizeGb != null) { |
| 7999 _json["diskSizeGb"] = diskSizeGb; |
| 8000 } |
| 8001 if (diskType != null) { |
| 8002 _json["diskType"] = diskType; |
| 8003 } |
| 8004 if (sourceImage != null) { |
| 8005 _json["sourceImage"] = sourceImage; |
| 8006 } |
| 8007 return _json; |
| 8008 } |
| 8009 } |
| 8010 |
| 8011 |
| 8012 /** Message containing information of one individual backend. */ |
| 8013 class Backend { |
| 8014 /** |
| 8015 * The balancing mode of this backend, default is UTILIZATION. |
| 8016 * Possible string values are: |
| 8017 * - "RATE" |
| 8018 * - "UTILIZATION" |
| 8019 */ |
| 8020 core.String balancingMode; |
| 8021 |
| 8022 /** |
| 8023 * The multiplier (a value between 0 and 1e6) of the max capacity (CPU or RPS, |
| 8024 * depending on 'balancingMode') the group should serve up to. 0 means the |
| 8025 * group is totally drained. Default value is 1. Valid range is [0, 1e6]. |
| 8026 */ |
| 8027 core.double capacityScaler; |
| 8028 |
| 8029 /** |
| 8030 * An optional textual description of the resource, which is provided by the |
| 8031 * client when the resource is created. |
| 8032 */ |
| 8033 core.String description; |
| 8034 |
| 8035 /** |
| 8036 * URL of a zonal Cloud Resource View resource. This resource view defines the |
| 8037 * list of instances that serve traffic. Member virtual machine instances from |
| 8038 * each resource view must live in the same zone as the resource view itself. |
| 8039 * No two backends in a backend service are allowed to use same Resource View |
| 8040 * resource. |
| 8041 */ |
| 8042 core.String group; |
| 8043 |
| 8044 /** |
| 8045 * The max RPS of the group. Can be used with either balancing mode, but |
| 8046 * required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance |
| 8047 * must be set. |
| 8048 */ |
| 8049 core.int maxRate; |
| 8050 |
| 8051 /** |
| 8052 * The max RPS that a single backed instance can handle. This is used to |
| 8053 * calculate the capacity of the group. Can be used in either balancing mode. |
| 8054 * For RATE mode, either maxRate or maxRatePerInstance must be set. |
| 8055 */ |
| 8056 core.double maxRatePerInstance; |
| 8057 |
| 8058 /** |
| 8059 * Used when 'balancingMode' is UTILIZATION. This ratio defines the CPU |
| 8060 * utilization target for the group. The default is 0.8. Valid range is [0, |
| 8061 * 1]. |
| 8062 */ |
| 8063 core.double maxUtilization; |
| 8064 |
| 8065 |
| 8066 Backend(); |
| 8067 |
| 8068 Backend.fromJson(core.Map _json) { |
| 8069 if (_json.containsKey("balancingMode")) { |
| 8070 balancingMode = _json["balancingMode"]; |
| 8071 } |
| 8072 if (_json.containsKey("capacityScaler")) { |
| 8073 capacityScaler = _json["capacityScaler"]; |
| 8074 } |
| 8075 if (_json.containsKey("description")) { |
| 8076 description = _json["description"]; |
| 8077 } |
| 8078 if (_json.containsKey("group")) { |
| 8079 group = _json["group"]; |
| 8080 } |
| 8081 if (_json.containsKey("maxRate")) { |
| 8082 maxRate = _json["maxRate"]; |
| 8083 } |
| 8084 if (_json.containsKey("maxRatePerInstance")) { |
| 8085 maxRatePerInstance = _json["maxRatePerInstance"]; |
| 8086 } |
| 8087 if (_json.containsKey("maxUtilization")) { |
| 8088 maxUtilization = _json["maxUtilization"]; |
| 8089 } |
| 8090 } |
| 8091 |
| 8092 core.Map toJson() { |
| 8093 var _json = new core.Map(); |
| 8094 if (balancingMode != null) { |
| 8095 _json["balancingMode"] = balancingMode; |
| 8096 } |
| 8097 if (capacityScaler != null) { |
| 8098 _json["capacityScaler"] = capacityScaler; |
| 8099 } |
| 8100 if (description != null) { |
| 8101 _json["description"] = description; |
| 8102 } |
| 8103 if (group != null) { |
| 8104 _json["group"] = group; |
| 8105 } |
| 8106 if (maxRate != null) { |
| 8107 _json["maxRate"] = maxRate; |
| 8108 } |
| 8109 if (maxRatePerInstance != null) { |
| 8110 _json["maxRatePerInstance"] = maxRatePerInstance; |
| 8111 } |
| 8112 if (maxUtilization != null) { |
| 8113 _json["maxUtilization"] = maxUtilization; |
| 8114 } |
| 8115 return _json; |
| 8116 } |
| 8117 } |
| 8118 |
| 8119 |
| 8120 /** |
| 8121 * A BackendService resource. This resource defines a group of backend VMs |
| 8122 * together with their serving capacity. |
| 8123 */ |
| 8124 class BackendService { |
| 8125 /** The list of backends that serve this BackendService. */ |
| 8126 core.List<Backend> backends; |
| 8127 |
| 8128 /** Creation timestamp in RFC3339 text format (output only). */ |
| 8129 core.String creationTimestamp; |
| 8130 |
| 8131 /** |
| 8132 * An optional textual description of the resource; provided by the client |
| 8133 * when the resource is created. |
| 8134 */ |
| 8135 core.String description; |
| 8136 |
| 8137 /** |
| 8138 * Fingerprint of this resource. A hash of the contents stored in this object. |
| 8139 * This field is used in optimistic locking. This field will be ignored when |
| 8140 * inserting a BackendService. An up-to-date fingerprint must be provided in |
| 8141 * order to update the BackendService. |
| 8142 */ |
| 8143 core.String fingerprint; |
| 8144 |
| 8145 core.List<core.int> get fingerprintAsBytes { |
| 8146 return crypto.CryptoUtils.base64StringToBytes(fingerprint); |
| 8147 } |
| 8148 |
| 8149 void set fingerprintAsBytes(core.List<core.int> _bytes) { |
| 8150 fingerprint = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 8151 } |
| 8152 |
| 8153 /** |
| 8154 * The list of URLs to the HttpHealthCheck resource for health checking this |
| 8155 * BackendService. Currently at most one health check can be specified, and a |
| 8156 * health check is required. |
| 8157 */ |
| 8158 core.List<core.String> healthChecks; |
| 8159 |
| 8160 /** |
| 8161 * Unique identifier for the resource; defined by the server (output only). |
| 8162 */ |
| 8163 core.String id; |
| 8164 |
| 8165 /** Type of the resource. */ |
| 8166 core.String kind; |
| 8167 |
| 8168 /** |
| 8169 * Name of the resource; provided by the client when the resource is created. |
| 8170 * The name must be 1-63 characters long, and comply with RFC1035. |
| 8171 */ |
| 8172 core.String name; |
| 8173 |
| 8174 /** The TCP port to connect on the backend. The default value is 80. */ |
| 8175 core.int port; |
| 8176 |
| 8177 /** |
| 8178 * Name of backend port. The same name should appear in the resource views |
| 8179 * referenced by this service. Required. |
| 8180 */ |
| 8181 core.String portName; |
| 8182 |
| 8183 /** |
| 8184 * Not documented yet. |
| 8185 * Possible string values are: |
| 8186 * - "HTTP" |
| 8187 */ |
| 8188 core.String protocol; |
| 8189 |
| 8190 /** Server defined URL for the resource (output only). */ |
| 8191 core.String selfLink; |
| 8192 |
| 8193 /** |
| 8194 * How many seconds to wait for the backend before considering it a failed |
| 8195 * request. Default is 30 seconds. |
| 8196 */ |
| 8197 core.int timeoutSec; |
| 8198 |
| 8199 |
| 8200 BackendService(); |
| 8201 |
| 8202 BackendService.fromJson(core.Map _json) { |
| 8203 if (_json.containsKey("backends")) { |
| 8204 backends = _json["backends"].map((value) => new Backend.fromJson(value)).t
oList(); |
| 8205 } |
| 8206 if (_json.containsKey("creationTimestamp")) { |
| 8207 creationTimestamp = _json["creationTimestamp"]; |
| 8208 } |
| 8209 if (_json.containsKey("description")) { |
| 8210 description = _json["description"]; |
| 8211 } |
| 8212 if (_json.containsKey("fingerprint")) { |
| 8213 fingerprint = _json["fingerprint"]; |
| 8214 } |
| 8215 if (_json.containsKey("healthChecks")) { |
| 8216 healthChecks = _json["healthChecks"]; |
| 8217 } |
| 8218 if (_json.containsKey("id")) { |
| 8219 id = _json["id"]; |
| 8220 } |
| 8221 if (_json.containsKey("kind")) { |
| 8222 kind = _json["kind"]; |
| 8223 } |
| 8224 if (_json.containsKey("name")) { |
| 8225 name = _json["name"]; |
| 8226 } |
| 8227 if (_json.containsKey("port")) { |
| 8228 port = _json["port"]; |
| 8229 } |
| 8230 if (_json.containsKey("portName")) { |
| 8231 portName = _json["portName"]; |
| 8232 } |
| 8233 if (_json.containsKey("protocol")) { |
| 8234 protocol = _json["protocol"]; |
| 8235 } |
| 8236 if (_json.containsKey("selfLink")) { |
| 8237 selfLink = _json["selfLink"]; |
| 8238 } |
| 8239 if (_json.containsKey("timeoutSec")) { |
| 8240 timeoutSec = _json["timeoutSec"]; |
| 8241 } |
| 8242 } |
| 8243 |
| 8244 core.Map toJson() { |
| 8245 var _json = new core.Map(); |
| 8246 if (backends != null) { |
| 8247 _json["backends"] = backends.map((value) => (value).toJson()).toList(); |
| 8248 } |
| 8249 if (creationTimestamp != null) { |
| 8250 _json["creationTimestamp"] = creationTimestamp; |
| 8251 } |
| 8252 if (description != null) { |
| 8253 _json["description"] = description; |
| 8254 } |
| 8255 if (fingerprint != null) { |
| 8256 _json["fingerprint"] = fingerprint; |
| 8257 } |
| 8258 if (healthChecks != null) { |
| 8259 _json["healthChecks"] = healthChecks; |
| 8260 } |
| 8261 if (id != null) { |
| 8262 _json["id"] = id; |
| 8263 } |
| 8264 if (kind != null) { |
| 8265 _json["kind"] = kind; |
| 8266 } |
| 8267 if (name != null) { |
| 8268 _json["name"] = name; |
| 8269 } |
| 8270 if (port != null) { |
| 8271 _json["port"] = port; |
| 8272 } |
| 8273 if (portName != null) { |
| 8274 _json["portName"] = portName; |
| 8275 } |
| 8276 if (protocol != null) { |
| 8277 _json["protocol"] = protocol; |
| 8278 } |
| 8279 if (selfLink != null) { |
| 8280 _json["selfLink"] = selfLink; |
| 8281 } |
| 8282 if (timeoutSec != null) { |
| 8283 _json["timeoutSec"] = timeoutSec; |
| 8284 } |
| 8285 return _json; |
| 8286 } |
| 8287 } |
| 8288 |
| 8289 |
| 8290 /** Not documented yet. */ |
| 8291 class BackendServiceGroupHealth { |
| 8292 /** Not documented yet. */ |
| 8293 core.List<HealthStatus> healthStatus; |
| 8294 |
| 8295 /** Type of resource. */ |
| 8296 core.String kind; |
| 8297 |
| 8298 |
| 8299 BackendServiceGroupHealth(); |
| 8300 |
| 8301 BackendServiceGroupHealth.fromJson(core.Map _json) { |
| 8302 if (_json.containsKey("healthStatus")) { |
| 8303 healthStatus = _json["healthStatus"].map((value) => new HealthStatus.fromJ
son(value)).toList(); |
| 8304 } |
| 8305 if (_json.containsKey("kind")) { |
| 8306 kind = _json["kind"]; |
| 8307 } |
| 8308 } |
| 8309 |
| 8310 core.Map toJson() { |
| 8311 var _json = new core.Map(); |
| 8312 if (healthStatus != null) { |
| 8313 _json["healthStatus"] = healthStatus.map((value) => (value).toJson()).toLi
st(); |
| 8314 } |
| 8315 if (kind != null) { |
| 8316 _json["kind"] = kind; |
| 8317 } |
| 8318 return _json; |
| 8319 } |
| 8320 } |
| 8321 |
| 8322 |
| 8323 /** Contains a list of BackendService resources. */ |
| 8324 class BackendServiceList { |
| 8325 /** |
| 8326 * Unique identifier for the resource; defined by the server (output only). |
| 8327 */ |
| 8328 core.String id; |
| 8329 |
| 8330 /** The BackendService resources. */ |
| 8331 core.List<BackendService> items; |
| 8332 |
| 8333 /** Type of resource. */ |
| 8334 core.String kind; |
| 8335 |
| 8336 /** A token used to continue a truncated list request (output only). */ |
| 8337 core.String nextPageToken; |
| 8338 |
| 8339 /** Server defined URL for this resource (output only). */ |
| 8340 core.String selfLink; |
| 8341 |
| 8342 |
| 8343 BackendServiceList(); |
| 8344 |
| 8345 BackendServiceList.fromJson(core.Map _json) { |
| 8346 if (_json.containsKey("id")) { |
| 8347 id = _json["id"]; |
| 8348 } |
| 8349 if (_json.containsKey("items")) { |
| 8350 items = _json["items"].map((value) => new BackendService.fromJson(value)).
toList(); |
| 8351 } |
| 8352 if (_json.containsKey("kind")) { |
| 8353 kind = _json["kind"]; |
| 8354 } |
| 8355 if (_json.containsKey("nextPageToken")) { |
| 8356 nextPageToken = _json["nextPageToken"]; |
| 8357 } |
| 8358 if (_json.containsKey("selfLink")) { |
| 8359 selfLink = _json["selfLink"]; |
| 8360 } |
| 8361 } |
| 8362 |
| 8363 core.Map toJson() { |
| 8364 var _json = new core.Map(); |
| 8365 if (id != null) { |
| 8366 _json["id"] = id; |
| 8367 } |
| 8368 if (items != null) { |
| 8369 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 8370 } |
| 8371 if (kind != null) { |
| 8372 _json["kind"] = kind; |
| 8373 } |
| 8374 if (nextPageToken != null) { |
| 8375 _json["nextPageToken"] = nextPageToken; |
| 8376 } |
| 8377 if (selfLink != null) { |
| 8378 _json["selfLink"] = selfLink; |
| 8379 } |
| 8380 return _json; |
| 8381 } |
| 8382 } |
| 8383 |
| 8384 |
| 8385 /** Deprecation status for a public resource. */ |
| 8386 class DeprecationStatus { |
| 8387 /** |
| 8388 * An optional RFC3339 timestamp on or after which the deprecation state of |
| 8389 * this resource will be changed to DELETED. |
| 8390 */ |
| 8391 core.String deleted; |
| 8392 |
| 8393 /** |
| 8394 * An optional RFC3339 timestamp on or after which the deprecation state of |
| 8395 * this resource will be changed to DEPRECATED. |
| 8396 */ |
| 8397 core.String deprecated; |
| 8398 |
| 8399 /** |
| 8400 * An optional RFC3339 timestamp on or after which the deprecation state of |
| 8401 * this resource will be changed to OBSOLETE. |
| 8402 */ |
| 8403 core.String obsolete; |
| 8404 |
| 8405 /** |
| 8406 * A URL of the suggested replacement for the deprecated resource. The |
| 8407 * deprecated resource and its replacement must be resources of the same kind. |
| 8408 */ |
| 8409 core.String replacement; |
| 8410 |
| 8411 /** |
| 8412 * The deprecation state. Can be "DEPRECATED", "OBSOLETE", or "DELETED". |
| 8413 * Operations which create a new resource using a "DEPRECATED" resource will |
| 8414 * return successfully, but with a warning indicating the deprecated resource |
| 8415 * and recommending its replacement. New uses of "OBSOLETE" or "DELETED" |
| 8416 * resources will result in an error. |
| 8417 * Possible string values are: |
| 8418 * - "DELETED" |
| 8419 * - "DEPRECATED" |
| 8420 * - "OBSOLETE" |
| 8421 */ |
| 8422 core.String state; |
| 8423 |
| 8424 |
| 8425 DeprecationStatus(); |
| 8426 |
| 8427 DeprecationStatus.fromJson(core.Map _json) { |
| 8428 if (_json.containsKey("deleted")) { |
| 8429 deleted = _json["deleted"]; |
| 8430 } |
| 8431 if (_json.containsKey("deprecated")) { |
| 8432 deprecated = _json["deprecated"]; |
| 8433 } |
| 8434 if (_json.containsKey("obsolete")) { |
| 8435 obsolete = _json["obsolete"]; |
| 8436 } |
| 8437 if (_json.containsKey("replacement")) { |
| 8438 replacement = _json["replacement"]; |
| 8439 } |
| 8440 if (_json.containsKey("state")) { |
| 8441 state = _json["state"]; |
| 8442 } |
| 8443 } |
| 8444 |
| 8445 core.Map toJson() { |
| 8446 var _json = new core.Map(); |
| 8447 if (deleted != null) { |
| 8448 _json["deleted"] = deleted; |
| 8449 } |
| 8450 if (deprecated != null) { |
| 8451 _json["deprecated"] = deprecated; |
| 8452 } |
| 8453 if (obsolete != null) { |
| 8454 _json["obsolete"] = obsolete; |
| 8455 } |
| 8456 if (replacement != null) { |
| 8457 _json["replacement"] = replacement; |
| 8458 } |
| 8459 if (state != null) { |
| 8460 _json["state"] = state; |
| 8461 } |
| 8462 return _json; |
| 8463 } |
| 8464 } |
| 8465 |
| 8466 |
| 8467 /** A persistent disk resource. */ |
| 8468 class Disk { |
| 8469 /** Creation timestamp in RFC3339 text format (output only). */ |
| 8470 core.String creationTimestamp; |
| 8471 |
| 8472 /** |
| 8473 * An optional textual description of the resource; provided by the client |
| 8474 * when the resource is created. |
| 8475 */ |
| 8476 core.String description; |
| 8477 |
| 8478 /** |
| 8479 * Unique identifier for the resource; defined by the server (output only). |
| 8480 */ |
| 8481 core.String id; |
| 8482 |
| 8483 /** Type of the resource. */ |
| 8484 core.String kind; |
| 8485 |
| 8486 /** Public visible licenses. */ |
| 8487 core.List<core.String> licenses; |
| 8488 |
| 8489 /** |
| 8490 * Name of the resource; provided by the client when the resource is created. |
| 8491 * The name must be 1-63 characters long, and comply with RFC1035. |
| 8492 */ |
| 8493 core.String name; |
| 8494 |
| 8495 /** Internal use only. */ |
| 8496 core.String options; |
| 8497 |
| 8498 /** Server defined URL for the resource (output only). */ |
| 8499 core.String selfLink; |
| 8500 |
| 8501 /** |
| 8502 * Size of the persistent disk, specified in GB. This parameter is optional |
| 8503 * when creating a disk from a disk image or a snapshot, otherwise it is |
| 8504 * required. |
| 8505 */ |
| 8506 core.String sizeGb; |
| 8507 |
| 8508 /** |
| 8509 * The source image used to create this disk. Once the source image has been |
| 8510 * deleted from the system, this field will not be set, even if an image with |
| 8511 * the same name has been re-created. |
| 8512 */ |
| 8513 core.String sourceImage; |
| 8514 |
| 8515 /** |
| 8516 * The 'id' value of the image used to create this disk. This value may be |
| 8517 * used to determine whether the disk was created from the current or a |
| 8518 * previous instance of a given image. |
| 8519 */ |
| 8520 core.String sourceImageId; |
| 8521 |
| 8522 /** |
| 8523 * The source snapshot used to create this disk. Once the source snapshot has |
| 8524 * been deleted from the system, this field will be cleared, and will not be |
| 8525 * set even if a snapshot with the same name has been re-created. |
| 8526 */ |
| 8527 core.String sourceSnapshot; |
| 8528 |
| 8529 /** |
| 8530 * The 'id' value of the snapshot used to create this disk. This value may be |
| 8531 * used to determine whether the disk was created from the current or a |
| 8532 * previous instance of a given disk snapshot. |
| 8533 */ |
| 8534 core.String sourceSnapshotId; |
| 8535 |
| 8536 /** |
| 8537 * The status of disk creation (output only). |
| 8538 * Possible string values are: |
| 8539 * - "CREATING" |
| 8540 * - "FAILED" |
| 8541 * - "READY" |
| 8542 * - "RESTORING" |
| 8543 */ |
| 8544 core.String status; |
| 8545 |
| 8546 /** |
| 8547 * URL of the disk type resource describing which disk type to use to create |
| 8548 * the disk; provided by the client when the disk is created. |
| 8549 */ |
| 8550 core.String type; |
| 8551 |
| 8552 /** URL of the zone where the disk resides (output only). */ |
| 8553 core.String zone; |
| 8554 |
| 8555 |
| 8556 Disk(); |
| 8557 |
| 8558 Disk.fromJson(core.Map _json) { |
| 8559 if (_json.containsKey("creationTimestamp")) { |
| 8560 creationTimestamp = _json["creationTimestamp"]; |
| 8561 } |
| 8562 if (_json.containsKey("description")) { |
| 8563 description = _json["description"]; |
| 8564 } |
| 8565 if (_json.containsKey("id")) { |
| 8566 id = _json["id"]; |
| 8567 } |
| 8568 if (_json.containsKey("kind")) { |
| 8569 kind = _json["kind"]; |
| 8570 } |
| 8571 if (_json.containsKey("licenses")) { |
| 8572 licenses = _json["licenses"]; |
| 8573 } |
| 8574 if (_json.containsKey("name")) { |
| 8575 name = _json["name"]; |
| 8576 } |
| 8577 if (_json.containsKey("options")) { |
| 8578 options = _json["options"]; |
| 8579 } |
| 8580 if (_json.containsKey("selfLink")) { |
| 8581 selfLink = _json["selfLink"]; |
| 8582 } |
| 8583 if (_json.containsKey("sizeGb")) { |
| 8584 sizeGb = _json["sizeGb"]; |
| 8585 } |
| 8586 if (_json.containsKey("sourceImage")) { |
| 8587 sourceImage = _json["sourceImage"]; |
| 8588 } |
| 8589 if (_json.containsKey("sourceImageId")) { |
| 8590 sourceImageId = _json["sourceImageId"]; |
| 8591 } |
| 8592 if (_json.containsKey("sourceSnapshot")) { |
| 8593 sourceSnapshot = _json["sourceSnapshot"]; |
| 8594 } |
| 8595 if (_json.containsKey("sourceSnapshotId")) { |
| 8596 sourceSnapshotId = _json["sourceSnapshotId"]; |
| 8597 } |
| 8598 if (_json.containsKey("status")) { |
| 8599 status = _json["status"]; |
| 8600 } |
| 8601 if (_json.containsKey("type")) { |
| 8602 type = _json["type"]; |
| 8603 } |
| 8604 if (_json.containsKey("zone")) { |
| 8605 zone = _json["zone"]; |
| 8606 } |
| 8607 } |
| 8608 |
| 8609 core.Map toJson() { |
| 8610 var _json = new core.Map(); |
| 8611 if (creationTimestamp != null) { |
| 8612 _json["creationTimestamp"] = creationTimestamp; |
| 8613 } |
| 8614 if (description != null) { |
| 8615 _json["description"] = description; |
| 8616 } |
| 8617 if (id != null) { |
| 8618 _json["id"] = id; |
| 8619 } |
| 8620 if (kind != null) { |
| 8621 _json["kind"] = kind; |
| 8622 } |
| 8623 if (licenses != null) { |
| 8624 _json["licenses"] = licenses; |
| 8625 } |
| 8626 if (name != null) { |
| 8627 _json["name"] = name; |
| 8628 } |
| 8629 if (options != null) { |
| 8630 _json["options"] = options; |
| 8631 } |
| 8632 if (selfLink != null) { |
| 8633 _json["selfLink"] = selfLink; |
| 8634 } |
| 8635 if (sizeGb != null) { |
| 8636 _json["sizeGb"] = sizeGb; |
| 8637 } |
| 8638 if (sourceImage != null) { |
| 8639 _json["sourceImage"] = sourceImage; |
| 8640 } |
| 8641 if (sourceImageId != null) { |
| 8642 _json["sourceImageId"] = sourceImageId; |
| 8643 } |
| 8644 if (sourceSnapshot != null) { |
| 8645 _json["sourceSnapshot"] = sourceSnapshot; |
| 8646 } |
| 8647 if (sourceSnapshotId != null) { |
| 8648 _json["sourceSnapshotId"] = sourceSnapshotId; |
| 8649 } |
| 8650 if (status != null) { |
| 8651 _json["status"] = status; |
| 8652 } |
| 8653 if (type != null) { |
| 8654 _json["type"] = type; |
| 8655 } |
| 8656 if (zone != null) { |
| 8657 _json["zone"] = zone; |
| 8658 } |
| 8659 return _json; |
| 8660 } |
| 8661 } |
| 8662 |
| 8663 |
| 8664 /** Not documented yet. */ |
| 8665 class DiskAggregatedList { |
| 8666 /** |
| 8667 * Unique identifier for the resource; defined by the server (output only). |
| 8668 */ |
| 8669 core.String id; |
| 8670 |
| 8671 /** A map of scoped disk lists. */ |
| 8672 core.Map<core.String, DisksScopedList> items; |
| 8673 |
| 8674 /** Type of resource. */ |
| 8675 core.String kind; |
| 8676 |
| 8677 /** A token used to continue a truncated list request (output only). */ |
| 8678 core.String nextPageToken; |
| 8679 |
| 8680 /** Server defined URL for this resource (output only). */ |
| 8681 core.String selfLink; |
| 8682 |
| 8683 |
| 8684 DiskAggregatedList(); |
| 8685 |
| 8686 DiskAggregatedList.fromJson(core.Map _json) { |
| 8687 if (_json.containsKey("id")) { |
| 8688 id = _json["id"]; |
| 8689 } |
| 8690 if (_json.containsKey("items")) { |
| 8691 items = common_internal.mapMap(_json["items"], (item) => new DisksScopedLi
st.fromJson(item)); |
| 8692 } |
| 8693 if (_json.containsKey("kind")) { |
| 8694 kind = _json["kind"]; |
| 8695 } |
| 8696 if (_json.containsKey("nextPageToken")) { |
| 8697 nextPageToken = _json["nextPageToken"]; |
| 8698 } |
| 8699 if (_json.containsKey("selfLink")) { |
| 8700 selfLink = _json["selfLink"]; |
| 8701 } |
| 8702 } |
| 8703 |
| 8704 core.Map toJson() { |
| 8705 var _json = new core.Map(); |
| 8706 if (id != null) { |
| 8707 _json["id"] = id; |
| 8708 } |
| 8709 if (items != null) { |
| 8710 _json["items"] = common_internal.mapMap(items, (item) => (item).toJson()); |
| 8711 } |
| 8712 if (kind != null) { |
| 8713 _json["kind"] = kind; |
| 8714 } |
| 8715 if (nextPageToken != null) { |
| 8716 _json["nextPageToken"] = nextPageToken; |
| 8717 } |
| 8718 if (selfLink != null) { |
| 8719 _json["selfLink"] = selfLink; |
| 8720 } |
| 8721 return _json; |
| 8722 } |
| 8723 } |
| 8724 |
| 8725 |
| 8726 /** Contains a list of persistent disk resources. */ |
| 8727 class DiskList { |
| 8728 /** |
| 8729 * Unique identifier for the resource; defined by the server (output only). |
| 8730 */ |
| 8731 core.String id; |
| 8732 |
| 8733 /** The persistent disk resources. */ |
| 8734 core.List<Disk> items; |
| 8735 |
| 8736 /** Type of resource. */ |
| 8737 core.String kind; |
| 8738 |
| 8739 /** A token used to continue a truncated list request (output only). */ |
| 8740 core.String nextPageToken; |
| 8741 |
| 8742 /** Server defined URL for this resource (output only). */ |
| 8743 core.String selfLink; |
| 8744 |
| 8745 |
| 8746 DiskList(); |
| 8747 |
| 8748 DiskList.fromJson(core.Map _json) { |
| 8749 if (_json.containsKey("id")) { |
| 8750 id = _json["id"]; |
| 8751 } |
| 8752 if (_json.containsKey("items")) { |
| 8753 items = _json["items"].map((value) => new Disk.fromJson(value)).toList(); |
| 8754 } |
| 8755 if (_json.containsKey("kind")) { |
| 8756 kind = _json["kind"]; |
| 8757 } |
| 8758 if (_json.containsKey("nextPageToken")) { |
| 8759 nextPageToken = _json["nextPageToken"]; |
| 8760 } |
| 8761 if (_json.containsKey("selfLink")) { |
| 8762 selfLink = _json["selfLink"]; |
| 8763 } |
| 8764 } |
| 8765 |
| 8766 core.Map toJson() { |
| 8767 var _json = new core.Map(); |
| 8768 if (id != null) { |
| 8769 _json["id"] = id; |
| 8770 } |
| 8771 if (items != null) { |
| 8772 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 8773 } |
| 8774 if (kind != null) { |
| 8775 _json["kind"] = kind; |
| 8776 } |
| 8777 if (nextPageToken != null) { |
| 8778 _json["nextPageToken"] = nextPageToken; |
| 8779 } |
| 8780 if (selfLink != null) { |
| 8781 _json["selfLink"] = selfLink; |
| 8782 } |
| 8783 return _json; |
| 8784 } |
| 8785 } |
| 8786 |
| 8787 |
| 8788 /** A disk type resource. */ |
| 8789 class DiskType { |
| 8790 /** Creation timestamp in RFC3339 text format (output only). */ |
| 8791 core.String creationTimestamp; |
| 8792 |
| 8793 /** Server defined default disk size in gb (output only). */ |
| 8794 core.String defaultDiskSizeGb; |
| 8795 |
| 8796 /** The deprecation status associated with this disk type. */ |
| 8797 DeprecationStatus deprecated; |
| 8798 |
| 8799 /** An optional textual description of the resource. */ |
| 8800 core.String description; |
| 8801 |
| 8802 /** |
| 8803 * Unique identifier for the resource; defined by the server (output only). |
| 8804 */ |
| 8805 core.String id; |
| 8806 |
| 8807 /** Type of the resource. */ |
| 8808 core.String kind; |
| 8809 |
| 8810 /** Name of the resource. */ |
| 8811 core.String name; |
| 8812 |
| 8813 /** Server defined URL for the resource (output only). */ |
| 8814 core.String selfLink; |
| 8815 |
| 8816 /** |
| 8817 * An optional textual descroption of the valid disk size, e.g., "10GB-10TB". |
| 8818 */ |
| 8819 core.String validDiskSize; |
| 8820 |
| 8821 /** Url of the zone where the disk type resides (output only). */ |
| 8822 core.String zone; |
| 8823 |
| 8824 |
| 8825 DiskType(); |
| 8826 |
| 8827 DiskType.fromJson(core.Map _json) { |
| 8828 if (_json.containsKey("creationTimestamp")) { |
| 8829 creationTimestamp = _json["creationTimestamp"]; |
| 8830 } |
| 8831 if (_json.containsKey("defaultDiskSizeGb")) { |
| 8832 defaultDiskSizeGb = _json["defaultDiskSizeGb"]; |
| 8833 } |
| 8834 if (_json.containsKey("deprecated")) { |
| 8835 deprecated = new DeprecationStatus.fromJson(_json["deprecated"]); |
| 8836 } |
| 8837 if (_json.containsKey("description")) { |
| 8838 description = _json["description"]; |
| 8839 } |
| 8840 if (_json.containsKey("id")) { |
| 8841 id = _json["id"]; |
| 8842 } |
| 8843 if (_json.containsKey("kind")) { |
| 8844 kind = _json["kind"]; |
| 8845 } |
| 8846 if (_json.containsKey("name")) { |
| 8847 name = _json["name"]; |
| 8848 } |
| 8849 if (_json.containsKey("selfLink")) { |
| 8850 selfLink = _json["selfLink"]; |
| 8851 } |
| 8852 if (_json.containsKey("validDiskSize")) { |
| 8853 validDiskSize = _json["validDiskSize"]; |
| 8854 } |
| 8855 if (_json.containsKey("zone")) { |
| 8856 zone = _json["zone"]; |
| 8857 } |
| 8858 } |
| 8859 |
| 8860 core.Map toJson() { |
| 8861 var _json = new core.Map(); |
| 8862 if (creationTimestamp != null) { |
| 8863 _json["creationTimestamp"] = creationTimestamp; |
| 8864 } |
| 8865 if (defaultDiskSizeGb != null) { |
| 8866 _json["defaultDiskSizeGb"] = defaultDiskSizeGb; |
| 8867 } |
| 8868 if (deprecated != null) { |
| 8869 _json["deprecated"] = (deprecated).toJson(); |
| 8870 } |
| 8871 if (description != null) { |
| 8872 _json["description"] = description; |
| 8873 } |
| 8874 if (id != null) { |
| 8875 _json["id"] = id; |
| 8876 } |
| 8877 if (kind != null) { |
| 8878 _json["kind"] = kind; |
| 8879 } |
| 8880 if (name != null) { |
| 8881 _json["name"] = name; |
| 8882 } |
| 8883 if (selfLink != null) { |
| 8884 _json["selfLink"] = selfLink; |
| 8885 } |
| 8886 if (validDiskSize != null) { |
| 8887 _json["validDiskSize"] = validDiskSize; |
| 8888 } |
| 8889 if (zone != null) { |
| 8890 _json["zone"] = zone; |
| 8891 } |
| 8892 return _json; |
| 8893 } |
| 8894 } |
| 8895 |
| 8896 |
| 8897 /** Not documented yet. */ |
| 8898 class DiskTypeAggregatedList { |
| 8899 /** |
| 8900 * Unique identifier for the resource; defined by the server (output only). |
| 8901 */ |
| 8902 core.String id; |
| 8903 |
| 8904 /** A map of scoped disk type lists. */ |
| 8905 core.Map<core.String, DiskTypesScopedList> items; |
| 8906 |
| 8907 /** Type of resource. */ |
| 8908 core.String kind; |
| 8909 |
| 8910 /** A token used to continue a truncated list request (output only). */ |
| 8911 core.String nextPageToken; |
| 8912 |
| 8913 /** Server defined URL for this resource (output only). */ |
| 8914 core.String selfLink; |
| 8915 |
| 8916 |
| 8917 DiskTypeAggregatedList(); |
| 8918 |
| 8919 DiskTypeAggregatedList.fromJson(core.Map _json) { |
| 8920 if (_json.containsKey("id")) { |
| 8921 id = _json["id"]; |
| 8922 } |
| 8923 if (_json.containsKey("items")) { |
| 8924 items = common_internal.mapMap(_json["items"], (item) => new DiskTypesScop
edList.fromJson(item)); |
| 8925 } |
| 8926 if (_json.containsKey("kind")) { |
| 8927 kind = _json["kind"]; |
| 8928 } |
| 8929 if (_json.containsKey("nextPageToken")) { |
| 8930 nextPageToken = _json["nextPageToken"]; |
| 8931 } |
| 8932 if (_json.containsKey("selfLink")) { |
| 8933 selfLink = _json["selfLink"]; |
| 8934 } |
| 8935 } |
| 8936 |
| 8937 core.Map toJson() { |
| 8938 var _json = new core.Map(); |
| 8939 if (id != null) { |
| 8940 _json["id"] = id; |
| 8941 } |
| 8942 if (items != null) { |
| 8943 _json["items"] = common_internal.mapMap(items, (item) => (item).toJson()); |
| 8944 } |
| 8945 if (kind != null) { |
| 8946 _json["kind"] = kind; |
| 8947 } |
| 8948 if (nextPageToken != null) { |
| 8949 _json["nextPageToken"] = nextPageToken; |
| 8950 } |
| 8951 if (selfLink != null) { |
| 8952 _json["selfLink"] = selfLink; |
| 8953 } |
| 8954 return _json; |
| 8955 } |
| 8956 } |
| 8957 |
| 8958 |
| 8959 /** Contains a list of disk type resources. */ |
| 8960 class DiskTypeList { |
| 8961 /** |
| 8962 * Unique identifier for the resource; defined by the server (output only). |
| 8963 */ |
| 8964 core.String id; |
| 8965 |
| 8966 /** The disk type resources. */ |
| 8967 core.List<DiskType> items; |
| 8968 |
| 8969 /** Type of resource. */ |
| 8970 core.String kind; |
| 8971 |
| 8972 /** A token used to continue a truncated list request (output only). */ |
| 8973 core.String nextPageToken; |
| 8974 |
| 8975 /** Server defined URL for this resource (output only). */ |
| 8976 core.String selfLink; |
| 8977 |
| 8978 |
| 8979 DiskTypeList(); |
| 8980 |
| 8981 DiskTypeList.fromJson(core.Map _json) { |
| 8982 if (_json.containsKey("id")) { |
| 8983 id = _json["id"]; |
| 8984 } |
| 8985 if (_json.containsKey("items")) { |
| 8986 items = _json["items"].map((value) => new DiskType.fromJson(value)).toList
(); |
| 8987 } |
| 8988 if (_json.containsKey("kind")) { |
| 8989 kind = _json["kind"]; |
| 8990 } |
| 8991 if (_json.containsKey("nextPageToken")) { |
| 8992 nextPageToken = _json["nextPageToken"]; |
| 8993 } |
| 8994 if (_json.containsKey("selfLink")) { |
| 8995 selfLink = _json["selfLink"]; |
| 8996 } |
| 8997 } |
| 8998 |
| 8999 core.Map toJson() { |
| 9000 var _json = new core.Map(); |
| 9001 if (id != null) { |
| 9002 _json["id"] = id; |
| 9003 } |
| 9004 if (items != null) { |
| 9005 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 9006 } |
| 9007 if (kind != null) { |
| 9008 _json["kind"] = kind; |
| 9009 } |
| 9010 if (nextPageToken != null) { |
| 9011 _json["nextPageToken"] = nextPageToken; |
| 9012 } |
| 9013 if (selfLink != null) { |
| 9014 _json["selfLink"] = selfLink; |
| 9015 } |
| 9016 return _json; |
| 9017 } |
| 9018 } |
| 9019 |
| 9020 |
| 9021 /** Not documented yet. */ |
| 9022 class DiskTypesScopedListWarningData { |
| 9023 /** A key for the warning data. */ |
| 9024 core.String key; |
| 9025 |
| 9026 /** A warning data value corresponding to the key. */ |
| 9027 core.String value; |
| 9028 |
| 9029 |
| 9030 DiskTypesScopedListWarningData(); |
| 9031 |
| 9032 DiskTypesScopedListWarningData.fromJson(core.Map _json) { |
| 9033 if (_json.containsKey("key")) { |
| 9034 key = _json["key"]; |
| 9035 } |
| 9036 if (_json.containsKey("value")) { |
| 9037 value = _json["value"]; |
| 9038 } |
| 9039 } |
| 9040 |
| 9041 core.Map toJson() { |
| 9042 var _json = new core.Map(); |
| 9043 if (key != null) { |
| 9044 _json["key"] = key; |
| 9045 } |
| 9046 if (value != null) { |
| 9047 _json["value"] = value; |
| 9048 } |
| 9049 return _json; |
| 9050 } |
| 9051 } |
| 9052 |
| 9053 |
| 9054 /** |
| 9055 * Informational warning which replaces the list of disk types when the list is |
| 9056 * empty. |
| 9057 */ |
| 9058 class DiskTypesScopedListWarning { |
| 9059 /** |
| 9060 * The warning type identifier for this warning. |
| 9061 * Possible string values are: |
| 9062 * - "DEPRECATED_RESOURCE_USED" |
| 9063 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 9064 * - "INJECTED_KERNELS_DEPRECATED" |
| 9065 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 9066 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 9067 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 9068 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 9069 * - "NEXT_HOP_NOT_RUNNING" |
| 9070 * - "NO_RESULTS_ON_PAGE" |
| 9071 * - "REQUIRED_TOS_AGREEMENT" |
| 9072 * - "RESOURCE_NOT_DELETED" |
| 9073 * - "UNREACHABLE" |
| 9074 */ |
| 9075 core.String code; |
| 9076 |
| 9077 /** Metadata for this warning in 'key: value' format. */ |
| 9078 core.List<DiskTypesScopedListWarningData> data; |
| 9079 |
| 9080 /** Optional human-readable details for this warning. */ |
| 9081 core.String message; |
| 9082 |
| 9083 |
| 9084 DiskTypesScopedListWarning(); |
| 9085 |
| 9086 DiskTypesScopedListWarning.fromJson(core.Map _json) { |
| 9087 if (_json.containsKey("code")) { |
| 9088 code = _json["code"]; |
| 9089 } |
| 9090 if (_json.containsKey("data")) { |
| 9091 data = _json["data"].map((value) => new DiskTypesScopedListWarningData.fro
mJson(value)).toList(); |
| 9092 } |
| 9093 if (_json.containsKey("message")) { |
| 9094 message = _json["message"]; |
| 9095 } |
| 9096 } |
| 9097 |
| 9098 core.Map toJson() { |
| 9099 var _json = new core.Map(); |
| 9100 if (code != null) { |
| 9101 _json["code"] = code; |
| 9102 } |
| 9103 if (data != null) { |
| 9104 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 9105 } |
| 9106 if (message != null) { |
| 9107 _json["message"] = message; |
| 9108 } |
| 9109 return _json; |
| 9110 } |
| 9111 } |
| 9112 |
| 9113 |
| 9114 /** Not documented yet. */ |
| 9115 class DiskTypesScopedList { |
| 9116 /** List of disk types contained in this scope. */ |
| 9117 core.List<DiskType> diskTypes; |
| 9118 |
| 9119 /** |
| 9120 * Informational warning which replaces the list of disk types when the list |
| 9121 * is empty. |
| 9122 */ |
| 9123 DiskTypesScopedListWarning warning; |
| 9124 |
| 9125 |
| 9126 DiskTypesScopedList(); |
| 9127 |
| 9128 DiskTypesScopedList.fromJson(core.Map _json) { |
| 9129 if (_json.containsKey("diskTypes")) { |
| 9130 diskTypes = _json["diskTypes"].map((value) => new DiskType.fromJson(value)
).toList(); |
| 9131 } |
| 9132 if (_json.containsKey("warning")) { |
| 9133 warning = new DiskTypesScopedListWarning.fromJson(_json["warning"]); |
| 9134 } |
| 9135 } |
| 9136 |
| 9137 core.Map toJson() { |
| 9138 var _json = new core.Map(); |
| 9139 if (diskTypes != null) { |
| 9140 _json["diskTypes"] = diskTypes.map((value) => (value).toJson()).toList(); |
| 9141 } |
| 9142 if (warning != null) { |
| 9143 _json["warning"] = (warning).toJson(); |
| 9144 } |
| 9145 return _json; |
| 9146 } |
| 9147 } |
| 9148 |
| 9149 |
| 9150 /** Not documented yet. */ |
| 9151 class DisksScopedListWarningData { |
| 9152 /** A key for the warning data. */ |
| 9153 core.String key; |
| 9154 |
| 9155 /** A warning data value corresponding to the key. */ |
| 9156 core.String value; |
| 9157 |
| 9158 |
| 9159 DisksScopedListWarningData(); |
| 9160 |
| 9161 DisksScopedListWarningData.fromJson(core.Map _json) { |
| 9162 if (_json.containsKey("key")) { |
| 9163 key = _json["key"]; |
| 9164 } |
| 9165 if (_json.containsKey("value")) { |
| 9166 value = _json["value"]; |
| 9167 } |
| 9168 } |
| 9169 |
| 9170 core.Map toJson() { |
| 9171 var _json = new core.Map(); |
| 9172 if (key != null) { |
| 9173 _json["key"] = key; |
| 9174 } |
| 9175 if (value != null) { |
| 9176 _json["value"] = value; |
| 9177 } |
| 9178 return _json; |
| 9179 } |
| 9180 } |
| 9181 |
| 9182 |
| 9183 /** |
| 9184 * Informational warning which replaces the list of disks when the list is |
| 9185 * empty. |
| 9186 */ |
| 9187 class DisksScopedListWarning { |
| 9188 /** |
| 9189 * The warning type identifier for this warning. |
| 9190 * Possible string values are: |
| 9191 * - "DEPRECATED_RESOURCE_USED" |
| 9192 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 9193 * - "INJECTED_KERNELS_DEPRECATED" |
| 9194 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 9195 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 9196 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 9197 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 9198 * - "NEXT_HOP_NOT_RUNNING" |
| 9199 * - "NO_RESULTS_ON_PAGE" |
| 9200 * - "REQUIRED_TOS_AGREEMENT" |
| 9201 * - "RESOURCE_NOT_DELETED" |
| 9202 * - "UNREACHABLE" |
| 9203 */ |
| 9204 core.String code; |
| 9205 |
| 9206 /** Metadata for this warning in 'key: value' format. */ |
| 9207 core.List<DisksScopedListWarningData> data; |
| 9208 |
| 9209 /** Optional human-readable details for this warning. */ |
| 9210 core.String message; |
| 9211 |
| 9212 |
| 9213 DisksScopedListWarning(); |
| 9214 |
| 9215 DisksScopedListWarning.fromJson(core.Map _json) { |
| 9216 if (_json.containsKey("code")) { |
| 9217 code = _json["code"]; |
| 9218 } |
| 9219 if (_json.containsKey("data")) { |
| 9220 data = _json["data"].map((value) => new DisksScopedListWarningData.fromJso
n(value)).toList(); |
| 9221 } |
| 9222 if (_json.containsKey("message")) { |
| 9223 message = _json["message"]; |
| 9224 } |
| 9225 } |
| 9226 |
| 9227 core.Map toJson() { |
| 9228 var _json = new core.Map(); |
| 9229 if (code != null) { |
| 9230 _json["code"] = code; |
| 9231 } |
| 9232 if (data != null) { |
| 9233 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 9234 } |
| 9235 if (message != null) { |
| 9236 _json["message"] = message; |
| 9237 } |
| 9238 return _json; |
| 9239 } |
| 9240 } |
| 9241 |
| 9242 |
| 9243 /** Not documented yet. */ |
| 9244 class DisksScopedList { |
| 9245 /** List of disks contained in this scope. */ |
| 9246 core.List<Disk> disks; |
| 9247 |
| 9248 /** |
| 9249 * Informational warning which replaces the list of disks when the list is |
| 9250 * empty. |
| 9251 */ |
| 9252 DisksScopedListWarning warning; |
| 9253 |
| 9254 |
| 9255 DisksScopedList(); |
| 9256 |
| 9257 DisksScopedList.fromJson(core.Map _json) { |
| 9258 if (_json.containsKey("disks")) { |
| 9259 disks = _json["disks"].map((value) => new Disk.fromJson(value)).toList(); |
| 9260 } |
| 9261 if (_json.containsKey("warning")) { |
| 9262 warning = new DisksScopedListWarning.fromJson(_json["warning"]); |
| 9263 } |
| 9264 } |
| 9265 |
| 9266 core.Map toJson() { |
| 9267 var _json = new core.Map(); |
| 9268 if (disks != null) { |
| 9269 _json["disks"] = disks.map((value) => (value).toJson()).toList(); |
| 9270 } |
| 9271 if (warning != null) { |
| 9272 _json["warning"] = (warning).toJson(); |
| 9273 } |
| 9274 return _json; |
| 9275 } |
| 9276 } |
| 9277 |
| 9278 |
| 9279 /** Not documented yet. */ |
| 9280 class FirewallAllowed { |
| 9281 /** |
| 9282 * Required; this is the IP protocol that is allowed for this rule. This can |
| 9283 * either be one of the following well known protocol strings ["tcp", "udp", |
| 9284 * "icmp", "esp", "ah", "sctp"], or the IP protocol number. |
| 9285 */ |
| 9286 core.String IPProtocol; |
| 9287 |
| 9288 /** |
| 9289 * An optional list of ports which are allowed. It is an error to specify this |
| 9290 * for any protocol that isn't UDP or TCP. Each entry must be either an |
| 9291 * integer or a range. If not specified, connections through any port are |
| 9292 * allowed. |
| 9293 * |
| 9294 * Example inputs include: ["22"], ["80","443"] and ["12345-12349"]. |
| 9295 */ |
| 9296 core.List<core.String> ports; |
| 9297 |
| 9298 |
| 9299 FirewallAllowed(); |
| 9300 |
| 9301 FirewallAllowed.fromJson(core.Map _json) { |
| 9302 if (_json.containsKey("IPProtocol")) { |
| 9303 IPProtocol = _json["IPProtocol"]; |
| 9304 } |
| 9305 if (_json.containsKey("ports")) { |
| 9306 ports = _json["ports"]; |
| 9307 } |
| 9308 } |
| 9309 |
| 9310 core.Map toJson() { |
| 9311 var _json = new core.Map(); |
| 9312 if (IPProtocol != null) { |
| 9313 _json["IPProtocol"] = IPProtocol; |
| 9314 } |
| 9315 if (ports != null) { |
| 9316 _json["ports"] = ports; |
| 9317 } |
| 9318 return _json; |
| 9319 } |
| 9320 } |
| 9321 |
| 9322 |
| 9323 /** A firewall resource. */ |
| 9324 class Firewall { |
| 9325 /** |
| 9326 * The list of rules specified by this firewall. Each rule specifies a |
| 9327 * protocol and port-range tuple that describes a permitted connection. |
| 9328 */ |
| 9329 core.List<FirewallAllowed> allowed; |
| 9330 |
| 9331 /** Creation timestamp in RFC3339 text format (output only). */ |
| 9332 core.String creationTimestamp; |
| 9333 |
| 9334 /** |
| 9335 * An optional textual description of the resource; provided by the client |
| 9336 * when the resource is created. |
| 9337 */ |
| 9338 core.String description; |
| 9339 |
| 9340 /** |
| 9341 * Unique identifier for the resource; defined by the server (output only). |
| 9342 */ |
| 9343 core.String id; |
| 9344 |
| 9345 /** Type of the resource. */ |
| 9346 core.String kind; |
| 9347 |
| 9348 /** |
| 9349 * Name of the resource; provided by the client when the resource is created. |
| 9350 * The name must be 1-63 characters long, and comply with RFC1035. |
| 9351 */ |
| 9352 core.String name; |
| 9353 |
| 9354 /** |
| 9355 * URL of the network to which this firewall is applied; provided by the |
| 9356 * client when the firewall is created. |
| 9357 */ |
| 9358 core.String network; |
| 9359 |
| 9360 /** Server defined URL for the resource (output only). */ |
| 9361 core.String selfLink; |
| 9362 |
| 9363 /** |
| 9364 * A list of IP address blocks expressed in CIDR format which this rule |
| 9365 * applies to. One or both of sourceRanges and sourceTags may be set; an |
| 9366 * inbound connection is allowed if either the range or the tag of the source |
| 9367 * matches. |
| 9368 */ |
| 9369 core.List<core.String> sourceRanges; |
| 9370 |
| 9371 /** |
| 9372 * A list of instance tags which this rule applies to. One or both of |
| 9373 * sourceRanges and sourceTags may be set; an inbound connection is allowed if |
| 9374 * either the range or the tag of the source matches. |
| 9375 */ |
| 9376 core.List<core.String> sourceTags; |
| 9377 |
| 9378 /** |
| 9379 * A list of instance tags indicating sets of instances located on network |
| 9380 * which may make network connections as specified in allowed. If no |
| 9381 * targetTags are specified, the firewall rule applies to all instances on the |
| 9382 * specified network. |
| 9383 */ |
| 9384 core.List<core.String> targetTags; |
| 9385 |
| 9386 |
| 9387 Firewall(); |
| 9388 |
| 9389 Firewall.fromJson(core.Map _json) { |
| 9390 if (_json.containsKey("allowed")) { |
| 9391 allowed = _json["allowed"].map((value) => new FirewallAllowed.fromJson(val
ue)).toList(); |
| 9392 } |
| 9393 if (_json.containsKey("creationTimestamp")) { |
| 9394 creationTimestamp = _json["creationTimestamp"]; |
| 9395 } |
| 9396 if (_json.containsKey("description")) { |
| 9397 description = _json["description"]; |
| 9398 } |
| 9399 if (_json.containsKey("id")) { |
| 9400 id = _json["id"]; |
| 9401 } |
| 9402 if (_json.containsKey("kind")) { |
| 9403 kind = _json["kind"]; |
| 9404 } |
| 9405 if (_json.containsKey("name")) { |
| 9406 name = _json["name"]; |
| 9407 } |
| 9408 if (_json.containsKey("network")) { |
| 9409 network = _json["network"]; |
| 9410 } |
| 9411 if (_json.containsKey("selfLink")) { |
| 9412 selfLink = _json["selfLink"]; |
| 9413 } |
| 9414 if (_json.containsKey("sourceRanges")) { |
| 9415 sourceRanges = _json["sourceRanges"]; |
| 9416 } |
| 9417 if (_json.containsKey("sourceTags")) { |
| 9418 sourceTags = _json["sourceTags"]; |
| 9419 } |
| 9420 if (_json.containsKey("targetTags")) { |
| 9421 targetTags = _json["targetTags"]; |
| 9422 } |
| 9423 } |
| 9424 |
| 9425 core.Map toJson() { |
| 9426 var _json = new core.Map(); |
| 9427 if (allowed != null) { |
| 9428 _json["allowed"] = allowed.map((value) => (value).toJson()).toList(); |
| 9429 } |
| 9430 if (creationTimestamp != null) { |
| 9431 _json["creationTimestamp"] = creationTimestamp; |
| 9432 } |
| 9433 if (description != null) { |
| 9434 _json["description"] = description; |
| 9435 } |
| 9436 if (id != null) { |
| 9437 _json["id"] = id; |
| 9438 } |
| 9439 if (kind != null) { |
| 9440 _json["kind"] = kind; |
| 9441 } |
| 9442 if (name != null) { |
| 9443 _json["name"] = name; |
| 9444 } |
| 9445 if (network != null) { |
| 9446 _json["network"] = network; |
| 9447 } |
| 9448 if (selfLink != null) { |
| 9449 _json["selfLink"] = selfLink; |
| 9450 } |
| 9451 if (sourceRanges != null) { |
| 9452 _json["sourceRanges"] = sourceRanges; |
| 9453 } |
| 9454 if (sourceTags != null) { |
| 9455 _json["sourceTags"] = sourceTags; |
| 9456 } |
| 9457 if (targetTags != null) { |
| 9458 _json["targetTags"] = targetTags; |
| 9459 } |
| 9460 return _json; |
| 9461 } |
| 9462 } |
| 9463 |
| 9464 |
| 9465 /** Contains a list of firewall resources. */ |
| 9466 class FirewallList { |
| 9467 /** |
| 9468 * Unique identifier for the resource; defined by the server (output only). |
| 9469 */ |
| 9470 core.String id; |
| 9471 |
| 9472 /** The firewall resources. */ |
| 9473 core.List<Firewall> items; |
| 9474 |
| 9475 /** Type of resource. */ |
| 9476 core.String kind; |
| 9477 |
| 9478 /** A token used to continue a truncated list request (output only). */ |
| 9479 core.String nextPageToken; |
| 9480 |
| 9481 /** Server defined URL for this resource (output only). */ |
| 9482 core.String selfLink; |
| 9483 |
| 9484 |
| 9485 FirewallList(); |
| 9486 |
| 9487 FirewallList.fromJson(core.Map _json) { |
| 9488 if (_json.containsKey("id")) { |
| 9489 id = _json["id"]; |
| 9490 } |
| 9491 if (_json.containsKey("items")) { |
| 9492 items = _json["items"].map((value) => new Firewall.fromJson(value)).toList
(); |
| 9493 } |
| 9494 if (_json.containsKey("kind")) { |
| 9495 kind = _json["kind"]; |
| 9496 } |
| 9497 if (_json.containsKey("nextPageToken")) { |
| 9498 nextPageToken = _json["nextPageToken"]; |
| 9499 } |
| 9500 if (_json.containsKey("selfLink")) { |
| 9501 selfLink = _json["selfLink"]; |
| 9502 } |
| 9503 } |
| 9504 |
| 9505 core.Map toJson() { |
| 9506 var _json = new core.Map(); |
| 9507 if (id != null) { |
| 9508 _json["id"] = id; |
| 9509 } |
| 9510 if (items != null) { |
| 9511 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 9512 } |
| 9513 if (kind != null) { |
| 9514 _json["kind"] = kind; |
| 9515 } |
| 9516 if (nextPageToken != null) { |
| 9517 _json["nextPageToken"] = nextPageToken; |
| 9518 } |
| 9519 if (selfLink != null) { |
| 9520 _json["selfLink"] = selfLink; |
| 9521 } |
| 9522 return _json; |
| 9523 } |
| 9524 } |
| 9525 |
| 9526 |
| 9527 /** |
| 9528 * A ForwardingRule resource. A ForwardingRule resource specifies which pool of |
| 9529 * target VMs to forward a packet to if it matches the given [IPAddress, |
| 9530 * IPProtocol, portRange] tuple. |
| 9531 */ |
| 9532 class ForwardingRule { |
| 9533 /** |
| 9534 * Value of the reserved IP address that this forwarding rule is serving on |
| 9535 * behalf of. For global forwarding rules, the address must be a global IP; |
| 9536 * for regional forwarding rules, the address must live in the same region as |
| 9537 * the forwarding rule. If left empty (default value), an ephemeral IP from |
| 9538 * the same scope (global or regional) will be assigned. |
| 9539 */ |
| 9540 core.String IPAddress; |
| 9541 |
| 9542 /** |
| 9543 * The IP protocol to which this rule applies, valid options are 'TCP', 'UDP', |
| 9544 * 'ESP', 'AH' or 'SCTP'. |
| 9545 * Possible string values are: |
| 9546 * - "AH" |
| 9547 * - "ESP" |
| 9548 * - "SCTP" |
| 9549 * - "TCP" |
| 9550 * - "UDP" |
| 9551 */ |
| 9552 core.String IPProtocol; |
| 9553 |
| 9554 /** Creation timestamp in RFC3339 text format (output only). */ |
| 9555 core.String creationTimestamp; |
| 9556 |
| 9557 /** |
| 9558 * An optional textual description of the resource; provided by the client |
| 9559 * when the resource is created. |
| 9560 */ |
| 9561 core.String description; |
| 9562 |
| 9563 /** |
| 9564 * Unique identifier for the resource; defined by the server (output only). |
| 9565 */ |
| 9566 core.String id; |
| 9567 |
| 9568 /** Type of the resource. */ |
| 9569 core.String kind; |
| 9570 |
| 9571 /** |
| 9572 * Name of the resource; provided by the client when the resource is created. |
| 9573 * The name must be 1-63 characters long, and comply with RFC1035. |
| 9574 */ |
| 9575 core.String name; |
| 9576 |
| 9577 /** |
| 9578 * Applicable only when 'IPProtocol' is 'TCP', 'UDP' or 'SCTP', only packets |
| 9579 * addressed to ports in the specified range will be forwarded to 'target'. If |
| 9580 * 'portRange' is left empty (default value), all ports are forwarded. |
| 9581 * Forwarding rules with the same [IPAddress, IPProtocol] pair must have |
| 9582 * disjoint port ranges. |
| 9583 */ |
| 9584 core.String portRange; |
| 9585 |
| 9586 /** |
| 9587 * URL of the region where the regional forwarding rule resides (output only). |
| 9588 * This field is not applicable to global forwarding rules. |
| 9589 */ |
| 9590 core.String region; |
| 9591 |
| 9592 /** Server defined URL for the resource (output only). */ |
| 9593 core.String selfLink; |
| 9594 |
| 9595 /** |
| 9596 * The URL of the target resource to receive the matched traffic. For regional |
| 9597 * forwarding rules, this target must live in the same region as the |
| 9598 * forwarding rule. For global forwarding rules, this target must be a global |
| 9599 * TargetHttpProxy resource. |
| 9600 */ |
| 9601 core.String target; |
| 9602 |
| 9603 |
| 9604 ForwardingRule(); |
| 9605 |
| 9606 ForwardingRule.fromJson(core.Map _json) { |
| 9607 if (_json.containsKey("IPAddress")) { |
| 9608 IPAddress = _json["IPAddress"]; |
| 9609 } |
| 9610 if (_json.containsKey("IPProtocol")) { |
| 9611 IPProtocol = _json["IPProtocol"]; |
| 9612 } |
| 9613 if (_json.containsKey("creationTimestamp")) { |
| 9614 creationTimestamp = _json["creationTimestamp"]; |
| 9615 } |
| 9616 if (_json.containsKey("description")) { |
| 9617 description = _json["description"]; |
| 9618 } |
| 9619 if (_json.containsKey("id")) { |
| 9620 id = _json["id"]; |
| 9621 } |
| 9622 if (_json.containsKey("kind")) { |
| 9623 kind = _json["kind"]; |
| 9624 } |
| 9625 if (_json.containsKey("name")) { |
| 9626 name = _json["name"]; |
| 9627 } |
| 9628 if (_json.containsKey("portRange")) { |
| 9629 portRange = _json["portRange"]; |
| 9630 } |
| 9631 if (_json.containsKey("region")) { |
| 9632 region = _json["region"]; |
| 9633 } |
| 9634 if (_json.containsKey("selfLink")) { |
| 9635 selfLink = _json["selfLink"]; |
| 9636 } |
| 9637 if (_json.containsKey("target")) { |
| 9638 target = _json["target"]; |
| 9639 } |
| 9640 } |
| 9641 |
| 9642 core.Map toJson() { |
| 9643 var _json = new core.Map(); |
| 9644 if (IPAddress != null) { |
| 9645 _json["IPAddress"] = IPAddress; |
| 9646 } |
| 9647 if (IPProtocol != null) { |
| 9648 _json["IPProtocol"] = IPProtocol; |
| 9649 } |
| 9650 if (creationTimestamp != null) { |
| 9651 _json["creationTimestamp"] = creationTimestamp; |
| 9652 } |
| 9653 if (description != null) { |
| 9654 _json["description"] = description; |
| 9655 } |
| 9656 if (id != null) { |
| 9657 _json["id"] = id; |
| 9658 } |
| 9659 if (kind != null) { |
| 9660 _json["kind"] = kind; |
| 9661 } |
| 9662 if (name != null) { |
| 9663 _json["name"] = name; |
| 9664 } |
| 9665 if (portRange != null) { |
| 9666 _json["portRange"] = portRange; |
| 9667 } |
| 9668 if (region != null) { |
| 9669 _json["region"] = region; |
| 9670 } |
| 9671 if (selfLink != null) { |
| 9672 _json["selfLink"] = selfLink; |
| 9673 } |
| 9674 if (target != null) { |
| 9675 _json["target"] = target; |
| 9676 } |
| 9677 return _json; |
| 9678 } |
| 9679 } |
| 9680 |
| 9681 |
| 9682 /** Not documented yet. */ |
| 9683 class ForwardingRuleAggregatedList { |
| 9684 /** |
| 9685 * Unique identifier for the resource; defined by the server (output only). |
| 9686 */ |
| 9687 core.String id; |
| 9688 |
| 9689 /** A map of scoped forwarding rule lists. */ |
| 9690 core.Map<core.String, ForwardingRulesScopedList> items; |
| 9691 |
| 9692 /** Type of resource. */ |
| 9693 core.String kind; |
| 9694 |
| 9695 /** A token used to continue a truncated list request (output only). */ |
| 9696 core.String nextPageToken; |
| 9697 |
| 9698 /** Server defined URL for this resource (output only). */ |
| 9699 core.String selfLink; |
| 9700 |
| 9701 |
| 9702 ForwardingRuleAggregatedList(); |
| 9703 |
| 9704 ForwardingRuleAggregatedList.fromJson(core.Map _json) { |
| 9705 if (_json.containsKey("id")) { |
| 9706 id = _json["id"]; |
| 9707 } |
| 9708 if (_json.containsKey("items")) { |
| 9709 items = common_internal.mapMap(_json["items"], (item) => new ForwardingRul
esScopedList.fromJson(item)); |
| 9710 } |
| 9711 if (_json.containsKey("kind")) { |
| 9712 kind = _json["kind"]; |
| 9713 } |
| 9714 if (_json.containsKey("nextPageToken")) { |
| 9715 nextPageToken = _json["nextPageToken"]; |
| 9716 } |
| 9717 if (_json.containsKey("selfLink")) { |
| 9718 selfLink = _json["selfLink"]; |
| 9719 } |
| 9720 } |
| 9721 |
| 9722 core.Map toJson() { |
| 9723 var _json = new core.Map(); |
| 9724 if (id != null) { |
| 9725 _json["id"] = id; |
| 9726 } |
| 9727 if (items != null) { |
| 9728 _json["items"] = common_internal.mapMap(items, (item) => (item).toJson()); |
| 9729 } |
| 9730 if (kind != null) { |
| 9731 _json["kind"] = kind; |
| 9732 } |
| 9733 if (nextPageToken != null) { |
| 9734 _json["nextPageToken"] = nextPageToken; |
| 9735 } |
| 9736 if (selfLink != null) { |
| 9737 _json["selfLink"] = selfLink; |
| 9738 } |
| 9739 return _json; |
| 9740 } |
| 9741 } |
| 9742 |
| 9743 |
| 9744 /** Contains a list of ForwardingRule resources. */ |
| 9745 class ForwardingRuleList { |
| 9746 /** |
| 9747 * Unique identifier for the resource; defined by the server (output only). |
| 9748 */ |
| 9749 core.String id; |
| 9750 |
| 9751 /** The ForwardingRule resources. */ |
| 9752 core.List<ForwardingRule> items; |
| 9753 |
| 9754 /** Type of resource. */ |
| 9755 core.String kind; |
| 9756 |
| 9757 /** A token used to continue a truncated list request (output only). */ |
| 9758 core.String nextPageToken; |
| 9759 |
| 9760 /** Server defined URL for this resource (output only). */ |
| 9761 core.String selfLink; |
| 9762 |
| 9763 |
| 9764 ForwardingRuleList(); |
| 9765 |
| 9766 ForwardingRuleList.fromJson(core.Map _json) { |
| 9767 if (_json.containsKey("id")) { |
| 9768 id = _json["id"]; |
| 9769 } |
| 9770 if (_json.containsKey("items")) { |
| 9771 items = _json["items"].map((value) => new ForwardingRule.fromJson(value)).
toList(); |
| 9772 } |
| 9773 if (_json.containsKey("kind")) { |
| 9774 kind = _json["kind"]; |
| 9775 } |
| 9776 if (_json.containsKey("nextPageToken")) { |
| 9777 nextPageToken = _json["nextPageToken"]; |
| 9778 } |
| 9779 if (_json.containsKey("selfLink")) { |
| 9780 selfLink = _json["selfLink"]; |
| 9781 } |
| 9782 } |
| 9783 |
| 9784 core.Map toJson() { |
| 9785 var _json = new core.Map(); |
| 9786 if (id != null) { |
| 9787 _json["id"] = id; |
| 9788 } |
| 9789 if (items != null) { |
| 9790 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 9791 } |
| 9792 if (kind != null) { |
| 9793 _json["kind"] = kind; |
| 9794 } |
| 9795 if (nextPageToken != null) { |
| 9796 _json["nextPageToken"] = nextPageToken; |
| 9797 } |
| 9798 if (selfLink != null) { |
| 9799 _json["selfLink"] = selfLink; |
| 9800 } |
| 9801 return _json; |
| 9802 } |
| 9803 } |
| 9804 |
| 9805 |
| 9806 /** Not documented yet. */ |
| 9807 class ForwardingRulesScopedListWarningData { |
| 9808 /** A key for the warning data. */ |
| 9809 core.String key; |
| 9810 |
| 9811 /** A warning data value corresponding to the key. */ |
| 9812 core.String value; |
| 9813 |
| 9814 |
| 9815 ForwardingRulesScopedListWarningData(); |
| 9816 |
| 9817 ForwardingRulesScopedListWarningData.fromJson(core.Map _json) { |
| 9818 if (_json.containsKey("key")) { |
| 9819 key = _json["key"]; |
| 9820 } |
| 9821 if (_json.containsKey("value")) { |
| 9822 value = _json["value"]; |
| 9823 } |
| 9824 } |
| 9825 |
| 9826 core.Map toJson() { |
| 9827 var _json = new core.Map(); |
| 9828 if (key != null) { |
| 9829 _json["key"] = key; |
| 9830 } |
| 9831 if (value != null) { |
| 9832 _json["value"] = value; |
| 9833 } |
| 9834 return _json; |
| 9835 } |
| 9836 } |
| 9837 |
| 9838 |
| 9839 /** |
| 9840 * Informational warning which replaces the list of forwarding rules when the |
| 9841 * list is empty. |
| 9842 */ |
| 9843 class ForwardingRulesScopedListWarning { |
| 9844 /** |
| 9845 * The warning type identifier for this warning. |
| 9846 * Possible string values are: |
| 9847 * - "DEPRECATED_RESOURCE_USED" |
| 9848 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 9849 * - "INJECTED_KERNELS_DEPRECATED" |
| 9850 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 9851 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 9852 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 9853 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 9854 * - "NEXT_HOP_NOT_RUNNING" |
| 9855 * - "NO_RESULTS_ON_PAGE" |
| 9856 * - "REQUIRED_TOS_AGREEMENT" |
| 9857 * - "RESOURCE_NOT_DELETED" |
| 9858 * - "UNREACHABLE" |
| 9859 */ |
| 9860 core.String code; |
| 9861 |
| 9862 /** Metadata for this warning in 'key: value' format. */ |
| 9863 core.List<ForwardingRulesScopedListWarningData> data; |
| 9864 |
| 9865 /** Optional human-readable details for this warning. */ |
| 9866 core.String message; |
| 9867 |
| 9868 |
| 9869 ForwardingRulesScopedListWarning(); |
| 9870 |
| 9871 ForwardingRulesScopedListWarning.fromJson(core.Map _json) { |
| 9872 if (_json.containsKey("code")) { |
| 9873 code = _json["code"]; |
| 9874 } |
| 9875 if (_json.containsKey("data")) { |
| 9876 data = _json["data"].map((value) => new ForwardingRulesScopedListWarningDa
ta.fromJson(value)).toList(); |
| 9877 } |
| 9878 if (_json.containsKey("message")) { |
| 9879 message = _json["message"]; |
| 9880 } |
| 9881 } |
| 9882 |
| 9883 core.Map toJson() { |
| 9884 var _json = new core.Map(); |
| 9885 if (code != null) { |
| 9886 _json["code"] = code; |
| 9887 } |
| 9888 if (data != null) { |
| 9889 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 9890 } |
| 9891 if (message != null) { |
| 9892 _json["message"] = message; |
| 9893 } |
| 9894 return _json; |
| 9895 } |
| 9896 } |
| 9897 |
| 9898 |
| 9899 /** Not documented yet. */ |
| 9900 class ForwardingRulesScopedList { |
| 9901 /** List of forwarding rules contained in this scope. */ |
| 9902 core.List<ForwardingRule> forwardingRules; |
| 9903 |
| 9904 /** |
| 9905 * Informational warning which replaces the list of forwarding rules when the |
| 9906 * list is empty. |
| 9907 */ |
| 9908 ForwardingRulesScopedListWarning warning; |
| 9909 |
| 9910 |
| 9911 ForwardingRulesScopedList(); |
| 9912 |
| 9913 ForwardingRulesScopedList.fromJson(core.Map _json) { |
| 9914 if (_json.containsKey("forwardingRules")) { |
| 9915 forwardingRules = _json["forwardingRules"].map((value) => new ForwardingRu
le.fromJson(value)).toList(); |
| 9916 } |
| 9917 if (_json.containsKey("warning")) { |
| 9918 warning = new ForwardingRulesScopedListWarning.fromJson(_json["warning"]); |
| 9919 } |
| 9920 } |
| 9921 |
| 9922 core.Map toJson() { |
| 9923 var _json = new core.Map(); |
| 9924 if (forwardingRules != null) { |
| 9925 _json["forwardingRules"] = forwardingRules.map((value) => (value).toJson()
).toList(); |
| 9926 } |
| 9927 if (warning != null) { |
| 9928 _json["warning"] = (warning).toJson(); |
| 9929 } |
| 9930 return _json; |
| 9931 } |
| 9932 } |
| 9933 |
| 9934 |
| 9935 /** Not documented yet. */ |
| 9936 class HealthCheckReference { |
| 9937 /** Not documented yet. */ |
| 9938 core.String healthCheck; |
| 9939 |
| 9940 |
| 9941 HealthCheckReference(); |
| 9942 |
| 9943 HealthCheckReference.fromJson(core.Map _json) { |
| 9944 if (_json.containsKey("healthCheck")) { |
| 9945 healthCheck = _json["healthCheck"]; |
| 9946 } |
| 9947 } |
| 9948 |
| 9949 core.Map toJson() { |
| 9950 var _json = new core.Map(); |
| 9951 if (healthCheck != null) { |
| 9952 _json["healthCheck"] = healthCheck; |
| 9953 } |
| 9954 return _json; |
| 9955 } |
| 9956 } |
| 9957 |
| 9958 |
| 9959 /** Not documented yet. */ |
| 9960 class HealthStatus { |
| 9961 /** |
| 9962 * Health state of the instance. |
| 9963 * Possible string values are: |
| 9964 * - "HEALTHY" |
| 9965 * - "UNHEALTHY" |
| 9966 */ |
| 9967 core.String healthState; |
| 9968 |
| 9969 /** URL of the instance resource. */ |
| 9970 core.String instance; |
| 9971 |
| 9972 /** The IP address represented by this resource. */ |
| 9973 core.String ipAddress; |
| 9974 |
| 9975 /** The port on the instance. */ |
| 9976 core.int port; |
| 9977 |
| 9978 |
| 9979 HealthStatus(); |
| 9980 |
| 9981 HealthStatus.fromJson(core.Map _json) { |
| 9982 if (_json.containsKey("healthState")) { |
| 9983 healthState = _json["healthState"]; |
| 9984 } |
| 9985 if (_json.containsKey("instance")) { |
| 9986 instance = _json["instance"]; |
| 9987 } |
| 9988 if (_json.containsKey("ipAddress")) { |
| 9989 ipAddress = _json["ipAddress"]; |
| 9990 } |
| 9991 if (_json.containsKey("port")) { |
| 9992 port = _json["port"]; |
| 9993 } |
| 9994 } |
| 9995 |
| 9996 core.Map toJson() { |
| 9997 var _json = new core.Map(); |
| 9998 if (healthState != null) { |
| 9999 _json["healthState"] = healthState; |
| 10000 } |
| 10001 if (instance != null) { |
| 10002 _json["instance"] = instance; |
| 10003 } |
| 10004 if (ipAddress != null) { |
| 10005 _json["ipAddress"] = ipAddress; |
| 10006 } |
| 10007 if (port != null) { |
| 10008 _json["port"] = port; |
| 10009 } |
| 10010 return _json; |
| 10011 } |
| 10012 } |
| 10013 |
| 10014 |
| 10015 /** |
| 10016 * A host-matching rule for a URL. If matched, will use the named PathMatcher to |
| 10017 * select the BackendService. |
| 10018 */ |
| 10019 class HostRule { |
| 10020 /** Not documented yet. */ |
| 10021 core.String description; |
| 10022 |
| 10023 /** |
| 10024 * The list of host patterns to match. They must be valid hostnames except |
| 10025 * that they may start with *. or *-. The * acts like a glob and will match |
| 10026 * any string of atoms (separated by .s and -s) to the left. |
| 10027 */ |
| 10028 core.List<core.String> hosts; |
| 10029 |
| 10030 /** |
| 10031 * The name of the PathMatcher to match the path portion of the URL, if the |
| 10032 * this HostRule matches the URL's host portion. |
| 10033 */ |
| 10034 core.String pathMatcher; |
| 10035 |
| 10036 |
| 10037 HostRule(); |
| 10038 |
| 10039 HostRule.fromJson(core.Map _json) { |
| 10040 if (_json.containsKey("description")) { |
| 10041 description = _json["description"]; |
| 10042 } |
| 10043 if (_json.containsKey("hosts")) { |
| 10044 hosts = _json["hosts"]; |
| 10045 } |
| 10046 if (_json.containsKey("pathMatcher")) { |
| 10047 pathMatcher = _json["pathMatcher"]; |
| 10048 } |
| 10049 } |
| 10050 |
| 10051 core.Map toJson() { |
| 10052 var _json = new core.Map(); |
| 10053 if (description != null) { |
| 10054 _json["description"] = description; |
| 10055 } |
| 10056 if (hosts != null) { |
| 10057 _json["hosts"] = hosts; |
| 10058 } |
| 10059 if (pathMatcher != null) { |
| 10060 _json["pathMatcher"] = pathMatcher; |
| 10061 } |
| 10062 return _json; |
| 10063 } |
| 10064 } |
| 10065 |
| 10066 |
| 10067 /** |
| 10068 * An HttpHealthCheck resource. This resource defines a template for how |
| 10069 * individual VMs should be checked for health, via HTTP. |
| 10070 */ |
| 10071 class HttpHealthCheck { |
| 10072 /** |
| 10073 * How often (in seconds) to send a health check. The default value is 5 |
| 10074 * seconds. |
| 10075 */ |
| 10076 core.int checkIntervalSec; |
| 10077 |
| 10078 /** Creation timestamp in RFC3339 text format (output only). */ |
| 10079 core.String creationTimestamp; |
| 10080 |
| 10081 /** |
| 10082 * An optional textual description of the resource; provided by the client |
| 10083 * when the resource is created. |
| 10084 */ |
| 10085 core.String description; |
| 10086 |
| 10087 /** |
| 10088 * A so-far unhealthy VM will be marked healthy after this many consecutive |
| 10089 * successes. The default value is 2. |
| 10090 */ |
| 10091 core.int healthyThreshold; |
| 10092 |
| 10093 /** |
| 10094 * The value of the host header in the HTTP health check request. If left |
| 10095 * empty (default value), the public IP on behalf of which this health check |
| 10096 * is performed will be used. |
| 10097 */ |
| 10098 core.String host; |
| 10099 |
| 10100 /** |
| 10101 * Unique identifier for the resource; defined by the server (output only). |
| 10102 */ |
| 10103 core.String id; |
| 10104 |
| 10105 /** Type of the resource. */ |
| 10106 core.String kind; |
| 10107 |
| 10108 /** |
| 10109 * Name of the resource; provided by the client when the resource is created. |
| 10110 * The name must be 1-63 characters long, and comply with RFC1035. |
| 10111 */ |
| 10112 core.String name; |
| 10113 |
| 10114 /** |
| 10115 * The TCP port number for the HTTP health check request. The default value is |
| 10116 * 80. |
| 10117 */ |
| 10118 core.int port; |
| 10119 |
| 10120 /** |
| 10121 * The request path of the HTTP health check request. The default value is |
| 10122 * "/". |
| 10123 */ |
| 10124 core.String requestPath; |
| 10125 |
| 10126 /** Server defined URL for the resource (output only). */ |
| 10127 core.String selfLink; |
| 10128 |
| 10129 /** |
| 10130 * How long (in seconds) to wait before claiming failure. The default value is |
| 10131 * 5 seconds. |
| 10132 */ |
| 10133 core.int timeoutSec; |
| 10134 |
| 10135 /** |
| 10136 * A so-far healthy VM will be marked unhealthy after this many consecutive |
| 10137 * failures. The default value is 2. |
| 10138 */ |
| 10139 core.int unhealthyThreshold; |
| 10140 |
| 10141 |
| 10142 HttpHealthCheck(); |
| 10143 |
| 10144 HttpHealthCheck.fromJson(core.Map _json) { |
| 10145 if (_json.containsKey("checkIntervalSec")) { |
| 10146 checkIntervalSec = _json["checkIntervalSec"]; |
| 10147 } |
| 10148 if (_json.containsKey("creationTimestamp")) { |
| 10149 creationTimestamp = _json["creationTimestamp"]; |
| 10150 } |
| 10151 if (_json.containsKey("description")) { |
| 10152 description = _json["description"]; |
| 10153 } |
| 10154 if (_json.containsKey("healthyThreshold")) { |
| 10155 healthyThreshold = _json["healthyThreshold"]; |
| 10156 } |
| 10157 if (_json.containsKey("host")) { |
| 10158 host = _json["host"]; |
| 10159 } |
| 10160 if (_json.containsKey("id")) { |
| 10161 id = _json["id"]; |
| 10162 } |
| 10163 if (_json.containsKey("kind")) { |
| 10164 kind = _json["kind"]; |
| 10165 } |
| 10166 if (_json.containsKey("name")) { |
| 10167 name = _json["name"]; |
| 10168 } |
| 10169 if (_json.containsKey("port")) { |
| 10170 port = _json["port"]; |
| 10171 } |
| 10172 if (_json.containsKey("requestPath")) { |
| 10173 requestPath = _json["requestPath"]; |
| 10174 } |
| 10175 if (_json.containsKey("selfLink")) { |
| 10176 selfLink = _json["selfLink"]; |
| 10177 } |
| 10178 if (_json.containsKey("timeoutSec")) { |
| 10179 timeoutSec = _json["timeoutSec"]; |
| 10180 } |
| 10181 if (_json.containsKey("unhealthyThreshold")) { |
| 10182 unhealthyThreshold = _json["unhealthyThreshold"]; |
| 10183 } |
| 10184 } |
| 10185 |
| 10186 core.Map toJson() { |
| 10187 var _json = new core.Map(); |
| 10188 if (checkIntervalSec != null) { |
| 10189 _json["checkIntervalSec"] = checkIntervalSec; |
| 10190 } |
| 10191 if (creationTimestamp != null) { |
| 10192 _json["creationTimestamp"] = creationTimestamp; |
| 10193 } |
| 10194 if (description != null) { |
| 10195 _json["description"] = description; |
| 10196 } |
| 10197 if (healthyThreshold != null) { |
| 10198 _json["healthyThreshold"] = healthyThreshold; |
| 10199 } |
| 10200 if (host != null) { |
| 10201 _json["host"] = host; |
| 10202 } |
| 10203 if (id != null) { |
| 10204 _json["id"] = id; |
| 10205 } |
| 10206 if (kind != null) { |
| 10207 _json["kind"] = kind; |
| 10208 } |
| 10209 if (name != null) { |
| 10210 _json["name"] = name; |
| 10211 } |
| 10212 if (port != null) { |
| 10213 _json["port"] = port; |
| 10214 } |
| 10215 if (requestPath != null) { |
| 10216 _json["requestPath"] = requestPath; |
| 10217 } |
| 10218 if (selfLink != null) { |
| 10219 _json["selfLink"] = selfLink; |
| 10220 } |
| 10221 if (timeoutSec != null) { |
| 10222 _json["timeoutSec"] = timeoutSec; |
| 10223 } |
| 10224 if (unhealthyThreshold != null) { |
| 10225 _json["unhealthyThreshold"] = unhealthyThreshold; |
| 10226 } |
| 10227 return _json; |
| 10228 } |
| 10229 } |
| 10230 |
| 10231 |
| 10232 /** Contains a list of HttpHealthCheck resources. */ |
| 10233 class HttpHealthCheckList { |
| 10234 /** |
| 10235 * Unique identifier for the resource; defined by the server (output only). |
| 10236 */ |
| 10237 core.String id; |
| 10238 |
| 10239 /** The HttpHealthCheck resources. */ |
| 10240 core.List<HttpHealthCheck> items; |
| 10241 |
| 10242 /** Type of resource. */ |
| 10243 core.String kind; |
| 10244 |
| 10245 /** A token used to continue a truncated list request (output only). */ |
| 10246 core.String nextPageToken; |
| 10247 |
| 10248 /** Server defined URL for this resource (output only). */ |
| 10249 core.String selfLink; |
| 10250 |
| 10251 |
| 10252 HttpHealthCheckList(); |
| 10253 |
| 10254 HttpHealthCheckList.fromJson(core.Map _json) { |
| 10255 if (_json.containsKey("id")) { |
| 10256 id = _json["id"]; |
| 10257 } |
| 10258 if (_json.containsKey("items")) { |
| 10259 items = _json["items"].map((value) => new HttpHealthCheck.fromJson(value))
.toList(); |
| 10260 } |
| 10261 if (_json.containsKey("kind")) { |
| 10262 kind = _json["kind"]; |
| 10263 } |
| 10264 if (_json.containsKey("nextPageToken")) { |
| 10265 nextPageToken = _json["nextPageToken"]; |
| 10266 } |
| 10267 if (_json.containsKey("selfLink")) { |
| 10268 selfLink = _json["selfLink"]; |
| 10269 } |
| 10270 } |
| 10271 |
| 10272 core.Map toJson() { |
| 10273 var _json = new core.Map(); |
| 10274 if (id != null) { |
| 10275 _json["id"] = id; |
| 10276 } |
| 10277 if (items != null) { |
| 10278 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 10279 } |
| 10280 if (kind != null) { |
| 10281 _json["kind"] = kind; |
| 10282 } |
| 10283 if (nextPageToken != null) { |
| 10284 _json["nextPageToken"] = nextPageToken; |
| 10285 } |
| 10286 if (selfLink != null) { |
| 10287 _json["selfLink"] = selfLink; |
| 10288 } |
| 10289 return _json; |
| 10290 } |
| 10291 } |
| 10292 |
| 10293 |
| 10294 /** The raw disk image parameters. */ |
| 10295 class ImageRawDisk { |
| 10296 /** |
| 10297 * The format used to encode and transmit the block device. Should be TAR. |
| 10298 * This is just a container and transmission format and not a runtime format. |
| 10299 * Provided by the client when the disk image is created. |
| 10300 * Possible string values are: |
| 10301 * - "TAR" |
| 10302 */ |
| 10303 core.String containerType; |
| 10304 |
| 10305 /** |
| 10306 * An optional SHA1 checksum of the disk image before unpackaging; provided by |
| 10307 * the client when the disk image is created. |
| 10308 */ |
| 10309 core.String sha1Checksum; |
| 10310 |
| 10311 /** |
| 10312 * The full Google Cloud Storage URL where the disk image is stored; provided |
| 10313 * by the client when the disk image is created. |
| 10314 */ |
| 10315 core.String source; |
| 10316 |
| 10317 |
| 10318 ImageRawDisk(); |
| 10319 |
| 10320 ImageRawDisk.fromJson(core.Map _json) { |
| 10321 if (_json.containsKey("containerType")) { |
| 10322 containerType = _json["containerType"]; |
| 10323 } |
| 10324 if (_json.containsKey("sha1Checksum")) { |
| 10325 sha1Checksum = _json["sha1Checksum"]; |
| 10326 } |
| 10327 if (_json.containsKey("source")) { |
| 10328 source = _json["source"]; |
| 10329 } |
| 10330 } |
| 10331 |
| 10332 core.Map toJson() { |
| 10333 var _json = new core.Map(); |
| 10334 if (containerType != null) { |
| 10335 _json["containerType"] = containerType; |
| 10336 } |
| 10337 if (sha1Checksum != null) { |
| 10338 _json["sha1Checksum"] = sha1Checksum; |
| 10339 } |
| 10340 if (source != null) { |
| 10341 _json["source"] = source; |
| 10342 } |
| 10343 return _json; |
| 10344 } |
| 10345 } |
| 10346 |
| 10347 |
| 10348 /** A disk image resource. */ |
| 10349 class Image { |
| 10350 /** |
| 10351 * Size of the image tar.gz archive stored in Google Cloud Storage (in bytes). |
| 10352 */ |
| 10353 core.String archiveSizeBytes; |
| 10354 |
| 10355 /** Creation timestamp in RFC3339 text format (output only). */ |
| 10356 core.String creationTimestamp; |
| 10357 |
| 10358 /** The deprecation status associated with this image. */ |
| 10359 DeprecationStatus deprecated; |
| 10360 |
| 10361 /** |
| 10362 * Textual description of the resource; provided by the client when the |
| 10363 * resource is created. |
| 10364 */ |
| 10365 core.String description; |
| 10366 |
| 10367 /** Size of the image when restored onto a disk (in GiB). */ |
| 10368 core.String diskSizeGb; |
| 10369 |
| 10370 /** |
| 10371 * Unique identifier for the resource; defined by the server (output only). |
| 10372 */ |
| 10373 core.String id; |
| 10374 |
| 10375 /** Type of the resource. */ |
| 10376 core.String kind; |
| 10377 |
| 10378 /** Public visible licenses. */ |
| 10379 core.List<core.String> licenses; |
| 10380 |
| 10381 /** |
| 10382 * Name of the resource; provided by the client when the resource is created. |
| 10383 * The name must be 1-63 characters long, and comply with RFC1035. |
| 10384 */ |
| 10385 core.String name; |
| 10386 |
| 10387 /** The raw disk image parameters. */ |
| 10388 ImageRawDisk rawDisk; |
| 10389 |
| 10390 /** Server defined URL for the resource (output only). */ |
| 10391 core.String selfLink; |
| 10392 |
| 10393 /** |
| 10394 * The source disk used to create this image. Once the source disk has been |
| 10395 * deleted from the system, this field will be cleared, and will not be set |
| 10396 * even if a disk with the same name has been re-created. |
| 10397 */ |
| 10398 core.String sourceDisk; |
| 10399 |
| 10400 /** |
| 10401 * The 'id' value of the disk used to create this image. This value may be |
| 10402 * used to determine whether the image was taken from the current or a |
| 10403 * previous instance of a given disk name. |
| 10404 */ |
| 10405 core.String sourceDiskId; |
| 10406 |
| 10407 /** |
| 10408 * Must be "RAW"; provided by the client when the disk image is created. |
| 10409 * Possible string values are: |
| 10410 * - "RAW" |
| 10411 */ |
| 10412 core.String sourceType; |
| 10413 |
| 10414 /** |
| 10415 * Status of the image (output only). It will be one of the following READY - |
| 10416 * after image has been successfully created and is ready for use FAILED - if |
| 10417 * creating the image fails for some reason PENDING - the image creation is in |
| 10418 * progress An image can be used to create other resources suck as instances |
| 10419 * only after the image has been successfully created and the status is set to |
| 10420 * READY. |
| 10421 * Possible string values are: |
| 10422 * - "FAILED" |
| 10423 * - "PENDING" |
| 10424 * - "READY" |
| 10425 */ |
| 10426 core.String status; |
| 10427 |
| 10428 |
| 10429 Image(); |
| 10430 |
| 10431 Image.fromJson(core.Map _json) { |
| 10432 if (_json.containsKey("archiveSizeBytes")) { |
| 10433 archiveSizeBytes = _json["archiveSizeBytes"]; |
| 10434 } |
| 10435 if (_json.containsKey("creationTimestamp")) { |
| 10436 creationTimestamp = _json["creationTimestamp"]; |
| 10437 } |
| 10438 if (_json.containsKey("deprecated")) { |
| 10439 deprecated = new DeprecationStatus.fromJson(_json["deprecated"]); |
| 10440 } |
| 10441 if (_json.containsKey("description")) { |
| 10442 description = _json["description"]; |
| 10443 } |
| 10444 if (_json.containsKey("diskSizeGb")) { |
| 10445 diskSizeGb = _json["diskSizeGb"]; |
| 10446 } |
| 10447 if (_json.containsKey("id")) { |
| 10448 id = _json["id"]; |
| 10449 } |
| 10450 if (_json.containsKey("kind")) { |
| 10451 kind = _json["kind"]; |
| 10452 } |
| 10453 if (_json.containsKey("licenses")) { |
| 10454 licenses = _json["licenses"]; |
| 10455 } |
| 10456 if (_json.containsKey("name")) { |
| 10457 name = _json["name"]; |
| 10458 } |
| 10459 if (_json.containsKey("rawDisk")) { |
| 10460 rawDisk = new ImageRawDisk.fromJson(_json["rawDisk"]); |
| 10461 } |
| 10462 if (_json.containsKey("selfLink")) { |
| 10463 selfLink = _json["selfLink"]; |
| 10464 } |
| 10465 if (_json.containsKey("sourceDisk")) { |
| 10466 sourceDisk = _json["sourceDisk"]; |
| 10467 } |
| 10468 if (_json.containsKey("sourceDiskId")) { |
| 10469 sourceDiskId = _json["sourceDiskId"]; |
| 10470 } |
| 10471 if (_json.containsKey("sourceType")) { |
| 10472 sourceType = _json["sourceType"]; |
| 10473 } |
| 10474 if (_json.containsKey("status")) { |
| 10475 status = _json["status"]; |
| 10476 } |
| 10477 } |
| 10478 |
| 10479 core.Map toJson() { |
| 10480 var _json = new core.Map(); |
| 10481 if (archiveSizeBytes != null) { |
| 10482 _json["archiveSizeBytes"] = archiveSizeBytes; |
| 10483 } |
| 10484 if (creationTimestamp != null) { |
| 10485 _json["creationTimestamp"] = creationTimestamp; |
| 10486 } |
| 10487 if (deprecated != null) { |
| 10488 _json["deprecated"] = (deprecated).toJson(); |
| 10489 } |
| 10490 if (description != null) { |
| 10491 _json["description"] = description; |
| 10492 } |
| 10493 if (diskSizeGb != null) { |
| 10494 _json["diskSizeGb"] = diskSizeGb; |
| 10495 } |
| 10496 if (id != null) { |
| 10497 _json["id"] = id; |
| 10498 } |
| 10499 if (kind != null) { |
| 10500 _json["kind"] = kind; |
| 10501 } |
| 10502 if (licenses != null) { |
| 10503 _json["licenses"] = licenses; |
| 10504 } |
| 10505 if (name != null) { |
| 10506 _json["name"] = name; |
| 10507 } |
| 10508 if (rawDisk != null) { |
| 10509 _json["rawDisk"] = (rawDisk).toJson(); |
| 10510 } |
| 10511 if (selfLink != null) { |
| 10512 _json["selfLink"] = selfLink; |
| 10513 } |
| 10514 if (sourceDisk != null) { |
| 10515 _json["sourceDisk"] = sourceDisk; |
| 10516 } |
| 10517 if (sourceDiskId != null) { |
| 10518 _json["sourceDiskId"] = sourceDiskId; |
| 10519 } |
| 10520 if (sourceType != null) { |
| 10521 _json["sourceType"] = sourceType; |
| 10522 } |
| 10523 if (status != null) { |
| 10524 _json["status"] = status; |
| 10525 } |
| 10526 return _json; |
| 10527 } |
| 10528 } |
| 10529 |
| 10530 |
| 10531 /** Contains a list of disk image resources. */ |
| 10532 class ImageList { |
| 10533 /** |
| 10534 * Unique identifier for the resource; defined by the server (output only). |
| 10535 */ |
| 10536 core.String id; |
| 10537 |
| 10538 /** The disk image resources. */ |
| 10539 core.List<Image> items; |
| 10540 |
| 10541 /** Type of resource. */ |
| 10542 core.String kind; |
| 10543 |
| 10544 /** A token used to continue a truncated list request (output only). */ |
| 10545 core.String nextPageToken; |
| 10546 |
| 10547 /** Server defined URL for this resource (output only). */ |
| 10548 core.String selfLink; |
| 10549 |
| 10550 |
| 10551 ImageList(); |
| 10552 |
| 10553 ImageList.fromJson(core.Map _json) { |
| 10554 if (_json.containsKey("id")) { |
| 10555 id = _json["id"]; |
| 10556 } |
| 10557 if (_json.containsKey("items")) { |
| 10558 items = _json["items"].map((value) => new Image.fromJson(value)).toList(); |
| 10559 } |
| 10560 if (_json.containsKey("kind")) { |
| 10561 kind = _json["kind"]; |
| 10562 } |
| 10563 if (_json.containsKey("nextPageToken")) { |
| 10564 nextPageToken = _json["nextPageToken"]; |
| 10565 } |
| 10566 if (_json.containsKey("selfLink")) { |
| 10567 selfLink = _json["selfLink"]; |
| 10568 } |
| 10569 } |
| 10570 |
| 10571 core.Map toJson() { |
| 10572 var _json = new core.Map(); |
| 10573 if (id != null) { |
| 10574 _json["id"] = id; |
| 10575 } |
| 10576 if (items != null) { |
| 10577 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 10578 } |
| 10579 if (kind != null) { |
| 10580 _json["kind"] = kind; |
| 10581 } |
| 10582 if (nextPageToken != null) { |
| 10583 _json["nextPageToken"] = nextPageToken; |
| 10584 } |
| 10585 if (selfLink != null) { |
| 10586 _json["selfLink"] = selfLink; |
| 10587 } |
| 10588 return _json; |
| 10589 } |
| 10590 } |
| 10591 |
| 10592 |
| 10593 /** An instance resource. */ |
| 10594 class Instance { |
| 10595 /** |
| 10596 * Allows this instance to send packets with source IP addresses other than |
| 10597 * its own and receive packets with destination IP addresses other than its |
| 10598 * own. If this instance will be used as an IP gateway or it will be set as |
| 10599 * the next-hop in a Route resource, say true. If unsure, leave this set to |
| 10600 * false. |
| 10601 */ |
| 10602 core.bool canIpForward; |
| 10603 |
| 10604 /** Creation timestamp in RFC3339 text format (output only). */ |
| 10605 core.String creationTimestamp; |
| 10606 |
| 10607 /** |
| 10608 * An optional textual description of the resource; provided by the client |
| 10609 * when the resource is created. |
| 10610 */ |
| 10611 core.String description; |
| 10612 |
| 10613 /** |
| 10614 * Array of disks associated with this instance. Persistent disks must be |
| 10615 * created before you can assign them. |
| 10616 */ |
| 10617 core.List<AttachedDisk> disks; |
| 10618 |
| 10619 /** |
| 10620 * Unique identifier for the resource; defined by the server (output only). |
| 10621 */ |
| 10622 core.String id; |
| 10623 |
| 10624 /** Type of the resource. */ |
| 10625 core.String kind; |
| 10626 |
| 10627 /** |
| 10628 * URL of the machine type resource describing which machine type to use to |
| 10629 * host the instance; provided by the client when the instance is created. |
| 10630 */ |
| 10631 core.String machineType; |
| 10632 |
| 10633 /** |
| 10634 * Metadata key/value pairs assigned to this instance. Consists of custom |
| 10635 * metadata or predefined keys; see Instance documentation for more |
| 10636 * information. |
| 10637 */ |
| 10638 Metadata metadata; |
| 10639 |
| 10640 /** |
| 10641 * Name of the resource; provided by the client when the resource is created. |
| 10642 * The name must be 1-63 characters long, and comply with RFC1035. |
| 10643 */ |
| 10644 core.String name; |
| 10645 |
| 10646 /** |
| 10647 * Array of configurations for this interface. This specifies how this |
| 10648 * interface is configured to interact with other network services, such as |
| 10649 * connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access |
| 10650 * config supported. If there are no accessConfigs specified, then this |
| 10651 * instance will have no external internet access. |
| 10652 */ |
| 10653 core.List<NetworkInterface> networkInterfaces; |
| 10654 |
| 10655 /** Scheduling options for this instance. */ |
| 10656 Scheduling scheduling; |
| 10657 |
| 10658 /** Server defined URL for this resource (output only). */ |
| 10659 core.String selfLink; |
| 10660 |
| 10661 /** |
| 10662 * A list of service accounts each with specified scopes, for which access |
| 10663 * tokens are to be made available to the instance through metadata queries. |
| 10664 */ |
| 10665 core.List<ServiceAccount> serviceAccounts; |
| 10666 |
| 10667 /** |
| 10668 * Instance status. One of the following values: "PROVISIONING", "STAGING", |
| 10669 * "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output only). |
| 10670 * Possible string values are: |
| 10671 * - "PROVISIONING" |
| 10672 * - "RUNNING" |
| 10673 * - "STAGING" |
| 10674 * - "STOPPED" |
| 10675 * - "STOPPING" |
| 10676 * - "TERMINATED" |
| 10677 */ |
| 10678 core.String status; |
| 10679 |
| 10680 /** An optional, human-readable explanation of the status (output only). */ |
| 10681 core.String statusMessage; |
| 10682 |
| 10683 /** |
| 10684 * A list of tags to be applied to this instance. Used to identify valid |
| 10685 * sources or targets for network firewalls. Provided by the client on |
| 10686 * instance creation. The tags can be later modified by the setTags method. |
| 10687 * Each tag within the list must comply with RFC1035. |
| 10688 */ |
| 10689 Tags tags; |
| 10690 |
| 10691 /** URL of the zone where the instance resides (output only). */ |
| 10692 core.String zone; |
| 10693 |
| 10694 |
| 10695 Instance(); |
| 10696 |
| 10697 Instance.fromJson(core.Map _json) { |
| 10698 if (_json.containsKey("canIpForward")) { |
| 10699 canIpForward = _json["canIpForward"]; |
| 10700 } |
| 10701 if (_json.containsKey("creationTimestamp")) { |
| 10702 creationTimestamp = _json["creationTimestamp"]; |
| 10703 } |
| 10704 if (_json.containsKey("description")) { |
| 10705 description = _json["description"]; |
| 10706 } |
| 10707 if (_json.containsKey("disks")) { |
| 10708 disks = _json["disks"].map((value) => new AttachedDisk.fromJson(value)).to
List(); |
| 10709 } |
| 10710 if (_json.containsKey("id")) { |
| 10711 id = _json["id"]; |
| 10712 } |
| 10713 if (_json.containsKey("kind")) { |
| 10714 kind = _json["kind"]; |
| 10715 } |
| 10716 if (_json.containsKey("machineType")) { |
| 10717 machineType = _json["machineType"]; |
| 10718 } |
| 10719 if (_json.containsKey("metadata")) { |
| 10720 metadata = new Metadata.fromJson(_json["metadata"]); |
| 10721 } |
| 10722 if (_json.containsKey("name")) { |
| 10723 name = _json["name"]; |
| 10724 } |
| 10725 if (_json.containsKey("networkInterfaces")) { |
| 10726 networkInterfaces = _json["networkInterfaces"].map((value) => new NetworkI
nterface.fromJson(value)).toList(); |
| 10727 } |
| 10728 if (_json.containsKey("scheduling")) { |
| 10729 scheduling = new Scheduling.fromJson(_json["scheduling"]); |
| 10730 } |
| 10731 if (_json.containsKey("selfLink")) { |
| 10732 selfLink = _json["selfLink"]; |
| 10733 } |
| 10734 if (_json.containsKey("serviceAccounts")) { |
| 10735 serviceAccounts = _json["serviceAccounts"].map((value) => new ServiceAccou
nt.fromJson(value)).toList(); |
| 10736 } |
| 10737 if (_json.containsKey("status")) { |
| 10738 status = _json["status"]; |
| 10739 } |
| 10740 if (_json.containsKey("statusMessage")) { |
| 10741 statusMessage = _json["statusMessage"]; |
| 10742 } |
| 10743 if (_json.containsKey("tags")) { |
| 10744 tags = new Tags.fromJson(_json["tags"]); |
| 10745 } |
| 10746 if (_json.containsKey("zone")) { |
| 10747 zone = _json["zone"]; |
| 10748 } |
| 10749 } |
| 10750 |
| 10751 core.Map toJson() { |
| 10752 var _json = new core.Map(); |
| 10753 if (canIpForward != null) { |
| 10754 _json["canIpForward"] = canIpForward; |
| 10755 } |
| 10756 if (creationTimestamp != null) { |
| 10757 _json["creationTimestamp"] = creationTimestamp; |
| 10758 } |
| 10759 if (description != null) { |
| 10760 _json["description"] = description; |
| 10761 } |
| 10762 if (disks != null) { |
| 10763 _json["disks"] = disks.map((value) => (value).toJson()).toList(); |
| 10764 } |
| 10765 if (id != null) { |
| 10766 _json["id"] = id; |
| 10767 } |
| 10768 if (kind != null) { |
| 10769 _json["kind"] = kind; |
| 10770 } |
| 10771 if (machineType != null) { |
| 10772 _json["machineType"] = machineType; |
| 10773 } |
| 10774 if (metadata != null) { |
| 10775 _json["metadata"] = (metadata).toJson(); |
| 10776 } |
| 10777 if (name != null) { |
| 10778 _json["name"] = name; |
| 10779 } |
| 10780 if (networkInterfaces != null) { |
| 10781 _json["networkInterfaces"] = networkInterfaces.map((value) => (value).toJs
on()).toList(); |
| 10782 } |
| 10783 if (scheduling != null) { |
| 10784 _json["scheduling"] = (scheduling).toJson(); |
| 10785 } |
| 10786 if (selfLink != null) { |
| 10787 _json["selfLink"] = selfLink; |
| 10788 } |
| 10789 if (serviceAccounts != null) { |
| 10790 _json["serviceAccounts"] = serviceAccounts.map((value) => (value).toJson()
).toList(); |
| 10791 } |
| 10792 if (status != null) { |
| 10793 _json["status"] = status; |
| 10794 } |
| 10795 if (statusMessage != null) { |
| 10796 _json["statusMessage"] = statusMessage; |
| 10797 } |
| 10798 if (tags != null) { |
| 10799 _json["tags"] = (tags).toJson(); |
| 10800 } |
| 10801 if (zone != null) { |
| 10802 _json["zone"] = zone; |
| 10803 } |
| 10804 return _json; |
| 10805 } |
| 10806 } |
| 10807 |
| 10808 |
| 10809 /** Not documented yet. */ |
| 10810 class InstanceAggregatedList { |
| 10811 /** |
| 10812 * Unique identifier for the resource; defined by the server (output only). |
| 10813 */ |
| 10814 core.String id; |
| 10815 |
| 10816 /** A map of scoped instance lists. */ |
| 10817 core.Map<core.String, InstancesScopedList> items; |
| 10818 |
| 10819 /** Type of resource. */ |
| 10820 core.String kind; |
| 10821 |
| 10822 /** A token used to continue a truncated list request (output only). */ |
| 10823 core.String nextPageToken; |
| 10824 |
| 10825 /** Server defined URL for this resource (output only). */ |
| 10826 core.String selfLink; |
| 10827 |
| 10828 |
| 10829 InstanceAggregatedList(); |
| 10830 |
| 10831 InstanceAggregatedList.fromJson(core.Map _json) { |
| 10832 if (_json.containsKey("id")) { |
| 10833 id = _json["id"]; |
| 10834 } |
| 10835 if (_json.containsKey("items")) { |
| 10836 items = common_internal.mapMap(_json["items"], (item) => new InstancesScop
edList.fromJson(item)); |
| 10837 } |
| 10838 if (_json.containsKey("kind")) { |
| 10839 kind = _json["kind"]; |
| 10840 } |
| 10841 if (_json.containsKey("nextPageToken")) { |
| 10842 nextPageToken = _json["nextPageToken"]; |
| 10843 } |
| 10844 if (_json.containsKey("selfLink")) { |
| 10845 selfLink = _json["selfLink"]; |
| 10846 } |
| 10847 } |
| 10848 |
| 10849 core.Map toJson() { |
| 10850 var _json = new core.Map(); |
| 10851 if (id != null) { |
| 10852 _json["id"] = id; |
| 10853 } |
| 10854 if (items != null) { |
| 10855 _json["items"] = common_internal.mapMap(items, (item) => (item).toJson()); |
| 10856 } |
| 10857 if (kind != null) { |
| 10858 _json["kind"] = kind; |
| 10859 } |
| 10860 if (nextPageToken != null) { |
| 10861 _json["nextPageToken"] = nextPageToken; |
| 10862 } |
| 10863 if (selfLink != null) { |
| 10864 _json["selfLink"] = selfLink; |
| 10865 } |
| 10866 return _json; |
| 10867 } |
| 10868 } |
| 10869 |
| 10870 |
| 10871 /** Contains a list of instance resources. */ |
| 10872 class InstanceList { |
| 10873 /** |
| 10874 * Unique identifier for the resource; defined by the server (output only). |
| 10875 */ |
| 10876 core.String id; |
| 10877 |
| 10878 /** A list of instance resources. */ |
| 10879 core.List<Instance> items; |
| 10880 |
| 10881 /** Type of resource. */ |
| 10882 core.String kind; |
| 10883 |
| 10884 /** A token used to continue a truncated list request (output only). */ |
| 10885 core.String nextPageToken; |
| 10886 |
| 10887 /** Server defined URL for this resource (output only). */ |
| 10888 core.String selfLink; |
| 10889 |
| 10890 |
| 10891 InstanceList(); |
| 10892 |
| 10893 InstanceList.fromJson(core.Map _json) { |
| 10894 if (_json.containsKey("id")) { |
| 10895 id = _json["id"]; |
| 10896 } |
| 10897 if (_json.containsKey("items")) { |
| 10898 items = _json["items"].map((value) => new Instance.fromJson(value)).toList
(); |
| 10899 } |
| 10900 if (_json.containsKey("kind")) { |
| 10901 kind = _json["kind"]; |
| 10902 } |
| 10903 if (_json.containsKey("nextPageToken")) { |
| 10904 nextPageToken = _json["nextPageToken"]; |
| 10905 } |
| 10906 if (_json.containsKey("selfLink")) { |
| 10907 selfLink = _json["selfLink"]; |
| 10908 } |
| 10909 } |
| 10910 |
| 10911 core.Map toJson() { |
| 10912 var _json = new core.Map(); |
| 10913 if (id != null) { |
| 10914 _json["id"] = id; |
| 10915 } |
| 10916 if (items != null) { |
| 10917 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 10918 } |
| 10919 if (kind != null) { |
| 10920 _json["kind"] = kind; |
| 10921 } |
| 10922 if (nextPageToken != null) { |
| 10923 _json["nextPageToken"] = nextPageToken; |
| 10924 } |
| 10925 if (selfLink != null) { |
| 10926 _json["selfLink"] = selfLink; |
| 10927 } |
| 10928 return _json; |
| 10929 } |
| 10930 } |
| 10931 |
| 10932 |
| 10933 /** Not documented yet. */ |
| 10934 class InstanceReference { |
| 10935 /** Not documented yet. */ |
| 10936 core.String instance; |
| 10937 |
| 10938 |
| 10939 InstanceReference(); |
| 10940 |
| 10941 InstanceReference.fromJson(core.Map _json) { |
| 10942 if (_json.containsKey("instance")) { |
| 10943 instance = _json["instance"]; |
| 10944 } |
| 10945 } |
| 10946 |
| 10947 core.Map toJson() { |
| 10948 var _json = new core.Map(); |
| 10949 if (instance != null) { |
| 10950 _json["instance"] = instance; |
| 10951 } |
| 10952 return _json; |
| 10953 } |
| 10954 } |
| 10955 |
| 10956 |
| 10957 /** Not documented yet. */ |
| 10958 class InstancesScopedListWarningData { |
| 10959 /** A key for the warning data. */ |
| 10960 core.String key; |
| 10961 |
| 10962 /** A warning data value corresponding to the key. */ |
| 10963 core.String value; |
| 10964 |
| 10965 |
| 10966 InstancesScopedListWarningData(); |
| 10967 |
| 10968 InstancesScopedListWarningData.fromJson(core.Map _json) { |
| 10969 if (_json.containsKey("key")) { |
| 10970 key = _json["key"]; |
| 10971 } |
| 10972 if (_json.containsKey("value")) { |
| 10973 value = _json["value"]; |
| 10974 } |
| 10975 } |
| 10976 |
| 10977 core.Map toJson() { |
| 10978 var _json = new core.Map(); |
| 10979 if (key != null) { |
| 10980 _json["key"] = key; |
| 10981 } |
| 10982 if (value != null) { |
| 10983 _json["value"] = value; |
| 10984 } |
| 10985 return _json; |
| 10986 } |
| 10987 } |
| 10988 |
| 10989 |
| 10990 /** |
| 10991 * Informational warning which replaces the list of instances when the list is |
| 10992 * empty. |
| 10993 */ |
| 10994 class InstancesScopedListWarning { |
| 10995 /** |
| 10996 * The warning type identifier for this warning. |
| 10997 * Possible string values are: |
| 10998 * - "DEPRECATED_RESOURCE_USED" |
| 10999 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 11000 * - "INJECTED_KERNELS_DEPRECATED" |
| 11001 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 11002 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 11003 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 11004 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 11005 * - "NEXT_HOP_NOT_RUNNING" |
| 11006 * - "NO_RESULTS_ON_PAGE" |
| 11007 * - "REQUIRED_TOS_AGREEMENT" |
| 11008 * - "RESOURCE_NOT_DELETED" |
| 11009 * - "UNREACHABLE" |
| 11010 */ |
| 11011 core.String code; |
| 11012 |
| 11013 /** Metadata for this warning in 'key: value' format. */ |
| 11014 core.List<InstancesScopedListWarningData> data; |
| 11015 |
| 11016 /** Optional human-readable details for this warning. */ |
| 11017 core.String message; |
| 11018 |
| 11019 |
| 11020 InstancesScopedListWarning(); |
| 11021 |
| 11022 InstancesScopedListWarning.fromJson(core.Map _json) { |
| 11023 if (_json.containsKey("code")) { |
| 11024 code = _json["code"]; |
| 11025 } |
| 11026 if (_json.containsKey("data")) { |
| 11027 data = _json["data"].map((value) => new InstancesScopedListWarningData.fro
mJson(value)).toList(); |
| 11028 } |
| 11029 if (_json.containsKey("message")) { |
| 11030 message = _json["message"]; |
| 11031 } |
| 11032 } |
| 11033 |
| 11034 core.Map toJson() { |
| 11035 var _json = new core.Map(); |
| 11036 if (code != null) { |
| 11037 _json["code"] = code; |
| 11038 } |
| 11039 if (data != null) { |
| 11040 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 11041 } |
| 11042 if (message != null) { |
| 11043 _json["message"] = message; |
| 11044 } |
| 11045 return _json; |
| 11046 } |
| 11047 } |
| 11048 |
| 11049 |
| 11050 /** Not documented yet. */ |
| 11051 class InstancesScopedList { |
| 11052 /** List of instances contained in this scope. */ |
| 11053 core.List<Instance> instances; |
| 11054 |
| 11055 /** |
| 11056 * Informational warning which replaces the list of instances when the list is |
| 11057 * empty. |
| 11058 */ |
| 11059 InstancesScopedListWarning warning; |
| 11060 |
| 11061 |
| 11062 InstancesScopedList(); |
| 11063 |
| 11064 InstancesScopedList.fromJson(core.Map _json) { |
| 11065 if (_json.containsKey("instances")) { |
| 11066 instances = _json["instances"].map((value) => new Instance.fromJson(value)
).toList(); |
| 11067 } |
| 11068 if (_json.containsKey("warning")) { |
| 11069 warning = new InstancesScopedListWarning.fromJson(_json["warning"]); |
| 11070 } |
| 11071 } |
| 11072 |
| 11073 core.Map toJson() { |
| 11074 var _json = new core.Map(); |
| 11075 if (instances != null) { |
| 11076 _json["instances"] = instances.map((value) => (value).toJson()).toList(); |
| 11077 } |
| 11078 if (warning != null) { |
| 11079 _json["warning"] = (warning).toJson(); |
| 11080 } |
| 11081 return _json; |
| 11082 } |
| 11083 } |
| 11084 |
| 11085 |
| 11086 /** A license resource. */ |
| 11087 class License { |
| 11088 /** |
| 11089 * If true, the customer will be charged license fee for running software that |
| 11090 * contains this license on an instance. |
| 11091 */ |
| 11092 core.bool chargesUseFee; |
| 11093 |
| 11094 /** Type of resource. */ |
| 11095 core.String kind; |
| 11096 |
| 11097 /** |
| 11098 * Name of the resource; provided by the client when the resource is created. |
| 11099 * The name must be 1-63 characters long, and comply with RFC1035. |
| 11100 */ |
| 11101 core.String name; |
| 11102 |
| 11103 /** Server defined URL for the resource (output only). */ |
| 11104 core.String selfLink; |
| 11105 |
| 11106 |
| 11107 License(); |
| 11108 |
| 11109 License.fromJson(core.Map _json) { |
| 11110 if (_json.containsKey("chargesUseFee")) { |
| 11111 chargesUseFee = _json["chargesUseFee"]; |
| 11112 } |
| 11113 if (_json.containsKey("kind")) { |
| 11114 kind = _json["kind"]; |
| 11115 } |
| 11116 if (_json.containsKey("name")) { |
| 11117 name = _json["name"]; |
| 11118 } |
| 11119 if (_json.containsKey("selfLink")) { |
| 11120 selfLink = _json["selfLink"]; |
| 11121 } |
| 11122 } |
| 11123 |
| 11124 core.Map toJson() { |
| 11125 var _json = new core.Map(); |
| 11126 if (chargesUseFee != null) { |
| 11127 _json["chargesUseFee"] = chargesUseFee; |
| 11128 } |
| 11129 if (kind != null) { |
| 11130 _json["kind"] = kind; |
| 11131 } |
| 11132 if (name != null) { |
| 11133 _json["name"] = name; |
| 11134 } |
| 11135 if (selfLink != null) { |
| 11136 _json["selfLink"] = selfLink; |
| 11137 } |
| 11138 return _json; |
| 11139 } |
| 11140 } |
| 11141 |
| 11142 |
| 11143 /** Not documented yet. */ |
| 11144 class MachineTypeScratchDisks { |
| 11145 /** Size of the scratch disk, defined in GB. */ |
| 11146 core.int diskGb; |
| 11147 |
| 11148 |
| 11149 MachineTypeScratchDisks(); |
| 11150 |
| 11151 MachineTypeScratchDisks.fromJson(core.Map _json) { |
| 11152 if (_json.containsKey("diskGb")) { |
| 11153 diskGb = _json["diskGb"]; |
| 11154 } |
| 11155 } |
| 11156 |
| 11157 core.Map toJson() { |
| 11158 var _json = new core.Map(); |
| 11159 if (diskGb != null) { |
| 11160 _json["diskGb"] = diskGb; |
| 11161 } |
| 11162 return _json; |
| 11163 } |
| 11164 } |
| 11165 |
| 11166 |
| 11167 /** A machine type resource. */ |
| 11168 class MachineType { |
| 11169 /** Creation timestamp in RFC3339 text format (output only). */ |
| 11170 core.String creationTimestamp; |
| 11171 |
| 11172 /** The deprecation status associated with this machine type. */ |
| 11173 DeprecationStatus deprecated; |
| 11174 |
| 11175 /** An optional textual description of the resource. */ |
| 11176 core.String description; |
| 11177 |
| 11178 /** Count of CPUs exposed to the instance. */ |
| 11179 core.int guestCpus; |
| 11180 |
| 11181 /** |
| 11182 * Unique identifier for the resource; defined by the server (output only). |
| 11183 */ |
| 11184 core.String id; |
| 11185 |
| 11186 /** Space allotted for the image, defined in GB. */ |
| 11187 core.int imageSpaceGb; |
| 11188 |
| 11189 /** Type of the resource. */ |
| 11190 core.String kind; |
| 11191 |
| 11192 /** Maximum persistent disks allowed. */ |
| 11193 core.int maximumPersistentDisks; |
| 11194 |
| 11195 /** Maximum total persistent disks size (GB) allowed. */ |
| 11196 core.String maximumPersistentDisksSizeGb; |
| 11197 |
| 11198 /** Physical memory assigned to the instance, defined in MB. */ |
| 11199 core.int memoryMb; |
| 11200 |
| 11201 /** Name of the resource. */ |
| 11202 core.String name; |
| 11203 |
| 11204 /** List of extended scratch disks assigned to the instance. */ |
| 11205 core.List<MachineTypeScratchDisks> scratchDisks; |
| 11206 |
| 11207 /** Server defined URL for the resource (output only). */ |
| 11208 core.String selfLink; |
| 11209 |
| 11210 /** Url of the zone where the machine type resides (output only). */ |
| 11211 core.String zone; |
| 11212 |
| 11213 |
| 11214 MachineType(); |
| 11215 |
| 11216 MachineType.fromJson(core.Map _json) { |
| 11217 if (_json.containsKey("creationTimestamp")) { |
| 11218 creationTimestamp = _json["creationTimestamp"]; |
| 11219 } |
| 11220 if (_json.containsKey("deprecated")) { |
| 11221 deprecated = new DeprecationStatus.fromJson(_json["deprecated"]); |
| 11222 } |
| 11223 if (_json.containsKey("description")) { |
| 11224 description = _json["description"]; |
| 11225 } |
| 11226 if (_json.containsKey("guestCpus")) { |
| 11227 guestCpus = _json["guestCpus"]; |
| 11228 } |
| 11229 if (_json.containsKey("id")) { |
| 11230 id = _json["id"]; |
| 11231 } |
| 11232 if (_json.containsKey("imageSpaceGb")) { |
| 11233 imageSpaceGb = _json["imageSpaceGb"]; |
| 11234 } |
| 11235 if (_json.containsKey("kind")) { |
| 11236 kind = _json["kind"]; |
| 11237 } |
| 11238 if (_json.containsKey("maximumPersistentDisks")) { |
| 11239 maximumPersistentDisks = _json["maximumPersistentDisks"]; |
| 11240 } |
| 11241 if (_json.containsKey("maximumPersistentDisksSizeGb")) { |
| 11242 maximumPersistentDisksSizeGb = _json["maximumPersistentDisksSizeGb"]; |
| 11243 } |
| 11244 if (_json.containsKey("memoryMb")) { |
| 11245 memoryMb = _json["memoryMb"]; |
| 11246 } |
| 11247 if (_json.containsKey("name")) { |
| 11248 name = _json["name"]; |
| 11249 } |
| 11250 if (_json.containsKey("scratchDisks")) { |
| 11251 scratchDisks = _json["scratchDisks"].map((value) => new MachineTypeScratch
Disks.fromJson(value)).toList(); |
| 11252 } |
| 11253 if (_json.containsKey("selfLink")) { |
| 11254 selfLink = _json["selfLink"]; |
| 11255 } |
| 11256 if (_json.containsKey("zone")) { |
| 11257 zone = _json["zone"]; |
| 11258 } |
| 11259 } |
| 11260 |
| 11261 core.Map toJson() { |
| 11262 var _json = new core.Map(); |
| 11263 if (creationTimestamp != null) { |
| 11264 _json["creationTimestamp"] = creationTimestamp; |
| 11265 } |
| 11266 if (deprecated != null) { |
| 11267 _json["deprecated"] = (deprecated).toJson(); |
| 11268 } |
| 11269 if (description != null) { |
| 11270 _json["description"] = description; |
| 11271 } |
| 11272 if (guestCpus != null) { |
| 11273 _json["guestCpus"] = guestCpus; |
| 11274 } |
| 11275 if (id != null) { |
| 11276 _json["id"] = id; |
| 11277 } |
| 11278 if (imageSpaceGb != null) { |
| 11279 _json["imageSpaceGb"] = imageSpaceGb; |
| 11280 } |
| 11281 if (kind != null) { |
| 11282 _json["kind"] = kind; |
| 11283 } |
| 11284 if (maximumPersistentDisks != null) { |
| 11285 _json["maximumPersistentDisks"] = maximumPersistentDisks; |
| 11286 } |
| 11287 if (maximumPersistentDisksSizeGb != null) { |
| 11288 _json["maximumPersistentDisksSizeGb"] = maximumPersistentDisksSizeGb; |
| 11289 } |
| 11290 if (memoryMb != null) { |
| 11291 _json["memoryMb"] = memoryMb; |
| 11292 } |
| 11293 if (name != null) { |
| 11294 _json["name"] = name; |
| 11295 } |
| 11296 if (scratchDisks != null) { |
| 11297 _json["scratchDisks"] = scratchDisks.map((value) => (value).toJson()).toLi
st(); |
| 11298 } |
| 11299 if (selfLink != null) { |
| 11300 _json["selfLink"] = selfLink; |
| 11301 } |
| 11302 if (zone != null) { |
| 11303 _json["zone"] = zone; |
| 11304 } |
| 11305 return _json; |
| 11306 } |
| 11307 } |
| 11308 |
| 11309 |
| 11310 /** Not documented yet. */ |
| 11311 class MachineTypeAggregatedList { |
| 11312 /** |
| 11313 * Unique identifier for the resource; defined by the server (output only). |
| 11314 */ |
| 11315 core.String id; |
| 11316 |
| 11317 /** A map of scoped machine type lists. */ |
| 11318 core.Map<core.String, MachineTypesScopedList> items; |
| 11319 |
| 11320 /** Type of resource. */ |
| 11321 core.String kind; |
| 11322 |
| 11323 /** A token used to continue a truncated list request (output only). */ |
| 11324 core.String nextPageToken; |
| 11325 |
| 11326 /** Server defined URL for this resource (output only). */ |
| 11327 core.String selfLink; |
| 11328 |
| 11329 |
| 11330 MachineTypeAggregatedList(); |
| 11331 |
| 11332 MachineTypeAggregatedList.fromJson(core.Map _json) { |
| 11333 if (_json.containsKey("id")) { |
| 11334 id = _json["id"]; |
| 11335 } |
| 11336 if (_json.containsKey("items")) { |
| 11337 items = common_internal.mapMap(_json["items"], (item) => new MachineTypesS
copedList.fromJson(item)); |
| 11338 } |
| 11339 if (_json.containsKey("kind")) { |
| 11340 kind = _json["kind"]; |
| 11341 } |
| 11342 if (_json.containsKey("nextPageToken")) { |
| 11343 nextPageToken = _json["nextPageToken"]; |
| 11344 } |
| 11345 if (_json.containsKey("selfLink")) { |
| 11346 selfLink = _json["selfLink"]; |
| 11347 } |
| 11348 } |
| 11349 |
| 11350 core.Map toJson() { |
| 11351 var _json = new core.Map(); |
| 11352 if (id != null) { |
| 11353 _json["id"] = id; |
| 11354 } |
| 11355 if (items != null) { |
| 11356 _json["items"] = common_internal.mapMap(items, (item) => (item).toJson()); |
| 11357 } |
| 11358 if (kind != null) { |
| 11359 _json["kind"] = kind; |
| 11360 } |
| 11361 if (nextPageToken != null) { |
| 11362 _json["nextPageToken"] = nextPageToken; |
| 11363 } |
| 11364 if (selfLink != null) { |
| 11365 _json["selfLink"] = selfLink; |
| 11366 } |
| 11367 return _json; |
| 11368 } |
| 11369 } |
| 11370 |
| 11371 |
| 11372 /** Contains a list of machine type resources. */ |
| 11373 class MachineTypeList { |
| 11374 /** |
| 11375 * Unique identifier for the resource; defined by the server (output only). |
| 11376 */ |
| 11377 core.String id; |
| 11378 |
| 11379 /** The machine type resources. */ |
| 11380 core.List<MachineType> items; |
| 11381 |
| 11382 /** Type of resource. */ |
| 11383 core.String kind; |
| 11384 |
| 11385 /** A token used to continue a truncated list request (output only). */ |
| 11386 core.String nextPageToken; |
| 11387 |
| 11388 /** Server defined URL for this resource (output only). */ |
| 11389 core.String selfLink; |
| 11390 |
| 11391 |
| 11392 MachineTypeList(); |
| 11393 |
| 11394 MachineTypeList.fromJson(core.Map _json) { |
| 11395 if (_json.containsKey("id")) { |
| 11396 id = _json["id"]; |
| 11397 } |
| 11398 if (_json.containsKey("items")) { |
| 11399 items = _json["items"].map((value) => new MachineType.fromJson(value)).toL
ist(); |
| 11400 } |
| 11401 if (_json.containsKey("kind")) { |
| 11402 kind = _json["kind"]; |
| 11403 } |
| 11404 if (_json.containsKey("nextPageToken")) { |
| 11405 nextPageToken = _json["nextPageToken"]; |
| 11406 } |
| 11407 if (_json.containsKey("selfLink")) { |
| 11408 selfLink = _json["selfLink"]; |
| 11409 } |
| 11410 } |
| 11411 |
| 11412 core.Map toJson() { |
| 11413 var _json = new core.Map(); |
| 11414 if (id != null) { |
| 11415 _json["id"] = id; |
| 11416 } |
| 11417 if (items != null) { |
| 11418 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 11419 } |
| 11420 if (kind != null) { |
| 11421 _json["kind"] = kind; |
| 11422 } |
| 11423 if (nextPageToken != null) { |
| 11424 _json["nextPageToken"] = nextPageToken; |
| 11425 } |
| 11426 if (selfLink != null) { |
| 11427 _json["selfLink"] = selfLink; |
| 11428 } |
| 11429 return _json; |
| 11430 } |
| 11431 } |
| 11432 |
| 11433 |
| 11434 /** Not documented yet. */ |
| 11435 class MachineTypesScopedListWarningData { |
| 11436 /** A key for the warning data. */ |
| 11437 core.String key; |
| 11438 |
| 11439 /** A warning data value corresponding to the key. */ |
| 11440 core.String value; |
| 11441 |
| 11442 |
| 11443 MachineTypesScopedListWarningData(); |
| 11444 |
| 11445 MachineTypesScopedListWarningData.fromJson(core.Map _json) { |
| 11446 if (_json.containsKey("key")) { |
| 11447 key = _json["key"]; |
| 11448 } |
| 11449 if (_json.containsKey("value")) { |
| 11450 value = _json["value"]; |
| 11451 } |
| 11452 } |
| 11453 |
| 11454 core.Map toJson() { |
| 11455 var _json = new core.Map(); |
| 11456 if (key != null) { |
| 11457 _json["key"] = key; |
| 11458 } |
| 11459 if (value != null) { |
| 11460 _json["value"] = value; |
| 11461 } |
| 11462 return _json; |
| 11463 } |
| 11464 } |
| 11465 |
| 11466 |
| 11467 /** |
| 11468 * Informational warning which replaces the list of machine types when the list |
| 11469 * is empty. |
| 11470 */ |
| 11471 class MachineTypesScopedListWarning { |
| 11472 /** |
| 11473 * The warning type identifier for this warning. |
| 11474 * Possible string values are: |
| 11475 * - "DEPRECATED_RESOURCE_USED" |
| 11476 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 11477 * - "INJECTED_KERNELS_DEPRECATED" |
| 11478 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 11479 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 11480 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 11481 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 11482 * - "NEXT_HOP_NOT_RUNNING" |
| 11483 * - "NO_RESULTS_ON_PAGE" |
| 11484 * - "REQUIRED_TOS_AGREEMENT" |
| 11485 * - "RESOURCE_NOT_DELETED" |
| 11486 * - "UNREACHABLE" |
| 11487 */ |
| 11488 core.String code; |
| 11489 |
| 11490 /** Metadata for this warning in 'key: value' format. */ |
| 11491 core.List<MachineTypesScopedListWarningData> data; |
| 11492 |
| 11493 /** Optional human-readable details for this warning. */ |
| 11494 core.String message; |
| 11495 |
| 11496 |
| 11497 MachineTypesScopedListWarning(); |
| 11498 |
| 11499 MachineTypesScopedListWarning.fromJson(core.Map _json) { |
| 11500 if (_json.containsKey("code")) { |
| 11501 code = _json["code"]; |
| 11502 } |
| 11503 if (_json.containsKey("data")) { |
| 11504 data = _json["data"].map((value) => new MachineTypesScopedListWarningData.
fromJson(value)).toList(); |
| 11505 } |
| 11506 if (_json.containsKey("message")) { |
| 11507 message = _json["message"]; |
| 11508 } |
| 11509 } |
| 11510 |
| 11511 core.Map toJson() { |
| 11512 var _json = new core.Map(); |
| 11513 if (code != null) { |
| 11514 _json["code"] = code; |
| 11515 } |
| 11516 if (data != null) { |
| 11517 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 11518 } |
| 11519 if (message != null) { |
| 11520 _json["message"] = message; |
| 11521 } |
| 11522 return _json; |
| 11523 } |
| 11524 } |
| 11525 |
| 11526 |
| 11527 /** Not documented yet. */ |
| 11528 class MachineTypesScopedList { |
| 11529 /** List of machine types contained in this scope. */ |
| 11530 core.List<MachineType> machineTypes; |
| 11531 |
| 11532 /** |
| 11533 * Informational warning which replaces the list of machine types when the |
| 11534 * list is empty. |
| 11535 */ |
| 11536 MachineTypesScopedListWarning warning; |
| 11537 |
| 11538 |
| 11539 MachineTypesScopedList(); |
| 11540 |
| 11541 MachineTypesScopedList.fromJson(core.Map _json) { |
| 11542 if (_json.containsKey("machineTypes")) { |
| 11543 machineTypes = _json["machineTypes"].map((value) => new MachineType.fromJs
on(value)).toList(); |
| 11544 } |
| 11545 if (_json.containsKey("warning")) { |
| 11546 warning = new MachineTypesScopedListWarning.fromJson(_json["warning"]); |
| 11547 } |
| 11548 } |
| 11549 |
| 11550 core.Map toJson() { |
| 11551 var _json = new core.Map(); |
| 11552 if (machineTypes != null) { |
| 11553 _json["machineTypes"] = machineTypes.map((value) => (value).toJson()).toLi
st(); |
| 11554 } |
| 11555 if (warning != null) { |
| 11556 _json["warning"] = (warning).toJson(); |
| 11557 } |
| 11558 return _json; |
| 11559 } |
| 11560 } |
| 11561 |
| 11562 |
| 11563 /** Not documented yet. */ |
| 11564 class MetadataItems { |
| 11565 /** |
| 11566 * Key for the metadata entry. Keys must conform to the following regexp: |
| 11567 * [a-zA-Z0-9-_]+, and be less than 128 bytes in length. This is reflected as |
| 11568 * part of a URL in the metadata server. Additionally, to avoid ambiguity, |
| 11569 * keys must not conflict with any other metadata keys for the project. |
| 11570 */ |
| 11571 core.String key; |
| 11572 |
| 11573 /** |
| 11574 * Value for the metadata entry. These are free-form strings, and only have |
| 11575 * meaning as interpreted by the image running in the instance. The only |
| 11576 * restriction placed on values is that their size must be less than or equal |
| 11577 * to 32768 bytes. |
| 11578 */ |
| 11579 core.String value; |
| 11580 |
| 11581 |
| 11582 MetadataItems(); |
| 11583 |
| 11584 MetadataItems.fromJson(core.Map _json) { |
| 11585 if (_json.containsKey("key")) { |
| 11586 key = _json["key"]; |
| 11587 } |
| 11588 if (_json.containsKey("value")) { |
| 11589 value = _json["value"]; |
| 11590 } |
| 11591 } |
| 11592 |
| 11593 core.Map toJson() { |
| 11594 var _json = new core.Map(); |
| 11595 if (key != null) { |
| 11596 _json["key"] = key; |
| 11597 } |
| 11598 if (value != null) { |
| 11599 _json["value"] = value; |
| 11600 } |
| 11601 return _json; |
| 11602 } |
| 11603 } |
| 11604 |
| 11605 |
| 11606 /** A metadata key/value entry. */ |
| 11607 class Metadata { |
| 11608 /** |
| 11609 * Fingerprint of this resource. A hash of the metadata's contents. This field |
| 11610 * is used for optimistic locking. An up-to-date metadata fingerprint must be |
| 11611 * provided in order to modify metadata. |
| 11612 */ |
| 11613 core.String fingerprint; |
| 11614 |
| 11615 core.List<core.int> get fingerprintAsBytes { |
| 11616 return crypto.CryptoUtils.base64StringToBytes(fingerprint); |
| 11617 } |
| 11618 |
| 11619 void set fingerprintAsBytes(core.List<core.int> _bytes) { |
| 11620 fingerprint = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 11621 } |
| 11622 |
| 11623 /** |
| 11624 * Array of key/value pairs. The total size of all keys and values must be |
| 11625 * less than 512 KB. |
| 11626 */ |
| 11627 core.List<MetadataItems> items; |
| 11628 |
| 11629 /** Type of the resource. */ |
| 11630 core.String kind; |
| 11631 |
| 11632 |
| 11633 Metadata(); |
| 11634 |
| 11635 Metadata.fromJson(core.Map _json) { |
| 11636 if (_json.containsKey("fingerprint")) { |
| 11637 fingerprint = _json["fingerprint"]; |
| 11638 } |
| 11639 if (_json.containsKey("items")) { |
| 11640 items = _json["items"].map((value) => new MetadataItems.fromJson(value)).t
oList(); |
| 11641 } |
| 11642 if (_json.containsKey("kind")) { |
| 11643 kind = _json["kind"]; |
| 11644 } |
| 11645 } |
| 11646 |
| 11647 core.Map toJson() { |
| 11648 var _json = new core.Map(); |
| 11649 if (fingerprint != null) { |
| 11650 _json["fingerprint"] = fingerprint; |
| 11651 } |
| 11652 if (items != null) { |
| 11653 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 11654 } |
| 11655 if (kind != null) { |
| 11656 _json["kind"] = kind; |
| 11657 } |
| 11658 return _json; |
| 11659 } |
| 11660 } |
| 11661 |
| 11662 |
| 11663 /** A network resource. */ |
| 11664 class Network { |
| 11665 /** |
| 11666 * Required; The range of internal addresses that are legal on this network. |
| 11667 * This range is a CIDR specification, for example: 192.168.0.0/16. Provided |
| 11668 * by the client when the network is created. |
| 11669 */ |
| 11670 core.String IPv4Range; |
| 11671 |
| 11672 /** Creation timestamp in RFC3339 text format (output only). */ |
| 11673 core.String creationTimestamp; |
| 11674 |
| 11675 /** |
| 11676 * An optional textual description of the resource; provided by the client |
| 11677 * when the resource is created. |
| 11678 */ |
| 11679 core.String description; |
| 11680 |
| 11681 /** |
| 11682 * An optional address that is used for default routing to other networks. |
| 11683 * This must be within the range specified by IPv4Range, and is typically the |
| 11684 * first usable address in that range. If not specified, the default value is |
| 11685 * the first usable address in IPv4Range. |
| 11686 */ |
| 11687 core.String gatewayIPv4; |
| 11688 |
| 11689 /** |
| 11690 * Unique identifier for the resource; defined by the server (output only). |
| 11691 */ |
| 11692 core.String id; |
| 11693 |
| 11694 /** Type of the resource. */ |
| 11695 core.String kind; |
| 11696 |
| 11697 /** |
| 11698 * Name of the resource; provided by the client when the resource is created. |
| 11699 * The name must be 1-63 characters long, and comply with RFC1035. |
| 11700 */ |
| 11701 core.String name; |
| 11702 |
| 11703 /** Server defined URL for the resource (output only). */ |
| 11704 core.String selfLink; |
| 11705 |
| 11706 |
| 11707 Network(); |
| 11708 |
| 11709 Network.fromJson(core.Map _json) { |
| 11710 if (_json.containsKey("IPv4Range")) { |
| 11711 IPv4Range = _json["IPv4Range"]; |
| 11712 } |
| 11713 if (_json.containsKey("creationTimestamp")) { |
| 11714 creationTimestamp = _json["creationTimestamp"]; |
| 11715 } |
| 11716 if (_json.containsKey("description")) { |
| 11717 description = _json["description"]; |
| 11718 } |
| 11719 if (_json.containsKey("gatewayIPv4")) { |
| 11720 gatewayIPv4 = _json["gatewayIPv4"]; |
| 11721 } |
| 11722 if (_json.containsKey("id")) { |
| 11723 id = _json["id"]; |
| 11724 } |
| 11725 if (_json.containsKey("kind")) { |
| 11726 kind = _json["kind"]; |
| 11727 } |
| 11728 if (_json.containsKey("name")) { |
| 11729 name = _json["name"]; |
| 11730 } |
| 11731 if (_json.containsKey("selfLink")) { |
| 11732 selfLink = _json["selfLink"]; |
| 11733 } |
| 11734 } |
| 11735 |
| 11736 core.Map toJson() { |
| 11737 var _json = new core.Map(); |
| 11738 if (IPv4Range != null) { |
| 11739 _json["IPv4Range"] = IPv4Range; |
| 11740 } |
| 11741 if (creationTimestamp != null) { |
| 11742 _json["creationTimestamp"] = creationTimestamp; |
| 11743 } |
| 11744 if (description != null) { |
| 11745 _json["description"] = description; |
| 11746 } |
| 11747 if (gatewayIPv4 != null) { |
| 11748 _json["gatewayIPv4"] = gatewayIPv4; |
| 11749 } |
| 11750 if (id != null) { |
| 11751 _json["id"] = id; |
| 11752 } |
| 11753 if (kind != null) { |
| 11754 _json["kind"] = kind; |
| 11755 } |
| 11756 if (name != null) { |
| 11757 _json["name"] = name; |
| 11758 } |
| 11759 if (selfLink != null) { |
| 11760 _json["selfLink"] = selfLink; |
| 11761 } |
| 11762 return _json; |
| 11763 } |
| 11764 } |
| 11765 |
| 11766 |
| 11767 /** A network interface resource attached to an instance. */ |
| 11768 class NetworkInterface { |
| 11769 /** |
| 11770 * Array of configurations for this interface. This specifies how this |
| 11771 * interface is configured to interact with other network services, such as |
| 11772 * connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access |
| 11773 * config supported. If there are no accessConfigs specified, then this |
| 11774 * instance will have no external internet access. |
| 11775 */ |
| 11776 core.List<AccessConfig> accessConfigs; |
| 11777 |
| 11778 /** |
| 11779 * Name of the network interface, determined by the server; for network |
| 11780 * devices, these are e.g. eth0, eth1, etc. (output only). |
| 11781 */ |
| 11782 core.String name; |
| 11783 |
| 11784 /** URL of the network resource attached to this interface. */ |
| 11785 core.String network; |
| 11786 |
| 11787 /** |
| 11788 * An optional IPV4 internal network address assigned to the instance for this |
| 11789 * network interface (output only). |
| 11790 */ |
| 11791 core.String networkIP; |
| 11792 |
| 11793 |
| 11794 NetworkInterface(); |
| 11795 |
| 11796 NetworkInterface.fromJson(core.Map _json) { |
| 11797 if (_json.containsKey("accessConfigs")) { |
| 11798 accessConfigs = _json["accessConfigs"].map((value) => new AccessConfig.fro
mJson(value)).toList(); |
| 11799 } |
| 11800 if (_json.containsKey("name")) { |
| 11801 name = _json["name"]; |
| 11802 } |
| 11803 if (_json.containsKey("network")) { |
| 11804 network = _json["network"]; |
| 11805 } |
| 11806 if (_json.containsKey("networkIP")) { |
| 11807 networkIP = _json["networkIP"]; |
| 11808 } |
| 11809 } |
| 11810 |
| 11811 core.Map toJson() { |
| 11812 var _json = new core.Map(); |
| 11813 if (accessConfigs != null) { |
| 11814 _json["accessConfigs"] = accessConfigs.map((value) => (value).toJson()).to
List(); |
| 11815 } |
| 11816 if (name != null) { |
| 11817 _json["name"] = name; |
| 11818 } |
| 11819 if (network != null) { |
| 11820 _json["network"] = network; |
| 11821 } |
| 11822 if (networkIP != null) { |
| 11823 _json["networkIP"] = networkIP; |
| 11824 } |
| 11825 return _json; |
| 11826 } |
| 11827 } |
| 11828 |
| 11829 |
| 11830 /** Contains a list of network resources. */ |
| 11831 class NetworkList { |
| 11832 /** |
| 11833 * Unique identifier for the resource; defined by the server (output only). |
| 11834 */ |
| 11835 core.String id; |
| 11836 |
| 11837 /** The network resources. */ |
| 11838 core.List<Network> items; |
| 11839 |
| 11840 /** Type of resource. */ |
| 11841 core.String kind; |
| 11842 |
| 11843 /** A token used to continue a truncated list request (output only). */ |
| 11844 core.String nextPageToken; |
| 11845 |
| 11846 /** Server defined URL for this resource (output only). */ |
| 11847 core.String selfLink; |
| 11848 |
| 11849 |
| 11850 NetworkList(); |
| 11851 |
| 11852 NetworkList.fromJson(core.Map _json) { |
| 11853 if (_json.containsKey("id")) { |
| 11854 id = _json["id"]; |
| 11855 } |
| 11856 if (_json.containsKey("items")) { |
| 11857 items = _json["items"].map((value) => new Network.fromJson(value)).toList(
); |
| 11858 } |
| 11859 if (_json.containsKey("kind")) { |
| 11860 kind = _json["kind"]; |
| 11861 } |
| 11862 if (_json.containsKey("nextPageToken")) { |
| 11863 nextPageToken = _json["nextPageToken"]; |
| 11864 } |
| 11865 if (_json.containsKey("selfLink")) { |
| 11866 selfLink = _json["selfLink"]; |
| 11867 } |
| 11868 } |
| 11869 |
| 11870 core.Map toJson() { |
| 11871 var _json = new core.Map(); |
| 11872 if (id != null) { |
| 11873 _json["id"] = id; |
| 11874 } |
| 11875 if (items != null) { |
| 11876 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 11877 } |
| 11878 if (kind != null) { |
| 11879 _json["kind"] = kind; |
| 11880 } |
| 11881 if (nextPageToken != null) { |
| 11882 _json["nextPageToken"] = nextPageToken; |
| 11883 } |
| 11884 if (selfLink != null) { |
| 11885 _json["selfLink"] = selfLink; |
| 11886 } |
| 11887 return _json; |
| 11888 } |
| 11889 } |
| 11890 |
| 11891 |
| 11892 /** Not documented yet. */ |
| 11893 class OperationErrorErrors { |
| 11894 /** The error type identifier for this error. */ |
| 11895 core.String code; |
| 11896 |
| 11897 /** |
| 11898 * Indicates the field in the request which caused the error. This property is |
| 11899 * optional. |
| 11900 */ |
| 11901 core.String location; |
| 11902 |
| 11903 /** An optional, human-readable error message. */ |
| 11904 core.String message; |
| 11905 |
| 11906 |
| 11907 OperationErrorErrors(); |
| 11908 |
| 11909 OperationErrorErrors.fromJson(core.Map _json) { |
| 11910 if (_json.containsKey("code")) { |
| 11911 code = _json["code"]; |
| 11912 } |
| 11913 if (_json.containsKey("location")) { |
| 11914 location = _json["location"]; |
| 11915 } |
| 11916 if (_json.containsKey("message")) { |
| 11917 message = _json["message"]; |
| 11918 } |
| 11919 } |
| 11920 |
| 11921 core.Map toJson() { |
| 11922 var _json = new core.Map(); |
| 11923 if (code != null) { |
| 11924 _json["code"] = code; |
| 11925 } |
| 11926 if (location != null) { |
| 11927 _json["location"] = location; |
| 11928 } |
| 11929 if (message != null) { |
| 11930 _json["message"] = message; |
| 11931 } |
| 11932 return _json; |
| 11933 } |
| 11934 } |
| 11935 |
| 11936 |
| 11937 /** |
| 11938 * If errors occurred during processing of this operation, this field will be |
| 11939 * populated (output only). |
| 11940 */ |
| 11941 class OperationError { |
| 11942 /** The array of errors encountered while processing this operation. */ |
| 11943 core.List<OperationErrorErrors> errors; |
| 11944 |
| 11945 |
| 11946 OperationError(); |
| 11947 |
| 11948 OperationError.fromJson(core.Map _json) { |
| 11949 if (_json.containsKey("errors")) { |
| 11950 errors = _json["errors"].map((value) => new OperationErrorErrors.fromJson(
value)).toList(); |
| 11951 } |
| 11952 } |
| 11953 |
| 11954 core.Map toJson() { |
| 11955 var _json = new core.Map(); |
| 11956 if (errors != null) { |
| 11957 _json["errors"] = errors.map((value) => (value).toJson()).toList(); |
| 11958 } |
| 11959 return _json; |
| 11960 } |
| 11961 } |
| 11962 |
| 11963 |
| 11964 /** Not documented yet. */ |
| 11965 class OperationWarningsData { |
| 11966 /** A key for the warning data. */ |
| 11967 core.String key; |
| 11968 |
| 11969 /** A warning data value corresponding to the key. */ |
| 11970 core.String value; |
| 11971 |
| 11972 |
| 11973 OperationWarningsData(); |
| 11974 |
| 11975 OperationWarningsData.fromJson(core.Map _json) { |
| 11976 if (_json.containsKey("key")) { |
| 11977 key = _json["key"]; |
| 11978 } |
| 11979 if (_json.containsKey("value")) { |
| 11980 value = _json["value"]; |
| 11981 } |
| 11982 } |
| 11983 |
| 11984 core.Map toJson() { |
| 11985 var _json = new core.Map(); |
| 11986 if (key != null) { |
| 11987 _json["key"] = key; |
| 11988 } |
| 11989 if (value != null) { |
| 11990 _json["value"] = value; |
| 11991 } |
| 11992 return _json; |
| 11993 } |
| 11994 } |
| 11995 |
| 11996 |
| 11997 /** Not documented yet. */ |
| 11998 class OperationWarnings { |
| 11999 /** |
| 12000 * The warning type identifier for this warning. |
| 12001 * Possible string values are: |
| 12002 * - "DEPRECATED_RESOURCE_USED" |
| 12003 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 12004 * - "INJECTED_KERNELS_DEPRECATED" |
| 12005 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 12006 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 12007 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 12008 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 12009 * - "NEXT_HOP_NOT_RUNNING" |
| 12010 * - "NO_RESULTS_ON_PAGE" |
| 12011 * - "REQUIRED_TOS_AGREEMENT" |
| 12012 * - "RESOURCE_NOT_DELETED" |
| 12013 * - "UNREACHABLE" |
| 12014 */ |
| 12015 core.String code; |
| 12016 |
| 12017 /** Metadata for this warning in 'key: value' format. */ |
| 12018 core.List<OperationWarningsData> data; |
| 12019 |
| 12020 /** Optional human-readable details for this warning. */ |
| 12021 core.String message; |
| 12022 |
| 12023 |
| 12024 OperationWarnings(); |
| 12025 |
| 12026 OperationWarnings.fromJson(core.Map _json) { |
| 12027 if (_json.containsKey("code")) { |
| 12028 code = _json["code"]; |
| 12029 } |
| 12030 if (_json.containsKey("data")) { |
| 12031 data = _json["data"].map((value) => new OperationWarningsData.fromJson(val
ue)).toList(); |
| 12032 } |
| 12033 if (_json.containsKey("message")) { |
| 12034 message = _json["message"]; |
| 12035 } |
| 12036 } |
| 12037 |
| 12038 core.Map toJson() { |
| 12039 var _json = new core.Map(); |
| 12040 if (code != null) { |
| 12041 _json["code"] = code; |
| 12042 } |
| 12043 if (data != null) { |
| 12044 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 12045 } |
| 12046 if (message != null) { |
| 12047 _json["message"] = message; |
| 12048 } |
| 12049 return _json; |
| 12050 } |
| 12051 } |
| 12052 |
| 12053 |
| 12054 /** An operation resource, used to manage asynchronous API requests. */ |
| 12055 class Operation { |
| 12056 /** |
| 12057 * An optional identifier specified by the client when the mutation was |
| 12058 * initiated. Must be unique for all operation resources in the project |
| 12059 * (output only). |
| 12060 */ |
| 12061 core.String clientOperationId; |
| 12062 |
| 12063 /** Creation timestamp in RFC3339 text format (output only). */ |
| 12064 core.String creationTimestamp; |
| 12065 |
| 12066 /** |
| 12067 * The time that this operation was completed. This is in RFC 3339 format |
| 12068 * (output only). |
| 12069 */ |
| 12070 core.String endTime; |
| 12071 |
| 12072 /** |
| 12073 * If errors occurred during processing of this operation, this field will be |
| 12074 * populated (output only). |
| 12075 */ |
| 12076 OperationError error; |
| 12077 |
| 12078 /** |
| 12079 * If operation fails, the HTTP error message returned, e.g. NOT FOUND. |
| 12080 * (output only). |
| 12081 */ |
| 12082 core.String httpErrorMessage; |
| 12083 |
| 12084 /** |
| 12085 * If operation fails, the HTTP error status code returned, e.g. 404. (output |
| 12086 * only). |
| 12087 */ |
| 12088 core.int httpErrorStatusCode; |
| 12089 |
| 12090 /** |
| 12091 * Unique identifier for the resource; defined by the server (output only). |
| 12092 */ |
| 12093 core.String id; |
| 12094 |
| 12095 /** |
| 12096 * The time that this operation was requested. This is in RFC 3339 format |
| 12097 * (output only). |
| 12098 */ |
| 12099 core.String insertTime; |
| 12100 |
| 12101 /** Type of the resource. */ |
| 12102 core.String kind; |
| 12103 |
| 12104 /** Name of the resource (output only). */ |
| 12105 core.String name; |
| 12106 |
| 12107 /** |
| 12108 * Type of the operation. Examples include "insert", "update", and "delete" |
| 12109 * (output only). |
| 12110 */ |
| 12111 core.String operationType; |
| 12112 |
| 12113 /** |
| 12114 * An optional progress indicator that ranges from 0 to 100. There is no |
| 12115 * requirement that this be linear or support any granularity of operations. |
| 12116 * This should not be used to guess at when the operation will be complete. |
| 12117 * This number should be monotonically increasing as the operation progresses |
| 12118 * (output only). |
| 12119 */ |
| 12120 core.int progress; |
| 12121 |
| 12122 /** URL of the region where the operation resides (output only). */ |
| 12123 core.String region; |
| 12124 |
| 12125 /** Server defined URL for the resource (output only). */ |
| 12126 core.String selfLink; |
| 12127 |
| 12128 /** |
| 12129 * The time that this operation was started by the server. This is in RFC 3339 |
| 12130 * format (output only). |
| 12131 */ |
| 12132 core.String startTime; |
| 12133 |
| 12134 /** |
| 12135 * Status of the operation. Can be one of the following: "PENDING", "RUNNING", |
| 12136 * or "DONE" (output only). |
| 12137 * Possible string values are: |
| 12138 * - "DONE" |
| 12139 * - "PENDING" |
| 12140 * - "RUNNING" |
| 12141 */ |
| 12142 core.String status; |
| 12143 |
| 12144 /** |
| 12145 * An optional textual description of the current status of the operation |
| 12146 * (output only). |
| 12147 */ |
| 12148 core.String statusMessage; |
| 12149 |
| 12150 /** |
| 12151 * Unique target id which identifies a particular incarnation of the target |
| 12152 * (output only). |
| 12153 */ |
| 12154 core.String targetId; |
| 12155 |
| 12156 /** URL of the resource the operation is mutating (output only). */ |
| 12157 core.String targetLink; |
| 12158 |
| 12159 /** |
| 12160 * User who requested the operation, for example "user@example.com" (output |
| 12161 * only). |
| 12162 */ |
| 12163 core.String user; |
| 12164 |
| 12165 /** |
| 12166 * If warning messages generated during processing of this operation, this |
| 12167 * field will be populated (output only). |
| 12168 */ |
| 12169 core.List<OperationWarnings> warnings; |
| 12170 |
| 12171 /** URL of the zone where the operation resides (output only). */ |
| 12172 core.String zone; |
| 12173 |
| 12174 |
| 12175 Operation(); |
| 12176 |
| 12177 Operation.fromJson(core.Map _json) { |
| 12178 if (_json.containsKey("clientOperationId")) { |
| 12179 clientOperationId = _json["clientOperationId"]; |
| 12180 } |
| 12181 if (_json.containsKey("creationTimestamp")) { |
| 12182 creationTimestamp = _json["creationTimestamp"]; |
| 12183 } |
| 12184 if (_json.containsKey("endTime")) { |
| 12185 endTime = _json["endTime"]; |
| 12186 } |
| 12187 if (_json.containsKey("error")) { |
| 12188 error = new OperationError.fromJson(_json["error"]); |
| 12189 } |
| 12190 if (_json.containsKey("httpErrorMessage")) { |
| 12191 httpErrorMessage = _json["httpErrorMessage"]; |
| 12192 } |
| 12193 if (_json.containsKey("httpErrorStatusCode")) { |
| 12194 httpErrorStatusCode = _json["httpErrorStatusCode"]; |
| 12195 } |
| 12196 if (_json.containsKey("id")) { |
| 12197 id = _json["id"]; |
| 12198 } |
| 12199 if (_json.containsKey("insertTime")) { |
| 12200 insertTime = _json["insertTime"]; |
| 12201 } |
| 12202 if (_json.containsKey("kind")) { |
| 12203 kind = _json["kind"]; |
| 12204 } |
| 12205 if (_json.containsKey("name")) { |
| 12206 name = _json["name"]; |
| 12207 } |
| 12208 if (_json.containsKey("operationType")) { |
| 12209 operationType = _json["operationType"]; |
| 12210 } |
| 12211 if (_json.containsKey("progress")) { |
| 12212 progress = _json["progress"]; |
| 12213 } |
| 12214 if (_json.containsKey("region")) { |
| 12215 region = _json["region"]; |
| 12216 } |
| 12217 if (_json.containsKey("selfLink")) { |
| 12218 selfLink = _json["selfLink"]; |
| 12219 } |
| 12220 if (_json.containsKey("startTime")) { |
| 12221 startTime = _json["startTime"]; |
| 12222 } |
| 12223 if (_json.containsKey("status")) { |
| 12224 status = _json["status"]; |
| 12225 } |
| 12226 if (_json.containsKey("statusMessage")) { |
| 12227 statusMessage = _json["statusMessage"]; |
| 12228 } |
| 12229 if (_json.containsKey("targetId")) { |
| 12230 targetId = _json["targetId"]; |
| 12231 } |
| 12232 if (_json.containsKey("targetLink")) { |
| 12233 targetLink = _json["targetLink"]; |
| 12234 } |
| 12235 if (_json.containsKey("user")) { |
| 12236 user = _json["user"]; |
| 12237 } |
| 12238 if (_json.containsKey("warnings")) { |
| 12239 warnings = _json["warnings"].map((value) => new OperationWarnings.fromJson
(value)).toList(); |
| 12240 } |
| 12241 if (_json.containsKey("zone")) { |
| 12242 zone = _json["zone"]; |
| 12243 } |
| 12244 } |
| 12245 |
| 12246 core.Map toJson() { |
| 12247 var _json = new core.Map(); |
| 12248 if (clientOperationId != null) { |
| 12249 _json["clientOperationId"] = clientOperationId; |
| 12250 } |
| 12251 if (creationTimestamp != null) { |
| 12252 _json["creationTimestamp"] = creationTimestamp; |
| 12253 } |
| 12254 if (endTime != null) { |
| 12255 _json["endTime"] = endTime; |
| 12256 } |
| 12257 if (error != null) { |
| 12258 _json["error"] = (error).toJson(); |
| 12259 } |
| 12260 if (httpErrorMessage != null) { |
| 12261 _json["httpErrorMessage"] = httpErrorMessage; |
| 12262 } |
| 12263 if (httpErrorStatusCode != null) { |
| 12264 _json["httpErrorStatusCode"] = httpErrorStatusCode; |
| 12265 } |
| 12266 if (id != null) { |
| 12267 _json["id"] = id; |
| 12268 } |
| 12269 if (insertTime != null) { |
| 12270 _json["insertTime"] = insertTime; |
| 12271 } |
| 12272 if (kind != null) { |
| 12273 _json["kind"] = kind; |
| 12274 } |
| 12275 if (name != null) { |
| 12276 _json["name"] = name; |
| 12277 } |
| 12278 if (operationType != null) { |
| 12279 _json["operationType"] = operationType; |
| 12280 } |
| 12281 if (progress != null) { |
| 12282 _json["progress"] = progress; |
| 12283 } |
| 12284 if (region != null) { |
| 12285 _json["region"] = region; |
| 12286 } |
| 12287 if (selfLink != null) { |
| 12288 _json["selfLink"] = selfLink; |
| 12289 } |
| 12290 if (startTime != null) { |
| 12291 _json["startTime"] = startTime; |
| 12292 } |
| 12293 if (status != null) { |
| 12294 _json["status"] = status; |
| 12295 } |
| 12296 if (statusMessage != null) { |
| 12297 _json["statusMessage"] = statusMessage; |
| 12298 } |
| 12299 if (targetId != null) { |
| 12300 _json["targetId"] = targetId; |
| 12301 } |
| 12302 if (targetLink != null) { |
| 12303 _json["targetLink"] = targetLink; |
| 12304 } |
| 12305 if (user != null) { |
| 12306 _json["user"] = user; |
| 12307 } |
| 12308 if (warnings != null) { |
| 12309 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); |
| 12310 } |
| 12311 if (zone != null) { |
| 12312 _json["zone"] = zone; |
| 12313 } |
| 12314 return _json; |
| 12315 } |
| 12316 } |
| 12317 |
| 12318 |
| 12319 /** Not documented yet. */ |
| 12320 class OperationAggregatedList { |
| 12321 /** |
| 12322 * Unique identifier for the resource; defined by the server (output only). |
| 12323 */ |
| 12324 core.String id; |
| 12325 |
| 12326 /** A map of scoped operation lists. */ |
| 12327 core.Map<core.String, OperationsScopedList> items; |
| 12328 |
| 12329 /** Type of resource. */ |
| 12330 core.String kind; |
| 12331 |
| 12332 /** A token used to continue a truncated list request (output only). */ |
| 12333 core.String nextPageToken; |
| 12334 |
| 12335 /** Server defined URL for this resource (output only). */ |
| 12336 core.String selfLink; |
| 12337 |
| 12338 |
| 12339 OperationAggregatedList(); |
| 12340 |
| 12341 OperationAggregatedList.fromJson(core.Map _json) { |
| 12342 if (_json.containsKey("id")) { |
| 12343 id = _json["id"]; |
| 12344 } |
| 12345 if (_json.containsKey("items")) { |
| 12346 items = common_internal.mapMap(_json["items"], (item) => new OperationsSco
pedList.fromJson(item)); |
| 12347 } |
| 12348 if (_json.containsKey("kind")) { |
| 12349 kind = _json["kind"]; |
| 12350 } |
| 12351 if (_json.containsKey("nextPageToken")) { |
| 12352 nextPageToken = _json["nextPageToken"]; |
| 12353 } |
| 12354 if (_json.containsKey("selfLink")) { |
| 12355 selfLink = _json["selfLink"]; |
| 12356 } |
| 12357 } |
| 12358 |
| 12359 core.Map toJson() { |
| 12360 var _json = new core.Map(); |
| 12361 if (id != null) { |
| 12362 _json["id"] = id; |
| 12363 } |
| 12364 if (items != null) { |
| 12365 _json["items"] = common_internal.mapMap(items, (item) => (item).toJson()); |
| 12366 } |
| 12367 if (kind != null) { |
| 12368 _json["kind"] = kind; |
| 12369 } |
| 12370 if (nextPageToken != null) { |
| 12371 _json["nextPageToken"] = nextPageToken; |
| 12372 } |
| 12373 if (selfLink != null) { |
| 12374 _json["selfLink"] = selfLink; |
| 12375 } |
| 12376 return _json; |
| 12377 } |
| 12378 } |
| 12379 |
| 12380 |
| 12381 /** Contains a list of operation resources. */ |
| 12382 class OperationList { |
| 12383 /** |
| 12384 * Unique identifier for the resource; defined by the server (output only). |
| 12385 */ |
| 12386 core.String id; |
| 12387 |
| 12388 /** The operation resources. */ |
| 12389 core.List<Operation> items; |
| 12390 |
| 12391 /** Type of resource. */ |
| 12392 core.String kind; |
| 12393 |
| 12394 /** A token used to continue a truncated list request (output only). */ |
| 12395 core.String nextPageToken; |
| 12396 |
| 12397 /** Server defined URL for this resource (output only). */ |
| 12398 core.String selfLink; |
| 12399 |
| 12400 |
| 12401 OperationList(); |
| 12402 |
| 12403 OperationList.fromJson(core.Map _json) { |
| 12404 if (_json.containsKey("id")) { |
| 12405 id = _json["id"]; |
| 12406 } |
| 12407 if (_json.containsKey("items")) { |
| 12408 items = _json["items"].map((value) => new Operation.fromJson(value)).toLis
t(); |
| 12409 } |
| 12410 if (_json.containsKey("kind")) { |
| 12411 kind = _json["kind"]; |
| 12412 } |
| 12413 if (_json.containsKey("nextPageToken")) { |
| 12414 nextPageToken = _json["nextPageToken"]; |
| 12415 } |
| 12416 if (_json.containsKey("selfLink")) { |
| 12417 selfLink = _json["selfLink"]; |
| 12418 } |
| 12419 } |
| 12420 |
| 12421 core.Map toJson() { |
| 12422 var _json = new core.Map(); |
| 12423 if (id != null) { |
| 12424 _json["id"] = id; |
| 12425 } |
| 12426 if (items != null) { |
| 12427 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 12428 } |
| 12429 if (kind != null) { |
| 12430 _json["kind"] = kind; |
| 12431 } |
| 12432 if (nextPageToken != null) { |
| 12433 _json["nextPageToken"] = nextPageToken; |
| 12434 } |
| 12435 if (selfLink != null) { |
| 12436 _json["selfLink"] = selfLink; |
| 12437 } |
| 12438 return _json; |
| 12439 } |
| 12440 } |
| 12441 |
| 12442 |
| 12443 /** Not documented yet. */ |
| 12444 class OperationsScopedListWarningData { |
| 12445 /** A key for the warning data. */ |
| 12446 core.String key; |
| 12447 |
| 12448 /** A warning data value corresponding to the key. */ |
| 12449 core.String value; |
| 12450 |
| 12451 |
| 12452 OperationsScopedListWarningData(); |
| 12453 |
| 12454 OperationsScopedListWarningData.fromJson(core.Map _json) { |
| 12455 if (_json.containsKey("key")) { |
| 12456 key = _json["key"]; |
| 12457 } |
| 12458 if (_json.containsKey("value")) { |
| 12459 value = _json["value"]; |
| 12460 } |
| 12461 } |
| 12462 |
| 12463 core.Map toJson() { |
| 12464 var _json = new core.Map(); |
| 12465 if (key != null) { |
| 12466 _json["key"] = key; |
| 12467 } |
| 12468 if (value != null) { |
| 12469 _json["value"] = value; |
| 12470 } |
| 12471 return _json; |
| 12472 } |
| 12473 } |
| 12474 |
| 12475 |
| 12476 /** |
| 12477 * Informational warning which replaces the list of operations when the list is |
| 12478 * empty. |
| 12479 */ |
| 12480 class OperationsScopedListWarning { |
| 12481 /** |
| 12482 * The warning type identifier for this warning. |
| 12483 * Possible string values are: |
| 12484 * - "DEPRECATED_RESOURCE_USED" |
| 12485 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 12486 * - "INJECTED_KERNELS_DEPRECATED" |
| 12487 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 12488 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 12489 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 12490 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 12491 * - "NEXT_HOP_NOT_RUNNING" |
| 12492 * - "NO_RESULTS_ON_PAGE" |
| 12493 * - "REQUIRED_TOS_AGREEMENT" |
| 12494 * - "RESOURCE_NOT_DELETED" |
| 12495 * - "UNREACHABLE" |
| 12496 */ |
| 12497 core.String code; |
| 12498 |
| 12499 /** Metadata for this warning in 'key: value' format. */ |
| 12500 core.List<OperationsScopedListWarningData> data; |
| 12501 |
| 12502 /** Optional human-readable details for this warning. */ |
| 12503 core.String message; |
| 12504 |
| 12505 |
| 12506 OperationsScopedListWarning(); |
| 12507 |
| 12508 OperationsScopedListWarning.fromJson(core.Map _json) { |
| 12509 if (_json.containsKey("code")) { |
| 12510 code = _json["code"]; |
| 12511 } |
| 12512 if (_json.containsKey("data")) { |
| 12513 data = _json["data"].map((value) => new OperationsScopedListWarningData.fr
omJson(value)).toList(); |
| 12514 } |
| 12515 if (_json.containsKey("message")) { |
| 12516 message = _json["message"]; |
| 12517 } |
| 12518 } |
| 12519 |
| 12520 core.Map toJson() { |
| 12521 var _json = new core.Map(); |
| 12522 if (code != null) { |
| 12523 _json["code"] = code; |
| 12524 } |
| 12525 if (data != null) { |
| 12526 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 12527 } |
| 12528 if (message != null) { |
| 12529 _json["message"] = message; |
| 12530 } |
| 12531 return _json; |
| 12532 } |
| 12533 } |
| 12534 |
| 12535 |
| 12536 /** Not documented yet. */ |
| 12537 class OperationsScopedList { |
| 12538 /** List of operations contained in this scope. */ |
| 12539 core.List<Operation> operations; |
| 12540 |
| 12541 /** |
| 12542 * Informational warning which replaces the list of operations when the list |
| 12543 * is empty. |
| 12544 */ |
| 12545 OperationsScopedListWarning warning; |
| 12546 |
| 12547 |
| 12548 OperationsScopedList(); |
| 12549 |
| 12550 OperationsScopedList.fromJson(core.Map _json) { |
| 12551 if (_json.containsKey("operations")) { |
| 12552 operations = _json["operations"].map((value) => new Operation.fromJson(val
ue)).toList(); |
| 12553 } |
| 12554 if (_json.containsKey("warning")) { |
| 12555 warning = new OperationsScopedListWarning.fromJson(_json["warning"]); |
| 12556 } |
| 12557 } |
| 12558 |
| 12559 core.Map toJson() { |
| 12560 var _json = new core.Map(); |
| 12561 if (operations != null) { |
| 12562 _json["operations"] = operations.map((value) => (value).toJson()).toList()
; |
| 12563 } |
| 12564 if (warning != null) { |
| 12565 _json["warning"] = (warning).toJson(); |
| 12566 } |
| 12567 return _json; |
| 12568 } |
| 12569 } |
| 12570 |
| 12571 |
| 12572 /** |
| 12573 * A matcher for the path portion of the URL. The BackendService from the |
| 12574 * longest-matched rule will serve the URL. If no rule was matched, the |
| 12575 * default_service will be used. |
| 12576 */ |
| 12577 class PathMatcher { |
| 12578 /** |
| 12579 * The URL to the BackendService resource. This will be used if none of the |
| 12580 * 'pathRules' defined by this PathMatcher is met by the URL's path portion. |
| 12581 */ |
| 12582 core.String defaultService; |
| 12583 |
| 12584 /** Not documented yet. */ |
| 12585 core.String description; |
| 12586 |
| 12587 /** The name to which this PathMatcher is referred by the HostRule. */ |
| 12588 core.String name; |
| 12589 |
| 12590 /** The list of path rules. */ |
| 12591 core.List<PathRule> pathRules; |
| 12592 |
| 12593 |
| 12594 PathMatcher(); |
| 12595 |
| 12596 PathMatcher.fromJson(core.Map _json) { |
| 12597 if (_json.containsKey("defaultService")) { |
| 12598 defaultService = _json["defaultService"]; |
| 12599 } |
| 12600 if (_json.containsKey("description")) { |
| 12601 description = _json["description"]; |
| 12602 } |
| 12603 if (_json.containsKey("name")) { |
| 12604 name = _json["name"]; |
| 12605 } |
| 12606 if (_json.containsKey("pathRules")) { |
| 12607 pathRules = _json["pathRules"].map((value) => new PathRule.fromJson(value)
).toList(); |
| 12608 } |
| 12609 } |
| 12610 |
| 12611 core.Map toJson() { |
| 12612 var _json = new core.Map(); |
| 12613 if (defaultService != null) { |
| 12614 _json["defaultService"] = defaultService; |
| 12615 } |
| 12616 if (description != null) { |
| 12617 _json["description"] = description; |
| 12618 } |
| 12619 if (name != null) { |
| 12620 _json["name"] = name; |
| 12621 } |
| 12622 if (pathRules != null) { |
| 12623 _json["pathRules"] = pathRules.map((value) => (value).toJson()).toList(); |
| 12624 } |
| 12625 return _json; |
| 12626 } |
| 12627 } |
| 12628 |
| 12629 |
| 12630 /** |
| 12631 * A path-matching rule for a URL. If matched, will use the specified |
| 12632 * BackendService to handle the traffic arriving at this URL. |
| 12633 */ |
| 12634 class PathRule { |
| 12635 /** |
| 12636 * The list of path patterns to match. Each must start with / and the only |
| 12637 * place a * is allowed is at the end following a /. The string fed to the |
| 12638 * path matcher does not include any text after the first ? or #, and those |
| 12639 * chars are not allowed here. |
| 12640 */ |
| 12641 core.List<core.String> paths; |
| 12642 |
| 12643 /** The URL of the BackendService resource if this rule is matched. */ |
| 12644 core.String service; |
| 12645 |
| 12646 |
| 12647 PathRule(); |
| 12648 |
| 12649 PathRule.fromJson(core.Map _json) { |
| 12650 if (_json.containsKey("paths")) { |
| 12651 paths = _json["paths"]; |
| 12652 } |
| 12653 if (_json.containsKey("service")) { |
| 12654 service = _json["service"]; |
| 12655 } |
| 12656 } |
| 12657 |
| 12658 core.Map toJson() { |
| 12659 var _json = new core.Map(); |
| 12660 if (paths != null) { |
| 12661 _json["paths"] = paths; |
| 12662 } |
| 12663 if (service != null) { |
| 12664 _json["service"] = service; |
| 12665 } |
| 12666 return _json; |
| 12667 } |
| 12668 } |
| 12669 |
| 12670 |
| 12671 /** |
| 12672 * A project resource. Projects can be created only in the APIs Console. Unless |
| 12673 * marked otherwise, values can only be modified in the console. |
| 12674 */ |
| 12675 class Project { |
| 12676 /** |
| 12677 * Metadata key/value pairs available to all instances contained in this |
| 12678 * project. |
| 12679 */ |
| 12680 Metadata commonInstanceMetadata; |
| 12681 |
| 12682 /** Creation timestamp in RFC3339 text format (output only). */ |
| 12683 core.String creationTimestamp; |
| 12684 |
| 12685 /** An optional textual description of the resource. */ |
| 12686 core.String description; |
| 12687 |
| 12688 /** |
| 12689 * Unique identifier for the resource; defined by the server (output only). |
| 12690 */ |
| 12691 core.String id; |
| 12692 |
| 12693 /** Type of the resource. */ |
| 12694 core.String kind; |
| 12695 |
| 12696 /** Name of the resource. */ |
| 12697 core.String name; |
| 12698 |
| 12699 /** Quotas assigned to this project. */ |
| 12700 core.List<Quota> quotas; |
| 12701 |
| 12702 /** Server defined URL for the resource (output only). */ |
| 12703 core.String selfLink; |
| 12704 |
| 12705 /** |
| 12706 * The location in Cloud Storage and naming method of the daily usage report. |
| 12707 */ |
| 12708 UsageExportLocation usageExportLocation; |
| 12709 |
| 12710 |
| 12711 Project(); |
| 12712 |
| 12713 Project.fromJson(core.Map _json) { |
| 12714 if (_json.containsKey("commonInstanceMetadata")) { |
| 12715 commonInstanceMetadata = new Metadata.fromJson(_json["commonInstanceMetada
ta"]); |
| 12716 } |
| 12717 if (_json.containsKey("creationTimestamp")) { |
| 12718 creationTimestamp = _json["creationTimestamp"]; |
| 12719 } |
| 12720 if (_json.containsKey("description")) { |
| 12721 description = _json["description"]; |
| 12722 } |
| 12723 if (_json.containsKey("id")) { |
| 12724 id = _json["id"]; |
| 12725 } |
| 12726 if (_json.containsKey("kind")) { |
| 12727 kind = _json["kind"]; |
| 12728 } |
| 12729 if (_json.containsKey("name")) { |
| 12730 name = _json["name"]; |
| 12731 } |
| 12732 if (_json.containsKey("quotas")) { |
| 12733 quotas = _json["quotas"].map((value) => new Quota.fromJson(value)).toList(
); |
| 12734 } |
| 12735 if (_json.containsKey("selfLink")) { |
| 12736 selfLink = _json["selfLink"]; |
| 12737 } |
| 12738 if (_json.containsKey("usageExportLocation")) { |
| 12739 usageExportLocation = new UsageExportLocation.fromJson(_json["usageExportL
ocation"]); |
| 12740 } |
| 12741 } |
| 12742 |
| 12743 core.Map toJson() { |
| 12744 var _json = new core.Map(); |
| 12745 if (commonInstanceMetadata != null) { |
| 12746 _json["commonInstanceMetadata"] = (commonInstanceMetadata).toJson(); |
| 12747 } |
| 12748 if (creationTimestamp != null) { |
| 12749 _json["creationTimestamp"] = creationTimestamp; |
| 12750 } |
| 12751 if (description != null) { |
| 12752 _json["description"] = description; |
| 12753 } |
| 12754 if (id != null) { |
| 12755 _json["id"] = id; |
| 12756 } |
| 12757 if (kind != null) { |
| 12758 _json["kind"] = kind; |
| 12759 } |
| 12760 if (name != null) { |
| 12761 _json["name"] = name; |
| 12762 } |
| 12763 if (quotas != null) { |
| 12764 _json["quotas"] = quotas.map((value) => (value).toJson()).toList(); |
| 12765 } |
| 12766 if (selfLink != null) { |
| 12767 _json["selfLink"] = selfLink; |
| 12768 } |
| 12769 if (usageExportLocation != null) { |
| 12770 _json["usageExportLocation"] = (usageExportLocation).toJson(); |
| 12771 } |
| 12772 return _json; |
| 12773 } |
| 12774 } |
| 12775 |
| 12776 |
| 12777 /** A quotas entry. */ |
| 12778 class Quota { |
| 12779 /** Quota limit for this metric. */ |
| 12780 core.double limit; |
| 12781 |
| 12782 /** |
| 12783 * Name of the quota metric. |
| 12784 * Possible string values are: |
| 12785 * - "BACKEND_SERVICES" |
| 12786 * - "CPUS" |
| 12787 * - "DISKS" |
| 12788 * - "DISKS_TOTAL_GB" |
| 12789 * - "EPHEMERAL_ADDRESSES" |
| 12790 * - "FIREWALLS" |
| 12791 * - "FORWARDING_RULES" |
| 12792 * - "HEALTH_CHECKS" |
| 12793 * - "IMAGES" |
| 12794 * - "IMAGES_TOTAL_GB" |
| 12795 * - "INSTANCES" |
| 12796 * - "IN_USE_ADDRESSES" |
| 12797 * - "KERNELS" |
| 12798 * - "KERNELS_TOTAL_GB" |
| 12799 * - "NETWORKS" |
| 12800 * - "OPERATIONS" |
| 12801 * - "ROUTES" |
| 12802 * - "SNAPSHOTS" |
| 12803 * - "SSD_TOTAL_GB" |
| 12804 * - "STATIC_ADDRESSES" |
| 12805 * - "TARGET_HTTP_PROXIES" |
| 12806 * - "TARGET_INSTANCES" |
| 12807 * - "TARGET_POOLS" |
| 12808 * - "URL_MAPS" |
| 12809 */ |
| 12810 core.String metric; |
| 12811 |
| 12812 /** Current usage of this metric. */ |
| 12813 core.double usage; |
| 12814 |
| 12815 |
| 12816 Quota(); |
| 12817 |
| 12818 Quota.fromJson(core.Map _json) { |
| 12819 if (_json.containsKey("limit")) { |
| 12820 limit = _json["limit"]; |
| 12821 } |
| 12822 if (_json.containsKey("metric")) { |
| 12823 metric = _json["metric"]; |
| 12824 } |
| 12825 if (_json.containsKey("usage")) { |
| 12826 usage = _json["usage"]; |
| 12827 } |
| 12828 } |
| 12829 |
| 12830 core.Map toJson() { |
| 12831 var _json = new core.Map(); |
| 12832 if (limit != null) { |
| 12833 _json["limit"] = limit; |
| 12834 } |
| 12835 if (metric != null) { |
| 12836 _json["metric"] = metric; |
| 12837 } |
| 12838 if (usage != null) { |
| 12839 _json["usage"] = usage; |
| 12840 } |
| 12841 return _json; |
| 12842 } |
| 12843 } |
| 12844 |
| 12845 |
| 12846 /** Region resource. */ |
| 12847 class Region { |
| 12848 /** Creation timestamp in RFC3339 text format (output only). */ |
| 12849 core.String creationTimestamp; |
| 12850 |
| 12851 /** The deprecation status associated with this region. */ |
| 12852 DeprecationStatus deprecated; |
| 12853 |
| 12854 /** Textual description of the resource. */ |
| 12855 core.String description; |
| 12856 |
| 12857 /** |
| 12858 * Unique identifier for the resource; defined by the server (output only). |
| 12859 */ |
| 12860 core.String id; |
| 12861 |
| 12862 /** Type of the resource. */ |
| 12863 core.String kind; |
| 12864 |
| 12865 /** Name of the resource. */ |
| 12866 core.String name; |
| 12867 |
| 12868 /** Quotas assigned to this region. */ |
| 12869 core.List<Quota> quotas; |
| 12870 |
| 12871 /** Server defined URL for the resource (output only). */ |
| 12872 core.String selfLink; |
| 12873 |
| 12874 /** |
| 12875 * Status of the region, "UP" or "DOWN". |
| 12876 * Possible string values are: |
| 12877 * - "DOWN" |
| 12878 * - "UP" |
| 12879 */ |
| 12880 core.String status; |
| 12881 |
| 12882 /** A list of zones homed in this region, in the form of resource URLs. */ |
| 12883 core.List<core.String> zones; |
| 12884 |
| 12885 |
| 12886 Region(); |
| 12887 |
| 12888 Region.fromJson(core.Map _json) { |
| 12889 if (_json.containsKey("creationTimestamp")) { |
| 12890 creationTimestamp = _json["creationTimestamp"]; |
| 12891 } |
| 12892 if (_json.containsKey("deprecated")) { |
| 12893 deprecated = new DeprecationStatus.fromJson(_json["deprecated"]); |
| 12894 } |
| 12895 if (_json.containsKey("description")) { |
| 12896 description = _json["description"]; |
| 12897 } |
| 12898 if (_json.containsKey("id")) { |
| 12899 id = _json["id"]; |
| 12900 } |
| 12901 if (_json.containsKey("kind")) { |
| 12902 kind = _json["kind"]; |
| 12903 } |
| 12904 if (_json.containsKey("name")) { |
| 12905 name = _json["name"]; |
| 12906 } |
| 12907 if (_json.containsKey("quotas")) { |
| 12908 quotas = _json["quotas"].map((value) => new Quota.fromJson(value)).toList(
); |
| 12909 } |
| 12910 if (_json.containsKey("selfLink")) { |
| 12911 selfLink = _json["selfLink"]; |
| 12912 } |
| 12913 if (_json.containsKey("status")) { |
| 12914 status = _json["status"]; |
| 12915 } |
| 12916 if (_json.containsKey("zones")) { |
| 12917 zones = _json["zones"]; |
| 12918 } |
| 12919 } |
| 12920 |
| 12921 core.Map toJson() { |
| 12922 var _json = new core.Map(); |
| 12923 if (creationTimestamp != null) { |
| 12924 _json["creationTimestamp"] = creationTimestamp; |
| 12925 } |
| 12926 if (deprecated != null) { |
| 12927 _json["deprecated"] = (deprecated).toJson(); |
| 12928 } |
| 12929 if (description != null) { |
| 12930 _json["description"] = description; |
| 12931 } |
| 12932 if (id != null) { |
| 12933 _json["id"] = id; |
| 12934 } |
| 12935 if (kind != null) { |
| 12936 _json["kind"] = kind; |
| 12937 } |
| 12938 if (name != null) { |
| 12939 _json["name"] = name; |
| 12940 } |
| 12941 if (quotas != null) { |
| 12942 _json["quotas"] = quotas.map((value) => (value).toJson()).toList(); |
| 12943 } |
| 12944 if (selfLink != null) { |
| 12945 _json["selfLink"] = selfLink; |
| 12946 } |
| 12947 if (status != null) { |
| 12948 _json["status"] = status; |
| 12949 } |
| 12950 if (zones != null) { |
| 12951 _json["zones"] = zones; |
| 12952 } |
| 12953 return _json; |
| 12954 } |
| 12955 } |
| 12956 |
| 12957 |
| 12958 /** Contains a list of region resources. */ |
| 12959 class RegionList { |
| 12960 /** |
| 12961 * Unique identifier for the resource; defined by the server (output only). |
| 12962 */ |
| 12963 core.String id; |
| 12964 |
| 12965 /** The region resources. */ |
| 12966 core.List<Region> items; |
| 12967 |
| 12968 /** Type of resource. */ |
| 12969 core.String kind; |
| 12970 |
| 12971 /** A token used to continue a truncated list request (output only). */ |
| 12972 core.String nextPageToken; |
| 12973 |
| 12974 /** Server defined URL for this resource (output only). */ |
| 12975 core.String selfLink; |
| 12976 |
| 12977 |
| 12978 RegionList(); |
| 12979 |
| 12980 RegionList.fromJson(core.Map _json) { |
| 12981 if (_json.containsKey("id")) { |
| 12982 id = _json["id"]; |
| 12983 } |
| 12984 if (_json.containsKey("items")) { |
| 12985 items = _json["items"].map((value) => new Region.fromJson(value)).toList()
; |
| 12986 } |
| 12987 if (_json.containsKey("kind")) { |
| 12988 kind = _json["kind"]; |
| 12989 } |
| 12990 if (_json.containsKey("nextPageToken")) { |
| 12991 nextPageToken = _json["nextPageToken"]; |
| 12992 } |
| 12993 if (_json.containsKey("selfLink")) { |
| 12994 selfLink = _json["selfLink"]; |
| 12995 } |
| 12996 } |
| 12997 |
| 12998 core.Map toJson() { |
| 12999 var _json = new core.Map(); |
| 13000 if (id != null) { |
| 13001 _json["id"] = id; |
| 13002 } |
| 13003 if (items != null) { |
| 13004 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 13005 } |
| 13006 if (kind != null) { |
| 13007 _json["kind"] = kind; |
| 13008 } |
| 13009 if (nextPageToken != null) { |
| 13010 _json["nextPageToken"] = nextPageToken; |
| 13011 } |
| 13012 if (selfLink != null) { |
| 13013 _json["selfLink"] = selfLink; |
| 13014 } |
| 13015 return _json; |
| 13016 } |
| 13017 } |
| 13018 |
| 13019 |
| 13020 /** Not documented yet. */ |
| 13021 class ResourceGroupReference { |
| 13022 /** |
| 13023 * A URI referencing one of the resource views listed in the backend service. |
| 13024 */ |
| 13025 core.String group; |
| 13026 |
| 13027 |
| 13028 ResourceGroupReference(); |
| 13029 |
| 13030 ResourceGroupReference.fromJson(core.Map _json) { |
| 13031 if (_json.containsKey("group")) { |
| 13032 group = _json["group"]; |
| 13033 } |
| 13034 } |
| 13035 |
| 13036 core.Map toJson() { |
| 13037 var _json = new core.Map(); |
| 13038 if (group != null) { |
| 13039 _json["group"] = group; |
| 13040 } |
| 13041 return _json; |
| 13042 } |
| 13043 } |
| 13044 |
| 13045 |
| 13046 /** Not documented yet. */ |
| 13047 class RouteWarningsData { |
| 13048 /** A key for the warning data. */ |
| 13049 core.String key; |
| 13050 |
| 13051 /** A warning data value corresponding to the key. */ |
| 13052 core.String value; |
| 13053 |
| 13054 |
| 13055 RouteWarningsData(); |
| 13056 |
| 13057 RouteWarningsData.fromJson(core.Map _json) { |
| 13058 if (_json.containsKey("key")) { |
| 13059 key = _json["key"]; |
| 13060 } |
| 13061 if (_json.containsKey("value")) { |
| 13062 value = _json["value"]; |
| 13063 } |
| 13064 } |
| 13065 |
| 13066 core.Map toJson() { |
| 13067 var _json = new core.Map(); |
| 13068 if (key != null) { |
| 13069 _json["key"] = key; |
| 13070 } |
| 13071 if (value != null) { |
| 13072 _json["value"] = value; |
| 13073 } |
| 13074 return _json; |
| 13075 } |
| 13076 } |
| 13077 |
| 13078 |
| 13079 /** Not documented yet. */ |
| 13080 class RouteWarnings { |
| 13081 /** |
| 13082 * The warning type identifier for this warning. |
| 13083 * Possible string values are: |
| 13084 * - "DEPRECATED_RESOURCE_USED" |
| 13085 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 13086 * - "INJECTED_KERNELS_DEPRECATED" |
| 13087 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 13088 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 13089 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 13090 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 13091 * - "NEXT_HOP_NOT_RUNNING" |
| 13092 * - "NO_RESULTS_ON_PAGE" |
| 13093 * - "REQUIRED_TOS_AGREEMENT" |
| 13094 * - "RESOURCE_NOT_DELETED" |
| 13095 * - "UNREACHABLE" |
| 13096 */ |
| 13097 core.String code; |
| 13098 |
| 13099 /** Metadata for this warning in 'key: value' format. */ |
| 13100 core.List<RouteWarningsData> data; |
| 13101 |
| 13102 /** Optional human-readable details for this warning. */ |
| 13103 core.String message; |
| 13104 |
| 13105 |
| 13106 RouteWarnings(); |
| 13107 |
| 13108 RouteWarnings.fromJson(core.Map _json) { |
| 13109 if (_json.containsKey("code")) { |
| 13110 code = _json["code"]; |
| 13111 } |
| 13112 if (_json.containsKey("data")) { |
| 13113 data = _json["data"].map((value) => new RouteWarningsData.fromJson(value))
.toList(); |
| 13114 } |
| 13115 if (_json.containsKey("message")) { |
| 13116 message = _json["message"]; |
| 13117 } |
| 13118 } |
| 13119 |
| 13120 core.Map toJson() { |
| 13121 var _json = new core.Map(); |
| 13122 if (code != null) { |
| 13123 _json["code"] = code; |
| 13124 } |
| 13125 if (data != null) { |
| 13126 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 13127 } |
| 13128 if (message != null) { |
| 13129 _json["message"] = message; |
| 13130 } |
| 13131 return _json; |
| 13132 } |
| 13133 } |
| 13134 |
| 13135 |
| 13136 /** |
| 13137 * The route resource. A Route is a rule that specifies how certain packets |
| 13138 * should be handled by the virtual network. Routes are associated with VMs by |
| 13139 * tag and the set of Routes for a particular VM is called its routing table. |
| 13140 * For each packet leaving a VM, the system searches that VM's routing table for |
| 13141 * a single best matching Route. Routes match packets by destination IP address, |
| 13142 * preferring smaller or more specific ranges over larger ones. If there is a |
| 13143 * tie, the system selects the Route with the smallest priority value. If there |
| 13144 * is still a tie, it uses the layer three and four packet headers to select |
| 13145 * just one of the remaining matching Routes. The packet is then forwarded as |
| 13146 * specified by the next_hop field of the winning Route -- either to another VM |
| 13147 * destination, a VM gateway or a GCE operated gateway. Packets that do not |
| 13148 * match any Route in the sending VM's routing table will be dropped. |
| 13149 */ |
| 13150 class Route { |
| 13151 /** Creation timestamp in RFC3339 text format (output only). */ |
| 13152 core.String creationTimestamp; |
| 13153 |
| 13154 /** |
| 13155 * An optional textual description of the resource; provided by the client |
| 13156 * when the resource is created. |
| 13157 */ |
| 13158 core.String description; |
| 13159 |
| 13160 /** Which packets does this route apply to? */ |
| 13161 core.String destRange; |
| 13162 |
| 13163 /** |
| 13164 * Unique identifier for the resource; defined by the server (output only). |
| 13165 */ |
| 13166 core.String id; |
| 13167 |
| 13168 /** Type of the resource. */ |
| 13169 core.String kind; |
| 13170 |
| 13171 /** |
| 13172 * Name of the resource; provided by the client when the resource is created. |
| 13173 * The name must be 1-63 characters long, and comply with RFC1035. |
| 13174 */ |
| 13175 core.String name; |
| 13176 |
| 13177 /** |
| 13178 * URL of the network to which this route is applied; provided by the client |
| 13179 * when the route is created. |
| 13180 */ |
| 13181 core.String network; |
| 13182 |
| 13183 /** The URL to a gateway that should handle matching packets. */ |
| 13184 core.String nextHopGateway; |
| 13185 |
| 13186 /** The URL to an instance that should handle matching packets. */ |
| 13187 core.String nextHopInstance; |
| 13188 |
| 13189 /** |
| 13190 * The network IP address of an instance that should handle matching packets. |
| 13191 */ |
| 13192 core.String nextHopIp; |
| 13193 |
| 13194 /** The URL of the local network if it should handle matching packets. */ |
| 13195 core.String nextHopNetwork; |
| 13196 |
| 13197 /** |
| 13198 * Breaks ties between Routes of equal specificity. Routes with smaller values |
| 13199 * win when tied with routes with larger values. |
| 13200 */ |
| 13201 core.int priority; |
| 13202 |
| 13203 /** Server defined URL for the resource (output only). */ |
| 13204 core.String selfLink; |
| 13205 |
| 13206 /** A list of instance tags to which this route applies. */ |
| 13207 core.List<core.String> tags; |
| 13208 |
| 13209 /** |
| 13210 * If potential misconfigurations are detected for this route, this field will |
| 13211 * be populated with warning messages. |
| 13212 */ |
| 13213 core.List<RouteWarnings> warnings; |
| 13214 |
| 13215 |
| 13216 Route(); |
| 13217 |
| 13218 Route.fromJson(core.Map _json) { |
| 13219 if (_json.containsKey("creationTimestamp")) { |
| 13220 creationTimestamp = _json["creationTimestamp"]; |
| 13221 } |
| 13222 if (_json.containsKey("description")) { |
| 13223 description = _json["description"]; |
| 13224 } |
| 13225 if (_json.containsKey("destRange")) { |
| 13226 destRange = _json["destRange"]; |
| 13227 } |
| 13228 if (_json.containsKey("id")) { |
| 13229 id = _json["id"]; |
| 13230 } |
| 13231 if (_json.containsKey("kind")) { |
| 13232 kind = _json["kind"]; |
| 13233 } |
| 13234 if (_json.containsKey("name")) { |
| 13235 name = _json["name"]; |
| 13236 } |
| 13237 if (_json.containsKey("network")) { |
| 13238 network = _json["network"]; |
| 13239 } |
| 13240 if (_json.containsKey("nextHopGateway")) { |
| 13241 nextHopGateway = _json["nextHopGateway"]; |
| 13242 } |
| 13243 if (_json.containsKey("nextHopInstance")) { |
| 13244 nextHopInstance = _json["nextHopInstance"]; |
| 13245 } |
| 13246 if (_json.containsKey("nextHopIp")) { |
| 13247 nextHopIp = _json["nextHopIp"]; |
| 13248 } |
| 13249 if (_json.containsKey("nextHopNetwork")) { |
| 13250 nextHopNetwork = _json["nextHopNetwork"]; |
| 13251 } |
| 13252 if (_json.containsKey("priority")) { |
| 13253 priority = _json["priority"]; |
| 13254 } |
| 13255 if (_json.containsKey("selfLink")) { |
| 13256 selfLink = _json["selfLink"]; |
| 13257 } |
| 13258 if (_json.containsKey("tags")) { |
| 13259 tags = _json["tags"]; |
| 13260 } |
| 13261 if (_json.containsKey("warnings")) { |
| 13262 warnings = _json["warnings"].map((value) => new RouteWarnings.fromJson(val
ue)).toList(); |
| 13263 } |
| 13264 } |
| 13265 |
| 13266 core.Map toJson() { |
| 13267 var _json = new core.Map(); |
| 13268 if (creationTimestamp != null) { |
| 13269 _json["creationTimestamp"] = creationTimestamp; |
| 13270 } |
| 13271 if (description != null) { |
| 13272 _json["description"] = description; |
| 13273 } |
| 13274 if (destRange != null) { |
| 13275 _json["destRange"] = destRange; |
| 13276 } |
| 13277 if (id != null) { |
| 13278 _json["id"] = id; |
| 13279 } |
| 13280 if (kind != null) { |
| 13281 _json["kind"] = kind; |
| 13282 } |
| 13283 if (name != null) { |
| 13284 _json["name"] = name; |
| 13285 } |
| 13286 if (network != null) { |
| 13287 _json["network"] = network; |
| 13288 } |
| 13289 if (nextHopGateway != null) { |
| 13290 _json["nextHopGateway"] = nextHopGateway; |
| 13291 } |
| 13292 if (nextHopInstance != null) { |
| 13293 _json["nextHopInstance"] = nextHopInstance; |
| 13294 } |
| 13295 if (nextHopIp != null) { |
| 13296 _json["nextHopIp"] = nextHopIp; |
| 13297 } |
| 13298 if (nextHopNetwork != null) { |
| 13299 _json["nextHopNetwork"] = nextHopNetwork; |
| 13300 } |
| 13301 if (priority != null) { |
| 13302 _json["priority"] = priority; |
| 13303 } |
| 13304 if (selfLink != null) { |
| 13305 _json["selfLink"] = selfLink; |
| 13306 } |
| 13307 if (tags != null) { |
| 13308 _json["tags"] = tags; |
| 13309 } |
| 13310 if (warnings != null) { |
| 13311 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); |
| 13312 } |
| 13313 return _json; |
| 13314 } |
| 13315 } |
| 13316 |
| 13317 |
| 13318 /** Contains a list of route resources. */ |
| 13319 class RouteList { |
| 13320 /** |
| 13321 * Unique identifier for the resource; defined by the server (output only). |
| 13322 */ |
| 13323 core.String id; |
| 13324 |
| 13325 /** The route resources. */ |
| 13326 core.List<Route> items; |
| 13327 |
| 13328 /** Type of resource. */ |
| 13329 core.String kind; |
| 13330 |
| 13331 /** A token used to continue a truncated list request (output only). */ |
| 13332 core.String nextPageToken; |
| 13333 |
| 13334 /** Server defined URL for this resource (output only). */ |
| 13335 core.String selfLink; |
| 13336 |
| 13337 |
| 13338 RouteList(); |
| 13339 |
| 13340 RouteList.fromJson(core.Map _json) { |
| 13341 if (_json.containsKey("id")) { |
| 13342 id = _json["id"]; |
| 13343 } |
| 13344 if (_json.containsKey("items")) { |
| 13345 items = _json["items"].map((value) => new Route.fromJson(value)).toList(); |
| 13346 } |
| 13347 if (_json.containsKey("kind")) { |
| 13348 kind = _json["kind"]; |
| 13349 } |
| 13350 if (_json.containsKey("nextPageToken")) { |
| 13351 nextPageToken = _json["nextPageToken"]; |
| 13352 } |
| 13353 if (_json.containsKey("selfLink")) { |
| 13354 selfLink = _json["selfLink"]; |
| 13355 } |
| 13356 } |
| 13357 |
| 13358 core.Map toJson() { |
| 13359 var _json = new core.Map(); |
| 13360 if (id != null) { |
| 13361 _json["id"] = id; |
| 13362 } |
| 13363 if (items != null) { |
| 13364 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 13365 } |
| 13366 if (kind != null) { |
| 13367 _json["kind"] = kind; |
| 13368 } |
| 13369 if (nextPageToken != null) { |
| 13370 _json["nextPageToken"] = nextPageToken; |
| 13371 } |
| 13372 if (selfLink != null) { |
| 13373 _json["selfLink"] = selfLink; |
| 13374 } |
| 13375 return _json; |
| 13376 } |
| 13377 } |
| 13378 |
| 13379 |
| 13380 /** Scheduling options for an Instance. */ |
| 13381 class Scheduling { |
| 13382 /** |
| 13383 * Whether the Instance should be automatically restarted whenever it is |
| 13384 * terminated by Compute Engine (not terminated by user). |
| 13385 */ |
| 13386 core.bool automaticRestart; |
| 13387 |
| 13388 /** |
| 13389 * How the instance should behave when the host machine undergoes maintenance |
| 13390 * that may temporarily impact instance performance. |
| 13391 * Possible string values are: |
| 13392 * - "MIGRATE" |
| 13393 * - "TERMINATE" |
| 13394 */ |
| 13395 core.String onHostMaintenance; |
| 13396 |
| 13397 |
| 13398 Scheduling(); |
| 13399 |
| 13400 Scheduling.fromJson(core.Map _json) { |
| 13401 if (_json.containsKey("automaticRestart")) { |
| 13402 automaticRestart = _json["automaticRestart"]; |
| 13403 } |
| 13404 if (_json.containsKey("onHostMaintenance")) { |
| 13405 onHostMaintenance = _json["onHostMaintenance"]; |
| 13406 } |
| 13407 } |
| 13408 |
| 13409 core.Map toJson() { |
| 13410 var _json = new core.Map(); |
| 13411 if (automaticRestart != null) { |
| 13412 _json["automaticRestart"] = automaticRestart; |
| 13413 } |
| 13414 if (onHostMaintenance != null) { |
| 13415 _json["onHostMaintenance"] = onHostMaintenance; |
| 13416 } |
| 13417 return _json; |
| 13418 } |
| 13419 } |
| 13420 |
| 13421 |
| 13422 /** An instance serial console output. */ |
| 13423 class SerialPortOutput { |
| 13424 /** The contents of the console output. */ |
| 13425 core.String contents; |
| 13426 |
| 13427 /** Type of the resource. */ |
| 13428 core.String kind; |
| 13429 |
| 13430 /** Server defined URL for the resource (output only). */ |
| 13431 core.String selfLink; |
| 13432 |
| 13433 |
| 13434 SerialPortOutput(); |
| 13435 |
| 13436 SerialPortOutput.fromJson(core.Map _json) { |
| 13437 if (_json.containsKey("contents")) { |
| 13438 contents = _json["contents"]; |
| 13439 } |
| 13440 if (_json.containsKey("kind")) { |
| 13441 kind = _json["kind"]; |
| 13442 } |
| 13443 if (_json.containsKey("selfLink")) { |
| 13444 selfLink = _json["selfLink"]; |
| 13445 } |
| 13446 } |
| 13447 |
| 13448 core.Map toJson() { |
| 13449 var _json = new core.Map(); |
| 13450 if (contents != null) { |
| 13451 _json["contents"] = contents; |
| 13452 } |
| 13453 if (kind != null) { |
| 13454 _json["kind"] = kind; |
| 13455 } |
| 13456 if (selfLink != null) { |
| 13457 _json["selfLink"] = selfLink; |
| 13458 } |
| 13459 return _json; |
| 13460 } |
| 13461 } |
| 13462 |
| 13463 |
| 13464 /** A service account. */ |
| 13465 class ServiceAccount { |
| 13466 /** Email address of the service account. */ |
| 13467 core.String email; |
| 13468 |
| 13469 /** The list of scopes to be made available for this service account. */ |
| 13470 core.List<core.String> scopes; |
| 13471 |
| 13472 |
| 13473 ServiceAccount(); |
| 13474 |
| 13475 ServiceAccount.fromJson(core.Map _json) { |
| 13476 if (_json.containsKey("email")) { |
| 13477 email = _json["email"]; |
| 13478 } |
| 13479 if (_json.containsKey("scopes")) { |
| 13480 scopes = _json["scopes"]; |
| 13481 } |
| 13482 } |
| 13483 |
| 13484 core.Map toJson() { |
| 13485 var _json = new core.Map(); |
| 13486 if (email != null) { |
| 13487 _json["email"] = email; |
| 13488 } |
| 13489 if (scopes != null) { |
| 13490 _json["scopes"] = scopes; |
| 13491 } |
| 13492 return _json; |
| 13493 } |
| 13494 } |
| 13495 |
| 13496 |
| 13497 /** A persistent disk snapshot resource. */ |
| 13498 class Snapshot { |
| 13499 /** Creation timestamp in RFC3339 text format (output only). */ |
| 13500 core.String creationTimestamp; |
| 13501 |
| 13502 /** |
| 13503 * An optional textual description of the resource; provided by the client |
| 13504 * when the resource is created. |
| 13505 */ |
| 13506 core.String description; |
| 13507 |
| 13508 /** Size of the persistent disk snapshot, specified in GB (output only). */ |
| 13509 core.String diskSizeGb; |
| 13510 |
| 13511 /** |
| 13512 * Unique identifier for the resource; defined by the server (output only). |
| 13513 */ |
| 13514 core.String id; |
| 13515 |
| 13516 /** Type of the resource. */ |
| 13517 core.String kind; |
| 13518 |
| 13519 /** Public visible licenses. */ |
| 13520 core.List<core.String> licenses; |
| 13521 |
| 13522 /** |
| 13523 * Name of the resource; provided by the client when the resource is created. |
| 13524 * The name must be 1-63 characters long, and comply with RFC1035. |
| 13525 */ |
| 13526 core.String name; |
| 13527 |
| 13528 /** Server defined URL for the resource (output only). */ |
| 13529 core.String selfLink; |
| 13530 |
| 13531 /** |
| 13532 * The source disk used to create this snapshot. Once the source disk has been |
| 13533 * deleted from the system, this field will be cleared, and will not be set |
| 13534 * even if a disk with the same name has been re-created (output only). |
| 13535 */ |
| 13536 core.String sourceDisk; |
| 13537 |
| 13538 /** |
| 13539 * The 'id' value of the disk used to create this snapshot. This value may be |
| 13540 * used to determine whether the snapshot was taken from the current or a |
| 13541 * previous instance of a given disk name. |
| 13542 */ |
| 13543 core.String sourceDiskId; |
| 13544 |
| 13545 /** |
| 13546 * The status of the persistent disk snapshot (output only). |
| 13547 * Possible string values are: |
| 13548 * - "CREATING" |
| 13549 * - "DELETING" |
| 13550 * - "FAILED" |
| 13551 * - "READY" |
| 13552 * - "UPLOADING" |
| 13553 */ |
| 13554 core.String status; |
| 13555 |
| 13556 /** |
| 13557 * A size of the the storage used by the snapshot. As snapshots share storage |
| 13558 * this number is expected to change with snapshot creation/deletion. |
| 13559 */ |
| 13560 core.String storageBytes; |
| 13561 |
| 13562 /** |
| 13563 * An indicator whether storageBytes is in a stable state, or it is being |
| 13564 * adjusted as a result of shared storage reallocation. |
| 13565 * Possible string values are: |
| 13566 * - "UPDATING" |
| 13567 * - "UP_TO_DATE" |
| 13568 */ |
| 13569 core.String storageBytesStatus; |
| 13570 |
| 13571 |
| 13572 Snapshot(); |
| 13573 |
| 13574 Snapshot.fromJson(core.Map _json) { |
| 13575 if (_json.containsKey("creationTimestamp")) { |
| 13576 creationTimestamp = _json["creationTimestamp"]; |
| 13577 } |
| 13578 if (_json.containsKey("description")) { |
| 13579 description = _json["description"]; |
| 13580 } |
| 13581 if (_json.containsKey("diskSizeGb")) { |
| 13582 diskSizeGb = _json["diskSizeGb"]; |
| 13583 } |
| 13584 if (_json.containsKey("id")) { |
| 13585 id = _json["id"]; |
| 13586 } |
| 13587 if (_json.containsKey("kind")) { |
| 13588 kind = _json["kind"]; |
| 13589 } |
| 13590 if (_json.containsKey("licenses")) { |
| 13591 licenses = _json["licenses"]; |
| 13592 } |
| 13593 if (_json.containsKey("name")) { |
| 13594 name = _json["name"]; |
| 13595 } |
| 13596 if (_json.containsKey("selfLink")) { |
| 13597 selfLink = _json["selfLink"]; |
| 13598 } |
| 13599 if (_json.containsKey("sourceDisk")) { |
| 13600 sourceDisk = _json["sourceDisk"]; |
| 13601 } |
| 13602 if (_json.containsKey("sourceDiskId")) { |
| 13603 sourceDiskId = _json["sourceDiskId"]; |
| 13604 } |
| 13605 if (_json.containsKey("status")) { |
| 13606 status = _json["status"]; |
| 13607 } |
| 13608 if (_json.containsKey("storageBytes")) { |
| 13609 storageBytes = _json["storageBytes"]; |
| 13610 } |
| 13611 if (_json.containsKey("storageBytesStatus")) { |
| 13612 storageBytesStatus = _json["storageBytesStatus"]; |
| 13613 } |
| 13614 } |
| 13615 |
| 13616 core.Map toJson() { |
| 13617 var _json = new core.Map(); |
| 13618 if (creationTimestamp != null) { |
| 13619 _json["creationTimestamp"] = creationTimestamp; |
| 13620 } |
| 13621 if (description != null) { |
| 13622 _json["description"] = description; |
| 13623 } |
| 13624 if (diskSizeGb != null) { |
| 13625 _json["diskSizeGb"] = diskSizeGb; |
| 13626 } |
| 13627 if (id != null) { |
| 13628 _json["id"] = id; |
| 13629 } |
| 13630 if (kind != null) { |
| 13631 _json["kind"] = kind; |
| 13632 } |
| 13633 if (licenses != null) { |
| 13634 _json["licenses"] = licenses; |
| 13635 } |
| 13636 if (name != null) { |
| 13637 _json["name"] = name; |
| 13638 } |
| 13639 if (selfLink != null) { |
| 13640 _json["selfLink"] = selfLink; |
| 13641 } |
| 13642 if (sourceDisk != null) { |
| 13643 _json["sourceDisk"] = sourceDisk; |
| 13644 } |
| 13645 if (sourceDiskId != null) { |
| 13646 _json["sourceDiskId"] = sourceDiskId; |
| 13647 } |
| 13648 if (status != null) { |
| 13649 _json["status"] = status; |
| 13650 } |
| 13651 if (storageBytes != null) { |
| 13652 _json["storageBytes"] = storageBytes; |
| 13653 } |
| 13654 if (storageBytesStatus != null) { |
| 13655 _json["storageBytesStatus"] = storageBytesStatus; |
| 13656 } |
| 13657 return _json; |
| 13658 } |
| 13659 } |
| 13660 |
| 13661 |
| 13662 /** Contains a list of persistent disk snapshot resources. */ |
| 13663 class SnapshotList { |
| 13664 /** |
| 13665 * Unique identifier for the resource; defined by the server (output only). |
| 13666 */ |
| 13667 core.String id; |
| 13668 |
| 13669 /** The persistent snapshot resources. */ |
| 13670 core.List<Snapshot> items; |
| 13671 |
| 13672 /** Type of resource. */ |
| 13673 core.String kind; |
| 13674 |
| 13675 /** A token used to continue a truncated list request (output only). */ |
| 13676 core.String nextPageToken; |
| 13677 |
| 13678 /** Server defined URL for this resource (output only). */ |
| 13679 core.String selfLink; |
| 13680 |
| 13681 |
| 13682 SnapshotList(); |
| 13683 |
| 13684 SnapshotList.fromJson(core.Map _json) { |
| 13685 if (_json.containsKey("id")) { |
| 13686 id = _json["id"]; |
| 13687 } |
| 13688 if (_json.containsKey("items")) { |
| 13689 items = _json["items"].map((value) => new Snapshot.fromJson(value)).toList
(); |
| 13690 } |
| 13691 if (_json.containsKey("kind")) { |
| 13692 kind = _json["kind"]; |
| 13693 } |
| 13694 if (_json.containsKey("nextPageToken")) { |
| 13695 nextPageToken = _json["nextPageToken"]; |
| 13696 } |
| 13697 if (_json.containsKey("selfLink")) { |
| 13698 selfLink = _json["selfLink"]; |
| 13699 } |
| 13700 } |
| 13701 |
| 13702 core.Map toJson() { |
| 13703 var _json = new core.Map(); |
| 13704 if (id != null) { |
| 13705 _json["id"] = id; |
| 13706 } |
| 13707 if (items != null) { |
| 13708 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 13709 } |
| 13710 if (kind != null) { |
| 13711 _json["kind"] = kind; |
| 13712 } |
| 13713 if (nextPageToken != null) { |
| 13714 _json["nextPageToken"] = nextPageToken; |
| 13715 } |
| 13716 if (selfLink != null) { |
| 13717 _json["selfLink"] = selfLink; |
| 13718 } |
| 13719 return _json; |
| 13720 } |
| 13721 } |
| 13722 |
| 13723 |
| 13724 /** A set of instance tags. */ |
| 13725 class Tags { |
| 13726 /** |
| 13727 * Fingerprint of this resource. A hash of the tags stored in this object. |
| 13728 * This field is used optimistic locking. An up-to-date tags fingerprint must |
| 13729 * be provided in order to modify tags. |
| 13730 */ |
| 13731 core.String fingerprint; |
| 13732 |
| 13733 core.List<core.int> get fingerprintAsBytes { |
| 13734 return crypto.CryptoUtils.base64StringToBytes(fingerprint); |
| 13735 } |
| 13736 |
| 13737 void set fingerprintAsBytes(core.List<core.int> _bytes) { |
| 13738 fingerprint = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 13739 } |
| 13740 |
| 13741 /** |
| 13742 * An array of tags. Each tag must be 1-63 characters long, and comply with |
| 13743 * RFC1035. |
| 13744 */ |
| 13745 core.List<core.String> items; |
| 13746 |
| 13747 |
| 13748 Tags(); |
| 13749 |
| 13750 Tags.fromJson(core.Map _json) { |
| 13751 if (_json.containsKey("fingerprint")) { |
| 13752 fingerprint = _json["fingerprint"]; |
| 13753 } |
| 13754 if (_json.containsKey("items")) { |
| 13755 items = _json["items"]; |
| 13756 } |
| 13757 } |
| 13758 |
| 13759 core.Map toJson() { |
| 13760 var _json = new core.Map(); |
| 13761 if (fingerprint != null) { |
| 13762 _json["fingerprint"] = fingerprint; |
| 13763 } |
| 13764 if (items != null) { |
| 13765 _json["items"] = items; |
| 13766 } |
| 13767 return _json; |
| 13768 } |
| 13769 } |
| 13770 |
| 13771 |
| 13772 /** A TargetHttpProxy resource. This resource defines an HTTP proxy. */ |
| 13773 class TargetHttpProxy { |
| 13774 /** Creation timestamp in RFC3339 text format (output only). */ |
| 13775 core.String creationTimestamp; |
| 13776 |
| 13777 /** |
| 13778 * An optional textual description of the resource; provided by the client |
| 13779 * when the resource is created. |
| 13780 */ |
| 13781 core.String description; |
| 13782 |
| 13783 /** |
| 13784 * Unique identifier for the resource; defined by the server (output only). |
| 13785 */ |
| 13786 core.String id; |
| 13787 |
| 13788 /** Type of the resource. */ |
| 13789 core.String kind; |
| 13790 |
| 13791 /** |
| 13792 * Name of the resource; provided by the client when the resource is created. |
| 13793 * The name must be 1-63 characters long, and comply with RFC1035. |
| 13794 */ |
| 13795 core.String name; |
| 13796 |
| 13797 /** Server defined URL for the resource (output only). */ |
| 13798 core.String selfLink; |
| 13799 |
| 13800 /** |
| 13801 * URL to the UrlMap resource that defines the mapping from URL to the |
| 13802 * BackendService. |
| 13803 */ |
| 13804 core.String urlMap; |
| 13805 |
| 13806 |
| 13807 TargetHttpProxy(); |
| 13808 |
| 13809 TargetHttpProxy.fromJson(core.Map _json) { |
| 13810 if (_json.containsKey("creationTimestamp")) { |
| 13811 creationTimestamp = _json["creationTimestamp"]; |
| 13812 } |
| 13813 if (_json.containsKey("description")) { |
| 13814 description = _json["description"]; |
| 13815 } |
| 13816 if (_json.containsKey("id")) { |
| 13817 id = _json["id"]; |
| 13818 } |
| 13819 if (_json.containsKey("kind")) { |
| 13820 kind = _json["kind"]; |
| 13821 } |
| 13822 if (_json.containsKey("name")) { |
| 13823 name = _json["name"]; |
| 13824 } |
| 13825 if (_json.containsKey("selfLink")) { |
| 13826 selfLink = _json["selfLink"]; |
| 13827 } |
| 13828 if (_json.containsKey("urlMap")) { |
| 13829 urlMap = _json["urlMap"]; |
| 13830 } |
| 13831 } |
| 13832 |
| 13833 core.Map toJson() { |
| 13834 var _json = new core.Map(); |
| 13835 if (creationTimestamp != null) { |
| 13836 _json["creationTimestamp"] = creationTimestamp; |
| 13837 } |
| 13838 if (description != null) { |
| 13839 _json["description"] = description; |
| 13840 } |
| 13841 if (id != null) { |
| 13842 _json["id"] = id; |
| 13843 } |
| 13844 if (kind != null) { |
| 13845 _json["kind"] = kind; |
| 13846 } |
| 13847 if (name != null) { |
| 13848 _json["name"] = name; |
| 13849 } |
| 13850 if (selfLink != null) { |
| 13851 _json["selfLink"] = selfLink; |
| 13852 } |
| 13853 if (urlMap != null) { |
| 13854 _json["urlMap"] = urlMap; |
| 13855 } |
| 13856 return _json; |
| 13857 } |
| 13858 } |
| 13859 |
| 13860 |
| 13861 /** Contains a list of TargetHttpProxy resources. */ |
| 13862 class TargetHttpProxyList { |
| 13863 /** |
| 13864 * Unique identifier for the resource; defined by the server (output only). |
| 13865 */ |
| 13866 core.String id; |
| 13867 |
| 13868 /** The TargetHttpProxy resources. */ |
| 13869 core.List<TargetHttpProxy> items; |
| 13870 |
| 13871 /** Type of resource. */ |
| 13872 core.String kind; |
| 13873 |
| 13874 /** A token used to continue a truncated list request (output only). */ |
| 13875 core.String nextPageToken; |
| 13876 |
| 13877 /** Server defined URL for this resource (output only). */ |
| 13878 core.String selfLink; |
| 13879 |
| 13880 |
| 13881 TargetHttpProxyList(); |
| 13882 |
| 13883 TargetHttpProxyList.fromJson(core.Map _json) { |
| 13884 if (_json.containsKey("id")) { |
| 13885 id = _json["id"]; |
| 13886 } |
| 13887 if (_json.containsKey("items")) { |
| 13888 items = _json["items"].map((value) => new TargetHttpProxy.fromJson(value))
.toList(); |
| 13889 } |
| 13890 if (_json.containsKey("kind")) { |
| 13891 kind = _json["kind"]; |
| 13892 } |
| 13893 if (_json.containsKey("nextPageToken")) { |
| 13894 nextPageToken = _json["nextPageToken"]; |
| 13895 } |
| 13896 if (_json.containsKey("selfLink")) { |
| 13897 selfLink = _json["selfLink"]; |
| 13898 } |
| 13899 } |
| 13900 |
| 13901 core.Map toJson() { |
| 13902 var _json = new core.Map(); |
| 13903 if (id != null) { |
| 13904 _json["id"] = id; |
| 13905 } |
| 13906 if (items != null) { |
| 13907 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 13908 } |
| 13909 if (kind != null) { |
| 13910 _json["kind"] = kind; |
| 13911 } |
| 13912 if (nextPageToken != null) { |
| 13913 _json["nextPageToken"] = nextPageToken; |
| 13914 } |
| 13915 if (selfLink != null) { |
| 13916 _json["selfLink"] = selfLink; |
| 13917 } |
| 13918 return _json; |
| 13919 } |
| 13920 } |
| 13921 |
| 13922 |
| 13923 /** |
| 13924 * A TargetInstance resource. This resource defines an endpoint VM that |
| 13925 * terminates traffic of certain protocols. |
| 13926 */ |
| 13927 class TargetInstance { |
| 13928 /** Creation timestamp in RFC3339 text format (output only). */ |
| 13929 core.String creationTimestamp; |
| 13930 |
| 13931 /** |
| 13932 * An optional textual description of the resource; provided by the client |
| 13933 * when the resource is created. |
| 13934 */ |
| 13935 core.String description; |
| 13936 |
| 13937 /** |
| 13938 * Unique identifier for the resource; defined by the server (output only). |
| 13939 */ |
| 13940 core.String id; |
| 13941 |
| 13942 /** The URL to the instance that terminates the relevant traffic. */ |
| 13943 core.String instance; |
| 13944 |
| 13945 /** Type of the resource. */ |
| 13946 core.String kind; |
| 13947 |
| 13948 /** |
| 13949 * Name of the resource; provided by the client when the resource is created. |
| 13950 * The name must be 1-63 characters long, and comply with RFC1035. |
| 13951 */ |
| 13952 core.String name; |
| 13953 |
| 13954 /** |
| 13955 * NAT option controlling how IPs are NAT'ed to the VM. Currently only NO_NAT |
| 13956 * (default value) is supported. |
| 13957 * Possible string values are: |
| 13958 * - "NO_NAT" |
| 13959 */ |
| 13960 core.String natPolicy; |
| 13961 |
| 13962 /** Server defined URL for the resource (output only). */ |
| 13963 core.String selfLink; |
| 13964 |
| 13965 /** URL of the zone where the target instance resides (output only). */ |
| 13966 core.String zone; |
| 13967 |
| 13968 |
| 13969 TargetInstance(); |
| 13970 |
| 13971 TargetInstance.fromJson(core.Map _json) { |
| 13972 if (_json.containsKey("creationTimestamp")) { |
| 13973 creationTimestamp = _json["creationTimestamp"]; |
| 13974 } |
| 13975 if (_json.containsKey("description")) { |
| 13976 description = _json["description"]; |
| 13977 } |
| 13978 if (_json.containsKey("id")) { |
| 13979 id = _json["id"]; |
| 13980 } |
| 13981 if (_json.containsKey("instance")) { |
| 13982 instance = _json["instance"]; |
| 13983 } |
| 13984 if (_json.containsKey("kind")) { |
| 13985 kind = _json["kind"]; |
| 13986 } |
| 13987 if (_json.containsKey("name")) { |
| 13988 name = _json["name"]; |
| 13989 } |
| 13990 if (_json.containsKey("natPolicy")) { |
| 13991 natPolicy = _json["natPolicy"]; |
| 13992 } |
| 13993 if (_json.containsKey("selfLink")) { |
| 13994 selfLink = _json["selfLink"]; |
| 13995 } |
| 13996 if (_json.containsKey("zone")) { |
| 13997 zone = _json["zone"]; |
| 13998 } |
| 13999 } |
| 14000 |
| 14001 core.Map toJson() { |
| 14002 var _json = new core.Map(); |
| 14003 if (creationTimestamp != null) { |
| 14004 _json["creationTimestamp"] = creationTimestamp; |
| 14005 } |
| 14006 if (description != null) { |
| 14007 _json["description"] = description; |
| 14008 } |
| 14009 if (id != null) { |
| 14010 _json["id"] = id; |
| 14011 } |
| 14012 if (instance != null) { |
| 14013 _json["instance"] = instance; |
| 14014 } |
| 14015 if (kind != null) { |
| 14016 _json["kind"] = kind; |
| 14017 } |
| 14018 if (name != null) { |
| 14019 _json["name"] = name; |
| 14020 } |
| 14021 if (natPolicy != null) { |
| 14022 _json["natPolicy"] = natPolicy; |
| 14023 } |
| 14024 if (selfLink != null) { |
| 14025 _json["selfLink"] = selfLink; |
| 14026 } |
| 14027 if (zone != null) { |
| 14028 _json["zone"] = zone; |
| 14029 } |
| 14030 return _json; |
| 14031 } |
| 14032 } |
| 14033 |
| 14034 |
| 14035 /** Not documented yet. */ |
| 14036 class TargetInstanceAggregatedList { |
| 14037 /** |
| 14038 * Unique identifier for the resource; defined by the server (output only). |
| 14039 */ |
| 14040 core.String id; |
| 14041 |
| 14042 /** A map of scoped target instance lists. */ |
| 14043 core.Map<core.String, TargetInstancesScopedList> items; |
| 14044 |
| 14045 /** Type of resource. */ |
| 14046 core.String kind; |
| 14047 |
| 14048 /** A token used to continue a truncated list request (output only). */ |
| 14049 core.String nextPageToken; |
| 14050 |
| 14051 /** Server defined URL for this resource (output only). */ |
| 14052 core.String selfLink; |
| 14053 |
| 14054 |
| 14055 TargetInstanceAggregatedList(); |
| 14056 |
| 14057 TargetInstanceAggregatedList.fromJson(core.Map _json) { |
| 14058 if (_json.containsKey("id")) { |
| 14059 id = _json["id"]; |
| 14060 } |
| 14061 if (_json.containsKey("items")) { |
| 14062 items = common_internal.mapMap(_json["items"], (item) => new TargetInstanc
esScopedList.fromJson(item)); |
| 14063 } |
| 14064 if (_json.containsKey("kind")) { |
| 14065 kind = _json["kind"]; |
| 14066 } |
| 14067 if (_json.containsKey("nextPageToken")) { |
| 14068 nextPageToken = _json["nextPageToken"]; |
| 14069 } |
| 14070 if (_json.containsKey("selfLink")) { |
| 14071 selfLink = _json["selfLink"]; |
| 14072 } |
| 14073 } |
| 14074 |
| 14075 core.Map toJson() { |
| 14076 var _json = new core.Map(); |
| 14077 if (id != null) { |
| 14078 _json["id"] = id; |
| 14079 } |
| 14080 if (items != null) { |
| 14081 _json["items"] = common_internal.mapMap(items, (item) => (item).toJson()); |
| 14082 } |
| 14083 if (kind != null) { |
| 14084 _json["kind"] = kind; |
| 14085 } |
| 14086 if (nextPageToken != null) { |
| 14087 _json["nextPageToken"] = nextPageToken; |
| 14088 } |
| 14089 if (selfLink != null) { |
| 14090 _json["selfLink"] = selfLink; |
| 14091 } |
| 14092 return _json; |
| 14093 } |
| 14094 } |
| 14095 |
| 14096 |
| 14097 /** Contains a list of TargetInstance resources. */ |
| 14098 class TargetInstanceList { |
| 14099 /** |
| 14100 * Unique identifier for the resource; defined by the server (output only). |
| 14101 */ |
| 14102 core.String id; |
| 14103 |
| 14104 /** The TargetInstance resources. */ |
| 14105 core.List<TargetInstance> items; |
| 14106 |
| 14107 /** Type of resource. */ |
| 14108 core.String kind; |
| 14109 |
| 14110 /** A token used to continue a truncated list request (output only). */ |
| 14111 core.String nextPageToken; |
| 14112 |
| 14113 /** Server defined URL for this resource (output only). */ |
| 14114 core.String selfLink; |
| 14115 |
| 14116 |
| 14117 TargetInstanceList(); |
| 14118 |
| 14119 TargetInstanceList.fromJson(core.Map _json) { |
| 14120 if (_json.containsKey("id")) { |
| 14121 id = _json["id"]; |
| 14122 } |
| 14123 if (_json.containsKey("items")) { |
| 14124 items = _json["items"].map((value) => new TargetInstance.fromJson(value)).
toList(); |
| 14125 } |
| 14126 if (_json.containsKey("kind")) { |
| 14127 kind = _json["kind"]; |
| 14128 } |
| 14129 if (_json.containsKey("nextPageToken")) { |
| 14130 nextPageToken = _json["nextPageToken"]; |
| 14131 } |
| 14132 if (_json.containsKey("selfLink")) { |
| 14133 selfLink = _json["selfLink"]; |
| 14134 } |
| 14135 } |
| 14136 |
| 14137 core.Map toJson() { |
| 14138 var _json = new core.Map(); |
| 14139 if (id != null) { |
| 14140 _json["id"] = id; |
| 14141 } |
| 14142 if (items != null) { |
| 14143 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 14144 } |
| 14145 if (kind != null) { |
| 14146 _json["kind"] = kind; |
| 14147 } |
| 14148 if (nextPageToken != null) { |
| 14149 _json["nextPageToken"] = nextPageToken; |
| 14150 } |
| 14151 if (selfLink != null) { |
| 14152 _json["selfLink"] = selfLink; |
| 14153 } |
| 14154 return _json; |
| 14155 } |
| 14156 } |
| 14157 |
| 14158 |
| 14159 /** Not documented yet. */ |
| 14160 class TargetInstancesScopedListWarningData { |
| 14161 /** A key for the warning data. */ |
| 14162 core.String key; |
| 14163 |
| 14164 /** A warning data value corresponding to the key. */ |
| 14165 core.String value; |
| 14166 |
| 14167 |
| 14168 TargetInstancesScopedListWarningData(); |
| 14169 |
| 14170 TargetInstancesScopedListWarningData.fromJson(core.Map _json) { |
| 14171 if (_json.containsKey("key")) { |
| 14172 key = _json["key"]; |
| 14173 } |
| 14174 if (_json.containsKey("value")) { |
| 14175 value = _json["value"]; |
| 14176 } |
| 14177 } |
| 14178 |
| 14179 core.Map toJson() { |
| 14180 var _json = new core.Map(); |
| 14181 if (key != null) { |
| 14182 _json["key"] = key; |
| 14183 } |
| 14184 if (value != null) { |
| 14185 _json["value"] = value; |
| 14186 } |
| 14187 return _json; |
| 14188 } |
| 14189 } |
| 14190 |
| 14191 |
| 14192 /** |
| 14193 * Informational warning which replaces the list of addresses when the list is |
| 14194 * empty. |
| 14195 */ |
| 14196 class TargetInstancesScopedListWarning { |
| 14197 /** |
| 14198 * The warning type identifier for this warning. |
| 14199 * Possible string values are: |
| 14200 * - "DEPRECATED_RESOURCE_USED" |
| 14201 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 14202 * - "INJECTED_KERNELS_DEPRECATED" |
| 14203 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 14204 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 14205 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 14206 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 14207 * - "NEXT_HOP_NOT_RUNNING" |
| 14208 * - "NO_RESULTS_ON_PAGE" |
| 14209 * - "REQUIRED_TOS_AGREEMENT" |
| 14210 * - "RESOURCE_NOT_DELETED" |
| 14211 * - "UNREACHABLE" |
| 14212 */ |
| 14213 core.String code; |
| 14214 |
| 14215 /** Metadata for this warning in 'key: value' format. */ |
| 14216 core.List<TargetInstancesScopedListWarningData> data; |
| 14217 |
| 14218 /** Optional human-readable details for this warning. */ |
| 14219 core.String message; |
| 14220 |
| 14221 |
| 14222 TargetInstancesScopedListWarning(); |
| 14223 |
| 14224 TargetInstancesScopedListWarning.fromJson(core.Map _json) { |
| 14225 if (_json.containsKey("code")) { |
| 14226 code = _json["code"]; |
| 14227 } |
| 14228 if (_json.containsKey("data")) { |
| 14229 data = _json["data"].map((value) => new TargetInstancesScopedListWarningDa
ta.fromJson(value)).toList(); |
| 14230 } |
| 14231 if (_json.containsKey("message")) { |
| 14232 message = _json["message"]; |
| 14233 } |
| 14234 } |
| 14235 |
| 14236 core.Map toJson() { |
| 14237 var _json = new core.Map(); |
| 14238 if (code != null) { |
| 14239 _json["code"] = code; |
| 14240 } |
| 14241 if (data != null) { |
| 14242 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 14243 } |
| 14244 if (message != null) { |
| 14245 _json["message"] = message; |
| 14246 } |
| 14247 return _json; |
| 14248 } |
| 14249 } |
| 14250 |
| 14251 |
| 14252 /** Not documented yet. */ |
| 14253 class TargetInstancesScopedList { |
| 14254 /** List of target instances contained in this scope. */ |
| 14255 core.List<TargetInstance> targetInstances; |
| 14256 |
| 14257 /** |
| 14258 * Informational warning which replaces the list of addresses when the list is |
| 14259 * empty. |
| 14260 */ |
| 14261 TargetInstancesScopedListWarning warning; |
| 14262 |
| 14263 |
| 14264 TargetInstancesScopedList(); |
| 14265 |
| 14266 TargetInstancesScopedList.fromJson(core.Map _json) { |
| 14267 if (_json.containsKey("targetInstances")) { |
| 14268 targetInstances = _json["targetInstances"].map((value) => new TargetInstan
ce.fromJson(value)).toList(); |
| 14269 } |
| 14270 if (_json.containsKey("warning")) { |
| 14271 warning = new TargetInstancesScopedListWarning.fromJson(_json["warning"]); |
| 14272 } |
| 14273 } |
| 14274 |
| 14275 core.Map toJson() { |
| 14276 var _json = new core.Map(); |
| 14277 if (targetInstances != null) { |
| 14278 _json["targetInstances"] = targetInstances.map((value) => (value).toJson()
).toList(); |
| 14279 } |
| 14280 if (warning != null) { |
| 14281 _json["warning"] = (warning).toJson(); |
| 14282 } |
| 14283 return _json; |
| 14284 } |
| 14285 } |
| 14286 |
| 14287 |
| 14288 /** |
| 14289 * A TargetPool resource. This resource defines a pool of VMs, associated |
| 14290 * HttpHealthCheck resources, and the fallback TargetPool. |
| 14291 */ |
| 14292 class TargetPool { |
| 14293 /** |
| 14294 * This field is applicable only when the containing target pool is serving a |
| 14295 * forwarding rule as the primary pool, and its 'failoverRatio' field is |
| 14296 * properly set to a value between [0, 1]. |
| 14297 * |
| 14298 * 'backupPool' and 'failoverRatio' together define the fallback behavior of |
| 14299 * the primary target pool: if the ratio of the healthy VMs in the primary |
| 14300 * pool is at or below 'failoverRatio', traffic arriving at the load-balanced |
| 14301 * IP will be directed to the backup pool. |
| 14302 * |
| 14303 * In case where 'failoverRatio' and 'backupPool' are not set, or all the VMs |
| 14304 * in the backup pool are unhealthy, the traffic will be directed back to the |
| 14305 * primary pool in the "force" mode, where traffic will be spread to the |
| 14306 * healthy VMs with the best effort, or to all VMs when no VM is healthy. |
| 14307 */ |
| 14308 core.String backupPool; |
| 14309 |
| 14310 /** Creation timestamp in RFC3339 text format (output only). */ |
| 14311 core.String creationTimestamp; |
| 14312 |
| 14313 /** |
| 14314 * An optional textual description of the resource; provided by the client |
| 14315 * when the resource is created. |
| 14316 */ |
| 14317 core.String description; |
| 14318 |
| 14319 /** |
| 14320 * This field is applicable only when the containing target pool is serving a |
| 14321 * forwarding rule as the primary pool (i.e., not as a backup pool to some |
| 14322 * other target pool). The value of the field must be in [0, 1]. |
| 14323 * |
| 14324 * If set, 'backupPool' must also be set. They together define the fallback |
| 14325 * behavior of the primary target pool: if the ratio of the healthy VMs in the |
| 14326 * primary pool is at or below this number, traffic arriving at the |
| 14327 * load-balanced IP will be directed to the backup pool. |
| 14328 * |
| 14329 * In case where 'failoverRatio' is not set or all the VMs in the backup pool |
| 14330 * are unhealthy, the traffic will be directed back to the primary pool in the |
| 14331 * "force" mode, where traffic will be spread to the healthy VMs with the best |
| 14332 * effort, or to all VMs when no VM is healthy. |
| 14333 */ |
| 14334 core.double failoverRatio; |
| 14335 |
| 14336 /** |
| 14337 * A list of URLs to the HttpHealthCheck resource. A member VM in this pool is |
| 14338 * considered healthy if and only if all specified health checks pass. An |
| 14339 * empty list means all member VMs will be considered healthy at all times. |
| 14340 */ |
| 14341 core.List<core.String> healthChecks; |
| 14342 |
| 14343 /** |
| 14344 * Unique identifier for the resource; defined by the server (output only). |
| 14345 */ |
| 14346 core.String id; |
| 14347 |
| 14348 /** |
| 14349 * A list of resource URLs to the member VMs serving this pool. They must live |
| 14350 * in zones contained in the same region as this pool. |
| 14351 */ |
| 14352 core.List<core.String> instances; |
| 14353 |
| 14354 /** Type of the resource. */ |
| 14355 core.String kind; |
| 14356 |
| 14357 /** |
| 14358 * Name of the resource; provided by the client when the resource is created. |
| 14359 * The name must be 1-63 characters long, and comply with RFC1035. |
| 14360 */ |
| 14361 core.String name; |
| 14362 |
| 14363 /** URL of the region where the target pool resides (output only). */ |
| 14364 core.String region; |
| 14365 |
| 14366 /** Server defined URL for the resource (output only). */ |
| 14367 core.String selfLink; |
| 14368 |
| 14369 /** |
| 14370 * Sesssion affinity option, must be one of the following values: 'NONE': |
| 14371 * Connections from the same client IP may go to any VM in the pool; |
| 14372 * 'CLIENT_IP': Connections from the same client IP will go to the same VM in |
| 14373 * the pool while that VM remains healthy. 'CLIENT_IP_PROTO': Connections from |
| 14374 * the same client IP with the same IP protocol will go to the same VM in the |
| 14375 * pool while that VM remains healthy. |
| 14376 * Possible string values are: |
| 14377 * - "CLIENT_IP" |
| 14378 * - "CLIENT_IP_PROTO" |
| 14379 * - "NONE" |
| 14380 */ |
| 14381 core.String sessionAffinity; |
| 14382 |
| 14383 |
| 14384 TargetPool(); |
| 14385 |
| 14386 TargetPool.fromJson(core.Map _json) { |
| 14387 if (_json.containsKey("backupPool")) { |
| 14388 backupPool = _json["backupPool"]; |
| 14389 } |
| 14390 if (_json.containsKey("creationTimestamp")) { |
| 14391 creationTimestamp = _json["creationTimestamp"]; |
| 14392 } |
| 14393 if (_json.containsKey("description")) { |
| 14394 description = _json["description"]; |
| 14395 } |
| 14396 if (_json.containsKey("failoverRatio")) { |
| 14397 failoverRatio = _json["failoverRatio"]; |
| 14398 } |
| 14399 if (_json.containsKey("healthChecks")) { |
| 14400 healthChecks = _json["healthChecks"]; |
| 14401 } |
| 14402 if (_json.containsKey("id")) { |
| 14403 id = _json["id"]; |
| 14404 } |
| 14405 if (_json.containsKey("instances")) { |
| 14406 instances = _json["instances"]; |
| 14407 } |
| 14408 if (_json.containsKey("kind")) { |
| 14409 kind = _json["kind"]; |
| 14410 } |
| 14411 if (_json.containsKey("name")) { |
| 14412 name = _json["name"]; |
| 14413 } |
| 14414 if (_json.containsKey("region")) { |
| 14415 region = _json["region"]; |
| 14416 } |
| 14417 if (_json.containsKey("selfLink")) { |
| 14418 selfLink = _json["selfLink"]; |
| 14419 } |
| 14420 if (_json.containsKey("sessionAffinity")) { |
| 14421 sessionAffinity = _json["sessionAffinity"]; |
| 14422 } |
| 14423 } |
| 14424 |
| 14425 core.Map toJson() { |
| 14426 var _json = new core.Map(); |
| 14427 if (backupPool != null) { |
| 14428 _json["backupPool"] = backupPool; |
| 14429 } |
| 14430 if (creationTimestamp != null) { |
| 14431 _json["creationTimestamp"] = creationTimestamp; |
| 14432 } |
| 14433 if (description != null) { |
| 14434 _json["description"] = description; |
| 14435 } |
| 14436 if (failoverRatio != null) { |
| 14437 _json["failoverRatio"] = failoverRatio; |
| 14438 } |
| 14439 if (healthChecks != null) { |
| 14440 _json["healthChecks"] = healthChecks; |
| 14441 } |
| 14442 if (id != null) { |
| 14443 _json["id"] = id; |
| 14444 } |
| 14445 if (instances != null) { |
| 14446 _json["instances"] = instances; |
| 14447 } |
| 14448 if (kind != null) { |
| 14449 _json["kind"] = kind; |
| 14450 } |
| 14451 if (name != null) { |
| 14452 _json["name"] = name; |
| 14453 } |
| 14454 if (region != null) { |
| 14455 _json["region"] = region; |
| 14456 } |
| 14457 if (selfLink != null) { |
| 14458 _json["selfLink"] = selfLink; |
| 14459 } |
| 14460 if (sessionAffinity != null) { |
| 14461 _json["sessionAffinity"] = sessionAffinity; |
| 14462 } |
| 14463 return _json; |
| 14464 } |
| 14465 } |
| 14466 |
| 14467 |
| 14468 /** Not documented yet. */ |
| 14469 class TargetPoolAggregatedList { |
| 14470 /** |
| 14471 * Unique identifier for the resource; defined by the server (output only). |
| 14472 */ |
| 14473 core.String id; |
| 14474 |
| 14475 /** A map of scoped target pool lists. */ |
| 14476 core.Map<core.String, TargetPoolsScopedList> items; |
| 14477 |
| 14478 /** Type of resource. */ |
| 14479 core.String kind; |
| 14480 |
| 14481 /** A token used to continue a truncated list request (output only). */ |
| 14482 core.String nextPageToken; |
| 14483 |
| 14484 /** Server defined URL for this resource (output only). */ |
| 14485 core.String selfLink; |
| 14486 |
| 14487 |
| 14488 TargetPoolAggregatedList(); |
| 14489 |
| 14490 TargetPoolAggregatedList.fromJson(core.Map _json) { |
| 14491 if (_json.containsKey("id")) { |
| 14492 id = _json["id"]; |
| 14493 } |
| 14494 if (_json.containsKey("items")) { |
| 14495 items = common_internal.mapMap(_json["items"], (item) => new TargetPoolsSc
opedList.fromJson(item)); |
| 14496 } |
| 14497 if (_json.containsKey("kind")) { |
| 14498 kind = _json["kind"]; |
| 14499 } |
| 14500 if (_json.containsKey("nextPageToken")) { |
| 14501 nextPageToken = _json["nextPageToken"]; |
| 14502 } |
| 14503 if (_json.containsKey("selfLink")) { |
| 14504 selfLink = _json["selfLink"]; |
| 14505 } |
| 14506 } |
| 14507 |
| 14508 core.Map toJson() { |
| 14509 var _json = new core.Map(); |
| 14510 if (id != null) { |
| 14511 _json["id"] = id; |
| 14512 } |
| 14513 if (items != null) { |
| 14514 _json["items"] = common_internal.mapMap(items, (item) => (item).toJson()); |
| 14515 } |
| 14516 if (kind != null) { |
| 14517 _json["kind"] = kind; |
| 14518 } |
| 14519 if (nextPageToken != null) { |
| 14520 _json["nextPageToken"] = nextPageToken; |
| 14521 } |
| 14522 if (selfLink != null) { |
| 14523 _json["selfLink"] = selfLink; |
| 14524 } |
| 14525 return _json; |
| 14526 } |
| 14527 } |
| 14528 |
| 14529 |
| 14530 /** Not documented yet. */ |
| 14531 class TargetPoolInstanceHealth { |
| 14532 /** Not documented yet. */ |
| 14533 core.List<HealthStatus> healthStatus; |
| 14534 |
| 14535 /** Type of resource. */ |
| 14536 core.String kind; |
| 14537 |
| 14538 |
| 14539 TargetPoolInstanceHealth(); |
| 14540 |
| 14541 TargetPoolInstanceHealth.fromJson(core.Map _json) { |
| 14542 if (_json.containsKey("healthStatus")) { |
| 14543 healthStatus = _json["healthStatus"].map((value) => new HealthStatus.fromJ
son(value)).toList(); |
| 14544 } |
| 14545 if (_json.containsKey("kind")) { |
| 14546 kind = _json["kind"]; |
| 14547 } |
| 14548 } |
| 14549 |
| 14550 core.Map toJson() { |
| 14551 var _json = new core.Map(); |
| 14552 if (healthStatus != null) { |
| 14553 _json["healthStatus"] = healthStatus.map((value) => (value).toJson()).toLi
st(); |
| 14554 } |
| 14555 if (kind != null) { |
| 14556 _json["kind"] = kind; |
| 14557 } |
| 14558 return _json; |
| 14559 } |
| 14560 } |
| 14561 |
| 14562 |
| 14563 /** Contains a list of TargetPool resources. */ |
| 14564 class TargetPoolList { |
| 14565 /** |
| 14566 * Unique identifier for the resource; defined by the server (output only). |
| 14567 */ |
| 14568 core.String id; |
| 14569 |
| 14570 /** The TargetPool resources. */ |
| 14571 core.List<TargetPool> items; |
| 14572 |
| 14573 /** Type of resource. */ |
| 14574 core.String kind; |
| 14575 |
| 14576 /** A token used to continue a truncated list request (output only). */ |
| 14577 core.String nextPageToken; |
| 14578 |
| 14579 /** Server defined URL for this resource (output only). */ |
| 14580 core.String selfLink; |
| 14581 |
| 14582 |
| 14583 TargetPoolList(); |
| 14584 |
| 14585 TargetPoolList.fromJson(core.Map _json) { |
| 14586 if (_json.containsKey("id")) { |
| 14587 id = _json["id"]; |
| 14588 } |
| 14589 if (_json.containsKey("items")) { |
| 14590 items = _json["items"].map((value) => new TargetPool.fromJson(value)).toLi
st(); |
| 14591 } |
| 14592 if (_json.containsKey("kind")) { |
| 14593 kind = _json["kind"]; |
| 14594 } |
| 14595 if (_json.containsKey("nextPageToken")) { |
| 14596 nextPageToken = _json["nextPageToken"]; |
| 14597 } |
| 14598 if (_json.containsKey("selfLink")) { |
| 14599 selfLink = _json["selfLink"]; |
| 14600 } |
| 14601 } |
| 14602 |
| 14603 core.Map toJson() { |
| 14604 var _json = new core.Map(); |
| 14605 if (id != null) { |
| 14606 _json["id"] = id; |
| 14607 } |
| 14608 if (items != null) { |
| 14609 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 14610 } |
| 14611 if (kind != null) { |
| 14612 _json["kind"] = kind; |
| 14613 } |
| 14614 if (nextPageToken != null) { |
| 14615 _json["nextPageToken"] = nextPageToken; |
| 14616 } |
| 14617 if (selfLink != null) { |
| 14618 _json["selfLink"] = selfLink; |
| 14619 } |
| 14620 return _json; |
| 14621 } |
| 14622 } |
| 14623 |
| 14624 |
| 14625 /** Not documented yet. */ |
| 14626 class TargetPoolsAddHealthCheckRequest { |
| 14627 /** Health check URLs to be added to targetPool. */ |
| 14628 core.List<HealthCheckReference> healthChecks; |
| 14629 |
| 14630 |
| 14631 TargetPoolsAddHealthCheckRequest(); |
| 14632 |
| 14633 TargetPoolsAddHealthCheckRequest.fromJson(core.Map _json) { |
| 14634 if (_json.containsKey("healthChecks")) { |
| 14635 healthChecks = _json["healthChecks"].map((value) => new HealthCheckReferen
ce.fromJson(value)).toList(); |
| 14636 } |
| 14637 } |
| 14638 |
| 14639 core.Map toJson() { |
| 14640 var _json = new core.Map(); |
| 14641 if (healthChecks != null) { |
| 14642 _json["healthChecks"] = healthChecks.map((value) => (value).toJson()).toLi
st(); |
| 14643 } |
| 14644 return _json; |
| 14645 } |
| 14646 } |
| 14647 |
| 14648 |
| 14649 /** Not documented yet. */ |
| 14650 class TargetPoolsAddInstanceRequest { |
| 14651 /** URLs of the instances to be added to targetPool. */ |
| 14652 core.List<InstanceReference> instances; |
| 14653 |
| 14654 |
| 14655 TargetPoolsAddInstanceRequest(); |
| 14656 |
| 14657 TargetPoolsAddInstanceRequest.fromJson(core.Map _json) { |
| 14658 if (_json.containsKey("instances")) { |
| 14659 instances = _json["instances"].map((value) => new InstanceReference.fromJs
on(value)).toList(); |
| 14660 } |
| 14661 } |
| 14662 |
| 14663 core.Map toJson() { |
| 14664 var _json = new core.Map(); |
| 14665 if (instances != null) { |
| 14666 _json["instances"] = instances.map((value) => (value).toJson()).toList(); |
| 14667 } |
| 14668 return _json; |
| 14669 } |
| 14670 } |
| 14671 |
| 14672 |
| 14673 /** Not documented yet. */ |
| 14674 class TargetPoolsRemoveHealthCheckRequest { |
| 14675 /** Health check URLs to be removed from targetPool. */ |
| 14676 core.List<HealthCheckReference> healthChecks; |
| 14677 |
| 14678 |
| 14679 TargetPoolsRemoveHealthCheckRequest(); |
| 14680 |
| 14681 TargetPoolsRemoveHealthCheckRequest.fromJson(core.Map _json) { |
| 14682 if (_json.containsKey("healthChecks")) { |
| 14683 healthChecks = _json["healthChecks"].map((value) => new HealthCheckReferen
ce.fromJson(value)).toList(); |
| 14684 } |
| 14685 } |
| 14686 |
| 14687 core.Map toJson() { |
| 14688 var _json = new core.Map(); |
| 14689 if (healthChecks != null) { |
| 14690 _json["healthChecks"] = healthChecks.map((value) => (value).toJson()).toLi
st(); |
| 14691 } |
| 14692 return _json; |
| 14693 } |
| 14694 } |
| 14695 |
| 14696 |
| 14697 /** Not documented yet. */ |
| 14698 class TargetPoolsRemoveInstanceRequest { |
| 14699 /** URLs of the instances to be removed from targetPool. */ |
| 14700 core.List<InstanceReference> instances; |
| 14701 |
| 14702 |
| 14703 TargetPoolsRemoveInstanceRequest(); |
| 14704 |
| 14705 TargetPoolsRemoveInstanceRequest.fromJson(core.Map _json) { |
| 14706 if (_json.containsKey("instances")) { |
| 14707 instances = _json["instances"].map((value) => new InstanceReference.fromJs
on(value)).toList(); |
| 14708 } |
| 14709 } |
| 14710 |
| 14711 core.Map toJson() { |
| 14712 var _json = new core.Map(); |
| 14713 if (instances != null) { |
| 14714 _json["instances"] = instances.map((value) => (value).toJson()).toList(); |
| 14715 } |
| 14716 return _json; |
| 14717 } |
| 14718 } |
| 14719 |
| 14720 |
| 14721 /** Not documented yet. */ |
| 14722 class TargetPoolsScopedListWarningData { |
| 14723 /** A key for the warning data. */ |
| 14724 core.String key; |
| 14725 |
| 14726 /** A warning data value corresponding to the key. */ |
| 14727 core.String value; |
| 14728 |
| 14729 |
| 14730 TargetPoolsScopedListWarningData(); |
| 14731 |
| 14732 TargetPoolsScopedListWarningData.fromJson(core.Map _json) { |
| 14733 if (_json.containsKey("key")) { |
| 14734 key = _json["key"]; |
| 14735 } |
| 14736 if (_json.containsKey("value")) { |
| 14737 value = _json["value"]; |
| 14738 } |
| 14739 } |
| 14740 |
| 14741 core.Map toJson() { |
| 14742 var _json = new core.Map(); |
| 14743 if (key != null) { |
| 14744 _json["key"] = key; |
| 14745 } |
| 14746 if (value != null) { |
| 14747 _json["value"] = value; |
| 14748 } |
| 14749 return _json; |
| 14750 } |
| 14751 } |
| 14752 |
| 14753 |
| 14754 /** |
| 14755 * Informational warning which replaces the list of addresses when the list is |
| 14756 * empty. |
| 14757 */ |
| 14758 class TargetPoolsScopedListWarning { |
| 14759 /** |
| 14760 * The warning type identifier for this warning. |
| 14761 * Possible string values are: |
| 14762 * - "DEPRECATED_RESOURCE_USED" |
| 14763 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 14764 * - "INJECTED_KERNELS_DEPRECATED" |
| 14765 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 14766 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 14767 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 14768 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 14769 * - "NEXT_HOP_NOT_RUNNING" |
| 14770 * - "NO_RESULTS_ON_PAGE" |
| 14771 * - "REQUIRED_TOS_AGREEMENT" |
| 14772 * - "RESOURCE_NOT_DELETED" |
| 14773 * - "UNREACHABLE" |
| 14774 */ |
| 14775 core.String code; |
| 14776 |
| 14777 /** Metadata for this warning in 'key: value' format. */ |
| 14778 core.List<TargetPoolsScopedListWarningData> data; |
| 14779 |
| 14780 /** Optional human-readable details for this warning. */ |
| 14781 core.String message; |
| 14782 |
| 14783 |
| 14784 TargetPoolsScopedListWarning(); |
| 14785 |
| 14786 TargetPoolsScopedListWarning.fromJson(core.Map _json) { |
| 14787 if (_json.containsKey("code")) { |
| 14788 code = _json["code"]; |
| 14789 } |
| 14790 if (_json.containsKey("data")) { |
| 14791 data = _json["data"].map((value) => new TargetPoolsScopedListWarningData.f
romJson(value)).toList(); |
| 14792 } |
| 14793 if (_json.containsKey("message")) { |
| 14794 message = _json["message"]; |
| 14795 } |
| 14796 } |
| 14797 |
| 14798 core.Map toJson() { |
| 14799 var _json = new core.Map(); |
| 14800 if (code != null) { |
| 14801 _json["code"] = code; |
| 14802 } |
| 14803 if (data != null) { |
| 14804 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 14805 } |
| 14806 if (message != null) { |
| 14807 _json["message"] = message; |
| 14808 } |
| 14809 return _json; |
| 14810 } |
| 14811 } |
| 14812 |
| 14813 |
| 14814 /** Not documented yet. */ |
| 14815 class TargetPoolsScopedList { |
| 14816 /** List of target pools contained in this scope. */ |
| 14817 core.List<TargetPool> targetPools; |
| 14818 |
| 14819 /** |
| 14820 * Informational warning which replaces the list of addresses when the list is |
| 14821 * empty. |
| 14822 */ |
| 14823 TargetPoolsScopedListWarning warning; |
| 14824 |
| 14825 |
| 14826 TargetPoolsScopedList(); |
| 14827 |
| 14828 TargetPoolsScopedList.fromJson(core.Map _json) { |
| 14829 if (_json.containsKey("targetPools")) { |
| 14830 targetPools = _json["targetPools"].map((value) => new TargetPool.fromJson(
value)).toList(); |
| 14831 } |
| 14832 if (_json.containsKey("warning")) { |
| 14833 warning = new TargetPoolsScopedListWarning.fromJson(_json["warning"]); |
| 14834 } |
| 14835 } |
| 14836 |
| 14837 core.Map toJson() { |
| 14838 var _json = new core.Map(); |
| 14839 if (targetPools != null) { |
| 14840 _json["targetPools"] = targetPools.map((value) => (value).toJson()).toList
(); |
| 14841 } |
| 14842 if (warning != null) { |
| 14843 _json["warning"] = (warning).toJson(); |
| 14844 } |
| 14845 return _json; |
| 14846 } |
| 14847 } |
| 14848 |
| 14849 |
| 14850 /** Not documented yet. */ |
| 14851 class TargetReference { |
| 14852 /** Not documented yet. */ |
| 14853 core.String target; |
| 14854 |
| 14855 |
| 14856 TargetReference(); |
| 14857 |
| 14858 TargetReference.fromJson(core.Map _json) { |
| 14859 if (_json.containsKey("target")) { |
| 14860 target = _json["target"]; |
| 14861 } |
| 14862 } |
| 14863 |
| 14864 core.Map toJson() { |
| 14865 var _json = new core.Map(); |
| 14866 if (target != null) { |
| 14867 _json["target"] = target; |
| 14868 } |
| 14869 return _json; |
| 14870 } |
| 14871 } |
| 14872 |
| 14873 |
| 14874 /** Not documented yet. */ |
| 14875 class TestFailure { |
| 14876 /** Not documented yet. */ |
| 14877 core.String actualService; |
| 14878 |
| 14879 /** Not documented yet. */ |
| 14880 core.String expectedService; |
| 14881 |
| 14882 /** Not documented yet. */ |
| 14883 core.String host; |
| 14884 |
| 14885 /** Not documented yet. */ |
| 14886 core.String path; |
| 14887 |
| 14888 |
| 14889 TestFailure(); |
| 14890 |
| 14891 TestFailure.fromJson(core.Map _json) { |
| 14892 if (_json.containsKey("actualService")) { |
| 14893 actualService = _json["actualService"]; |
| 14894 } |
| 14895 if (_json.containsKey("expectedService")) { |
| 14896 expectedService = _json["expectedService"]; |
| 14897 } |
| 14898 if (_json.containsKey("host")) { |
| 14899 host = _json["host"]; |
| 14900 } |
| 14901 if (_json.containsKey("path")) { |
| 14902 path = _json["path"]; |
| 14903 } |
| 14904 } |
| 14905 |
| 14906 core.Map toJson() { |
| 14907 var _json = new core.Map(); |
| 14908 if (actualService != null) { |
| 14909 _json["actualService"] = actualService; |
| 14910 } |
| 14911 if (expectedService != null) { |
| 14912 _json["expectedService"] = expectedService; |
| 14913 } |
| 14914 if (host != null) { |
| 14915 _json["host"] = host; |
| 14916 } |
| 14917 if (path != null) { |
| 14918 _json["path"] = path; |
| 14919 } |
| 14920 return _json; |
| 14921 } |
| 14922 } |
| 14923 |
| 14924 |
| 14925 /** |
| 14926 * A UrlMap resource. This resource defines the mapping from URL to the |
| 14927 * BackendService resource, based on the "longest-match" of the URL's host and |
| 14928 * path. |
| 14929 */ |
| 14930 class UrlMap { |
| 14931 /** Creation timestamp in RFC3339 text format (output only). */ |
| 14932 core.String creationTimestamp; |
| 14933 |
| 14934 /** The URL of the BackendService resource if none of the hostRules match. */ |
| 14935 core.String defaultService; |
| 14936 |
| 14937 /** |
| 14938 * An optional textual description of the resource; provided by the client |
| 14939 * when the resource is created. |
| 14940 */ |
| 14941 core.String description; |
| 14942 |
| 14943 /** |
| 14944 * Fingerprint of this resource. A hash of the contents stored in this object. |
| 14945 * This field is used in optimistic locking. This field will be ignored when |
| 14946 * inserting a UrlMap. An up-to-date fingerprint must be provided in order to |
| 14947 * update the UrlMap. |
| 14948 */ |
| 14949 core.String fingerprint; |
| 14950 |
| 14951 core.List<core.int> get fingerprintAsBytes { |
| 14952 return crypto.CryptoUtils.base64StringToBytes(fingerprint); |
| 14953 } |
| 14954 |
| 14955 void set fingerprintAsBytes(core.List<core.int> _bytes) { |
| 14956 fingerprint = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 14957 } |
| 14958 |
| 14959 /** The list of HostRules to use against the URL. */ |
| 14960 core.List<HostRule> hostRules; |
| 14961 |
| 14962 /** |
| 14963 * Unique identifier for the resource; defined by the server (output only). |
| 14964 */ |
| 14965 core.String id; |
| 14966 |
| 14967 /** Type of the resource. */ |
| 14968 core.String kind; |
| 14969 |
| 14970 /** |
| 14971 * Name of the resource; provided by the client when the resource is created. |
| 14972 * The name must be 1-63 characters long, and comply with RFC1035. |
| 14973 */ |
| 14974 core.String name; |
| 14975 |
| 14976 /** The list of named PathMatchers to use against the URL. */ |
| 14977 core.List<PathMatcher> pathMatchers; |
| 14978 |
| 14979 /** Server defined URL for the resource (output only). */ |
| 14980 core.String selfLink; |
| 14981 |
| 14982 /** |
| 14983 * The list of expected URL mappings. Request to update this UrlMap will |
| 14984 * succeed only all of the test cases pass. |
| 14985 */ |
| 14986 core.List<UrlMapTest> tests; |
| 14987 |
| 14988 |
| 14989 UrlMap(); |
| 14990 |
| 14991 UrlMap.fromJson(core.Map _json) { |
| 14992 if (_json.containsKey("creationTimestamp")) { |
| 14993 creationTimestamp = _json["creationTimestamp"]; |
| 14994 } |
| 14995 if (_json.containsKey("defaultService")) { |
| 14996 defaultService = _json["defaultService"]; |
| 14997 } |
| 14998 if (_json.containsKey("description")) { |
| 14999 description = _json["description"]; |
| 15000 } |
| 15001 if (_json.containsKey("fingerprint")) { |
| 15002 fingerprint = _json["fingerprint"]; |
| 15003 } |
| 15004 if (_json.containsKey("hostRules")) { |
| 15005 hostRules = _json["hostRules"].map((value) => new HostRule.fromJson(value)
).toList(); |
| 15006 } |
| 15007 if (_json.containsKey("id")) { |
| 15008 id = _json["id"]; |
| 15009 } |
| 15010 if (_json.containsKey("kind")) { |
| 15011 kind = _json["kind"]; |
| 15012 } |
| 15013 if (_json.containsKey("name")) { |
| 15014 name = _json["name"]; |
| 15015 } |
| 15016 if (_json.containsKey("pathMatchers")) { |
| 15017 pathMatchers = _json["pathMatchers"].map((value) => new PathMatcher.fromJs
on(value)).toList(); |
| 15018 } |
| 15019 if (_json.containsKey("selfLink")) { |
| 15020 selfLink = _json["selfLink"]; |
| 15021 } |
| 15022 if (_json.containsKey("tests")) { |
| 15023 tests = _json["tests"].map((value) => new UrlMapTest.fromJson(value)).toLi
st(); |
| 15024 } |
| 15025 } |
| 15026 |
| 15027 core.Map toJson() { |
| 15028 var _json = new core.Map(); |
| 15029 if (creationTimestamp != null) { |
| 15030 _json["creationTimestamp"] = creationTimestamp; |
| 15031 } |
| 15032 if (defaultService != null) { |
| 15033 _json["defaultService"] = defaultService; |
| 15034 } |
| 15035 if (description != null) { |
| 15036 _json["description"] = description; |
| 15037 } |
| 15038 if (fingerprint != null) { |
| 15039 _json["fingerprint"] = fingerprint; |
| 15040 } |
| 15041 if (hostRules != null) { |
| 15042 _json["hostRules"] = hostRules.map((value) => (value).toJson()).toList(); |
| 15043 } |
| 15044 if (id != null) { |
| 15045 _json["id"] = id; |
| 15046 } |
| 15047 if (kind != null) { |
| 15048 _json["kind"] = kind; |
| 15049 } |
| 15050 if (name != null) { |
| 15051 _json["name"] = name; |
| 15052 } |
| 15053 if (pathMatchers != null) { |
| 15054 _json["pathMatchers"] = pathMatchers.map((value) => (value).toJson()).toLi
st(); |
| 15055 } |
| 15056 if (selfLink != null) { |
| 15057 _json["selfLink"] = selfLink; |
| 15058 } |
| 15059 if (tests != null) { |
| 15060 _json["tests"] = tests.map((value) => (value).toJson()).toList(); |
| 15061 } |
| 15062 return _json; |
| 15063 } |
| 15064 } |
| 15065 |
| 15066 |
| 15067 /** Contains a list of UrlMap resources. */ |
| 15068 class UrlMapList { |
| 15069 /** |
| 15070 * Unique identifier for the resource; defined by the server (output only). |
| 15071 */ |
| 15072 core.String id; |
| 15073 |
| 15074 /** The UrlMap resources. */ |
| 15075 core.List<UrlMap> items; |
| 15076 |
| 15077 /** Type of resource. */ |
| 15078 core.String kind; |
| 15079 |
| 15080 /** A token used to continue a truncated list request (output only). */ |
| 15081 core.String nextPageToken; |
| 15082 |
| 15083 /** Server defined URL for this resource (output only). */ |
| 15084 core.String selfLink; |
| 15085 |
| 15086 |
| 15087 UrlMapList(); |
| 15088 |
| 15089 UrlMapList.fromJson(core.Map _json) { |
| 15090 if (_json.containsKey("id")) { |
| 15091 id = _json["id"]; |
| 15092 } |
| 15093 if (_json.containsKey("items")) { |
| 15094 items = _json["items"].map((value) => new UrlMap.fromJson(value)).toList()
; |
| 15095 } |
| 15096 if (_json.containsKey("kind")) { |
| 15097 kind = _json["kind"]; |
| 15098 } |
| 15099 if (_json.containsKey("nextPageToken")) { |
| 15100 nextPageToken = _json["nextPageToken"]; |
| 15101 } |
| 15102 if (_json.containsKey("selfLink")) { |
| 15103 selfLink = _json["selfLink"]; |
| 15104 } |
| 15105 } |
| 15106 |
| 15107 core.Map toJson() { |
| 15108 var _json = new core.Map(); |
| 15109 if (id != null) { |
| 15110 _json["id"] = id; |
| 15111 } |
| 15112 if (items != null) { |
| 15113 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 15114 } |
| 15115 if (kind != null) { |
| 15116 _json["kind"] = kind; |
| 15117 } |
| 15118 if (nextPageToken != null) { |
| 15119 _json["nextPageToken"] = nextPageToken; |
| 15120 } |
| 15121 if (selfLink != null) { |
| 15122 _json["selfLink"] = selfLink; |
| 15123 } |
| 15124 return _json; |
| 15125 } |
| 15126 } |
| 15127 |
| 15128 |
| 15129 /** Not documented yet. */ |
| 15130 class UrlMapReference { |
| 15131 /** Not documented yet. */ |
| 15132 core.String urlMap; |
| 15133 |
| 15134 |
| 15135 UrlMapReference(); |
| 15136 |
| 15137 UrlMapReference.fromJson(core.Map _json) { |
| 15138 if (_json.containsKey("urlMap")) { |
| 15139 urlMap = _json["urlMap"]; |
| 15140 } |
| 15141 } |
| 15142 |
| 15143 core.Map toJson() { |
| 15144 var _json = new core.Map(); |
| 15145 if (urlMap != null) { |
| 15146 _json["urlMap"] = urlMap; |
| 15147 } |
| 15148 return _json; |
| 15149 } |
| 15150 } |
| 15151 |
| 15152 |
| 15153 /** Message for the expected URL mappings. */ |
| 15154 class UrlMapTest { |
| 15155 /** Description of this test case. */ |
| 15156 core.String description; |
| 15157 |
| 15158 /** Host portion of the URL. */ |
| 15159 core.String host; |
| 15160 |
| 15161 /** Path portion of the URL. */ |
| 15162 core.String path; |
| 15163 |
| 15164 /** Expected BackendService resource the given URL should be mapped to. */ |
| 15165 core.String service; |
| 15166 |
| 15167 |
| 15168 UrlMapTest(); |
| 15169 |
| 15170 UrlMapTest.fromJson(core.Map _json) { |
| 15171 if (_json.containsKey("description")) { |
| 15172 description = _json["description"]; |
| 15173 } |
| 15174 if (_json.containsKey("host")) { |
| 15175 host = _json["host"]; |
| 15176 } |
| 15177 if (_json.containsKey("path")) { |
| 15178 path = _json["path"]; |
| 15179 } |
| 15180 if (_json.containsKey("service")) { |
| 15181 service = _json["service"]; |
| 15182 } |
| 15183 } |
| 15184 |
| 15185 core.Map toJson() { |
| 15186 var _json = new core.Map(); |
| 15187 if (description != null) { |
| 15188 _json["description"] = description; |
| 15189 } |
| 15190 if (host != null) { |
| 15191 _json["host"] = host; |
| 15192 } |
| 15193 if (path != null) { |
| 15194 _json["path"] = path; |
| 15195 } |
| 15196 if (service != null) { |
| 15197 _json["service"] = service; |
| 15198 } |
| 15199 return _json; |
| 15200 } |
| 15201 } |
| 15202 |
| 15203 |
| 15204 /** Message representing the validation result for a UrlMap. */ |
| 15205 class UrlMapValidationResult { |
| 15206 /** Not documented yet. */ |
| 15207 core.List<core.String> loadErrors; |
| 15208 |
| 15209 /** |
| 15210 * Whether the given UrlMap can be successfully loaded. If false, 'loadErrors' |
| 15211 * indicates the reasons. |
| 15212 */ |
| 15213 core.bool loadSucceeded; |
| 15214 |
| 15215 /** Not documented yet. */ |
| 15216 core.List<TestFailure> testFailures; |
| 15217 |
| 15218 /** |
| 15219 * If successfully loaded, this field indicates whether the test passed. If |
| 15220 * false, 'testFailures's indicate the reason of failure. |
| 15221 */ |
| 15222 core.bool testPassed; |
| 15223 |
| 15224 |
| 15225 UrlMapValidationResult(); |
| 15226 |
| 15227 UrlMapValidationResult.fromJson(core.Map _json) { |
| 15228 if (_json.containsKey("loadErrors")) { |
| 15229 loadErrors = _json["loadErrors"]; |
| 15230 } |
| 15231 if (_json.containsKey("loadSucceeded")) { |
| 15232 loadSucceeded = _json["loadSucceeded"]; |
| 15233 } |
| 15234 if (_json.containsKey("testFailures")) { |
| 15235 testFailures = _json["testFailures"].map((value) => new TestFailure.fromJs
on(value)).toList(); |
| 15236 } |
| 15237 if (_json.containsKey("testPassed")) { |
| 15238 testPassed = _json["testPassed"]; |
| 15239 } |
| 15240 } |
| 15241 |
| 15242 core.Map toJson() { |
| 15243 var _json = new core.Map(); |
| 15244 if (loadErrors != null) { |
| 15245 _json["loadErrors"] = loadErrors; |
| 15246 } |
| 15247 if (loadSucceeded != null) { |
| 15248 _json["loadSucceeded"] = loadSucceeded; |
| 15249 } |
| 15250 if (testFailures != null) { |
| 15251 _json["testFailures"] = testFailures.map((value) => (value).toJson()).toLi
st(); |
| 15252 } |
| 15253 if (testPassed != null) { |
| 15254 _json["testPassed"] = testPassed; |
| 15255 } |
| 15256 return _json; |
| 15257 } |
| 15258 } |
| 15259 |
| 15260 |
| 15261 /** Not documented yet. */ |
| 15262 class UrlMapsValidateRequest { |
| 15263 /** Content of the UrlMap to be validated. */ |
| 15264 UrlMap resource; |
| 15265 |
| 15266 |
| 15267 UrlMapsValidateRequest(); |
| 15268 |
| 15269 UrlMapsValidateRequest.fromJson(core.Map _json) { |
| 15270 if (_json.containsKey("resource")) { |
| 15271 resource = new UrlMap.fromJson(_json["resource"]); |
| 15272 } |
| 15273 } |
| 15274 |
| 15275 core.Map toJson() { |
| 15276 var _json = new core.Map(); |
| 15277 if (resource != null) { |
| 15278 _json["resource"] = (resource).toJson(); |
| 15279 } |
| 15280 return _json; |
| 15281 } |
| 15282 } |
| 15283 |
| 15284 |
| 15285 /** Not documented yet. */ |
| 15286 class UrlMapsValidateResponse { |
| 15287 /** Not documented yet. */ |
| 15288 UrlMapValidationResult result; |
| 15289 |
| 15290 |
| 15291 UrlMapsValidateResponse(); |
| 15292 |
| 15293 UrlMapsValidateResponse.fromJson(core.Map _json) { |
| 15294 if (_json.containsKey("result")) { |
| 15295 result = new UrlMapValidationResult.fromJson(_json["result"]); |
| 15296 } |
| 15297 } |
| 15298 |
| 15299 core.Map toJson() { |
| 15300 var _json = new core.Map(); |
| 15301 if (result != null) { |
| 15302 _json["result"] = (result).toJson(); |
| 15303 } |
| 15304 return _json; |
| 15305 } |
| 15306 } |
| 15307 |
| 15308 |
| 15309 /** |
| 15310 * The location in Cloud Storage and naming method of the daily usage report. |
| 15311 * Contains bucket_name and report_name prefix. |
| 15312 */ |
| 15313 class UsageExportLocation { |
| 15314 /** |
| 15315 * The name of an existing bucket in Cloud Storage where the usage report |
| 15316 * object is stored. The Google Service Account is granted write access to |
| 15317 * this bucket. This is simply the bucket name, with no "gs://" or |
| 15318 * "https://storage.googleapis.com/" in front of it. |
| 15319 */ |
| 15320 core.String bucketName; |
| 15321 |
| 15322 /** |
| 15323 * An optional prefix for the name of the usage report object stored in |
| 15324 * bucket_name. If not supplied, defaults to "usage_". The report is stored as |
| 15325 * a CSV file named _gce_.csv. where is the day of the usage according to |
| 15326 * Pacific Time. The prefix should conform to Cloud Storage object naming |
| 15327 * conventions. |
| 15328 */ |
| 15329 core.String reportNamePrefix; |
| 15330 |
| 15331 |
| 15332 UsageExportLocation(); |
| 15333 |
| 15334 UsageExportLocation.fromJson(core.Map _json) { |
| 15335 if (_json.containsKey("bucketName")) { |
| 15336 bucketName = _json["bucketName"]; |
| 15337 } |
| 15338 if (_json.containsKey("reportNamePrefix")) { |
| 15339 reportNamePrefix = _json["reportNamePrefix"]; |
| 15340 } |
| 15341 } |
| 15342 |
| 15343 core.Map toJson() { |
| 15344 var _json = new core.Map(); |
| 15345 if (bucketName != null) { |
| 15346 _json["bucketName"] = bucketName; |
| 15347 } |
| 15348 if (reportNamePrefix != null) { |
| 15349 _json["reportNamePrefix"] = reportNamePrefix; |
| 15350 } |
| 15351 return _json; |
| 15352 } |
| 15353 } |
| 15354 |
| 15355 |
| 15356 /** Not documented yet. */ |
| 15357 class ZoneMaintenanceWindows { |
| 15358 /** Begin time of the maintenance window, in RFC 3339 format. */ |
| 15359 core.String beginTime; |
| 15360 |
| 15361 /** Textual description of the maintenance window. */ |
| 15362 core.String description; |
| 15363 |
| 15364 /** End time of the maintenance window, in RFC 3339 format. */ |
| 15365 core.String endTime; |
| 15366 |
| 15367 /** Name of the maintenance window. */ |
| 15368 core.String name; |
| 15369 |
| 15370 |
| 15371 ZoneMaintenanceWindows(); |
| 15372 |
| 15373 ZoneMaintenanceWindows.fromJson(core.Map _json) { |
| 15374 if (_json.containsKey("beginTime")) { |
| 15375 beginTime = _json["beginTime"]; |
| 15376 } |
| 15377 if (_json.containsKey("description")) { |
| 15378 description = _json["description"]; |
| 15379 } |
| 15380 if (_json.containsKey("endTime")) { |
| 15381 endTime = _json["endTime"]; |
| 15382 } |
| 15383 if (_json.containsKey("name")) { |
| 15384 name = _json["name"]; |
| 15385 } |
| 15386 } |
| 15387 |
| 15388 core.Map toJson() { |
| 15389 var _json = new core.Map(); |
| 15390 if (beginTime != null) { |
| 15391 _json["beginTime"] = beginTime; |
| 15392 } |
| 15393 if (description != null) { |
| 15394 _json["description"] = description; |
| 15395 } |
| 15396 if (endTime != null) { |
| 15397 _json["endTime"] = endTime; |
| 15398 } |
| 15399 if (name != null) { |
| 15400 _json["name"] = name; |
| 15401 } |
| 15402 return _json; |
| 15403 } |
| 15404 } |
| 15405 |
| 15406 |
| 15407 /** A zone resource. */ |
| 15408 class Zone { |
| 15409 /** Creation timestamp in RFC3339 text format (output only). */ |
| 15410 core.String creationTimestamp; |
| 15411 |
| 15412 /** The deprecation status associated with this zone. */ |
| 15413 DeprecationStatus deprecated; |
| 15414 |
| 15415 /** Textual description of the resource. */ |
| 15416 core.String description; |
| 15417 |
| 15418 /** |
| 15419 * Unique identifier for the resource; defined by the server (output only). |
| 15420 */ |
| 15421 core.String id; |
| 15422 |
| 15423 /** Type of the resource. */ |
| 15424 core.String kind; |
| 15425 |
| 15426 /** |
| 15427 * Scheduled maintenance windows for the zone. When the zone is in a |
| 15428 * maintenance window, all resources which reside in the zone will be |
| 15429 * unavailable. |
| 15430 */ |
| 15431 core.List<ZoneMaintenanceWindows> maintenanceWindows; |
| 15432 |
| 15433 /** Name of the resource. */ |
| 15434 core.String name; |
| 15435 |
| 15436 /** Full URL reference to the region which hosts the zone (output only). */ |
| 15437 core.String region; |
| 15438 |
| 15439 /** Server defined URL for the resource (output only). */ |
| 15440 core.String selfLink; |
| 15441 |
| 15442 /** |
| 15443 * Status of the zone. "UP" or "DOWN". |
| 15444 * Possible string values are: |
| 15445 * - "DOWN" |
| 15446 * - "UP" |
| 15447 */ |
| 15448 core.String status; |
| 15449 |
| 15450 |
| 15451 Zone(); |
| 15452 |
| 15453 Zone.fromJson(core.Map _json) { |
| 15454 if (_json.containsKey("creationTimestamp")) { |
| 15455 creationTimestamp = _json["creationTimestamp"]; |
| 15456 } |
| 15457 if (_json.containsKey("deprecated")) { |
| 15458 deprecated = new DeprecationStatus.fromJson(_json["deprecated"]); |
| 15459 } |
| 15460 if (_json.containsKey("description")) { |
| 15461 description = _json["description"]; |
| 15462 } |
| 15463 if (_json.containsKey("id")) { |
| 15464 id = _json["id"]; |
| 15465 } |
| 15466 if (_json.containsKey("kind")) { |
| 15467 kind = _json["kind"]; |
| 15468 } |
| 15469 if (_json.containsKey("maintenanceWindows")) { |
| 15470 maintenanceWindows = _json["maintenanceWindows"].map((value) => new ZoneMa
intenanceWindows.fromJson(value)).toList(); |
| 15471 } |
| 15472 if (_json.containsKey("name")) { |
| 15473 name = _json["name"]; |
| 15474 } |
| 15475 if (_json.containsKey("region")) { |
| 15476 region = _json["region"]; |
| 15477 } |
| 15478 if (_json.containsKey("selfLink")) { |
| 15479 selfLink = _json["selfLink"]; |
| 15480 } |
| 15481 if (_json.containsKey("status")) { |
| 15482 status = _json["status"]; |
| 15483 } |
| 15484 } |
| 15485 |
| 15486 core.Map toJson() { |
| 15487 var _json = new core.Map(); |
| 15488 if (creationTimestamp != null) { |
| 15489 _json["creationTimestamp"] = creationTimestamp; |
| 15490 } |
| 15491 if (deprecated != null) { |
| 15492 _json["deprecated"] = (deprecated).toJson(); |
| 15493 } |
| 15494 if (description != null) { |
| 15495 _json["description"] = description; |
| 15496 } |
| 15497 if (id != null) { |
| 15498 _json["id"] = id; |
| 15499 } |
| 15500 if (kind != null) { |
| 15501 _json["kind"] = kind; |
| 15502 } |
| 15503 if (maintenanceWindows != null) { |
| 15504 _json["maintenanceWindows"] = maintenanceWindows.map((value) => (value).to
Json()).toList(); |
| 15505 } |
| 15506 if (name != null) { |
| 15507 _json["name"] = name; |
| 15508 } |
| 15509 if (region != null) { |
| 15510 _json["region"] = region; |
| 15511 } |
| 15512 if (selfLink != null) { |
| 15513 _json["selfLink"] = selfLink; |
| 15514 } |
| 15515 if (status != null) { |
| 15516 _json["status"] = status; |
| 15517 } |
| 15518 return _json; |
| 15519 } |
| 15520 } |
| 15521 |
| 15522 |
| 15523 /** Contains a list of zone resources. */ |
| 15524 class ZoneList { |
| 15525 /** |
| 15526 * Unique identifier for the resource; defined by the server (output only). |
| 15527 */ |
| 15528 core.String id; |
| 15529 |
| 15530 /** The zone resources. */ |
| 15531 core.List<Zone> items; |
| 15532 |
| 15533 /** Type of resource. */ |
| 15534 core.String kind; |
| 15535 |
| 15536 /** A token used to continue a truncated list request (output only). */ |
| 15537 core.String nextPageToken; |
| 15538 |
| 15539 /** Server defined URL for this resource (output only). */ |
| 15540 core.String selfLink; |
| 15541 |
| 15542 |
| 15543 ZoneList(); |
| 15544 |
| 15545 ZoneList.fromJson(core.Map _json) { |
| 15546 if (_json.containsKey("id")) { |
| 15547 id = _json["id"]; |
| 15548 } |
| 15549 if (_json.containsKey("items")) { |
| 15550 items = _json["items"].map((value) => new Zone.fromJson(value)).toList(); |
| 15551 } |
| 15552 if (_json.containsKey("kind")) { |
| 15553 kind = _json["kind"]; |
| 15554 } |
| 15555 if (_json.containsKey("nextPageToken")) { |
| 15556 nextPageToken = _json["nextPageToken"]; |
| 15557 } |
| 15558 if (_json.containsKey("selfLink")) { |
| 15559 selfLink = _json["selfLink"]; |
| 15560 } |
| 15561 } |
| 15562 |
| 15563 core.Map toJson() { |
| 15564 var _json = new core.Map(); |
| 15565 if (id != null) { |
| 15566 _json["id"] = id; |
| 15567 } |
| 15568 if (items != null) { |
| 15569 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 15570 } |
| 15571 if (kind != null) { |
| 15572 _json["kind"] = kind; |
| 15573 } |
| 15574 if (nextPageToken != null) { |
| 15575 _json["nextPageToken"] = nextPageToken; |
| 15576 } |
| 15577 if (selfLink != null) { |
| 15578 _json["selfLink"] = selfLink; |
| 15579 } |
| 15580 return _json; |
| 15581 } |
| 15582 } |
| 15583 |
| 15584 |
OLD | NEW |