OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.compute.v1; | 3 library googleapis.compute.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:crypto/crypto.dart' as crypto; | 10 import 'package:crypto/crypto.dart' as crypto; |
(...skipping 21 matching lines...) Expand all Loading... |
32 /** View your data in Google Cloud Storage */ | 32 /** View your data in Google Cloud Storage */ |
33 static const DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devsto
rage.read_only"; | 33 static const DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devsto
rage.read_only"; |
34 | 34 |
35 /** Manage your data in Google Cloud Storage */ | 35 /** Manage your data in Google Cloud Storage */ |
36 static const DevstorageReadWriteScope = "https://www.googleapis.com/auth/devst
orage.read_write"; | 36 static const DevstorageReadWriteScope = "https://www.googleapis.com/auth/devst
orage.read_write"; |
37 | 37 |
38 | 38 |
39 final commons.ApiRequester _requester; | 39 final commons.ApiRequester _requester; |
40 | 40 |
41 AddressesResourceApi get addresses => new AddressesResourceApi(_requester); | 41 AddressesResourceApi get addresses => new AddressesResourceApi(_requester); |
| 42 AutoscalersResourceApi get autoscalers => new AutoscalersResourceApi(_requeste
r); |
42 BackendServicesResourceApi get backendServices => new BackendServicesResourceA
pi(_requester); | 43 BackendServicesResourceApi get backendServices => new BackendServicesResourceA
pi(_requester); |
43 DiskTypesResourceApi get diskTypes => new DiskTypesResourceApi(_requester); | 44 DiskTypesResourceApi get diskTypes => new DiskTypesResourceApi(_requester); |
44 DisksResourceApi get disks => new DisksResourceApi(_requester); | 45 DisksResourceApi get disks => new DisksResourceApi(_requester); |
45 FirewallsResourceApi get firewalls => new FirewallsResourceApi(_requester); | 46 FirewallsResourceApi get firewalls => new FirewallsResourceApi(_requester); |
46 ForwardingRulesResourceApi get forwardingRules => new ForwardingRulesResourceA
pi(_requester); | 47 ForwardingRulesResourceApi get forwardingRules => new ForwardingRulesResourceA
pi(_requester); |
47 GlobalAddressesResourceApi get globalAddresses => new GlobalAddressesResourceA
pi(_requester); | 48 GlobalAddressesResourceApi get globalAddresses => new GlobalAddressesResourceA
pi(_requester); |
48 GlobalForwardingRulesResourceApi get globalForwardingRules => new GlobalForwar
dingRulesResourceApi(_requester); | 49 GlobalForwardingRulesResourceApi get globalForwardingRules => new GlobalForwar
dingRulesResourceApi(_requester); |
49 GlobalOperationsResourceApi get globalOperations => new GlobalOperationsResour
ceApi(_requester); | 50 GlobalOperationsResourceApi get globalOperations => new GlobalOperationsResour
ceApi(_requester); |
50 HttpHealthChecksResourceApi get httpHealthChecks => new HttpHealthChecksResour
ceApi(_requester); | 51 HttpHealthChecksResourceApi get httpHealthChecks => new HttpHealthChecksResour
ceApi(_requester); |
51 ImagesResourceApi get images => new ImagesResourceApi(_requester); | 52 ImagesResourceApi get images => new ImagesResourceApi(_requester); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 /** | 85 /** |
85 * Retrieves the list of addresses grouped by scope. | 86 * Retrieves the list of addresses grouped by scope. |
86 * | 87 * |
87 * Request parameters: | 88 * Request parameters: |
88 * | 89 * |
89 * [project] - Project ID for this request. | 90 * [project] - Project ID for this request. |
90 * Value must have pattern | 91 * Value must have pattern |
91 * "(?:(?:[-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])?))". | 92 * "(?:(?:[-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])?))". |
92 * | 93 * |
93 * [filter] - Sets a filter expression for filtering listed resources, in the | 94 * [filter] - Sets a filter expression for filtering listed resources, in the |
94 * form filter={expression}. Your {expression} must contain the following: | 95 * form filter={expression}. Your {expression} must be in the format: |
95 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 96 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
96 * | 97 * |
97 * - FIELD_NAME: The name of the field you want to compare. The field name | 98 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
98 * must be valid for the type of resource being filtered. Only atomic field | 99 * field types are supported (string, number, boolean). The COMPARISON_STRING |
99 * types are supported (string, number, boolean). Array and object fields are | 100 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
100 * not currently supported. | 101 * string value to filter to. The literal value must be valid for the type of |
101 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 102 * field (string, number, boolean). For string fields, the literal value is |
102 * equals). | 103 * interpreted as a regular expression using RE2 syntax. The literal value |
103 * - LITERAL_STRING: The literal string value to filter to. The literal value | 104 * must match the entire field. |
104 * must be valid for the type of field (string, number, boolean). For string | 105 * |
105 * fields, the literal value is interpreted as a regular expression using RE2 | 106 * For example, filter=name ne example-instance. |
106 * syntax. The literal value must match the entire field. For example, you | |
107 * can filter by the name of a resource: | |
108 * filter=name ne example-instance | |
109 * The above filter returns only results whose name field does not equal | |
110 * example-instance. You can also enclose your literal string in single, | |
111 * double, or no quotes. | |
112 * | 107 * |
113 * [maxResults] - Maximum count of results to be returned. | 108 * [maxResults] - Maximum count of results to be returned. |
114 * Value must be between "0" and "500". | 109 * Value must be between "0" and "500". |
115 * | 110 * |
116 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 111 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
117 * to list the next page of results. Set pageToken to the nextPageToken | 112 * to list the next page of results. Set pageToken to the nextPageToken |
118 * returned by a previous list request. | 113 * returned by a previous list request. |
119 * | 114 * |
120 * Completes with a [AddressAggregatedList]. | 115 * Completes with a [AddressAggregatedList]. |
121 * | 116 * |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 * Request parameters: | 319 * Request parameters: |
325 * | 320 * |
326 * [project] - Project ID for this request. | 321 * [project] - Project ID for this request. |
327 * Value must have pattern | 322 * Value must have pattern |
328 * "(?:(?:[-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])?))". | 323 * "(?:(?:[-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])?))". |
329 * | 324 * |
330 * [region] - The name of the region for this request. | 325 * [region] - The name of the region for this request. |
331 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 326 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
332 * | 327 * |
333 * [filter] - Sets a filter expression for filtering listed resources, in the | 328 * [filter] - Sets a filter expression for filtering listed resources, in the |
334 * form filter={expression}. Your {expression} must contain the following: | 329 * form filter={expression}. Your {expression} must be in the format: |
335 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 330 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
336 * | 331 * |
337 * - FIELD_NAME: The name of the field you want to compare. The field name | 332 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
338 * must be valid for the type of resource being filtered. Only atomic field | 333 * field types are supported (string, number, boolean). The COMPARISON_STRING |
339 * types are supported (string, number, boolean). Array and object fields are | 334 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
340 * not currently supported. | 335 * string value to filter to. The literal value must be valid for the type of |
341 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 336 * field (string, number, boolean). For string fields, the literal value is |
342 * equals). | 337 * interpreted as a regular expression using RE2 syntax. The literal value |
343 * - LITERAL_STRING: The literal string value to filter to. The literal value | 338 * must match the entire field. |
344 * must be valid for the type of field (string, number, boolean). For string | 339 * |
345 * fields, the literal value is interpreted as a regular expression using RE2 | 340 * For example, filter=name ne example-instance. |
346 * syntax. The literal value must match the entire field. For example, you | |
347 * can filter by the name of a resource: | |
348 * filter=name ne example-instance | |
349 * The above filter returns only results whose name field does not equal | |
350 * example-instance. You can also enclose your literal string in single, | |
351 * double, or no quotes. | |
352 * | 341 * |
353 * [maxResults] - Maximum count of results to be returned. | 342 * [maxResults] - Maximum count of results to be returned. |
354 * Value must be between "0" and "500". | 343 * Value must be between "0" and "500". |
355 * | 344 * |
356 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 345 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
357 * to list the next page of results. Set pageToken to the nextPageToken | 346 * to list the next page of results. Set pageToken to the nextPageToken |
358 * returned by a previous list request. | 347 * returned by a previous list request. |
359 * | 348 * |
360 * Completes with a [AddressList]. | 349 * Completes with a [AddressList]. |
361 * | 350 * |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 queryParams: _queryParams, | 386 queryParams: _queryParams, |
398 uploadOptions: _uploadOptions, | 387 uploadOptions: _uploadOptions, |
399 uploadMedia: _uploadMedia, | 388 uploadMedia: _uploadMedia, |
400 downloadOptions: _downloadOptions); | 389 downloadOptions: _downloadOptions); |
401 return _response.then((data) => new AddressList.fromJson(data)); | 390 return _response.then((data) => new AddressList.fromJson(data)); |
402 } | 391 } |
403 | 392 |
404 } | 393 } |
405 | 394 |
406 | 395 |
407 class BackendServicesResourceApi { | 396 class AutoscalersResourceApi { |
408 final commons.ApiRequester _requester; | 397 final commons.ApiRequester _requester; |
409 | 398 |
410 BackendServicesResourceApi(commons.ApiRequester client) : | 399 AutoscalersResourceApi(commons.ApiRequester client) : |
411 _requester = client; | 400 _requester = client; |
412 | 401 |
413 /** | 402 /** |
414 * Deletes the specified BackendService resource. | 403 * Retrieves the list of autoscalers grouped by scope. |
415 * | 404 * |
416 * Request parameters: | 405 * Request parameters: |
417 * | 406 * |
418 * [project] - Name of the project scoping this request. | 407 * [project] - Name of the project scoping this request. |
419 * Value must have pattern | 408 * Value must have pattern |
420 * "(?:(?:[-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])?))". | 409 * "(?:(?:[-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])?))". |
421 * | 410 * |
422 * [backendService] - Name of the BackendService resource to delete. | 411 * [filter] - Sets a filter expression for filtering listed resources, in the |
423 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 412 * form filter={expression}. Your {expression} must be in the format: |
| 413 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
424 * | 414 * |
425 * Completes with a [Operation]. | 415 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 416 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 417 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 418 * string value to filter to. The literal value must be valid for the type of |
| 419 * field (string, number, boolean). For string fields, the literal value is |
| 420 * interpreted as a regular expression using RE2 syntax. The literal value |
| 421 * must match the entire field. |
| 422 * |
| 423 * For example, filter=name ne example-instance. |
| 424 * |
| 425 * [maxResults] - Maximum count of results to be returned. |
| 426 * Value must be between "0" and "500". |
| 427 * |
| 428 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 429 * to list the next page of results. Set pageToken to the nextPageToken |
| 430 * returned by a previous list request. |
| 431 * |
| 432 * Completes with a [AutoscalerAggregatedList]. |
426 * | 433 * |
427 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 434 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
428 * error. | 435 * error. |
429 * | 436 * |
430 * If the used [http.Client] completes with an error when making a REST call, | 437 * If the used [http.Client] completes with an error when making a REST call, |
431 * this method will complete with the same error. | 438 * this method will complete with the same error. |
432 */ | 439 */ |
433 async.Future<Operation> delete(core.String project, core.String backendService
) { | 440 async.Future<AutoscalerAggregatedList> aggregatedList(core.String project, {co
re.String filter, core.int maxResults, core.String pageToken}) { |
434 var _url = null; | 441 var _url = null; |
435 var _queryParams = new core.Map(); | 442 var _queryParams = new core.Map(); |
436 var _uploadMedia = null; | 443 var _uploadMedia = null; |
437 var _uploadOptions = null; | 444 var _uploadOptions = null; |
438 var _downloadOptions = commons.DownloadOptions.Metadata; | 445 var _downloadOptions = commons.DownloadOptions.Metadata; |
439 var _body = null; | 446 var _body = null; |
440 | 447 |
441 if (project == null) { | 448 if (project == null) { |
442 throw new core.ArgumentError("Parameter project is required."); | 449 throw new core.ArgumentError("Parameter project is required."); |
443 } | 450 } |
444 if (backendService == null) { | 451 if (filter != null) { |
445 throw new core.ArgumentError("Parameter backendService is required."); | 452 _queryParams["filter"] = [filter]; |
| 453 } |
| 454 if (maxResults != null) { |
| 455 _queryParams["maxResults"] = ["${maxResults}"]; |
| 456 } |
| 457 if (pageToken != null) { |
| 458 _queryParams["pageToken"] = [pageToken]; |
446 } | 459 } |
447 | 460 |
448 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices/
' + commons.Escaper.ecapeVariable('$backendService'); | 461 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/autoscalers'
; |
449 | 462 |
450 var _response = _requester.request(_url, | 463 var _response = _requester.request(_url, |
451 "DELETE", | 464 "GET", |
452 body: _body, | 465 body: _body, |
453 queryParams: _queryParams, | 466 queryParams: _queryParams, |
454 uploadOptions: _uploadOptions, | 467 uploadOptions: _uploadOptions, |
455 uploadMedia: _uploadMedia, | 468 uploadMedia: _uploadMedia, |
456 downloadOptions: _downloadOptions); | 469 downloadOptions: _downloadOptions); |
457 return _response.then((data) => new Operation.fromJson(data)); | 470 return _response.then((data) => new AutoscalerAggregatedList.fromJson(data))
; |
458 } | 471 } |
459 | 472 |
460 /** | 473 /** |
461 * Returns the specified BackendService resource. | 474 * Deletes the specified autoscaler resource. |
462 * | 475 * |
463 * Request parameters: | 476 * Request parameters: |
464 * | 477 * |
465 * [project] - Name of the project scoping this request. | 478 * [project] - Name of the project scoping this request. |
466 * Value must have pattern | 479 * Value must have pattern |
467 * "(?:(?:[-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 * "(?:(?:[-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])?))". |
468 * | 481 * |
469 * [backendService] - Name of the BackendService resource to return. | 482 * [zone] - Name of the zone scoping this request. |
470 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 483 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
471 * | 484 * |
472 * Completes with a [BackendService]. | 485 * [autoscaler] - Name of the persistent autoscaler resource to delete. |
| 486 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 487 * |
| 488 * Completes with a [Operation]. |
473 * | 489 * |
474 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 490 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
475 * error. | 491 * error. |
476 * | 492 * |
477 * If the used [http.Client] completes with an error when making a REST call, | 493 * If the used [http.Client] completes with an error when making a REST call, |
478 * this method will complete with the same error. | 494 * this method will complete with the same error. |
479 */ | 495 */ |
480 async.Future<BackendService> get(core.String project, core.String backendServi
ce) { | 496 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing autoscaler) { |
481 var _url = null; | 497 var _url = null; |
482 var _queryParams = new core.Map(); | 498 var _queryParams = new core.Map(); |
483 var _uploadMedia = null; | 499 var _uploadMedia = null; |
484 var _uploadOptions = null; | 500 var _uploadOptions = null; |
485 var _downloadOptions = commons.DownloadOptions.Metadata; | 501 var _downloadOptions = commons.DownloadOptions.Metadata; |
486 var _body = null; | 502 var _body = null; |
487 | 503 |
488 if (project == null) { | 504 if (project == null) { |
489 throw new core.ArgumentError("Parameter project is required."); | 505 throw new core.ArgumentError("Parameter project is required."); |
490 } | 506 } |
491 if (backendService == null) { | 507 if (zone == null) { |
492 throw new core.ArgumentError("Parameter backendService is required."); | 508 throw new core.ArgumentError("Parameter zone is required."); |
| 509 } |
| 510 if (autoscaler == null) { |
| 511 throw new core.ArgumentError("Parameter autoscaler is required."); |
493 } | 512 } |
494 | 513 |
495 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices/
' + commons.Escaper.ecapeVariable('$backendService'); | 514 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/autoscalers/' + commons.Escaper.ecapeVariable('$au
toscaler'); |
496 | 515 |
497 var _response = _requester.request(_url, | 516 var _response = _requester.request(_url, |
498 "GET", | 517 "DELETE", |
499 body: _body, | 518 body: _body, |
500 queryParams: _queryParams, | 519 queryParams: _queryParams, |
501 uploadOptions: _uploadOptions, | 520 uploadOptions: _uploadOptions, |
502 uploadMedia: _uploadMedia, | 521 uploadMedia: _uploadMedia, |
503 downloadOptions: _downloadOptions); | 522 downloadOptions: _downloadOptions); |
504 return _response.then((data) => new BackendService.fromJson(data)); | 523 return _response.then((data) => new Operation.fromJson(data)); |
505 } | 524 } |
506 | 525 |
507 /** | 526 /** |
508 * Gets the most recent health check results for this BackendService. | 527 * Returns the specified autoscaler resource. |
509 * | |
510 * [request] - The metadata request object. | |
511 * | 528 * |
512 * Request parameters: | 529 * Request parameters: |
513 * | 530 * |
514 * [project] - null | 531 * [project] - Name of the project scoping this request. |
515 * Value must have pattern | 532 * Value must have pattern |
516 * "(?:(?:[-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])?))". | 533 * "(?:(?:[-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])?))". |
517 * | 534 * |
518 * [backendService] - Name of the BackendService resource to which the queried | 535 * [zone] - Name of the zone scoping this request. |
519 * instance belongs. | |
520 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 536 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
521 * | 537 * |
522 * Completes with a [BackendServiceGroupHealth]. | 538 * [autoscaler] - Name of the persistent autoscaler resource to return. |
| 539 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 540 * |
| 541 * Completes with a [Autoscaler]. |
523 * | 542 * |
524 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 543 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
525 * error. | 544 * error. |
526 * | 545 * |
527 * If the used [http.Client] completes with an error when making a REST call, | 546 * If the used [http.Client] completes with an error when making a REST call, |
528 * this method will complete with the same error. | 547 * this method will complete with the same error. |
529 */ | 548 */ |
530 async.Future<BackendServiceGroupHealth> getHealth(ResourceGroupReference reque
st, core.String project, core.String backendService) { | 549 async.Future<Autoscaler> get(core.String project, core.String zone, core.Strin
g autoscaler) { |
531 var _url = null; | 550 var _url = null; |
532 var _queryParams = new core.Map(); | 551 var _queryParams = new core.Map(); |
533 var _uploadMedia = null; | 552 var _uploadMedia = null; |
534 var _uploadOptions = null; | 553 var _uploadOptions = null; |
535 var _downloadOptions = commons.DownloadOptions.Metadata; | 554 var _downloadOptions = commons.DownloadOptions.Metadata; |
536 var _body = null; | 555 var _body = null; |
537 | 556 |
538 if (request != null) { | |
539 _body = convert.JSON.encode((request).toJson()); | |
540 } | |
541 if (project == null) { | 557 if (project == null) { |
542 throw new core.ArgumentError("Parameter project is required."); | 558 throw new core.ArgumentError("Parameter project is required."); |
543 } | 559 } |
544 if (backendService == null) { | 560 if (zone == null) { |
545 throw new core.ArgumentError("Parameter backendService is required."); | 561 throw new core.ArgumentError("Parameter zone is required."); |
| 562 } |
| 563 if (autoscaler == null) { |
| 564 throw new core.ArgumentError("Parameter autoscaler is required."); |
546 } | 565 } |
547 | 566 |
548 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices/
' + commons.Escaper.ecapeVariable('$backendService') + '/getHealth'; | 567 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/autoscalers/' + commons.Escaper.ecapeVariable('$au
toscaler'); |
549 | 568 |
550 var _response = _requester.request(_url, | 569 var _response = _requester.request(_url, |
551 "POST", | 570 "GET", |
552 body: _body, | 571 body: _body, |
553 queryParams: _queryParams, | 572 queryParams: _queryParams, |
554 uploadOptions: _uploadOptions, | 573 uploadOptions: _uploadOptions, |
555 uploadMedia: _uploadMedia, | 574 uploadMedia: _uploadMedia, |
556 downloadOptions: _downloadOptions); | 575 downloadOptions: _downloadOptions); |
557 return _response.then((data) => new BackendServiceGroupHealth.fromJson(data)
); | 576 return _response.then((data) => new Autoscaler.fromJson(data)); |
558 } | 577 } |
559 | 578 |
560 /** | 579 /** |
561 * Creates a BackendService resource in the specified project using the data | 580 * Creates an autoscaler resource in the specified project using the data |
562 * included in the request. | 581 * included in the request. |
563 * | 582 * |
564 * [request] - The metadata request object. | 583 * [request] - The metadata request object. |
565 * | 584 * |
566 * Request parameters: | 585 * Request parameters: |
567 * | 586 * |
568 * [project] - Name of the project scoping this request. | 587 * [project] - Name of the project scoping this request. |
569 * Value must have pattern | 588 * Value must have pattern |
570 * "(?:(?:[-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])?))". | 589 * "(?:(?:[-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])?))". |
571 * | 590 * |
| 591 * [zone] - Name of the zone scoping this request. |
| 592 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 593 * |
572 * Completes with a [Operation]. | 594 * Completes with a [Operation]. |
573 * | 595 * |
574 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 596 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
575 * error. | 597 * error. |
576 * | 598 * |
577 * If the used [http.Client] completes with an error when making a REST call, | 599 * If the used [http.Client] completes with an error when making a REST call, |
578 * this method will complete with the same error. | 600 * this method will complete with the same error. |
579 */ | 601 */ |
580 async.Future<Operation> insert(BackendService request, core.String project) { | 602 async.Future<Operation> insert(Autoscaler request, core.String project, core.S
tring zone) { |
581 var _url = null; | 603 var _url = null; |
582 var _queryParams = new core.Map(); | 604 var _queryParams = new core.Map(); |
583 var _uploadMedia = null; | 605 var _uploadMedia = null; |
584 var _uploadOptions = null; | 606 var _uploadOptions = null; |
585 var _downloadOptions = commons.DownloadOptions.Metadata; | 607 var _downloadOptions = commons.DownloadOptions.Metadata; |
586 var _body = null; | 608 var _body = null; |
587 | 609 |
588 if (request != null) { | 610 if (request != null) { |
589 _body = convert.JSON.encode((request).toJson()); | 611 _body = convert.JSON.encode((request).toJson()); |
590 } | 612 } |
591 if (project == null) { | 613 if (project == null) { |
592 throw new core.ArgumentError("Parameter project is required."); | 614 throw new core.ArgumentError("Parameter project is required."); |
593 } | 615 } |
| 616 if (zone == null) { |
| 617 throw new core.ArgumentError("Parameter zone is required."); |
| 618 } |
594 | 619 |
595 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices'
; | 620 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/autoscalers'; |
596 | 621 |
597 var _response = _requester.request(_url, | 622 var _response = _requester.request(_url, |
598 "POST", | 623 "POST", |
599 body: _body, | 624 body: _body, |
600 queryParams: _queryParams, | 625 queryParams: _queryParams, |
601 uploadOptions: _uploadOptions, | 626 uploadOptions: _uploadOptions, |
602 uploadMedia: _uploadMedia, | 627 uploadMedia: _uploadMedia, |
603 downloadOptions: _downloadOptions); | 628 downloadOptions: _downloadOptions); |
604 return _response.then((data) => new Operation.fromJson(data)); | 629 return _response.then((data) => new Operation.fromJson(data)); |
605 } | 630 } |
606 | 631 |
607 /** | 632 /** |
608 * Retrieves the list of BackendService resources available to the specified | 633 * Retrieves the list of autoscaler resources contained within the specified |
609 * project. | 634 * zone. |
610 * | 635 * |
611 * Request parameters: | 636 * Request parameters: |
612 * | 637 * |
613 * [project] - Name of the project scoping this request. | 638 * [project] - Name of the project scoping this request. |
614 * Value must have pattern | 639 * Value must have pattern |
615 * "(?:(?:[-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])?))". | 640 * "(?:(?:[-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])?))". |
616 * | 641 * |
| 642 * [zone] - Name of the zone scoping this request. |
| 643 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 644 * |
617 * [filter] - Sets a filter expression for filtering listed resources, in the | 645 * [filter] - Sets a filter expression for filtering listed resources, in the |
618 * form filter={expression}. Your {expression} must contain the following: | 646 * form filter={expression}. Your {expression} must be in the format: |
619 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 647 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
620 * | 648 * |
621 * - FIELD_NAME: The name of the field you want to compare. The field name | 649 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
622 * must be valid for the type of resource being filtered. Only atomic field | 650 * field types are supported (string, number, boolean). The COMPARISON_STRING |
623 * types are supported (string, number, boolean). Array and object fields are | 651 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
624 * not currently supported. | 652 * string value to filter to. The literal value must be valid for the type of |
625 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 653 * field (string, number, boolean). For string fields, the literal value is |
626 * equals). | 654 * interpreted as a regular expression using RE2 syntax. The literal value |
627 * - LITERAL_STRING: The literal string value to filter to. The literal value | 655 * must match the entire field. |
628 * must be valid for the type of field (string, number, boolean). For string | 656 * |
629 * fields, the literal value is interpreted as a regular expression using RE2 | 657 * For example, filter=name ne example-instance. |
630 * syntax. The literal value must match the entire field. For example, you | |
631 * can filter by the name of a resource: | |
632 * filter=name ne example-instance | |
633 * The above filter returns only results whose name field does not equal | |
634 * example-instance. You can also enclose your literal string in single, | |
635 * double, or no quotes. | |
636 * | 658 * |
637 * [maxResults] - Maximum count of results to be returned. | 659 * [maxResults] - Maximum count of results to be returned. |
638 * Value must be between "0" and "500". | 660 * Value must be between "0" and "500". |
639 * | 661 * |
640 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 662 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
641 * to list the next page of results. Set pageToken to the nextPageToken | 663 * to list the next page of results. Set pageToken to the nextPageToken |
642 * returned by a previous list request. | 664 * returned by a previous list request. |
643 * | 665 * |
644 * Completes with a [BackendServiceList]. | 666 * Completes with a [AutoscalerList]. |
645 * | 667 * |
646 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 668 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
647 * error. | 669 * error. |
648 * | 670 * |
649 * If the used [http.Client] completes with an error when making a REST call, | 671 * If the used [http.Client] completes with an error when making a REST call, |
650 * this method will complete with the same error. | 672 * this method will complete with the same error. |
651 */ | 673 */ |
652 async.Future<BackendServiceList> list(core.String project, {core.String filter
, core.int maxResults, core.String pageToken}) { | 674 async.Future<AutoscalerList> list(core.String project, core.String zone, {core
.String filter, core.int maxResults, core.String pageToken}) { |
653 var _url = null; | 675 var _url = null; |
654 var _queryParams = new core.Map(); | 676 var _queryParams = new core.Map(); |
655 var _uploadMedia = null; | 677 var _uploadMedia = null; |
656 var _uploadOptions = null; | 678 var _uploadOptions = null; |
657 var _downloadOptions = commons.DownloadOptions.Metadata; | 679 var _downloadOptions = commons.DownloadOptions.Metadata; |
658 var _body = null; | 680 var _body = null; |
659 | 681 |
660 if (project == null) { | 682 if (project == null) { |
661 throw new core.ArgumentError("Parameter project is required."); | 683 throw new core.ArgumentError("Parameter project is required."); |
662 } | 684 } |
| 685 if (zone == null) { |
| 686 throw new core.ArgumentError("Parameter zone is required."); |
| 687 } |
663 if (filter != null) { | 688 if (filter != null) { |
664 _queryParams["filter"] = [filter]; | 689 _queryParams["filter"] = [filter]; |
665 } | 690 } |
666 if (maxResults != null) { | 691 if (maxResults != null) { |
667 _queryParams["maxResults"] = ["${maxResults}"]; | 692 _queryParams["maxResults"] = ["${maxResults}"]; |
668 } | 693 } |
669 if (pageToken != null) { | 694 if (pageToken != null) { |
670 _queryParams["pageToken"] = [pageToken]; | 695 _queryParams["pageToken"] = [pageToken]; |
671 } | 696 } |
672 | 697 |
673 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices'
; | 698 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/autoscalers'; |
674 | 699 |
675 var _response = _requester.request(_url, | 700 var _response = _requester.request(_url, |
676 "GET", | 701 "GET", |
677 body: _body, | 702 body: _body, |
678 queryParams: _queryParams, | 703 queryParams: _queryParams, |
679 uploadOptions: _uploadOptions, | 704 uploadOptions: _uploadOptions, |
680 uploadMedia: _uploadMedia, | 705 uploadMedia: _uploadMedia, |
681 downloadOptions: _downloadOptions); | 706 downloadOptions: _downloadOptions); |
682 return _response.then((data) => new BackendServiceList.fromJson(data)); | 707 return _response.then((data) => new AutoscalerList.fromJson(data)); |
683 } | 708 } |
684 | 709 |
685 /** | 710 /** |
686 * Update the entire content of the BackendService resource. This method | 711 * Updates an autoscaler resource in the specified project using the data |
687 * supports patch semantics. | 712 * included in the request. This method supports patch semantics. |
688 * | 713 * |
689 * [request] - The metadata request object. | 714 * [request] - The metadata request object. |
690 * | 715 * |
691 * Request parameters: | 716 * Request parameters: |
692 * | 717 * |
693 * [project] - Name of the project scoping this request. | 718 * [project] - Name of the project scoping this request. |
694 * Value must have pattern | 719 * Value must have pattern |
695 * "(?:(?:[-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])?))". | 720 * "(?:(?:[-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])?))". |
696 * | 721 * |
697 * [backendService] - Name of the BackendService resource to update. | 722 * [zone] - Name of the zone scoping this request. |
| 723 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 724 * |
| 725 * [autoscaler] - Name of the autoscaler resource to update. |
698 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 726 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
699 * | 727 * |
700 * Completes with a [Operation]. | 728 * Completes with a [Operation]. |
701 * | 729 * |
702 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 730 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
703 * error. | 731 * error. |
704 * | 732 * |
705 * If the used [http.Client] completes with an error when making a REST call, | 733 * If the used [http.Client] completes with an error when making a REST call, |
706 * this method will complete with the same error. | 734 * this method will complete with the same error. |
707 */ | 735 */ |
708 async.Future<Operation> patch(BackendService request, core.String project, cor
e.String backendService) { | 736 async.Future<Operation> patch(Autoscaler request, core.String project, core.St
ring zone, core.String autoscaler) { |
709 var _url = null; | 737 var _url = null; |
710 var _queryParams = new core.Map(); | 738 var _queryParams = new core.Map(); |
711 var _uploadMedia = null; | 739 var _uploadMedia = null; |
712 var _uploadOptions = null; | 740 var _uploadOptions = null; |
713 var _downloadOptions = commons.DownloadOptions.Metadata; | 741 var _downloadOptions = commons.DownloadOptions.Metadata; |
714 var _body = null; | 742 var _body = null; |
715 | 743 |
716 if (request != null) { | 744 if (request != null) { |
717 _body = convert.JSON.encode((request).toJson()); | 745 _body = convert.JSON.encode((request).toJson()); |
718 } | 746 } |
719 if (project == null) { | 747 if (project == null) { |
720 throw new core.ArgumentError("Parameter project is required."); | 748 throw new core.ArgumentError("Parameter project is required."); |
721 } | 749 } |
722 if (backendService == null) { | 750 if (zone == null) { |
723 throw new core.ArgumentError("Parameter backendService is required."); | 751 throw new core.ArgumentError("Parameter zone is required."); |
724 } | 752 } |
| 753 if (autoscaler == null) { |
| 754 throw new core.ArgumentError("Parameter autoscaler is required."); |
| 755 } |
| 756 _queryParams["autoscaler"] = [autoscaler]; |
725 | 757 |
726 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices/
' + commons.Escaper.ecapeVariable('$backendService'); | 758 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/autoscalers'; |
727 | 759 |
728 var _response = _requester.request(_url, | 760 var _response = _requester.request(_url, |
729 "PATCH", | 761 "PATCH", |
730 body: _body, | 762 body: _body, |
731 queryParams: _queryParams, | 763 queryParams: _queryParams, |
732 uploadOptions: _uploadOptions, | 764 uploadOptions: _uploadOptions, |
733 uploadMedia: _uploadMedia, | 765 uploadMedia: _uploadMedia, |
734 downloadOptions: _downloadOptions); | 766 downloadOptions: _downloadOptions); |
735 return _response.then((data) => new Operation.fromJson(data)); | 767 return _response.then((data) => new Operation.fromJson(data)); |
736 } | 768 } |
737 | 769 |
738 /** | 770 /** |
739 * Update the entire content of the BackendService resource. | 771 * Updates an autoscaler resource in the specified project using the data |
| 772 * included in the request. |
740 * | 773 * |
741 * [request] - The metadata request object. | 774 * [request] - The metadata request object. |
742 * | 775 * |
743 * Request parameters: | 776 * Request parameters: |
744 * | 777 * |
745 * [project] - Name of the project scoping this request. | 778 * [project] - Name of the project scoping this request. |
746 * Value must have pattern | 779 * Value must have pattern |
747 * "(?:(?:[-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])?))". | 780 * "(?:(?:[-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])?))". |
748 * | 781 * |
749 * [backendService] - Name of the BackendService resource to update. | 782 * [zone] - Name of the zone scoping this request. |
| 783 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 784 * |
| 785 * [autoscaler] - Name of the autoscaler resource to update. |
750 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 786 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
751 * | 787 * |
752 * Completes with a [Operation]. | 788 * Completes with a [Operation]. |
753 * | 789 * |
754 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 790 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
755 * error. | 791 * error. |
756 * | 792 * |
757 * If the used [http.Client] completes with an error when making a REST call, | 793 * If the used [http.Client] completes with an error when making a REST call, |
758 * this method will complete with the same error. | 794 * this method will complete with the same error. |
759 */ | 795 */ |
760 async.Future<Operation> update(BackendService request, core.String project, co
re.String backendService) { | 796 async.Future<Operation> update(Autoscaler request, core.String project, core.S
tring zone, {core.String autoscaler}) { |
761 var _url = null; | 797 var _url = null; |
762 var _queryParams = new core.Map(); | 798 var _queryParams = new core.Map(); |
763 var _uploadMedia = null; | 799 var _uploadMedia = null; |
764 var _uploadOptions = null; | 800 var _uploadOptions = null; |
765 var _downloadOptions = commons.DownloadOptions.Metadata; | 801 var _downloadOptions = commons.DownloadOptions.Metadata; |
766 var _body = null; | 802 var _body = null; |
767 | 803 |
768 if (request != null) { | 804 if (request != null) { |
769 _body = convert.JSON.encode((request).toJson()); | 805 _body = convert.JSON.encode((request).toJson()); |
770 } | 806 } |
771 if (project == null) { | 807 if (project == null) { |
772 throw new core.ArgumentError("Parameter project is required."); | 808 throw new core.ArgumentError("Parameter project is required."); |
773 } | 809 } |
774 if (backendService == null) { | 810 if (zone == null) { |
775 throw new core.ArgumentError("Parameter backendService is required."); | 811 throw new core.ArgumentError("Parameter zone is required."); |
| 812 } |
| 813 if (autoscaler != null) { |
| 814 _queryParams["autoscaler"] = [autoscaler]; |
776 } | 815 } |
777 | 816 |
778 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices/
' + commons.Escaper.ecapeVariable('$backendService'); | 817 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/autoscalers'; |
779 | 818 |
780 var _response = _requester.request(_url, | 819 var _response = _requester.request(_url, |
781 "PUT", | 820 "PUT", |
782 body: _body, | 821 body: _body, |
783 queryParams: _queryParams, | 822 queryParams: _queryParams, |
784 uploadOptions: _uploadOptions, | 823 uploadOptions: _uploadOptions, |
785 uploadMedia: _uploadMedia, | 824 uploadMedia: _uploadMedia, |
786 downloadOptions: _downloadOptions); | 825 downloadOptions: _downloadOptions); |
787 return _response.then((data) => new Operation.fromJson(data)); | 826 return _response.then((data) => new Operation.fromJson(data)); |
788 } | 827 } |
789 | 828 |
790 } | 829 } |
791 | 830 |
792 | 831 |
793 class DiskTypesResourceApi { | 832 class BackendServicesResourceApi { |
794 final commons.ApiRequester _requester; | 833 final commons.ApiRequester _requester; |
795 | 834 |
796 DiskTypesResourceApi(commons.ApiRequester client) : | 835 BackendServicesResourceApi(commons.ApiRequester client) : |
797 _requester = client; | 836 _requester = client; |
798 | 837 |
799 /** | 838 /** |
800 * Retrieves the list of disk type resources grouped by scope. | 839 * Deletes the specified BackendService resource. |
801 * | 840 * |
802 * Request parameters: | 841 * Request parameters: |
803 * | 842 * |
804 * [project] - Project ID for this request. | 843 * [project] - Name of the project scoping this request. |
805 * Value must have pattern | 844 * Value must have pattern |
806 * "(?:(?:[-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])?))". | 845 * "(?:(?:[-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])?))". |
807 * | 846 * |
808 * [filter] - Sets a filter expression for filtering listed resources, in the | 847 * [backendService] - Name of the BackendService resource to delete. |
809 * form filter={expression}. Your {expression} must contain the following: | 848 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
810 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
811 * | 849 * |
812 * - FIELD_NAME: The name of the field you want to compare. The field name | 850 * Completes with a [Operation]. |
813 * must be valid for the type of resource being filtered. Only atomic field | |
814 * types are supported (string, number, boolean). Array and object fields are | |
815 * not currently supported. | |
816 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
817 * equals). | |
818 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
819 * must be valid for the type of field (string, number, boolean). For string | |
820 * fields, the literal value is interpreted as a regular expression using RE2 | |
821 * syntax. The literal value must match the entire field. For example, you | |
822 * can filter by the name of a resource: | |
823 * filter=name ne example-instance | |
824 * The above filter returns only results whose name field does not equal | |
825 * example-instance. You can also enclose your literal string in single, | |
826 * double, or no quotes. | |
827 * | |
828 * [maxResults] - Maximum count of results to be returned. | |
829 * Value must be between "0" and "500". | |
830 * | |
831 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
832 * to list the next page of results. Set pageToken to the nextPageToken | |
833 * returned by a previous list request. | |
834 * | |
835 * Completes with a [DiskTypeAggregatedList]. | |
836 * | 851 * |
837 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 852 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
838 * error. | 853 * error. |
839 * | 854 * |
840 * If the used [http.Client] completes with an error when making a REST call, | 855 * If the used [http.Client] completes with an error when making a REST call, |
841 * this method will complete with the same error. | 856 * this method will complete with the same error. |
842 */ | 857 */ |
843 async.Future<DiskTypeAggregatedList> aggregatedList(core.String project, {core
.String filter, core.int maxResults, core.String pageToken}) { | 858 async.Future<Operation> delete(core.String project, core.String backendService
) { |
844 var _url = null; | 859 var _url = null; |
845 var _queryParams = new core.Map(); | 860 var _queryParams = new core.Map(); |
846 var _uploadMedia = null; | 861 var _uploadMedia = null; |
847 var _uploadOptions = null; | 862 var _uploadOptions = null; |
848 var _downloadOptions = commons.DownloadOptions.Metadata; | 863 var _downloadOptions = commons.DownloadOptions.Metadata; |
849 var _body = null; | 864 var _body = null; |
850 | 865 |
851 if (project == null) { | 866 if (project == null) { |
852 throw new core.ArgumentError("Parameter project is required."); | 867 throw new core.ArgumentError("Parameter project is required."); |
853 } | 868 } |
854 if (filter != null) { | 869 if (backendService == null) { |
855 _queryParams["filter"] = [filter]; | 870 throw new core.ArgumentError("Parameter backendService is required."); |
856 } | |
857 if (maxResults != null) { | |
858 _queryParams["maxResults"] = ["${maxResults}"]; | |
859 } | |
860 if (pageToken != null) { | |
861 _queryParams["pageToken"] = [pageToken]; | |
862 } | 871 } |
863 | 872 |
864 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/diskTypes'; | 873 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices/
' + commons.Escaper.ecapeVariable('$backendService'); |
865 | 874 |
866 var _response = _requester.request(_url, | 875 var _response = _requester.request(_url, |
867 "GET", | 876 "DELETE", |
868 body: _body, | 877 body: _body, |
869 queryParams: _queryParams, | 878 queryParams: _queryParams, |
870 uploadOptions: _uploadOptions, | 879 uploadOptions: _uploadOptions, |
871 uploadMedia: _uploadMedia, | 880 uploadMedia: _uploadMedia, |
872 downloadOptions: _downloadOptions); | 881 downloadOptions: _downloadOptions); |
873 return _response.then((data) => new DiskTypeAggregatedList.fromJson(data)); | 882 return _response.then((data) => new Operation.fromJson(data)); |
874 } | 883 } |
875 | 884 |
876 /** | 885 /** |
877 * Returns the specified disk type resource. | 886 * Returns the specified BackendService resource. |
878 * | 887 * |
879 * Request parameters: | 888 * Request parameters: |
880 * | 889 * |
881 * [project] - Project ID for this request. | 890 * [project] - Name of the project scoping this request. |
882 * Value must have pattern | 891 * Value must have pattern |
883 * "(?:(?:[-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])?))". | 892 * "(?:(?:[-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])?))". |
884 * | 893 * |
885 * [zone] - The name of the zone for this request. | 894 * [backendService] - Name of the BackendService resource to return. |
886 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 895 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
887 * | 896 * |
888 * [diskType] - Name of the disk type resource to return. | 897 * Completes with a [BackendService]. |
889 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
890 * | |
891 * Completes with a [DiskType]. | |
892 * | 898 * |
893 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 899 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
894 * error. | 900 * error. |
895 * | 901 * |
896 * If the used [http.Client] completes with an error when making a REST call, | 902 * If the used [http.Client] completes with an error when making a REST call, |
897 * this method will complete with the same error. | 903 * this method will complete with the same error. |
898 */ | 904 */ |
899 async.Future<DiskType> get(core.String project, core.String zone, core.String
diskType) { | 905 async.Future<BackendService> get(core.String project, core.String backendServi
ce) { |
900 var _url = null; | 906 var _url = null; |
901 var _queryParams = new core.Map(); | 907 var _queryParams = new core.Map(); |
902 var _uploadMedia = null; | 908 var _uploadMedia = null; |
903 var _uploadOptions = null; | 909 var _uploadOptions = null; |
904 var _downloadOptions = commons.DownloadOptions.Metadata; | 910 var _downloadOptions = commons.DownloadOptions.Metadata; |
905 var _body = null; | 911 var _body = null; |
906 | 912 |
907 if (project == null) { | 913 if (project == null) { |
908 throw new core.ArgumentError("Parameter project is required."); | 914 throw new core.ArgumentError("Parameter project is required."); |
909 } | 915 } |
910 if (zone == null) { | 916 if (backendService == null) { |
911 throw new core.ArgumentError("Parameter zone is required."); | 917 throw new core.ArgumentError("Parameter backendService is required."); |
912 } | |
913 if (diskType == null) { | |
914 throw new core.ArgumentError("Parameter diskType is required."); | |
915 } | 918 } |
916 | 919 |
917 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/diskTypes/' + commons.Escaper.ecapeVariable('$disk
Type'); | 920 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices/
' + commons.Escaper.ecapeVariable('$backendService'); |
918 | 921 |
919 var _response = _requester.request(_url, | 922 var _response = _requester.request(_url, |
920 "GET", | 923 "GET", |
921 body: _body, | 924 body: _body, |
922 queryParams: _queryParams, | 925 queryParams: _queryParams, |
923 uploadOptions: _uploadOptions, | 926 uploadOptions: _uploadOptions, |
924 uploadMedia: _uploadMedia, | 927 uploadMedia: _uploadMedia, |
925 downloadOptions: _downloadOptions); | 928 downloadOptions: _downloadOptions); |
926 return _response.then((data) => new DiskType.fromJson(data)); | 929 return _response.then((data) => new BackendService.fromJson(data)); |
927 } | 930 } |
928 | 931 |
929 /** | 932 /** |
930 * Retrieves the list of disk type resources available to the specified | 933 * Gets the most recent health check results for this BackendService. |
931 * project. | 934 * |
| 935 * [request] - The metadata request object. |
932 * | 936 * |
933 * Request parameters: | 937 * Request parameters: |
934 * | 938 * |
935 * [project] - Project ID for this request. | 939 * [project] - null |
936 * Value must have pattern | 940 * Value must have pattern |
937 * "(?:(?:[-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])?))". | 941 * "(?:(?:[-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])?))". |
938 * | 942 * |
939 * [zone] - The name of the zone for this request. | 943 * [backendService] - Name of the BackendService resource to which the queried |
| 944 * instance belongs. |
940 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 945 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
941 * | 946 * |
942 * [filter] - Sets a filter expression for filtering listed resources, in the | 947 * Completes with a [BackendServiceGroupHealth]. |
943 * form filter={expression}. Your {expression} must contain the following: | |
944 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
945 * | |
946 * - FIELD_NAME: The name of the field you want to compare. The field name | |
947 * must be valid for the type of resource being filtered. Only atomic field | |
948 * types are supported (string, number, boolean). Array and object fields are | |
949 * not currently supported. | |
950 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
951 * equals). | |
952 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
953 * must be valid for the type of field (string, number, boolean). For string | |
954 * fields, the literal value is interpreted as a regular expression using RE2 | |
955 * syntax. The literal value must match the entire field. For example, you | |
956 * can filter by the name of a resource: | |
957 * filter=name ne example-instance | |
958 * The above filter returns only results whose name field does not equal | |
959 * example-instance. You can also enclose your literal string in single, | |
960 * double, or no quotes. | |
961 * | |
962 * [maxResults] - Maximum count of results to be returned. | |
963 * Value must be between "0" and "500". | |
964 * | |
965 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
966 * to list the next page of results. Set pageToken to the nextPageToken | |
967 * returned by a previous list request. | |
968 * | |
969 * Completes with a [DiskTypeList]. | |
970 * | 948 * |
971 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 949 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
972 * error. | 950 * error. |
973 * | 951 * |
974 * If the used [http.Client] completes with an error when making a REST call, | 952 * If the used [http.Client] completes with an error when making a REST call, |
975 * this method will complete with the same error. | 953 * this method will complete with the same error. |
976 */ | 954 */ |
977 async.Future<DiskTypeList> list(core.String project, core.String zone, {core.S
tring filter, core.int maxResults, core.String pageToken}) { | 955 async.Future<BackendServiceGroupHealth> getHealth(ResourceGroupReference reque
st, core.String project, core.String backendService) { |
978 var _url = null; | 956 var _url = null; |
979 var _queryParams = new core.Map(); | 957 var _queryParams = new core.Map(); |
980 var _uploadMedia = null; | 958 var _uploadMedia = null; |
981 var _uploadOptions = null; | 959 var _uploadOptions = null; |
982 var _downloadOptions = commons.DownloadOptions.Metadata; | 960 var _downloadOptions = commons.DownloadOptions.Metadata; |
983 var _body = null; | 961 var _body = null; |
984 | 962 |
| 963 if (request != null) { |
| 964 _body = convert.JSON.encode((request).toJson()); |
| 965 } |
985 if (project == null) { | 966 if (project == null) { |
986 throw new core.ArgumentError("Parameter project is required."); | 967 throw new core.ArgumentError("Parameter project is required."); |
987 } | 968 } |
988 if (zone == null) { | 969 if (backendService == null) { |
989 throw new core.ArgumentError("Parameter zone is required."); | 970 throw new core.ArgumentError("Parameter backendService is required."); |
990 } | |
991 if (filter != null) { | |
992 _queryParams["filter"] = [filter]; | |
993 } | |
994 if (maxResults != null) { | |
995 _queryParams["maxResults"] = ["${maxResults}"]; | |
996 } | |
997 if (pageToken != null) { | |
998 _queryParams["pageToken"] = [pageToken]; | |
999 } | 971 } |
1000 | 972 |
1001 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/diskTypes'; | 973 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices/
' + commons.Escaper.ecapeVariable('$backendService') + '/getHealth'; |
1002 | 974 |
1003 var _response = _requester.request(_url, | 975 var _response = _requester.request(_url, |
1004 "GET", | 976 "POST", |
1005 body: _body, | 977 body: _body, |
1006 queryParams: _queryParams, | 978 queryParams: _queryParams, |
1007 uploadOptions: _uploadOptions, | 979 uploadOptions: _uploadOptions, |
1008 uploadMedia: _uploadMedia, | 980 uploadMedia: _uploadMedia, |
1009 downloadOptions: _downloadOptions); | 981 downloadOptions: _downloadOptions); |
1010 return _response.then((data) => new DiskTypeList.fromJson(data)); | 982 return _response.then((data) => new BackendServiceGroupHealth.fromJson(data)
); |
1011 } | 983 } |
1012 | 984 |
1013 } | |
1014 | |
1015 | |
1016 class DisksResourceApi { | |
1017 final commons.ApiRequester _requester; | |
1018 | |
1019 DisksResourceApi(commons.ApiRequester client) : | |
1020 _requester = client; | |
1021 | |
1022 /** | 985 /** |
1023 * Retrieves the list of disks grouped by scope. | 986 * Creates a BackendService resource in the specified project using the data |
| 987 * included in the request. |
| 988 * |
| 989 * [request] - The metadata request object. |
1024 * | 990 * |
1025 * Request parameters: | 991 * Request parameters: |
1026 * | 992 * |
1027 * [project] - Project ID for this request. | 993 * [project] - Name of the project scoping this request. |
| 994 * Value must have pattern |
| 995 * "(?:(?:[-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])?))". |
| 996 * |
| 997 * Completes with a [Operation]. |
| 998 * |
| 999 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1000 * error. |
| 1001 * |
| 1002 * If the used [http.Client] completes with an error when making a REST call, |
| 1003 * this method will complete with the same error. |
| 1004 */ |
| 1005 async.Future<Operation> insert(BackendService request, core.String project) { |
| 1006 var _url = null; |
| 1007 var _queryParams = new core.Map(); |
| 1008 var _uploadMedia = null; |
| 1009 var _uploadOptions = null; |
| 1010 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1011 var _body = null; |
| 1012 |
| 1013 if (request != null) { |
| 1014 _body = convert.JSON.encode((request).toJson()); |
| 1015 } |
| 1016 if (project == null) { |
| 1017 throw new core.ArgumentError("Parameter project is required."); |
| 1018 } |
| 1019 |
| 1020 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices'
; |
| 1021 |
| 1022 var _response = _requester.request(_url, |
| 1023 "POST", |
| 1024 body: _body, |
| 1025 queryParams: _queryParams, |
| 1026 uploadOptions: _uploadOptions, |
| 1027 uploadMedia: _uploadMedia, |
| 1028 downloadOptions: _downloadOptions); |
| 1029 return _response.then((data) => new Operation.fromJson(data)); |
| 1030 } |
| 1031 |
| 1032 /** |
| 1033 * Retrieves the list of BackendService resources available to the specified |
| 1034 * project. |
| 1035 * |
| 1036 * Request parameters: |
| 1037 * |
| 1038 * [project] - Name of the project scoping this request. |
1028 * Value must have pattern | 1039 * Value must have pattern |
1029 * "(?:(?:[-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])?))". | 1040 * "(?:(?:[-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])?))". |
1030 * | 1041 * |
1031 * [filter] - Sets a filter expression for filtering listed resources, in the | 1042 * [filter] - Sets a filter expression for filtering listed resources, in the |
1032 * form filter={expression}. Your {expression} must contain the following: | 1043 * form filter={expression}. Your {expression} must be in the format: |
1033 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 1044 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
1034 * | 1045 * |
1035 * - FIELD_NAME: The name of the field you want to compare. The field name | 1046 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
1036 * must be valid for the type of resource being filtered. Only atomic field | 1047 * field types are supported (string, number, boolean). The COMPARISON_STRING |
1037 * types are supported (string, number, boolean). Array and object fields are | 1048 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
1038 * not currently supported. | 1049 * string value to filter to. The literal value must be valid for the type of |
1039 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 1050 * field (string, number, boolean). For string fields, the literal value is |
1040 * equals). | 1051 * interpreted as a regular expression using RE2 syntax. The literal value |
1041 * - LITERAL_STRING: The literal string value to filter to. The literal value | 1052 * must match the entire field. |
1042 * must be valid for the type of field (string, number, boolean). For string | 1053 * |
1043 * fields, the literal value is interpreted as a regular expression using RE2 | 1054 * For example, filter=name ne example-instance. |
1044 * syntax. The literal value must match the entire field. For example, you | |
1045 * can filter by the name of a resource: | |
1046 * filter=name ne example-instance | |
1047 * The above filter returns only results whose name field does not equal | |
1048 * example-instance. You can also enclose your literal string in single, | |
1049 * double, or no quotes. | |
1050 * | 1055 * |
1051 * [maxResults] - Maximum count of results to be returned. | 1056 * [maxResults] - Maximum count of results to be returned. |
1052 * Value must be between "0" and "500". | 1057 * Value must be between "0" and "500". |
1053 * | 1058 * |
1054 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 1059 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
1055 * to list the next page of results. Set pageToken to the nextPageToken | 1060 * to list the next page of results. Set pageToken to the nextPageToken |
1056 * returned by a previous list request. | 1061 * returned by a previous list request. |
1057 * | 1062 * |
1058 * Completes with a [DiskAggregatedList]. | 1063 * Completes with a [BackendServiceList]. |
1059 * | 1064 * |
1060 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1065 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1061 * error. | 1066 * error. |
1062 * | 1067 * |
1063 * If the used [http.Client] completes with an error when making a REST call, | 1068 * If the used [http.Client] completes with an error when making a REST call, |
1064 * this method will complete with the same error. | 1069 * this method will complete with the same error. |
1065 */ | 1070 */ |
1066 async.Future<DiskAggregatedList> aggregatedList(core.String project, {core.Str
ing filter, core.int maxResults, core.String pageToken}) { | 1071 async.Future<BackendServiceList> list(core.String project, {core.String filter
, core.int maxResults, core.String pageToken}) { |
1067 var _url = null; | 1072 var _url = null; |
1068 var _queryParams = new core.Map(); | 1073 var _queryParams = new core.Map(); |
1069 var _uploadMedia = null; | 1074 var _uploadMedia = null; |
1070 var _uploadOptions = null; | 1075 var _uploadOptions = null; |
1071 var _downloadOptions = commons.DownloadOptions.Metadata; | 1076 var _downloadOptions = commons.DownloadOptions.Metadata; |
1072 var _body = null; | 1077 var _body = null; |
1073 | 1078 |
1074 if (project == null) { | 1079 if (project == null) { |
1075 throw new core.ArgumentError("Parameter project is required."); | 1080 throw new core.ArgumentError("Parameter project is required."); |
1076 } | 1081 } |
1077 if (filter != null) { | 1082 if (filter != null) { |
1078 _queryParams["filter"] = [filter]; | 1083 _queryParams["filter"] = [filter]; |
1079 } | 1084 } |
1080 if (maxResults != null) { | 1085 if (maxResults != null) { |
1081 _queryParams["maxResults"] = ["${maxResults}"]; | 1086 _queryParams["maxResults"] = ["${maxResults}"]; |
1082 } | 1087 } |
1083 if (pageToken != null) { | 1088 if (pageToken != null) { |
1084 _queryParams["pageToken"] = [pageToken]; | 1089 _queryParams["pageToken"] = [pageToken]; |
1085 } | 1090 } |
1086 | 1091 |
1087 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/disks'; | 1092 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices'
; |
1088 | 1093 |
1089 var _response = _requester.request(_url, | 1094 var _response = _requester.request(_url, |
1090 "GET", | 1095 "GET", |
1091 body: _body, | 1096 body: _body, |
1092 queryParams: _queryParams, | 1097 queryParams: _queryParams, |
1093 uploadOptions: _uploadOptions, | 1098 uploadOptions: _uploadOptions, |
1094 uploadMedia: _uploadMedia, | 1099 uploadMedia: _uploadMedia, |
1095 downloadOptions: _downloadOptions); | 1100 downloadOptions: _downloadOptions); |
1096 return _response.then((data) => new DiskAggregatedList.fromJson(data)); | 1101 return _response.then((data) => new BackendServiceList.fromJson(data)); |
1097 } | 1102 } |
1098 | 1103 |
1099 /** | 1104 /** |
1100 * Creates a snapshot of this disk. | 1105 * Update the entire content of the BackendService resource. This method |
| 1106 * supports patch semantics. |
1101 * | 1107 * |
1102 * [request] - The metadata request object. | 1108 * [request] - The metadata request object. |
1103 * | 1109 * |
1104 * Request parameters: | 1110 * Request parameters: |
1105 * | 1111 * |
1106 * [project] - Project ID for this request. | 1112 * [project] - Name of the project scoping this request. |
1107 * Value must have pattern | 1113 * Value must have pattern |
1108 * "(?:(?:[-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])?))". | 1114 * "(?:(?:[-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])?))". |
1109 * | 1115 * |
1110 * [zone] - The name of the zone for this request. | 1116 * [backendService] - Name of the BackendService resource to update. |
1111 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
1112 * | |
1113 * [disk] - Name of the persistent disk to snapshot. | |
1114 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1117 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1115 * | 1118 * |
1116 * Completes with a [Operation]. | 1119 * Completes with a [Operation]. |
1117 * | 1120 * |
1118 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1121 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1119 * error. | 1122 * error. |
1120 * | 1123 * |
1121 * If the used [http.Client] completes with an error when making a REST call, | 1124 * If the used [http.Client] completes with an error when making a REST call, |
1122 * this method will complete with the same error. | 1125 * this method will complete with the same error. |
1123 */ | 1126 */ |
1124 async.Future<Operation> createSnapshot(Snapshot request, core.String project,
core.String zone, core.String disk) { | 1127 async.Future<Operation> patch(BackendService request, core.String project, cor
e.String backendService) { |
1125 var _url = null; | 1128 var _url = null; |
1126 var _queryParams = new core.Map(); | 1129 var _queryParams = new core.Map(); |
1127 var _uploadMedia = null; | 1130 var _uploadMedia = null; |
1128 var _uploadOptions = null; | 1131 var _uploadOptions = null; |
1129 var _downloadOptions = commons.DownloadOptions.Metadata; | 1132 var _downloadOptions = commons.DownloadOptions.Metadata; |
1130 var _body = null; | 1133 var _body = null; |
1131 | 1134 |
1132 if (request != null) { | 1135 if (request != null) { |
1133 _body = convert.JSON.encode((request).toJson()); | 1136 _body = convert.JSON.encode((request).toJson()); |
1134 } | 1137 } |
1135 if (project == null) { | 1138 if (project == null) { |
1136 throw new core.ArgumentError("Parameter project is required."); | 1139 throw new core.ArgumentError("Parameter project is required."); |
1137 } | 1140 } |
1138 if (zone == null) { | 1141 if (backendService == null) { |
1139 throw new core.ArgumentError("Parameter zone is required."); | 1142 throw new core.ArgumentError("Parameter backendService is required."); |
1140 } | |
1141 if (disk == null) { | |
1142 throw new core.ArgumentError("Parameter disk is required."); | |
1143 } | 1143 } |
1144 | 1144 |
1145 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/disks/' + commons.Escaper.ecapeVariable('$disk') +
'/createSnapshot'; | 1145 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices/
' + commons.Escaper.ecapeVariable('$backendService'); |
1146 | 1146 |
1147 var _response = _requester.request(_url, | 1147 var _response = _requester.request(_url, |
1148 "POST", | 1148 "PATCH", |
1149 body: _body, | 1149 body: _body, |
1150 queryParams: _queryParams, | 1150 queryParams: _queryParams, |
1151 uploadOptions: _uploadOptions, | 1151 uploadOptions: _uploadOptions, |
1152 uploadMedia: _uploadMedia, | 1152 uploadMedia: _uploadMedia, |
1153 downloadOptions: _downloadOptions); | 1153 downloadOptions: _downloadOptions); |
1154 return _response.then((data) => new Operation.fromJson(data)); | 1154 return _response.then((data) => new Operation.fromJson(data)); |
1155 } | 1155 } |
1156 | 1156 |
1157 /** | 1157 /** |
1158 * Deletes the specified persistent disk. | 1158 * Update the entire content of the BackendService resource. |
| 1159 * |
| 1160 * [request] - The metadata request object. |
1159 * | 1161 * |
1160 * Request parameters: | 1162 * Request parameters: |
1161 * | 1163 * |
1162 * [project] - Project ID for this request. | 1164 * [project] - Name of the project scoping this request. |
1163 * Value must have pattern | 1165 * Value must have pattern |
1164 * "(?:(?:[-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])?))". | 1166 * "(?:(?:[-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])?))". |
1165 * | 1167 * |
1166 * [zone] - The name of the zone for this request. | 1168 * [backendService] - Name of the BackendService resource to update. |
1167 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
1168 * | |
1169 * [disk] - Name of the persistent disk to delete. | |
1170 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1169 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1171 * | 1170 * |
1172 * Completes with a [Operation]. | 1171 * Completes with a [Operation]. |
1173 * | 1172 * |
1174 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1173 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1175 * error. | 1174 * error. |
1176 * | 1175 * |
1177 * If the used [http.Client] completes with an error when making a REST call, | 1176 * If the used [http.Client] completes with an error when making a REST call, |
1178 * this method will complete with the same error. | 1177 * this method will complete with the same error. |
1179 */ | 1178 */ |
1180 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing disk) { | 1179 async.Future<Operation> update(BackendService request, core.String project, co
re.String backendService) { |
1181 var _url = null; | 1180 var _url = null; |
1182 var _queryParams = new core.Map(); | 1181 var _queryParams = new core.Map(); |
1183 var _uploadMedia = null; | 1182 var _uploadMedia = null; |
1184 var _uploadOptions = null; | 1183 var _uploadOptions = null; |
1185 var _downloadOptions = commons.DownloadOptions.Metadata; | 1184 var _downloadOptions = commons.DownloadOptions.Metadata; |
1186 var _body = null; | 1185 var _body = null; |
1187 | 1186 |
| 1187 if (request != null) { |
| 1188 _body = convert.JSON.encode((request).toJson()); |
| 1189 } |
1188 if (project == null) { | 1190 if (project == null) { |
1189 throw new core.ArgumentError("Parameter project is required."); | 1191 throw new core.ArgumentError("Parameter project is required."); |
1190 } | 1192 } |
1191 if (zone == null) { | 1193 if (backendService == null) { |
1192 throw new core.ArgumentError("Parameter zone is required."); | 1194 throw new core.ArgumentError("Parameter backendService is required."); |
1193 } | |
1194 if (disk == null) { | |
1195 throw new core.ArgumentError("Parameter disk is required."); | |
1196 } | 1195 } |
1197 | 1196 |
1198 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/disks/' + commons.Escaper.ecapeVariable('$disk'); | 1197 _url = commons.Escaper.ecapeVariable('$project') + '/global/backendServices/
' + commons.Escaper.ecapeVariable('$backendService'); |
1199 | 1198 |
1200 var _response = _requester.request(_url, | 1199 var _response = _requester.request(_url, |
1201 "DELETE", | 1200 "PUT", |
1202 body: _body, | 1201 body: _body, |
1203 queryParams: _queryParams, | 1202 queryParams: _queryParams, |
1204 uploadOptions: _uploadOptions, | 1203 uploadOptions: _uploadOptions, |
1205 uploadMedia: _uploadMedia, | 1204 uploadMedia: _uploadMedia, |
1206 downloadOptions: _downloadOptions); | 1205 downloadOptions: _downloadOptions); |
1207 return _response.then((data) => new Operation.fromJson(data)); | 1206 return _response.then((data) => new Operation.fromJson(data)); |
1208 } | 1207 } |
1209 | 1208 |
| 1209 } |
| 1210 |
| 1211 |
| 1212 class DiskTypesResourceApi { |
| 1213 final commons.ApiRequester _requester; |
| 1214 |
| 1215 DiskTypesResourceApi(commons.ApiRequester client) : |
| 1216 _requester = client; |
| 1217 |
1210 /** | 1218 /** |
1211 * Returns a specified persistent disk. | 1219 * Retrieves the list of disk type resources grouped by scope. |
1212 * | 1220 * |
1213 * Request parameters: | 1221 * Request parameters: |
1214 * | 1222 * |
1215 * [project] - Project ID for this request. | 1223 * [project] - Project ID for this request. |
1216 * Value must have pattern | 1224 * Value must have pattern |
1217 * "(?:(?:[-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])?))". | 1225 * "(?:(?:[-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])?))". |
1218 * | 1226 * |
1219 * [zone] - The name of the zone for this request. | 1227 * [filter] - Sets a filter expression for filtering listed resources, in the |
1220 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1228 * form filter={expression}. Your {expression} must be in the format: |
| 1229 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
1221 * | 1230 * |
1222 * [disk] - Name of the persistent disk to return. | 1231 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
1223 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1232 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 1233 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 1234 * string value to filter to. The literal value must be valid for the type of |
| 1235 * field (string, number, boolean). For string fields, the literal value is |
| 1236 * interpreted as a regular expression using RE2 syntax. The literal value |
| 1237 * must match the entire field. |
1224 * | 1238 * |
1225 * Completes with a [Disk]. | 1239 * For example, filter=name ne example-instance. |
| 1240 * |
| 1241 * [maxResults] - Maximum count of results to be returned. |
| 1242 * Value must be between "0" and "500". |
| 1243 * |
| 1244 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 1245 * to list the next page of results. Set pageToken to the nextPageToken |
| 1246 * returned by a previous list request. |
| 1247 * |
| 1248 * Completes with a [DiskTypeAggregatedList]. |
1226 * | 1249 * |
1227 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1250 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1228 * error. | 1251 * error. |
1229 * | 1252 * |
1230 * If the used [http.Client] completes with an error when making a REST call, | 1253 * If the used [http.Client] completes with an error when making a REST call, |
1231 * this method will complete with the same error. | 1254 * this method will complete with the same error. |
1232 */ | 1255 */ |
1233 async.Future<Disk> get(core.String project, core.String zone, core.String disk
) { | 1256 async.Future<DiskTypeAggregatedList> aggregatedList(core.String project, {core
.String filter, core.int maxResults, core.String pageToken}) { |
1234 var _url = null; | 1257 var _url = null; |
1235 var _queryParams = new core.Map(); | 1258 var _queryParams = new core.Map(); |
1236 var _uploadMedia = null; | 1259 var _uploadMedia = null; |
1237 var _uploadOptions = null; | 1260 var _uploadOptions = null; |
1238 var _downloadOptions = commons.DownloadOptions.Metadata; | 1261 var _downloadOptions = commons.DownloadOptions.Metadata; |
1239 var _body = null; | 1262 var _body = null; |
1240 | 1263 |
1241 if (project == null) { | 1264 if (project == null) { |
1242 throw new core.ArgumentError("Parameter project is required."); | 1265 throw new core.ArgumentError("Parameter project is required."); |
1243 } | 1266 } |
1244 if (zone == null) { | 1267 if (filter != null) { |
1245 throw new core.ArgumentError("Parameter zone is required."); | 1268 _queryParams["filter"] = [filter]; |
1246 } | 1269 } |
1247 if (disk == null) { | 1270 if (maxResults != null) { |
1248 throw new core.ArgumentError("Parameter disk is required."); | 1271 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1272 } |
| 1273 if (pageToken != null) { |
| 1274 _queryParams["pageToken"] = [pageToken]; |
1249 } | 1275 } |
1250 | 1276 |
1251 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/disks/' + commons.Escaper.ecapeVariable('$disk'); | 1277 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/diskTypes'; |
1252 | 1278 |
1253 var _response = _requester.request(_url, | 1279 var _response = _requester.request(_url, |
1254 "GET", | 1280 "GET", |
1255 body: _body, | 1281 body: _body, |
1256 queryParams: _queryParams, | 1282 queryParams: _queryParams, |
1257 uploadOptions: _uploadOptions, | 1283 uploadOptions: _uploadOptions, |
1258 uploadMedia: _uploadMedia, | 1284 uploadMedia: _uploadMedia, |
1259 downloadOptions: _downloadOptions); | 1285 downloadOptions: _downloadOptions); |
1260 return _response.then((data) => new Disk.fromJson(data)); | 1286 return _response.then((data) => new DiskTypeAggregatedList.fromJson(data)); |
1261 } | 1287 } |
1262 | 1288 |
1263 /** | 1289 /** |
1264 * Creates a persistent disk in the specified project using the data included | 1290 * Returns the specified disk type resource. |
1265 * in the request. | |
1266 * | |
1267 * [request] - The metadata request object. | |
1268 * | 1291 * |
1269 * Request parameters: | 1292 * Request parameters: |
1270 * | 1293 * |
1271 * [project] - Project ID for this request. | 1294 * [project] - Project ID for this request. |
1272 * Value must have pattern | 1295 * Value must have pattern |
1273 * "(?:(?:[-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])?))". | 1296 * "(?:(?:[-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])?))". |
1274 * | 1297 * |
1275 * [zone] - The name of the zone for this request. | 1298 * [zone] - The name of the zone for this request. |
1276 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1299 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1277 * | 1300 * |
1278 * [sourceImage] - Optional. Source image to restore onto a disk. | 1301 * [diskType] - Name of the disk type resource to return. |
| 1302 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1279 * | 1303 * |
1280 * Completes with a [Operation]. | 1304 * Completes with a [DiskType]. |
1281 * | 1305 * |
1282 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1306 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1283 * error. | 1307 * error. |
1284 * | 1308 * |
1285 * If the used [http.Client] completes with an error when making a REST call, | 1309 * If the used [http.Client] completes with an error when making a REST call, |
1286 * this method will complete with the same error. | 1310 * this method will complete with the same error. |
1287 */ | 1311 */ |
1288 async.Future<Operation> insert(Disk request, core.String project, core.String
zone, {core.String sourceImage}) { | 1312 async.Future<DiskType> get(core.String project, core.String zone, core.String
diskType) { |
1289 var _url = null; | 1313 var _url = null; |
1290 var _queryParams = new core.Map(); | 1314 var _queryParams = new core.Map(); |
1291 var _uploadMedia = null; | 1315 var _uploadMedia = null; |
1292 var _uploadOptions = null; | 1316 var _uploadOptions = null; |
1293 var _downloadOptions = commons.DownloadOptions.Metadata; | 1317 var _downloadOptions = commons.DownloadOptions.Metadata; |
1294 var _body = null; | 1318 var _body = null; |
1295 | 1319 |
1296 if (request != null) { | |
1297 _body = convert.JSON.encode((request).toJson()); | |
1298 } | |
1299 if (project == null) { | 1320 if (project == null) { |
1300 throw new core.ArgumentError("Parameter project is required."); | 1321 throw new core.ArgumentError("Parameter project is required."); |
1301 } | 1322 } |
1302 if (zone == null) { | 1323 if (zone == null) { |
1303 throw new core.ArgumentError("Parameter zone is required."); | 1324 throw new core.ArgumentError("Parameter zone is required."); |
1304 } | 1325 } |
1305 if (sourceImage != null) { | 1326 if (diskType == null) { |
1306 _queryParams["sourceImage"] = [sourceImage]; | 1327 throw new core.ArgumentError("Parameter diskType is required."); |
1307 } | 1328 } |
1308 | 1329 |
1309 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/disks'; | 1330 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/diskTypes/' + commons.Escaper.ecapeVariable('$disk
Type'); |
1310 | 1331 |
1311 var _response = _requester.request(_url, | 1332 var _response = _requester.request(_url, |
1312 "POST", | 1333 "GET", |
1313 body: _body, | 1334 body: _body, |
1314 queryParams: _queryParams, | 1335 queryParams: _queryParams, |
1315 uploadOptions: _uploadOptions, | 1336 uploadOptions: _uploadOptions, |
1316 uploadMedia: _uploadMedia, | 1337 uploadMedia: _uploadMedia, |
1317 downloadOptions: _downloadOptions); | 1338 downloadOptions: _downloadOptions); |
1318 return _response.then((data) => new Operation.fromJson(data)); | 1339 return _response.then((data) => new DiskType.fromJson(data)); |
1319 } | 1340 } |
1320 | 1341 |
1321 /** | 1342 /** |
1322 * Retrieves the list of persistent disks contained within the specified zone. | 1343 * Retrieves the list of disk type resources available to the specified |
| 1344 * project. |
1323 * | 1345 * |
1324 * Request parameters: | 1346 * Request parameters: |
1325 * | 1347 * |
1326 * [project] - Project ID for this request. | 1348 * [project] - Project ID for this request. |
1327 * Value must have pattern | 1349 * Value must have pattern |
1328 * "(?:(?:[-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])?))". | 1350 * "(?:(?:[-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])?))". |
1329 * | 1351 * |
1330 * [zone] - The name of the zone for this request. | 1352 * [zone] - The name of the zone for this request. |
1331 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1353 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1332 * | 1354 * |
1333 * [filter] - Sets a filter expression for filtering listed resources, in the | 1355 * [filter] - Sets a filter expression for filtering listed resources, in the |
1334 * form filter={expression}. Your {expression} must contain the following: | 1356 * form filter={expression}. Your {expression} must be in the format: |
1335 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 1357 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
1336 * | 1358 * |
1337 * - FIELD_NAME: The name of the field you want to compare. The field name | 1359 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
1338 * must be valid for the type of resource being filtered. Only atomic field | 1360 * field types are supported (string, number, boolean). The COMPARISON_STRING |
1339 * types are supported (string, number, boolean). Array and object fields are | 1361 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
1340 * not currently supported. | 1362 * string value to filter to. The literal value must be valid for the type of |
1341 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 1363 * field (string, number, boolean). For string fields, the literal value is |
1342 * equals). | 1364 * interpreted as a regular expression using RE2 syntax. The literal value |
1343 * - LITERAL_STRING: The literal string value to filter to. The literal value | 1365 * must match the entire field. |
1344 * must be valid for the type of field (string, number, boolean). For string | 1366 * |
1345 * fields, the literal value is interpreted as a regular expression using RE2 | 1367 * For example, filter=name ne example-instance. |
1346 * syntax. The literal value must match the entire field. For example, you | |
1347 * can filter by the name of a resource: | |
1348 * filter=name ne example-instance | |
1349 * The above filter returns only results whose name field does not equal | |
1350 * example-instance. You can also enclose your literal string in single, | |
1351 * double, or no quotes. | |
1352 * | 1368 * |
1353 * [maxResults] - Maximum count of results to be returned. | 1369 * [maxResults] - Maximum count of results to be returned. |
1354 * Value must be between "0" and "500". | 1370 * Value must be between "0" and "500". |
1355 * | 1371 * |
1356 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 1372 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
1357 * to list the next page of results. Set pageToken to the nextPageToken | 1373 * to list the next page of results. Set pageToken to the nextPageToken |
1358 * returned by a previous list request. | 1374 * returned by a previous list request. |
1359 * | 1375 * |
1360 * Completes with a [DiskList]. | 1376 * Completes with a [DiskTypeList]. |
1361 * | 1377 * |
1362 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1378 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1363 * error. | 1379 * error. |
1364 * | 1380 * |
1365 * If the used [http.Client] completes with an error when making a REST call, | 1381 * If the used [http.Client] completes with an error when making a REST call, |
1366 * this method will complete with the same error. | 1382 * this method will complete with the same error. |
1367 */ | 1383 */ |
1368 async.Future<DiskList> list(core.String project, core.String zone, {core.Strin
g filter, core.int maxResults, core.String pageToken}) { | 1384 async.Future<DiskTypeList> list(core.String project, core.String zone, {core.S
tring filter, core.int maxResults, core.String pageToken}) { |
1369 var _url = null; | 1385 var _url = null; |
1370 var _queryParams = new core.Map(); | 1386 var _queryParams = new core.Map(); |
1371 var _uploadMedia = null; | 1387 var _uploadMedia = null; |
1372 var _uploadOptions = null; | 1388 var _uploadOptions = null; |
1373 var _downloadOptions = commons.DownloadOptions.Metadata; | 1389 var _downloadOptions = commons.DownloadOptions.Metadata; |
1374 var _body = null; | 1390 var _body = null; |
1375 | 1391 |
1376 if (project == null) { | 1392 if (project == null) { |
1377 throw new core.ArgumentError("Parameter project is required."); | 1393 throw new core.ArgumentError("Parameter project is required."); |
1378 } | 1394 } |
1379 if (zone == null) { | 1395 if (zone == null) { |
1380 throw new core.ArgumentError("Parameter zone is required."); | 1396 throw new core.ArgumentError("Parameter zone is required."); |
1381 } | 1397 } |
1382 if (filter != null) { | 1398 if (filter != null) { |
1383 _queryParams["filter"] = [filter]; | 1399 _queryParams["filter"] = [filter]; |
1384 } | 1400 } |
1385 if (maxResults != null) { | 1401 if (maxResults != null) { |
1386 _queryParams["maxResults"] = ["${maxResults}"]; | 1402 _queryParams["maxResults"] = ["${maxResults}"]; |
1387 } | 1403 } |
1388 if (pageToken != null) { | 1404 if (pageToken != null) { |
1389 _queryParams["pageToken"] = [pageToken]; | 1405 _queryParams["pageToken"] = [pageToken]; |
1390 } | 1406 } |
1391 | 1407 |
1392 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/disks'; | 1408 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/diskTypes'; |
1393 | 1409 |
1394 var _response = _requester.request(_url, | 1410 var _response = _requester.request(_url, |
1395 "GET", | 1411 "GET", |
1396 body: _body, | 1412 body: _body, |
1397 queryParams: _queryParams, | 1413 queryParams: _queryParams, |
1398 uploadOptions: _uploadOptions, | 1414 uploadOptions: _uploadOptions, |
1399 uploadMedia: _uploadMedia, | 1415 uploadMedia: _uploadMedia, |
1400 downloadOptions: _downloadOptions); | 1416 downloadOptions: _downloadOptions); |
1401 return _response.then((data) => new DiskList.fromJson(data)); | 1417 return _response.then((data) => new DiskTypeList.fromJson(data)); |
1402 } | 1418 } |
1403 | 1419 |
1404 } | 1420 } |
1405 | 1421 |
1406 | 1422 |
1407 class FirewallsResourceApi { | 1423 class DisksResourceApi { |
1408 final commons.ApiRequester _requester; | 1424 final commons.ApiRequester _requester; |
1409 | 1425 |
1410 FirewallsResourceApi(commons.ApiRequester client) : | 1426 DisksResourceApi(commons.ApiRequester client) : |
1411 _requester = client; | 1427 _requester = client; |
1412 | 1428 |
1413 /** | 1429 /** |
1414 * Deletes the specified firewall resource. | 1430 * Retrieves the list of disks grouped by scope. |
1415 * | 1431 * |
1416 * Request parameters: | 1432 * Request parameters: |
1417 * | 1433 * |
1418 * [project] - Project ID for this request. | 1434 * [project] - Project ID for this request. |
1419 * Value must have pattern | 1435 * Value must have pattern |
1420 * "(?:(?:[-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])?))". | 1436 * "(?:(?:[-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])?))". |
1421 * | 1437 * |
1422 * [firewall] - Name of the firewall resource to delete. | 1438 * [filter] - Sets a filter expression for filtering listed resources, in the |
1423 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1439 * form filter={expression}. Your {expression} must be in the format: |
| 1440 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
1424 * | 1441 * |
1425 * Completes with a [Operation]. | 1442 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 1443 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 1444 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 1445 * string value to filter to. The literal value must be valid for the type of |
| 1446 * field (string, number, boolean). For string fields, the literal value is |
| 1447 * interpreted as a regular expression using RE2 syntax. The literal value |
| 1448 * must match the entire field. |
| 1449 * |
| 1450 * For example, filter=name ne example-instance. |
| 1451 * |
| 1452 * [maxResults] - Maximum count of results to be returned. |
| 1453 * Value must be between "0" and "500". |
| 1454 * |
| 1455 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 1456 * to list the next page of results. Set pageToken to the nextPageToken |
| 1457 * returned by a previous list request. |
| 1458 * |
| 1459 * Completes with a [DiskAggregatedList]. |
1426 * | 1460 * |
1427 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1461 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1428 * error. | 1462 * error. |
1429 * | 1463 * |
1430 * If the used [http.Client] completes with an error when making a REST call, | 1464 * If the used [http.Client] completes with an error when making a REST call, |
1431 * this method will complete with the same error. | 1465 * this method will complete with the same error. |
1432 */ | 1466 */ |
1433 async.Future<Operation> delete(core.String project, core.String firewall) { | 1467 async.Future<DiskAggregatedList> aggregatedList(core.String project, {core.Str
ing filter, core.int maxResults, core.String pageToken}) { |
1434 var _url = null; | 1468 var _url = null; |
1435 var _queryParams = new core.Map(); | 1469 var _queryParams = new core.Map(); |
1436 var _uploadMedia = null; | 1470 var _uploadMedia = null; |
1437 var _uploadOptions = null; | 1471 var _uploadOptions = null; |
1438 var _downloadOptions = commons.DownloadOptions.Metadata; | 1472 var _downloadOptions = commons.DownloadOptions.Metadata; |
1439 var _body = null; | 1473 var _body = null; |
1440 | 1474 |
1441 if (project == null) { | 1475 if (project == null) { |
1442 throw new core.ArgumentError("Parameter project is required."); | 1476 throw new core.ArgumentError("Parameter project is required."); |
1443 } | 1477 } |
1444 if (firewall == null) { | 1478 if (filter != null) { |
1445 throw new core.ArgumentError("Parameter firewall is required."); | 1479 _queryParams["filter"] = [filter]; |
| 1480 } |
| 1481 if (maxResults != null) { |
| 1482 _queryParams["maxResults"] = ["${maxResults}"]; |
| 1483 } |
| 1484 if (pageToken != null) { |
| 1485 _queryParams["pageToken"] = [pageToken]; |
1446 } | 1486 } |
1447 | 1487 |
1448 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls/' + co
mmons.Escaper.ecapeVariable('$firewall'); | 1488 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/disks'; |
1449 | 1489 |
1450 var _response = _requester.request(_url, | 1490 var _response = _requester.request(_url, |
1451 "DELETE", | 1491 "GET", |
1452 body: _body, | 1492 body: _body, |
1453 queryParams: _queryParams, | 1493 queryParams: _queryParams, |
1454 uploadOptions: _uploadOptions, | 1494 uploadOptions: _uploadOptions, |
1455 uploadMedia: _uploadMedia, | 1495 uploadMedia: _uploadMedia, |
1456 downloadOptions: _downloadOptions); | 1496 downloadOptions: _downloadOptions); |
1457 return _response.then((data) => new Operation.fromJson(data)); | 1497 return _response.then((data) => new DiskAggregatedList.fromJson(data)); |
1458 } | 1498 } |
1459 | 1499 |
1460 /** | 1500 /** |
1461 * Returns the specified firewall resource. | 1501 * Creates a snapshot of this disk. |
| 1502 * |
| 1503 * [request] - The metadata request object. |
1462 * | 1504 * |
1463 * Request parameters: | 1505 * Request parameters: |
1464 * | 1506 * |
1465 * [project] - Project ID for this request. | 1507 * [project] - Project ID for this request. |
1466 * Value must have pattern | 1508 * Value must have pattern |
1467 * "(?:(?:[-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])?))". | 1509 * "(?:(?:[-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])?))". |
1468 * | 1510 * |
1469 * [firewall] - Name of the firewall resource to return. | 1511 * [zone] - The name of the zone for this request. |
1470 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1512 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1471 * | 1513 * |
1472 * Completes with a [Firewall]. | 1514 * [disk] - Name of the persistent disk to snapshot. |
| 1515 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1516 * |
| 1517 * Completes with a [Operation]. |
1473 * | 1518 * |
1474 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1519 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1475 * error. | 1520 * error. |
1476 * | 1521 * |
1477 * If the used [http.Client] completes with an error when making a REST call, | 1522 * If the used [http.Client] completes with an error when making a REST call, |
1478 * this method will complete with the same error. | 1523 * this method will complete with the same error. |
1479 */ | 1524 */ |
1480 async.Future<Firewall> get(core.String project, core.String firewall) { | 1525 async.Future<Operation> createSnapshot(Snapshot request, core.String project,
core.String zone, core.String disk) { |
1481 var _url = null; | 1526 var _url = null; |
1482 var _queryParams = new core.Map(); | 1527 var _queryParams = new core.Map(); |
1483 var _uploadMedia = null; | 1528 var _uploadMedia = null; |
1484 var _uploadOptions = null; | 1529 var _uploadOptions = null; |
1485 var _downloadOptions = commons.DownloadOptions.Metadata; | 1530 var _downloadOptions = commons.DownloadOptions.Metadata; |
1486 var _body = null; | 1531 var _body = null; |
1487 | 1532 |
| 1533 if (request != null) { |
| 1534 _body = convert.JSON.encode((request).toJson()); |
| 1535 } |
1488 if (project == null) { | 1536 if (project == null) { |
1489 throw new core.ArgumentError("Parameter project is required."); | 1537 throw new core.ArgumentError("Parameter project is required."); |
1490 } | 1538 } |
1491 if (firewall == null) { | 1539 if (zone == null) { |
1492 throw new core.ArgumentError("Parameter firewall is required."); | 1540 throw new core.ArgumentError("Parameter zone is required."); |
| 1541 } |
| 1542 if (disk == null) { |
| 1543 throw new core.ArgumentError("Parameter disk is required."); |
1493 } | 1544 } |
1494 | 1545 |
1495 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls/' + co
mmons.Escaper.ecapeVariable('$firewall'); | 1546 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/disks/' + commons.Escaper.ecapeVariable('$disk') +
'/createSnapshot'; |
1496 | 1547 |
1497 var _response = _requester.request(_url, | 1548 var _response = _requester.request(_url, |
1498 "GET", | 1549 "POST", |
1499 body: _body, | 1550 body: _body, |
1500 queryParams: _queryParams, | 1551 queryParams: _queryParams, |
1501 uploadOptions: _uploadOptions, | 1552 uploadOptions: _uploadOptions, |
1502 uploadMedia: _uploadMedia, | 1553 uploadMedia: _uploadMedia, |
1503 downloadOptions: _downloadOptions); | 1554 downloadOptions: _downloadOptions); |
1504 return _response.then((data) => new Firewall.fromJson(data)); | 1555 return _response.then((data) => new Operation.fromJson(data)); |
1505 } | 1556 } |
1506 | 1557 |
1507 /** | 1558 /** |
1508 * Creates a firewall resource in the specified project using the data | 1559 * Deletes the specified persistent disk. Deleting a disk removes its data |
1509 * included in the request. | 1560 * permanently and is irreversible. However, deleting a disk does not delete |
1510 * | 1561 * any snapshots previously made from the disk. You must separately delete |
1511 * [request] - The metadata request object. | 1562 * snapshots. |
1512 * | 1563 * |
1513 * Request parameters: | 1564 * Request parameters: |
1514 * | 1565 * |
1515 * [project] - Project ID for this request. | 1566 * [project] - Project ID for this request. |
1516 * Value must have pattern | 1567 * Value must have pattern |
1517 * "(?:(?:[-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])?))". | 1568 * "(?:(?:[-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])?))". |
1518 * | 1569 * |
| 1570 * [zone] - The name of the zone for this request. |
| 1571 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1572 * |
| 1573 * [disk] - Name of the persistent disk to delete. |
| 1574 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 1575 * |
1519 * Completes with a [Operation]. | 1576 * Completes with a [Operation]. |
1520 * | 1577 * |
1521 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1578 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1522 * error. | 1579 * error. |
1523 * | 1580 * |
1524 * If the used [http.Client] completes with an error when making a REST call, | 1581 * If the used [http.Client] completes with an error when making a REST call, |
1525 * this method will complete with the same error. | 1582 * this method will complete with the same error. |
1526 */ | 1583 */ |
1527 async.Future<Operation> insert(Firewall request, core.String project) { | 1584 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing disk) { |
1528 var _url = null; | 1585 var _url = null; |
1529 var _queryParams = new core.Map(); | 1586 var _queryParams = new core.Map(); |
1530 var _uploadMedia = null; | 1587 var _uploadMedia = null; |
1531 var _uploadOptions = null; | 1588 var _uploadOptions = null; |
1532 var _downloadOptions = commons.DownloadOptions.Metadata; | 1589 var _downloadOptions = commons.DownloadOptions.Metadata; |
1533 var _body = null; | 1590 var _body = null; |
1534 | 1591 |
1535 if (request != null) { | |
1536 _body = convert.JSON.encode((request).toJson()); | |
1537 } | |
1538 if (project == null) { | 1592 if (project == null) { |
1539 throw new core.ArgumentError("Parameter project is required."); | 1593 throw new core.ArgumentError("Parameter project is required."); |
1540 } | 1594 } |
| 1595 if (zone == null) { |
| 1596 throw new core.ArgumentError("Parameter zone is required."); |
| 1597 } |
| 1598 if (disk == null) { |
| 1599 throw new core.ArgumentError("Parameter disk is required."); |
| 1600 } |
1541 | 1601 |
1542 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls'; | 1602 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/disks/' + commons.Escaper.ecapeVariable('$disk'); |
1543 | 1603 |
1544 var _response = _requester.request(_url, | 1604 var _response = _requester.request(_url, |
1545 "POST", | 1605 "DELETE", |
1546 body: _body, | 1606 body: _body, |
1547 queryParams: _queryParams, | 1607 queryParams: _queryParams, |
1548 uploadOptions: _uploadOptions, | 1608 uploadOptions: _uploadOptions, |
1549 uploadMedia: _uploadMedia, | 1609 uploadMedia: _uploadMedia, |
1550 downloadOptions: _downloadOptions); | 1610 downloadOptions: _downloadOptions); |
1551 return _response.then((data) => new Operation.fromJson(data)); | 1611 return _response.then((data) => new Operation.fromJson(data)); |
1552 } | 1612 } |
1553 | 1613 |
1554 /** | 1614 /** |
1555 * Retrieves the list of firewall resources available to the specified | 1615 * Returns a specified persistent disk. |
1556 * project. | |
1557 * | 1616 * |
1558 * Request parameters: | 1617 * Request parameters: |
1559 * | 1618 * |
1560 * [project] - Project ID for this request. | 1619 * [project] - Project ID for this request. |
1561 * Value must have pattern | 1620 * Value must have pattern |
1562 * "(?:(?:[-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])?))". | 1621 * "(?:(?:[-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])?))". |
1563 * | 1622 * |
1564 * [filter] - Sets a filter expression for filtering listed resources, in the | 1623 * [zone] - The name of the zone for this request. |
1565 * form filter={expression}. Your {expression} must contain the following: | 1624 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1566 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
1567 * | 1625 * |
1568 * - FIELD_NAME: The name of the field you want to compare. The field name | 1626 * [disk] - Name of the persistent disk to return. |
1569 * must be valid for the type of resource being filtered. Only atomic field | 1627 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1570 * types are supported (string, number, boolean). Array and object fields are | |
1571 * not currently supported. | |
1572 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
1573 * equals). | |
1574 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
1575 * must be valid for the type of field (string, number, boolean). For string | |
1576 * fields, the literal value is interpreted as a regular expression using RE2 | |
1577 * syntax. The literal value must match the entire field. For example, you | |
1578 * can filter by the name of a resource: | |
1579 * filter=name ne example-instance | |
1580 * The above filter returns only results whose name field does not equal | |
1581 * example-instance. You can also enclose your literal string in single, | |
1582 * double, or no quotes. | |
1583 * | 1628 * |
1584 * [maxResults] - Maximum count of results to be returned. | 1629 * Completes with a [Disk]. |
1585 * Value must be between "0" and "500". | |
1586 * | |
1587 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
1588 * to list the next page of results. Set pageToken to the nextPageToken | |
1589 * returned by a previous list request. | |
1590 * | |
1591 * Completes with a [FirewallList]. | |
1592 * | 1630 * |
1593 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1631 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1594 * error. | 1632 * error. |
1595 * | 1633 * |
1596 * If the used [http.Client] completes with an error when making a REST call, | 1634 * If the used [http.Client] completes with an error when making a REST call, |
1597 * this method will complete with the same error. | 1635 * this method will complete with the same error. |
1598 */ | 1636 */ |
1599 async.Future<FirewallList> list(core.String project, {core.String filter, core
.int maxResults, core.String pageToken}) { | 1637 async.Future<Disk> get(core.String project, core.String zone, core.String disk
) { |
1600 var _url = null; | 1638 var _url = null; |
1601 var _queryParams = new core.Map(); | 1639 var _queryParams = new core.Map(); |
1602 var _uploadMedia = null; | 1640 var _uploadMedia = null; |
1603 var _uploadOptions = null; | 1641 var _uploadOptions = null; |
1604 var _downloadOptions = commons.DownloadOptions.Metadata; | 1642 var _downloadOptions = commons.DownloadOptions.Metadata; |
1605 var _body = null; | 1643 var _body = null; |
1606 | 1644 |
1607 if (project == null) { | 1645 if (project == null) { |
1608 throw new core.ArgumentError("Parameter project is required."); | 1646 throw new core.ArgumentError("Parameter project is required."); |
1609 } | 1647 } |
1610 if (filter != null) { | 1648 if (zone == null) { |
1611 _queryParams["filter"] = [filter]; | 1649 throw new core.ArgumentError("Parameter zone is required."); |
1612 } | 1650 } |
1613 if (maxResults != null) { | 1651 if (disk == null) { |
1614 _queryParams["maxResults"] = ["${maxResults}"]; | 1652 throw new core.ArgumentError("Parameter disk is required."); |
1615 } | |
1616 if (pageToken != null) { | |
1617 _queryParams["pageToken"] = [pageToken]; | |
1618 } | 1653 } |
1619 | 1654 |
1620 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls'; | 1655 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/disks/' + commons.Escaper.ecapeVariable('$disk'); |
1621 | 1656 |
1622 var _response = _requester.request(_url, | 1657 var _response = _requester.request(_url, |
1623 "GET", | 1658 "GET", |
1624 body: _body, | 1659 body: _body, |
1625 queryParams: _queryParams, | 1660 queryParams: _queryParams, |
1626 uploadOptions: _uploadOptions, | 1661 uploadOptions: _uploadOptions, |
1627 uploadMedia: _uploadMedia, | 1662 uploadMedia: _uploadMedia, |
1628 downloadOptions: _downloadOptions); | 1663 downloadOptions: _downloadOptions); |
1629 return _response.then((data) => new FirewallList.fromJson(data)); | 1664 return _response.then((data) => new Disk.fromJson(data)); |
1630 } | 1665 } |
1631 | 1666 |
1632 /** | 1667 /** |
1633 * Updates the specified firewall resource with the data included in the | 1668 * Creates a persistent disk in the specified project using the data included |
1634 * request. This method supports patch semantics. | 1669 * in the request. |
1635 * | 1670 * |
1636 * [request] - The metadata request object. | 1671 * [request] - The metadata request object. |
1637 * | 1672 * |
1638 * Request parameters: | 1673 * Request parameters: |
1639 * | 1674 * |
1640 * [project] - Project ID for this request. | 1675 * [project] - Project ID for this request. |
1641 * Value must have pattern | 1676 * Value must have pattern |
1642 * "(?:(?:[-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])?))". | 1677 * "(?:(?:[-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])?))". |
1643 * | 1678 * |
1644 * [firewall] - Name of the firewall resource to update. | 1679 * [zone] - The name of the zone for this request. |
1645 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1680 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1646 * | 1681 * |
| 1682 * [sourceImage] - Optional. Source image to restore onto a disk. |
| 1683 * |
1647 * Completes with a [Operation]. | 1684 * Completes with a [Operation]. |
1648 * | 1685 * |
1649 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1686 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1650 * error. | 1687 * error. |
1651 * | 1688 * |
1652 * If the used [http.Client] completes with an error when making a REST call, | 1689 * If the used [http.Client] completes with an error when making a REST call, |
1653 * this method will complete with the same error. | 1690 * this method will complete with the same error. |
1654 */ | 1691 */ |
1655 async.Future<Operation> patch(Firewall request, core.String project, core.Stri
ng firewall) { | 1692 async.Future<Operation> insert(Disk request, core.String project, core.String
zone, {core.String sourceImage}) { |
1656 var _url = null; | 1693 var _url = null; |
1657 var _queryParams = new core.Map(); | 1694 var _queryParams = new core.Map(); |
1658 var _uploadMedia = null; | 1695 var _uploadMedia = null; |
1659 var _uploadOptions = null; | 1696 var _uploadOptions = null; |
1660 var _downloadOptions = commons.DownloadOptions.Metadata; | 1697 var _downloadOptions = commons.DownloadOptions.Metadata; |
1661 var _body = null; | 1698 var _body = null; |
1662 | 1699 |
1663 if (request != null) { | 1700 if (request != null) { |
1664 _body = convert.JSON.encode((request).toJson()); | 1701 _body = convert.JSON.encode((request).toJson()); |
1665 } | 1702 } |
1666 if (project == null) { | 1703 if (project == null) { |
1667 throw new core.ArgumentError("Parameter project is required."); | 1704 throw new core.ArgumentError("Parameter project is required."); |
1668 } | 1705 } |
1669 if (firewall == null) { | 1706 if (zone == null) { |
1670 throw new core.ArgumentError("Parameter firewall is required."); | 1707 throw new core.ArgumentError("Parameter zone is required."); |
| 1708 } |
| 1709 if (sourceImage != null) { |
| 1710 _queryParams["sourceImage"] = [sourceImage]; |
1671 } | 1711 } |
1672 | 1712 |
1673 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls/' + co
mmons.Escaper.ecapeVariable('$firewall'); | 1713 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/disks'; |
1674 | 1714 |
1675 var _response = _requester.request(_url, | 1715 var _response = _requester.request(_url, |
1676 "PATCH", | 1716 "POST", |
1677 body: _body, | 1717 body: _body, |
1678 queryParams: _queryParams, | 1718 queryParams: _queryParams, |
1679 uploadOptions: _uploadOptions, | 1719 uploadOptions: _uploadOptions, |
1680 uploadMedia: _uploadMedia, | 1720 uploadMedia: _uploadMedia, |
1681 downloadOptions: _downloadOptions); | 1721 downloadOptions: _downloadOptions); |
1682 return _response.then((data) => new Operation.fromJson(data)); | 1722 return _response.then((data) => new Operation.fromJson(data)); |
1683 } | 1723 } |
1684 | 1724 |
1685 /** | 1725 /** |
1686 * Updates the specified firewall resource with the data included in the | 1726 * Retrieves the list of persistent disks contained within the specified zone. |
1687 * request. | |
1688 * | |
1689 * [request] - The metadata request object. | |
1690 * | 1727 * |
1691 * Request parameters: | 1728 * Request parameters: |
1692 * | 1729 * |
1693 * [project] - Project ID for this request. | 1730 * [project] - Project ID for this request. |
1694 * Value must have pattern | 1731 * Value must have pattern |
1695 * "(?:(?:[-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])?))". | 1732 * "(?:(?:[-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])?))". |
1696 * | 1733 * |
1697 * [firewall] - Name of the firewall resource to update. | 1734 * [zone] - The name of the zone for this request. |
1698 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1735 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1699 * | 1736 * |
1700 * Completes with a [Operation]. | 1737 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 1738 * form filter={expression}. Your {expression} must be in the format: |
| 1739 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
1701 * | 1740 * |
1702 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1741 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
1703 * error. | 1742 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 1743 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 1744 * string value to filter to. The literal value must be valid for the type of |
| 1745 * field (string, number, boolean). For string fields, the literal value is |
| 1746 * interpreted as a regular expression using RE2 syntax. The literal value |
| 1747 * must match the entire field. |
1704 * | 1748 * |
1705 * If the used [http.Client] completes with an error when making a REST call, | 1749 * For example, filter=name ne example-instance. |
1706 * this method will complete with the same error. | |
1707 */ | |
1708 async.Future<Operation> update(Firewall request, core.String project, core.Str
ing firewall) { | |
1709 var _url = null; | |
1710 var _queryParams = new core.Map(); | |
1711 var _uploadMedia = null; | |
1712 var _uploadOptions = null; | |
1713 var _downloadOptions = commons.DownloadOptions.Metadata; | |
1714 var _body = null; | |
1715 | |
1716 if (request != null) { | |
1717 _body = convert.JSON.encode((request).toJson()); | |
1718 } | |
1719 if (project == null) { | |
1720 throw new core.ArgumentError("Parameter project is required."); | |
1721 } | |
1722 if (firewall == null) { | |
1723 throw new core.ArgumentError("Parameter firewall is required."); | |
1724 } | |
1725 | |
1726 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls/' + co
mmons.Escaper.ecapeVariable('$firewall'); | |
1727 | |
1728 var _response = _requester.request(_url, | |
1729 "PUT", | |
1730 body: _body, | |
1731 queryParams: _queryParams, | |
1732 uploadOptions: _uploadOptions, | |
1733 uploadMedia: _uploadMedia, | |
1734 downloadOptions: _downloadOptions); | |
1735 return _response.then((data) => new Operation.fromJson(data)); | |
1736 } | |
1737 | |
1738 } | |
1739 | |
1740 | |
1741 class ForwardingRulesResourceApi { | |
1742 final commons.ApiRequester _requester; | |
1743 | |
1744 ForwardingRulesResourceApi(commons.ApiRequester client) : | |
1745 _requester = client; | |
1746 | |
1747 /** | |
1748 * Retrieves the list of forwarding rules grouped by scope. | |
1749 * | |
1750 * Request parameters: | |
1751 * | |
1752 * [project] - Name of the project scoping this request. | |
1753 * Value must have pattern | |
1754 * "(?:(?:[-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])?))". | |
1755 * | |
1756 * [filter] - Sets a filter expression for filtering listed resources, in the | |
1757 * form filter={expression}. Your {expression} must contain the following: | |
1758 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
1759 * | |
1760 * - FIELD_NAME: The name of the field you want to compare. The field name | |
1761 * must be valid for the type of resource being filtered. Only atomic field | |
1762 * types are supported (string, number, boolean). Array and object fields are | |
1763 * not currently supported. | |
1764 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
1765 * equals). | |
1766 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
1767 * must be valid for the type of field (string, number, boolean). For string | |
1768 * fields, the literal value is interpreted as a regular expression using RE2 | |
1769 * syntax. The literal value must match the entire field. For example, you | |
1770 * can filter by the name of a resource: | |
1771 * filter=name ne example-instance | |
1772 * The above filter returns only results whose name field does not equal | |
1773 * example-instance. You can also enclose your literal string in single, | |
1774 * double, or no quotes. | |
1775 * | 1750 * |
1776 * [maxResults] - Maximum count of results to be returned. | 1751 * [maxResults] - Maximum count of results to be returned. |
1777 * Value must be between "0" and "500". | 1752 * Value must be between "0" and "500". |
1778 * | 1753 * |
1779 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 1754 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
1780 * to list the next page of results. Set pageToken to the nextPageToken | 1755 * to list the next page of results. Set pageToken to the nextPageToken |
1781 * returned by a previous list request. | 1756 * returned by a previous list request. |
1782 * | 1757 * |
1783 * Completes with a [ForwardingRuleAggregatedList]. | 1758 * Completes with a [DiskList]. |
1784 * | 1759 * |
1785 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1760 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1786 * error. | 1761 * error. |
1787 * | 1762 * |
1788 * If the used [http.Client] completes with an error when making a REST call, | 1763 * If the used [http.Client] completes with an error when making a REST call, |
1789 * this method will complete with the same error. | 1764 * this method will complete with the same error. |
1790 */ | 1765 */ |
1791 async.Future<ForwardingRuleAggregatedList> aggregatedList(core.String project,
{core.String filter, core.int maxResults, core.String pageToken}) { | 1766 async.Future<DiskList> list(core.String project, core.String zone, {core.Strin
g filter, core.int maxResults, core.String pageToken}) { |
1792 var _url = null; | 1767 var _url = null; |
1793 var _queryParams = new core.Map(); | 1768 var _queryParams = new core.Map(); |
1794 var _uploadMedia = null; | 1769 var _uploadMedia = null; |
1795 var _uploadOptions = null; | 1770 var _uploadOptions = null; |
1796 var _downloadOptions = commons.DownloadOptions.Metadata; | 1771 var _downloadOptions = commons.DownloadOptions.Metadata; |
1797 var _body = null; | 1772 var _body = null; |
1798 | 1773 |
1799 if (project == null) { | 1774 if (project == null) { |
1800 throw new core.ArgumentError("Parameter project is required."); | 1775 throw new core.ArgumentError("Parameter project is required."); |
1801 } | 1776 } |
| 1777 if (zone == null) { |
| 1778 throw new core.ArgumentError("Parameter zone is required."); |
| 1779 } |
1802 if (filter != null) { | 1780 if (filter != null) { |
1803 _queryParams["filter"] = [filter]; | 1781 _queryParams["filter"] = [filter]; |
1804 } | 1782 } |
1805 if (maxResults != null) { | 1783 if (maxResults != null) { |
1806 _queryParams["maxResults"] = ["${maxResults}"]; | 1784 _queryParams["maxResults"] = ["${maxResults}"]; |
1807 } | 1785 } |
1808 if (pageToken != null) { | 1786 if (pageToken != null) { |
1809 _queryParams["pageToken"] = [pageToken]; | 1787 _queryParams["pageToken"] = [pageToken]; |
1810 } | 1788 } |
1811 | 1789 |
1812 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/forwardingRu
les'; | 1790 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/disks'; |
1813 | 1791 |
1814 var _response = _requester.request(_url, | 1792 var _response = _requester.request(_url, |
1815 "GET", | 1793 "GET", |
1816 body: _body, | 1794 body: _body, |
1817 queryParams: _queryParams, | 1795 queryParams: _queryParams, |
1818 uploadOptions: _uploadOptions, | 1796 uploadOptions: _uploadOptions, |
1819 uploadMedia: _uploadMedia, | 1797 uploadMedia: _uploadMedia, |
1820 downloadOptions: _downloadOptions); | 1798 downloadOptions: _downloadOptions); |
1821 return _response.then((data) => new ForwardingRuleAggregatedList.fromJson(da
ta)); | 1799 return _response.then((data) => new DiskList.fromJson(data)); |
1822 } | 1800 } |
1823 | 1801 |
| 1802 } |
| 1803 |
| 1804 |
| 1805 class FirewallsResourceApi { |
| 1806 final commons.ApiRequester _requester; |
| 1807 |
| 1808 FirewallsResourceApi(commons.ApiRequester client) : |
| 1809 _requester = client; |
| 1810 |
1824 /** | 1811 /** |
1825 * Deletes the specified ForwardingRule resource. | 1812 * Deletes the specified firewall resource. |
1826 * | 1813 * |
1827 * Request parameters: | 1814 * Request parameters: |
1828 * | 1815 * |
1829 * [project] - Name of the project scoping this request. | 1816 * [project] - Project ID for this request. |
1830 * Value must have pattern | 1817 * Value must have pattern |
1831 * "(?:(?:[-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])?))". | 1818 * "(?:(?:[-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])?))". |
1832 * | 1819 * |
1833 * [region] - Name of the region scoping this request. | 1820 * [firewall] - Name of the firewall resource to delete. |
1834 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
1835 * | |
1836 * [forwardingRule] - Name of the ForwardingRule resource to delete. | |
1837 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1821 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1838 * | 1822 * |
1839 * Completes with a [Operation]. | 1823 * Completes with a [Operation]. |
1840 * | 1824 * |
1841 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1825 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1842 * error. | 1826 * error. |
1843 * | 1827 * |
1844 * If the used [http.Client] completes with an error when making a REST call, | 1828 * If the used [http.Client] completes with an error when making a REST call, |
1845 * this method will complete with the same error. | 1829 * this method will complete with the same error. |
1846 */ | 1830 */ |
1847 async.Future<Operation> delete(core.String project, core.String region, core.S
tring forwardingRule) { | 1831 async.Future<Operation> delete(core.String project, core.String firewall) { |
1848 var _url = null; | 1832 var _url = null; |
1849 var _queryParams = new core.Map(); | 1833 var _queryParams = new core.Map(); |
1850 var _uploadMedia = null; | 1834 var _uploadMedia = null; |
1851 var _uploadOptions = null; | 1835 var _uploadOptions = null; |
1852 var _downloadOptions = commons.DownloadOptions.Metadata; | 1836 var _downloadOptions = commons.DownloadOptions.Metadata; |
1853 var _body = null; | 1837 var _body = null; |
1854 | 1838 |
1855 if (project == null) { | 1839 if (project == null) { |
1856 throw new core.ArgumentError("Parameter project is required."); | 1840 throw new core.ArgumentError("Parameter project is required."); |
1857 } | 1841 } |
1858 if (region == null) { | 1842 if (firewall == null) { |
1859 throw new core.ArgumentError("Parameter region is required."); | 1843 throw new core.ArgumentError("Parameter firewall is required."); |
1860 } | |
1861 if (forwardingRule == null) { | |
1862 throw new core.ArgumentError("Parameter forwardingRule is required."); | |
1863 } | 1844 } |
1864 | 1845 |
1865 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/forwardingRules/' + commons.Escaper.ecapeVaria
ble('$forwardingRule'); | 1846 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls/' + co
mmons.Escaper.ecapeVariable('$firewall'); |
1866 | 1847 |
1867 var _response = _requester.request(_url, | 1848 var _response = _requester.request(_url, |
1868 "DELETE", | 1849 "DELETE", |
1869 body: _body, | 1850 body: _body, |
1870 queryParams: _queryParams, | 1851 queryParams: _queryParams, |
1871 uploadOptions: _uploadOptions, | 1852 uploadOptions: _uploadOptions, |
1872 uploadMedia: _uploadMedia, | 1853 uploadMedia: _uploadMedia, |
1873 downloadOptions: _downloadOptions); | 1854 downloadOptions: _downloadOptions); |
1874 return _response.then((data) => new Operation.fromJson(data)); | 1855 return _response.then((data) => new Operation.fromJson(data)); |
1875 } | 1856 } |
1876 | 1857 |
1877 /** | 1858 /** |
1878 * Returns the specified ForwardingRule resource. | 1859 * Returns the specified firewall resource. |
1879 * | 1860 * |
1880 * Request parameters: | 1861 * Request parameters: |
1881 * | 1862 * |
1882 * [project] - Name of the project scoping this request. | 1863 * [project] - Project ID for this request. |
1883 * Value must have pattern | 1864 * Value must have pattern |
1884 * "(?:(?:[-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])?))". | 1865 * "(?:(?:[-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])?))". |
1885 * | 1866 * |
1886 * [region] - Name of the region scoping this request. | 1867 * [firewall] - Name of the firewall resource to return. |
1887 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1868 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
1888 * | 1869 * |
1889 * [forwardingRule] - Name of the ForwardingRule resource to return. | 1870 * Completes with a [Firewall]. |
1890 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
1891 * | |
1892 * Completes with a [ForwardingRule]. | |
1893 * | 1871 * |
1894 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1872 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1895 * error. | 1873 * error. |
1896 * | 1874 * |
1897 * If the used [http.Client] completes with an error when making a REST call, | 1875 * If the used [http.Client] completes with an error when making a REST call, |
1898 * this method will complete with the same error. | 1876 * this method will complete with the same error. |
1899 */ | 1877 */ |
1900 async.Future<ForwardingRule> get(core.String project, core.String region, core
.String forwardingRule) { | 1878 async.Future<Firewall> get(core.String project, core.String firewall) { |
1901 var _url = null; | 1879 var _url = null; |
1902 var _queryParams = new core.Map(); | 1880 var _queryParams = new core.Map(); |
1903 var _uploadMedia = null; | 1881 var _uploadMedia = null; |
1904 var _uploadOptions = null; | 1882 var _uploadOptions = null; |
1905 var _downloadOptions = commons.DownloadOptions.Metadata; | 1883 var _downloadOptions = commons.DownloadOptions.Metadata; |
1906 var _body = null; | 1884 var _body = null; |
1907 | 1885 |
1908 if (project == null) { | 1886 if (project == null) { |
1909 throw new core.ArgumentError("Parameter project is required."); | 1887 throw new core.ArgumentError("Parameter project is required."); |
1910 } | 1888 } |
1911 if (region == null) { | 1889 if (firewall == null) { |
1912 throw new core.ArgumentError("Parameter region is required."); | 1890 throw new core.ArgumentError("Parameter firewall is required."); |
1913 } | |
1914 if (forwardingRule == null) { | |
1915 throw new core.ArgumentError("Parameter forwardingRule is required."); | |
1916 } | 1891 } |
1917 | 1892 |
1918 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/forwardingRules/' + commons.Escaper.ecapeVaria
ble('$forwardingRule'); | 1893 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls/' + co
mmons.Escaper.ecapeVariable('$firewall'); |
1919 | 1894 |
1920 var _response = _requester.request(_url, | 1895 var _response = _requester.request(_url, |
1921 "GET", | 1896 "GET", |
1922 body: _body, | 1897 body: _body, |
1923 queryParams: _queryParams, | 1898 queryParams: _queryParams, |
1924 uploadOptions: _uploadOptions, | 1899 uploadOptions: _uploadOptions, |
1925 uploadMedia: _uploadMedia, | 1900 uploadMedia: _uploadMedia, |
1926 downloadOptions: _downloadOptions); | 1901 downloadOptions: _downloadOptions); |
1927 return _response.then((data) => new ForwardingRule.fromJson(data)); | 1902 return _response.then((data) => new Firewall.fromJson(data)); |
1928 } | 1903 } |
1929 | 1904 |
1930 /** | 1905 /** |
1931 * Creates a ForwardingRule resource in the specified project and region using | 1906 * Creates a firewall resource in the specified project using the data |
1932 * the data included in the request. | 1907 * included in the request. |
1933 * | 1908 * |
1934 * [request] - The metadata request object. | 1909 * [request] - The metadata request object. |
1935 * | 1910 * |
1936 * Request parameters: | 1911 * Request parameters: |
1937 * | 1912 * |
1938 * [project] - Name of the project scoping this request. | 1913 * [project] - Project ID for this request. |
1939 * Value must have pattern | 1914 * Value must have pattern |
1940 * "(?:(?:[-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])?))". | 1915 * "(?:(?:[-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])?))". |
1941 * | 1916 * |
1942 * [region] - Name of the region scoping this request. | |
1943 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
1944 * | |
1945 * Completes with a [Operation]. | 1917 * Completes with a [Operation]. |
1946 * | 1918 * |
1947 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1919 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1948 * error. | 1920 * error. |
1949 * | 1921 * |
1950 * If the used [http.Client] completes with an error when making a REST call, | 1922 * If the used [http.Client] completes with an error when making a REST call, |
1951 * this method will complete with the same error. | 1923 * this method will complete with the same error. |
1952 */ | 1924 */ |
1953 async.Future<Operation> insert(ForwardingRule request, core.String project, co
re.String region) { | 1925 async.Future<Operation> insert(Firewall request, core.String project) { |
1954 var _url = null; | 1926 var _url = null; |
1955 var _queryParams = new core.Map(); | 1927 var _queryParams = new core.Map(); |
1956 var _uploadMedia = null; | 1928 var _uploadMedia = null; |
1957 var _uploadOptions = null; | 1929 var _uploadOptions = null; |
1958 var _downloadOptions = commons.DownloadOptions.Metadata; | 1930 var _downloadOptions = commons.DownloadOptions.Metadata; |
1959 var _body = null; | 1931 var _body = null; |
1960 | 1932 |
1961 if (request != null) { | 1933 if (request != null) { |
1962 _body = convert.JSON.encode((request).toJson()); | 1934 _body = convert.JSON.encode((request).toJson()); |
1963 } | 1935 } |
1964 if (project == null) { | 1936 if (project == null) { |
1965 throw new core.ArgumentError("Parameter project is required."); | 1937 throw new core.ArgumentError("Parameter project is required."); |
1966 } | 1938 } |
1967 if (region == null) { | |
1968 throw new core.ArgumentError("Parameter region is required."); | |
1969 } | |
1970 | 1939 |
1971 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/forwardingRules'; | 1940 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls'; |
1972 | 1941 |
1973 var _response = _requester.request(_url, | 1942 var _response = _requester.request(_url, |
1974 "POST", | 1943 "POST", |
1975 body: _body, | 1944 body: _body, |
1976 queryParams: _queryParams, | 1945 queryParams: _queryParams, |
1977 uploadOptions: _uploadOptions, | 1946 uploadOptions: _uploadOptions, |
1978 uploadMedia: _uploadMedia, | 1947 uploadMedia: _uploadMedia, |
1979 downloadOptions: _downloadOptions); | 1948 downloadOptions: _downloadOptions); |
1980 return _response.then((data) => new Operation.fromJson(data)); | 1949 return _response.then((data) => new Operation.fromJson(data)); |
1981 } | 1950 } |
1982 | 1951 |
1983 /** | 1952 /** |
1984 * Retrieves the list of ForwardingRule resources available to the specified | 1953 * Retrieves the list of firewall resources available to the specified |
1985 * project and region. | 1954 * project. |
1986 * | 1955 * |
1987 * Request parameters: | 1956 * Request parameters: |
1988 * | 1957 * |
1989 * [project] - Name of the project scoping this request. | 1958 * [project] - Project ID for this request. |
1990 * Value must have pattern | 1959 * Value must have pattern |
1991 * "(?:(?:[-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])?))". | 1960 * "(?:(?:[-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])?))". |
1992 * | 1961 * |
1993 * [region] - Name of the region scoping this request. | 1962 * [filter] - Sets a filter expression for filtering listed resources, in the |
1994 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 1963 * form filter={expression}. Your {expression} must be in the format: |
| 1964 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
1995 * | 1965 * |
1996 * [filter] - Sets a filter expression for filtering listed resources, in the | 1966 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
1997 * form filter={expression}. Your {expression} must contain the following: | 1967 * field types are supported (string, number, boolean). The COMPARISON_STRING |
1998 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 1968 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 1969 * string value to filter to. The literal value must be valid for the type of |
| 1970 * field (string, number, boolean). For string fields, the literal value is |
| 1971 * interpreted as a regular expression using RE2 syntax. The literal value |
| 1972 * must match the entire field. |
1999 * | 1973 * |
2000 * - FIELD_NAME: The name of the field you want to compare. The field name | 1974 * For example, filter=name ne example-instance. |
2001 * must be valid for the type of resource being filtered. Only atomic field | |
2002 * types are supported (string, number, boolean). Array and object fields are | |
2003 * not currently supported. | |
2004 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
2005 * equals). | |
2006 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
2007 * must be valid for the type of field (string, number, boolean). For string | |
2008 * fields, the literal value is interpreted as a regular expression using RE2 | |
2009 * syntax. The literal value must match the entire field. For example, you | |
2010 * can filter by the name of a resource: | |
2011 * filter=name ne example-instance | |
2012 * The above filter returns only results whose name field does not equal | |
2013 * example-instance. You can also enclose your literal string in single, | |
2014 * double, or no quotes. | |
2015 * | 1975 * |
2016 * [maxResults] - Maximum count of results to be returned. | 1976 * [maxResults] - Maximum count of results to be returned. |
2017 * Value must be between "0" and "500". | 1977 * Value must be between "0" and "500". |
2018 * | 1978 * |
2019 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 1979 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
2020 * to list the next page of results. Set pageToken to the nextPageToken | 1980 * to list the next page of results. Set pageToken to the nextPageToken |
2021 * returned by a previous list request. | 1981 * returned by a previous list request. |
2022 * | 1982 * |
2023 * Completes with a [ForwardingRuleList]. | 1983 * Completes with a [FirewallList]. |
2024 * | 1984 * |
2025 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1985 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2026 * error. | 1986 * error. |
2027 * | 1987 * |
2028 * If the used [http.Client] completes with an error when making a REST call, | 1988 * If the used [http.Client] completes with an error when making a REST call, |
2029 * this method will complete with the same error. | 1989 * this method will complete with the same error. |
2030 */ | 1990 */ |
2031 async.Future<ForwardingRuleList> list(core.String project, core.String region,
{core.String filter, core.int maxResults, core.String pageToken}) { | 1991 async.Future<FirewallList> list(core.String project, {core.String filter, core
.int maxResults, core.String pageToken}) { |
2032 var _url = null; | 1992 var _url = null; |
2033 var _queryParams = new core.Map(); | 1993 var _queryParams = new core.Map(); |
2034 var _uploadMedia = null; | 1994 var _uploadMedia = null; |
2035 var _uploadOptions = null; | 1995 var _uploadOptions = null; |
2036 var _downloadOptions = commons.DownloadOptions.Metadata; | 1996 var _downloadOptions = commons.DownloadOptions.Metadata; |
2037 var _body = null; | 1997 var _body = null; |
2038 | 1998 |
2039 if (project == null) { | 1999 if (project == null) { |
2040 throw new core.ArgumentError("Parameter project is required."); | 2000 throw new core.ArgumentError("Parameter project is required."); |
2041 } | 2001 } |
2042 if (region == null) { | |
2043 throw new core.ArgumentError("Parameter region is required."); | |
2044 } | |
2045 if (filter != null) { | 2002 if (filter != null) { |
2046 _queryParams["filter"] = [filter]; | 2003 _queryParams["filter"] = [filter]; |
2047 } | 2004 } |
2048 if (maxResults != null) { | 2005 if (maxResults != null) { |
2049 _queryParams["maxResults"] = ["${maxResults}"]; | 2006 _queryParams["maxResults"] = ["${maxResults}"]; |
2050 } | 2007 } |
2051 if (pageToken != null) { | 2008 if (pageToken != null) { |
2052 _queryParams["pageToken"] = [pageToken]; | 2009 _queryParams["pageToken"] = [pageToken]; |
2053 } | 2010 } |
2054 | 2011 |
2055 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/forwardingRules'; | 2012 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls'; |
2056 | 2013 |
2057 var _response = _requester.request(_url, | 2014 var _response = _requester.request(_url, |
2058 "GET", | 2015 "GET", |
2059 body: _body, | 2016 body: _body, |
2060 queryParams: _queryParams, | 2017 queryParams: _queryParams, |
2061 uploadOptions: _uploadOptions, | 2018 uploadOptions: _uploadOptions, |
2062 uploadMedia: _uploadMedia, | 2019 uploadMedia: _uploadMedia, |
2063 downloadOptions: _downloadOptions); | 2020 downloadOptions: _downloadOptions); |
2064 return _response.then((data) => new ForwardingRuleList.fromJson(data)); | 2021 return _response.then((data) => new FirewallList.fromJson(data)); |
2065 } | 2022 } |
2066 | 2023 |
2067 /** | 2024 /** |
2068 * Changes target url for forwarding rule. | 2025 * Updates the specified firewall resource with the data included in the |
| 2026 * request. This method supports patch semantics. |
2069 * | 2027 * |
2070 * [request] - The metadata request object. | 2028 * [request] - The metadata request object. |
2071 * | 2029 * |
2072 * Request parameters: | 2030 * Request parameters: |
2073 * | 2031 * |
2074 * [project] - Name of the project scoping this request. | 2032 * [project] - Project ID for this request. |
2075 * Value must have pattern | 2033 * Value must have pattern |
2076 * "(?:(?:[-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])?))". | 2034 * "(?:(?:[-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])?))". |
2077 * | 2035 * |
2078 * [region] - Name of the region scoping this request. | 2036 * [firewall] - Name of the firewall resource to update. |
2079 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
2080 * | |
2081 * [forwardingRule] - Name of the ForwardingRule resource in which target is | |
2082 * to be set. | |
2083 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 2037 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
2084 * | 2038 * |
2085 * Completes with a [Operation]. | 2039 * Completes with a [Operation]. |
2086 * | 2040 * |
2087 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2041 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2088 * error. | 2042 * error. |
2089 * | 2043 * |
2090 * If the used [http.Client] completes with an error when making a REST call, | 2044 * If the used [http.Client] completes with an error when making a REST call, |
2091 * this method will complete with the same error. | 2045 * this method will complete with the same error. |
2092 */ | 2046 */ |
2093 async.Future<Operation> setTarget(TargetReference request, core.String project
, core.String region, core.String forwardingRule) { | 2047 async.Future<Operation> patch(Firewall request, core.String project, core.Stri
ng firewall) { |
2094 var _url = null; | 2048 var _url = null; |
2095 var _queryParams = new core.Map(); | 2049 var _queryParams = new core.Map(); |
2096 var _uploadMedia = null; | 2050 var _uploadMedia = null; |
2097 var _uploadOptions = null; | 2051 var _uploadOptions = null; |
2098 var _downloadOptions = commons.DownloadOptions.Metadata; | 2052 var _downloadOptions = commons.DownloadOptions.Metadata; |
2099 var _body = null; | 2053 var _body = null; |
2100 | 2054 |
2101 if (request != null) { | 2055 if (request != null) { |
2102 _body = convert.JSON.encode((request).toJson()); | 2056 _body = convert.JSON.encode((request).toJson()); |
2103 } | 2057 } |
2104 if (project == null) { | 2058 if (project == null) { |
2105 throw new core.ArgumentError("Parameter project is required."); | 2059 throw new core.ArgumentError("Parameter project is required."); |
2106 } | 2060 } |
2107 if (region == null) { | 2061 if (firewall == null) { |
2108 throw new core.ArgumentError("Parameter region is required."); | 2062 throw new core.ArgumentError("Parameter firewall is required."); |
2109 } | |
2110 if (forwardingRule == null) { | |
2111 throw new core.ArgumentError("Parameter forwardingRule is required."); | |
2112 } | 2063 } |
2113 | 2064 |
2114 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/forwardingRules/' + commons.Escaper.ecapeVaria
ble('$forwardingRule') + '/setTarget'; | 2065 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls/' + co
mmons.Escaper.ecapeVariable('$firewall'); |
2115 | 2066 |
2116 var _response = _requester.request(_url, | 2067 var _response = _requester.request(_url, |
2117 "POST", | 2068 "PATCH", |
2118 body: _body, | 2069 body: _body, |
2119 queryParams: _queryParams, | 2070 queryParams: _queryParams, |
2120 uploadOptions: _uploadOptions, | 2071 uploadOptions: _uploadOptions, |
2121 uploadMedia: _uploadMedia, | 2072 uploadMedia: _uploadMedia, |
2122 downloadOptions: _downloadOptions); | 2073 downloadOptions: _downloadOptions); |
2123 return _response.then((data) => new Operation.fromJson(data)); | 2074 return _response.then((data) => new Operation.fromJson(data)); |
2124 } | 2075 } |
2125 | 2076 |
2126 } | |
2127 | |
2128 | |
2129 class GlobalAddressesResourceApi { | |
2130 final commons.ApiRequester _requester; | |
2131 | |
2132 GlobalAddressesResourceApi(commons.ApiRequester client) : | |
2133 _requester = client; | |
2134 | |
2135 /** | 2077 /** |
2136 * Deletes the specified address resource. | 2078 * Updates the specified firewall resource with the data included in the |
| 2079 * request. |
| 2080 * |
| 2081 * [request] - The metadata request object. |
2137 * | 2082 * |
2138 * Request parameters: | 2083 * Request parameters: |
2139 * | 2084 * |
2140 * [project] - Project ID for this request. | 2085 * [project] - Project ID for this request. |
2141 * Value must have pattern | 2086 * Value must have pattern |
2142 * "(?:(?:[-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])?))". | 2087 * "(?:(?:[-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])?))". |
2143 * | 2088 * |
2144 * [address] - Name of the address resource to delete. | 2089 * [firewall] - Name of the firewall resource to update. |
2145 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 2090 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
2146 * | 2091 * |
2147 * Completes with a [Operation]. | 2092 * Completes with a [Operation]. |
2148 * | 2093 * |
2149 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2094 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2150 * error. | 2095 * error. |
2151 * | 2096 * |
2152 * If the used [http.Client] completes with an error when making a REST call, | 2097 * If the used [http.Client] completes with an error when making a REST call, |
2153 * this method will complete with the same error. | 2098 * this method will complete with the same error. |
2154 */ | 2099 */ |
2155 async.Future<Operation> delete(core.String project, core.String address) { | 2100 async.Future<Operation> update(Firewall request, core.String project, core.Str
ing firewall) { |
2156 var _url = null; | 2101 var _url = null; |
2157 var _queryParams = new core.Map(); | 2102 var _queryParams = new core.Map(); |
2158 var _uploadMedia = null; | 2103 var _uploadMedia = null; |
2159 var _uploadOptions = null; | 2104 var _uploadOptions = null; |
2160 var _downloadOptions = commons.DownloadOptions.Metadata; | 2105 var _downloadOptions = commons.DownloadOptions.Metadata; |
2161 var _body = null; | 2106 var _body = null; |
2162 | 2107 |
| 2108 if (request != null) { |
| 2109 _body = convert.JSON.encode((request).toJson()); |
| 2110 } |
2163 if (project == null) { | 2111 if (project == null) { |
2164 throw new core.ArgumentError("Parameter project is required."); | 2112 throw new core.ArgumentError("Parameter project is required."); |
2165 } | 2113 } |
2166 if (address == null) { | 2114 if (firewall == null) { |
2167 throw new core.ArgumentError("Parameter address is required."); | 2115 throw new core.ArgumentError("Parameter firewall is required."); |
2168 } | 2116 } |
2169 | 2117 |
2170 _url = commons.Escaper.ecapeVariable('$project') + '/global/addresses/' + co
mmons.Escaper.ecapeVariable('$address'); | 2118 _url = commons.Escaper.ecapeVariable('$project') + '/global/firewalls/' + co
mmons.Escaper.ecapeVariable('$firewall'); |
2171 | 2119 |
2172 var _response = _requester.request(_url, | 2120 var _response = _requester.request(_url, |
2173 "DELETE", | 2121 "PUT", |
2174 body: _body, | 2122 body: _body, |
2175 queryParams: _queryParams, | 2123 queryParams: _queryParams, |
2176 uploadOptions: _uploadOptions, | 2124 uploadOptions: _uploadOptions, |
2177 uploadMedia: _uploadMedia, | 2125 uploadMedia: _uploadMedia, |
2178 downloadOptions: _downloadOptions); | 2126 downloadOptions: _downloadOptions); |
2179 return _response.then((data) => new Operation.fromJson(data)); | 2127 return _response.then((data) => new Operation.fromJson(data)); |
2180 } | 2128 } |
2181 | 2129 |
| 2130 } |
| 2131 |
| 2132 |
| 2133 class ForwardingRulesResourceApi { |
| 2134 final commons.ApiRequester _requester; |
| 2135 |
| 2136 ForwardingRulesResourceApi(commons.ApiRequester client) : |
| 2137 _requester = client; |
| 2138 |
2182 /** | 2139 /** |
2183 * Returns the specified address resource. | 2140 * Retrieves the list of forwarding rules grouped by scope. |
2184 * | 2141 * |
2185 * Request parameters: | 2142 * Request parameters: |
2186 * | 2143 * |
2187 * [project] - Project ID for this request. | 2144 * [project] - Name of the project scoping this request. |
2188 * Value must have pattern | |
2189 * "(?:(?:[-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])?))". | |
2190 * | |
2191 * [address] - Name of the address resource to return. | |
2192 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
2193 * | |
2194 * Completes with a [Address]. | |
2195 * | |
2196 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
2197 * error. | |
2198 * | |
2199 * If the used [http.Client] completes with an error when making a REST call, | |
2200 * this method will complete with the same error. | |
2201 */ | |
2202 async.Future<Address> get(core.String project, core.String address) { | |
2203 var _url = null; | |
2204 var _queryParams = new core.Map(); | |
2205 var _uploadMedia = null; | |
2206 var _uploadOptions = null; | |
2207 var _downloadOptions = commons.DownloadOptions.Metadata; | |
2208 var _body = null; | |
2209 | |
2210 if (project == null) { | |
2211 throw new core.ArgumentError("Parameter project is required."); | |
2212 } | |
2213 if (address == null) { | |
2214 throw new core.ArgumentError("Parameter address is required."); | |
2215 } | |
2216 | |
2217 _url = commons.Escaper.ecapeVariable('$project') + '/global/addresses/' + co
mmons.Escaper.ecapeVariable('$address'); | |
2218 | |
2219 var _response = _requester.request(_url, | |
2220 "GET", | |
2221 body: _body, | |
2222 queryParams: _queryParams, | |
2223 uploadOptions: _uploadOptions, | |
2224 uploadMedia: _uploadMedia, | |
2225 downloadOptions: _downloadOptions); | |
2226 return _response.then((data) => new Address.fromJson(data)); | |
2227 } | |
2228 | |
2229 /** | |
2230 * Creates an address resource in the specified project using the data | |
2231 * included in the request. | |
2232 * | |
2233 * [request] - The metadata request object. | |
2234 * | |
2235 * Request parameters: | |
2236 * | |
2237 * [project] - Project ID for this request. | |
2238 * Value must have pattern | |
2239 * "(?:(?:[-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])?))". | |
2240 * | |
2241 * Completes with a [Operation]. | |
2242 * | |
2243 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
2244 * error. | |
2245 * | |
2246 * If the used [http.Client] completes with an error when making a REST call, | |
2247 * this method will complete with the same error. | |
2248 */ | |
2249 async.Future<Operation> insert(Address request, core.String project) { | |
2250 var _url = null; | |
2251 var _queryParams = new core.Map(); | |
2252 var _uploadMedia = null; | |
2253 var _uploadOptions = null; | |
2254 var _downloadOptions = commons.DownloadOptions.Metadata; | |
2255 var _body = null; | |
2256 | |
2257 if (request != null) { | |
2258 _body = convert.JSON.encode((request).toJson()); | |
2259 } | |
2260 if (project == null) { | |
2261 throw new core.ArgumentError("Parameter project is required."); | |
2262 } | |
2263 | |
2264 _url = commons.Escaper.ecapeVariable('$project') + '/global/addresses'; | |
2265 | |
2266 var _response = _requester.request(_url, | |
2267 "POST", | |
2268 body: _body, | |
2269 queryParams: _queryParams, | |
2270 uploadOptions: _uploadOptions, | |
2271 uploadMedia: _uploadMedia, | |
2272 downloadOptions: _downloadOptions); | |
2273 return _response.then((data) => new Operation.fromJson(data)); | |
2274 } | |
2275 | |
2276 /** | |
2277 * Retrieves the list of global address resources. | |
2278 * | |
2279 * Request parameters: | |
2280 * | |
2281 * [project] - Project ID for this request. | |
2282 * Value must have pattern | 2145 * Value must have pattern |
2283 * "(?:(?:[-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])?))". | 2146 * "(?:(?:[-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])?))". |
2284 * | 2147 * |
2285 * [filter] - Sets a filter expression for filtering listed resources, in the | 2148 * [filter] - Sets a filter expression for filtering listed resources, in the |
2286 * form filter={expression}. Your {expression} must contain the following: | 2149 * form filter={expression}. Your {expression} must be in the format: |
2287 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 2150 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
2288 * | 2151 * |
2289 * - FIELD_NAME: The name of the field you want to compare. The field name | 2152 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
2290 * must be valid for the type of resource being filtered. Only atomic field | 2153 * field types are supported (string, number, boolean). The COMPARISON_STRING |
2291 * types are supported (string, number, boolean). Array and object fields are | 2154 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
2292 * not currently supported. | 2155 * string value to filter to. The literal value must be valid for the type of |
2293 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 2156 * field (string, number, boolean). For string fields, the literal value is |
2294 * equals). | 2157 * interpreted as a regular expression using RE2 syntax. The literal value |
2295 * - LITERAL_STRING: The literal string value to filter to. The literal value | 2158 * must match the entire field. |
2296 * must be valid for the type of field (string, number, boolean). For string | 2159 * |
2297 * fields, the literal value is interpreted as a regular expression using RE2 | 2160 * For example, filter=name ne example-instance. |
2298 * syntax. The literal value must match the entire field. For example, you | |
2299 * can filter by the name of a resource: | |
2300 * filter=name ne example-instance | |
2301 * The above filter returns only results whose name field does not equal | |
2302 * example-instance. You can also enclose your literal string in single, | |
2303 * double, or no quotes. | |
2304 * | 2161 * |
2305 * [maxResults] - Maximum count of results to be returned. | 2162 * [maxResults] - Maximum count of results to be returned. |
2306 * Value must be between "0" and "500". | 2163 * Value must be between "0" and "500". |
2307 * | 2164 * |
2308 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 2165 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
2309 * to list the next page of results. Set pageToken to the nextPageToken | 2166 * to list the next page of results. Set pageToken to the nextPageToken |
2310 * returned by a previous list request. | 2167 * returned by a previous list request. |
2311 * | 2168 * |
2312 * Completes with a [AddressList]. | 2169 * Completes with a [ForwardingRuleAggregatedList]. |
2313 * | 2170 * |
2314 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2171 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2315 * error. | 2172 * error. |
2316 * | 2173 * |
2317 * If the used [http.Client] completes with an error when making a REST call, | 2174 * If the used [http.Client] completes with an error when making a REST call, |
2318 * this method will complete with the same error. | 2175 * this method will complete with the same error. |
2319 */ | 2176 */ |
2320 async.Future<AddressList> list(core.String project, {core.String filter, core.
int maxResults, core.String pageToken}) { | 2177 async.Future<ForwardingRuleAggregatedList> aggregatedList(core.String project,
{core.String filter, core.int maxResults, core.String pageToken}) { |
2321 var _url = null; | 2178 var _url = null; |
2322 var _queryParams = new core.Map(); | 2179 var _queryParams = new core.Map(); |
2323 var _uploadMedia = null; | 2180 var _uploadMedia = null; |
2324 var _uploadOptions = null; | 2181 var _uploadOptions = null; |
2325 var _downloadOptions = commons.DownloadOptions.Metadata; | 2182 var _downloadOptions = commons.DownloadOptions.Metadata; |
2326 var _body = null; | 2183 var _body = null; |
2327 | 2184 |
2328 if (project == null) { | 2185 if (project == null) { |
2329 throw new core.ArgumentError("Parameter project is required."); | 2186 throw new core.ArgumentError("Parameter project is required."); |
2330 } | 2187 } |
2331 if (filter != null) { | 2188 if (filter != null) { |
2332 _queryParams["filter"] = [filter]; | 2189 _queryParams["filter"] = [filter]; |
2333 } | 2190 } |
2334 if (maxResults != null) { | 2191 if (maxResults != null) { |
2335 _queryParams["maxResults"] = ["${maxResults}"]; | 2192 _queryParams["maxResults"] = ["${maxResults}"]; |
2336 } | 2193 } |
2337 if (pageToken != null) { | 2194 if (pageToken != null) { |
2338 _queryParams["pageToken"] = [pageToken]; | 2195 _queryParams["pageToken"] = [pageToken]; |
2339 } | 2196 } |
2340 | 2197 |
2341 _url = commons.Escaper.ecapeVariable('$project') + '/global/addresses'; | 2198 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/forwardingRu
les'; |
2342 | 2199 |
2343 var _response = _requester.request(_url, | 2200 var _response = _requester.request(_url, |
2344 "GET", | 2201 "GET", |
2345 body: _body, | 2202 body: _body, |
2346 queryParams: _queryParams, | 2203 queryParams: _queryParams, |
2347 uploadOptions: _uploadOptions, | 2204 uploadOptions: _uploadOptions, |
2348 uploadMedia: _uploadMedia, | 2205 uploadMedia: _uploadMedia, |
2349 downloadOptions: _downloadOptions); | 2206 downloadOptions: _downloadOptions); |
2350 return _response.then((data) => new AddressList.fromJson(data)); | 2207 return _response.then((data) => new ForwardingRuleAggregatedList.fromJson(da
ta)); |
2351 } | 2208 } |
2352 | 2209 |
2353 } | |
2354 | |
2355 | |
2356 class GlobalForwardingRulesResourceApi { | |
2357 final commons.ApiRequester _requester; | |
2358 | |
2359 GlobalForwardingRulesResourceApi(commons.ApiRequester client) : | |
2360 _requester = client; | |
2361 | |
2362 /** | 2210 /** |
2363 * Deletes the specified ForwardingRule resource. | 2211 * Deletes the specified ForwardingRule resource. |
2364 * | 2212 * |
2365 * Request parameters: | 2213 * Request parameters: |
2366 * | 2214 * |
2367 * [project] - Name of the project scoping this request. | 2215 * [project] - Name of the project scoping this request. |
2368 * Value must have pattern | 2216 * Value must have pattern |
2369 * "(?:(?:[-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])?))". | 2217 * "(?:(?:[-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])?))". |
2370 * | 2218 * |
| 2219 * [region] - Name of the region scoping this request. |
| 2220 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2221 * |
2371 * [forwardingRule] - Name of the ForwardingRule resource to delete. | 2222 * [forwardingRule] - Name of the ForwardingRule resource to delete. |
2372 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 2223 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
2373 * | 2224 * |
2374 * Completes with a [Operation]. | 2225 * Completes with a [Operation]. |
2375 * | 2226 * |
2376 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2227 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2377 * error. | 2228 * error. |
2378 * | 2229 * |
2379 * If the used [http.Client] completes with an error when making a REST call, | 2230 * If the used [http.Client] completes with an error when making a REST call, |
2380 * this method will complete with the same error. | 2231 * this method will complete with the same error. |
2381 */ | 2232 */ |
2382 async.Future<Operation> delete(core.String project, core.String forwardingRule
) { | 2233 async.Future<Operation> delete(core.String project, core.String region, core.S
tring forwardingRule) { |
2383 var _url = null; | 2234 var _url = null; |
2384 var _queryParams = new core.Map(); | 2235 var _queryParams = new core.Map(); |
2385 var _uploadMedia = null; | 2236 var _uploadMedia = null; |
2386 var _uploadOptions = null; | 2237 var _uploadOptions = null; |
2387 var _downloadOptions = commons.DownloadOptions.Metadata; | 2238 var _downloadOptions = commons.DownloadOptions.Metadata; |
2388 var _body = null; | 2239 var _body = null; |
2389 | 2240 |
2390 if (project == null) { | 2241 if (project == null) { |
2391 throw new core.ArgumentError("Parameter project is required."); | 2242 throw new core.ArgumentError("Parameter project is required."); |
2392 } | 2243 } |
| 2244 if (region == null) { |
| 2245 throw new core.ArgumentError("Parameter region is required."); |
| 2246 } |
2393 if (forwardingRule == null) { | 2247 if (forwardingRule == null) { |
2394 throw new core.ArgumentError("Parameter forwardingRule is required."); | 2248 throw new core.ArgumentError("Parameter forwardingRule is required."); |
2395 } | 2249 } |
2396 | 2250 |
2397 _url = commons.Escaper.ecapeVariable('$project') + '/global/forwardingRules/
' + commons.Escaper.ecapeVariable('$forwardingRule'); | 2251 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/forwardingRules/' + commons.Escaper.ecapeVaria
ble('$forwardingRule'); |
2398 | 2252 |
2399 var _response = _requester.request(_url, | 2253 var _response = _requester.request(_url, |
2400 "DELETE", | 2254 "DELETE", |
2401 body: _body, | 2255 body: _body, |
2402 queryParams: _queryParams, | 2256 queryParams: _queryParams, |
2403 uploadOptions: _uploadOptions, | 2257 uploadOptions: _uploadOptions, |
2404 uploadMedia: _uploadMedia, | 2258 uploadMedia: _uploadMedia, |
2405 downloadOptions: _downloadOptions); | 2259 downloadOptions: _downloadOptions); |
2406 return _response.then((data) => new Operation.fromJson(data)); | 2260 return _response.then((data) => new Operation.fromJson(data)); |
2407 } | 2261 } |
2408 | 2262 |
2409 /** | 2263 /** |
2410 * Returns the specified ForwardingRule resource. | 2264 * Returns the specified ForwardingRule resource. |
2411 * | 2265 * |
2412 * Request parameters: | 2266 * Request parameters: |
2413 * | 2267 * |
2414 * [project] - Name of the project scoping this request. | 2268 * [project] - Name of the project scoping this request. |
2415 * Value must have pattern | 2269 * Value must have pattern |
2416 * "(?:(?:[-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])?))". | 2270 * "(?:(?:[-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])?))". |
2417 * | 2271 * |
| 2272 * [region] - Name of the region scoping this request. |
| 2273 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2274 * |
2418 * [forwardingRule] - Name of the ForwardingRule resource to return. | 2275 * [forwardingRule] - Name of the ForwardingRule resource to return. |
2419 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 2276 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
2420 * | 2277 * |
2421 * Completes with a [ForwardingRule]. | 2278 * Completes with a [ForwardingRule]. |
2422 * | 2279 * |
2423 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2280 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2424 * error. | 2281 * error. |
2425 * | 2282 * |
2426 * If the used [http.Client] completes with an error when making a REST call, | 2283 * If the used [http.Client] completes with an error when making a REST call, |
2427 * this method will complete with the same error. | 2284 * this method will complete with the same error. |
2428 */ | 2285 */ |
2429 async.Future<ForwardingRule> get(core.String project, core.String forwardingRu
le) { | 2286 async.Future<ForwardingRule> get(core.String project, core.String region, core
.String forwardingRule) { |
2430 var _url = null; | 2287 var _url = null; |
2431 var _queryParams = new core.Map(); | 2288 var _queryParams = new core.Map(); |
2432 var _uploadMedia = null; | 2289 var _uploadMedia = null; |
2433 var _uploadOptions = null; | 2290 var _uploadOptions = null; |
2434 var _downloadOptions = commons.DownloadOptions.Metadata; | 2291 var _downloadOptions = commons.DownloadOptions.Metadata; |
2435 var _body = null; | 2292 var _body = null; |
2436 | 2293 |
2437 if (project == null) { | 2294 if (project == null) { |
2438 throw new core.ArgumentError("Parameter project is required."); | 2295 throw new core.ArgumentError("Parameter project is required."); |
2439 } | 2296 } |
| 2297 if (region == null) { |
| 2298 throw new core.ArgumentError("Parameter region is required."); |
| 2299 } |
2440 if (forwardingRule == null) { | 2300 if (forwardingRule == null) { |
2441 throw new core.ArgumentError("Parameter forwardingRule is required."); | 2301 throw new core.ArgumentError("Parameter forwardingRule is required."); |
2442 } | 2302 } |
2443 | 2303 |
2444 _url = commons.Escaper.ecapeVariable('$project') + '/global/forwardingRules/
' + commons.Escaper.ecapeVariable('$forwardingRule'); | 2304 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/forwardingRules/' + commons.Escaper.ecapeVaria
ble('$forwardingRule'); |
2445 | 2305 |
2446 var _response = _requester.request(_url, | 2306 var _response = _requester.request(_url, |
2447 "GET", | 2307 "GET", |
2448 body: _body, | 2308 body: _body, |
2449 queryParams: _queryParams, | 2309 queryParams: _queryParams, |
2450 uploadOptions: _uploadOptions, | 2310 uploadOptions: _uploadOptions, |
2451 uploadMedia: _uploadMedia, | 2311 uploadMedia: _uploadMedia, |
2452 downloadOptions: _downloadOptions); | 2312 downloadOptions: _downloadOptions); |
2453 return _response.then((data) => new ForwardingRule.fromJson(data)); | 2313 return _response.then((data) => new ForwardingRule.fromJson(data)); |
2454 } | 2314 } |
2455 | 2315 |
2456 /** | 2316 /** |
2457 * Creates a ForwardingRule resource in the specified project and region using | 2317 * Creates a ForwardingRule resource in the specified project and region using |
2458 * the data included in the request. | 2318 * the data included in the request. |
2459 * | 2319 * |
2460 * [request] - The metadata request object. | 2320 * [request] - The metadata request object. |
2461 * | 2321 * |
2462 * Request parameters: | 2322 * Request parameters: |
2463 * | 2323 * |
2464 * [project] - Name of the project scoping this request. | 2324 * [project] - Name of the project scoping this request. |
2465 * Value must have pattern | 2325 * Value must have pattern |
2466 * "(?:(?:[-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])?))". | 2326 * "(?:(?:[-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])?))". |
2467 * | 2327 * |
| 2328 * [region] - Name of the region scoping this request. |
| 2329 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2330 * |
2468 * Completes with a [Operation]. | 2331 * Completes with a [Operation]. |
2469 * | 2332 * |
2470 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2333 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2471 * error. | 2334 * error. |
2472 * | 2335 * |
2473 * If the used [http.Client] completes with an error when making a REST call, | 2336 * If the used [http.Client] completes with an error when making a REST call, |
2474 * this method will complete with the same error. | 2337 * this method will complete with the same error. |
2475 */ | 2338 */ |
2476 async.Future<Operation> insert(ForwardingRule request, core.String project) { | 2339 async.Future<Operation> insert(ForwardingRule request, core.String project, co
re.String region) { |
2477 var _url = null; | 2340 var _url = null; |
2478 var _queryParams = new core.Map(); | 2341 var _queryParams = new core.Map(); |
2479 var _uploadMedia = null; | 2342 var _uploadMedia = null; |
2480 var _uploadOptions = null; | 2343 var _uploadOptions = null; |
2481 var _downloadOptions = commons.DownloadOptions.Metadata; | 2344 var _downloadOptions = commons.DownloadOptions.Metadata; |
2482 var _body = null; | 2345 var _body = null; |
2483 | 2346 |
2484 if (request != null) { | 2347 if (request != null) { |
2485 _body = convert.JSON.encode((request).toJson()); | 2348 _body = convert.JSON.encode((request).toJson()); |
2486 } | 2349 } |
2487 if (project == null) { | 2350 if (project == null) { |
2488 throw new core.ArgumentError("Parameter project is required."); | 2351 throw new core.ArgumentError("Parameter project is required."); |
2489 } | 2352 } |
| 2353 if (region == null) { |
| 2354 throw new core.ArgumentError("Parameter region is required."); |
| 2355 } |
2490 | 2356 |
2491 _url = commons.Escaper.ecapeVariable('$project') + '/global/forwardingRules'
; | 2357 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/forwardingRules'; |
2492 | 2358 |
2493 var _response = _requester.request(_url, | 2359 var _response = _requester.request(_url, |
2494 "POST", | 2360 "POST", |
2495 body: _body, | 2361 body: _body, |
2496 queryParams: _queryParams, | 2362 queryParams: _queryParams, |
2497 uploadOptions: _uploadOptions, | 2363 uploadOptions: _uploadOptions, |
2498 uploadMedia: _uploadMedia, | 2364 uploadMedia: _uploadMedia, |
2499 downloadOptions: _downloadOptions); | 2365 downloadOptions: _downloadOptions); |
2500 return _response.then((data) => new Operation.fromJson(data)); | 2366 return _response.then((data) => new Operation.fromJson(data)); |
2501 } | 2367 } |
2502 | 2368 |
2503 /** | 2369 /** |
2504 * Retrieves the list of ForwardingRule resources available to the specified | 2370 * Retrieves the list of ForwardingRule resources available to the specified |
2505 * project. | 2371 * project and region. |
2506 * | 2372 * |
2507 * Request parameters: | 2373 * Request parameters: |
2508 * | 2374 * |
2509 * [project] - Name of the project scoping this request. | 2375 * [project] - Name of the project scoping this request. |
2510 * Value must have pattern | 2376 * Value must have pattern |
2511 * "(?:(?:[-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])?))". | 2377 * "(?:(?:[-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])?))". |
2512 * | 2378 * |
| 2379 * [region] - Name of the region scoping this request. |
| 2380 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2381 * |
2513 * [filter] - Sets a filter expression for filtering listed resources, in the | 2382 * [filter] - Sets a filter expression for filtering listed resources, in the |
2514 * form filter={expression}. Your {expression} must contain the following: | 2383 * form filter={expression}. Your {expression} must be in the format: |
2515 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 2384 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
2516 * | 2385 * |
2517 * - FIELD_NAME: The name of the field you want to compare. The field name | 2386 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
2518 * must be valid for the type of resource being filtered. Only atomic field | 2387 * field types are supported (string, number, boolean). The COMPARISON_STRING |
2519 * types are supported (string, number, boolean). Array and object fields are | 2388 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
2520 * not currently supported. | 2389 * string value to filter to. The literal value must be valid for the type of |
2521 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 2390 * field (string, number, boolean). For string fields, the literal value is |
2522 * equals). | 2391 * interpreted as a regular expression using RE2 syntax. The literal value |
2523 * - LITERAL_STRING: The literal string value to filter to. The literal value | 2392 * must match the entire field. |
2524 * must be valid for the type of field (string, number, boolean). For string | 2393 * |
2525 * fields, the literal value is interpreted as a regular expression using RE2 | 2394 * For example, filter=name ne example-instance. |
2526 * syntax. The literal value must match the entire field. For example, you | |
2527 * can filter by the name of a resource: | |
2528 * filter=name ne example-instance | |
2529 * The above filter returns only results whose name field does not equal | |
2530 * example-instance. You can also enclose your literal string in single, | |
2531 * double, or no quotes. | |
2532 * | 2395 * |
2533 * [maxResults] - Maximum count of results to be returned. | 2396 * [maxResults] - Maximum count of results to be returned. |
2534 * Value must be between "0" and "500". | 2397 * Value must be between "0" and "500". |
2535 * | 2398 * |
2536 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 2399 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
2537 * to list the next page of results. Set pageToken to the nextPageToken | 2400 * to list the next page of results. Set pageToken to the nextPageToken |
2538 * returned by a previous list request. | 2401 * returned by a previous list request. |
2539 * | 2402 * |
2540 * Completes with a [ForwardingRuleList]. | 2403 * Completes with a [ForwardingRuleList]. |
2541 * | 2404 * |
2542 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2405 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2543 * error. | 2406 * error. |
2544 * | 2407 * |
2545 * If the used [http.Client] completes with an error when making a REST call, | 2408 * If the used [http.Client] completes with an error when making a REST call, |
2546 * this method will complete with the same error. | 2409 * this method will complete with the same error. |
2547 */ | 2410 */ |
2548 async.Future<ForwardingRuleList> list(core.String project, {core.String filter
, core.int maxResults, core.String pageToken}) { | 2411 async.Future<ForwardingRuleList> list(core.String project, core.String region,
{core.String filter, core.int maxResults, core.String pageToken}) { |
2549 var _url = null; | 2412 var _url = null; |
2550 var _queryParams = new core.Map(); | 2413 var _queryParams = new core.Map(); |
2551 var _uploadMedia = null; | 2414 var _uploadMedia = null; |
2552 var _uploadOptions = null; | 2415 var _uploadOptions = null; |
2553 var _downloadOptions = commons.DownloadOptions.Metadata; | 2416 var _downloadOptions = commons.DownloadOptions.Metadata; |
2554 var _body = null; | 2417 var _body = null; |
2555 | 2418 |
2556 if (project == null) { | 2419 if (project == null) { |
2557 throw new core.ArgumentError("Parameter project is required."); | 2420 throw new core.ArgumentError("Parameter project is required."); |
2558 } | 2421 } |
| 2422 if (region == null) { |
| 2423 throw new core.ArgumentError("Parameter region is required."); |
| 2424 } |
2559 if (filter != null) { | 2425 if (filter != null) { |
2560 _queryParams["filter"] = [filter]; | 2426 _queryParams["filter"] = [filter]; |
2561 } | 2427 } |
2562 if (maxResults != null) { | 2428 if (maxResults != null) { |
2563 _queryParams["maxResults"] = ["${maxResults}"]; | 2429 _queryParams["maxResults"] = ["${maxResults}"]; |
2564 } | 2430 } |
2565 if (pageToken != null) { | 2431 if (pageToken != null) { |
2566 _queryParams["pageToken"] = [pageToken]; | 2432 _queryParams["pageToken"] = [pageToken]; |
2567 } | 2433 } |
2568 | 2434 |
2569 _url = commons.Escaper.ecapeVariable('$project') + '/global/forwardingRules'
; | 2435 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/forwardingRules'; |
2570 | 2436 |
2571 var _response = _requester.request(_url, | 2437 var _response = _requester.request(_url, |
2572 "GET", | 2438 "GET", |
2573 body: _body, | 2439 body: _body, |
2574 queryParams: _queryParams, | 2440 queryParams: _queryParams, |
2575 uploadOptions: _uploadOptions, | 2441 uploadOptions: _uploadOptions, |
2576 uploadMedia: _uploadMedia, | 2442 uploadMedia: _uploadMedia, |
2577 downloadOptions: _downloadOptions); | 2443 downloadOptions: _downloadOptions); |
2578 return _response.then((data) => new ForwardingRuleList.fromJson(data)); | 2444 return _response.then((data) => new ForwardingRuleList.fromJson(data)); |
2579 } | 2445 } |
2580 | 2446 |
2581 /** | 2447 /** |
2582 * Changes target url for forwarding rule. | 2448 * Changes target url for forwarding rule. |
2583 * | 2449 * |
2584 * [request] - The metadata request object. | 2450 * [request] - The metadata request object. |
2585 * | 2451 * |
2586 * Request parameters: | 2452 * Request parameters: |
2587 * | 2453 * |
2588 * [project] - Name of the project scoping this request. | 2454 * [project] - Name of the project scoping this request. |
2589 * Value must have pattern | 2455 * Value must have pattern |
2590 * "(?:(?:[-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])?))". | 2456 * "(?:(?:[-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])?))". |
2591 * | 2457 * |
| 2458 * [region] - Name of the region scoping this request. |
| 2459 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 2460 * |
2592 * [forwardingRule] - Name of the ForwardingRule resource in which target is | 2461 * [forwardingRule] - Name of the ForwardingRule resource in which target is |
2593 * to be set. | 2462 * to be set. |
2594 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 2463 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
2595 * | 2464 * |
2596 * Completes with a [Operation]. | 2465 * Completes with a [Operation]. |
2597 * | 2466 * |
2598 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2467 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2599 * error. | 2468 * error. |
2600 * | 2469 * |
2601 * If the used [http.Client] completes with an error when making a REST call, | 2470 * If the used [http.Client] completes with an error when making a REST call, |
2602 * this method will complete with the same error. | 2471 * this method will complete with the same error. |
2603 */ | 2472 */ |
2604 async.Future<Operation> setTarget(TargetReference request, core.String project
, core.String forwardingRule) { | 2473 async.Future<Operation> setTarget(TargetReference request, core.String project
, core.String region, core.String forwardingRule) { |
2605 var _url = null; | 2474 var _url = null; |
2606 var _queryParams = new core.Map(); | 2475 var _queryParams = new core.Map(); |
2607 var _uploadMedia = null; | 2476 var _uploadMedia = null; |
2608 var _uploadOptions = null; | 2477 var _uploadOptions = null; |
2609 var _downloadOptions = commons.DownloadOptions.Metadata; | 2478 var _downloadOptions = commons.DownloadOptions.Metadata; |
2610 var _body = null; | 2479 var _body = null; |
2611 | 2480 |
2612 if (request != null) { | 2481 if (request != null) { |
2613 _body = convert.JSON.encode((request).toJson()); | 2482 _body = convert.JSON.encode((request).toJson()); |
2614 } | 2483 } |
2615 if (project == null) { | 2484 if (project == null) { |
2616 throw new core.ArgumentError("Parameter project is required."); | 2485 throw new core.ArgumentError("Parameter project is required."); |
2617 } | 2486 } |
| 2487 if (region == null) { |
| 2488 throw new core.ArgumentError("Parameter region is required."); |
| 2489 } |
2618 if (forwardingRule == null) { | 2490 if (forwardingRule == null) { |
2619 throw new core.ArgumentError("Parameter forwardingRule is required."); | 2491 throw new core.ArgumentError("Parameter forwardingRule is required."); |
2620 } | 2492 } |
2621 | 2493 |
2622 _url = commons.Escaper.ecapeVariable('$project') + '/global/forwardingRules/
' + commons.Escaper.ecapeVariable('$forwardingRule') + '/setTarget'; | 2494 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/forwardingRules/' + commons.Escaper.ecapeVaria
ble('$forwardingRule') + '/setTarget'; |
2623 | 2495 |
2624 var _response = _requester.request(_url, | 2496 var _response = _requester.request(_url, |
2625 "POST", | 2497 "POST", |
2626 body: _body, | 2498 body: _body, |
2627 queryParams: _queryParams, | 2499 queryParams: _queryParams, |
2628 uploadOptions: _uploadOptions, | 2500 uploadOptions: _uploadOptions, |
2629 uploadMedia: _uploadMedia, | 2501 uploadMedia: _uploadMedia, |
2630 downloadOptions: _downloadOptions); | 2502 downloadOptions: _downloadOptions); |
2631 return _response.then((data) => new Operation.fromJson(data)); | 2503 return _response.then((data) => new Operation.fromJson(data)); |
2632 } | 2504 } |
2633 | 2505 |
2634 } | 2506 } |
2635 | 2507 |
2636 | 2508 |
2637 class GlobalOperationsResourceApi { | 2509 class GlobalAddressesResourceApi { |
2638 final commons.ApiRequester _requester; | 2510 final commons.ApiRequester _requester; |
2639 | 2511 |
2640 GlobalOperationsResourceApi(commons.ApiRequester client) : | 2512 GlobalAddressesResourceApi(commons.ApiRequester client) : |
2641 _requester = client; | 2513 _requester = client; |
2642 | 2514 |
2643 /** | 2515 /** |
2644 * Retrieves the list of all operations grouped by scope. | 2516 * Deletes the specified address resource. |
2645 * | 2517 * |
2646 * Request parameters: | 2518 * Request parameters: |
2647 * | 2519 * |
2648 * [project] - Project ID for this request. | 2520 * [project] - Project ID for this request. |
2649 * Value must have pattern | 2521 * Value must have pattern |
2650 * "(?:(?:[-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])?))". | 2522 * "(?:(?:[-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])?))". |
2651 * | 2523 * |
2652 * [filter] - Sets a filter expression for filtering listed resources, in the | 2524 * [address] - Name of the address resource to delete. |
2653 * form filter={expression}. Your {expression} must contain the following: | 2525 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
2654 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
2655 * | 2526 * |
2656 * - FIELD_NAME: The name of the field you want to compare. The field name | 2527 * Completes with a [Operation]. |
2657 * must be valid for the type of resource being filtered. Only atomic field | |
2658 * types are supported (string, number, boolean). Array and object fields are | |
2659 * not currently supported. | |
2660 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
2661 * equals). | |
2662 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
2663 * must be valid for the type of field (string, number, boolean). For string | |
2664 * fields, the literal value is interpreted as a regular expression using RE2 | |
2665 * syntax. The literal value must match the entire field. For example, you | |
2666 * can filter by the name of a resource: | |
2667 * filter=name ne example-instance | |
2668 * The above filter returns only results whose name field does not equal | |
2669 * example-instance. You can also enclose your literal string in single, | |
2670 * double, or no quotes. | |
2671 * | |
2672 * [maxResults] - Maximum count of results to be returned. | |
2673 * Value must be between "0" and "500". | |
2674 * | |
2675 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
2676 * to list the next page of results. Set pageToken to the nextPageToken | |
2677 * returned by a previous list request. | |
2678 * | |
2679 * Completes with a [OperationAggregatedList]. | |
2680 * | 2528 * |
2681 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2529 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2682 * error. | 2530 * error. |
2683 * | 2531 * |
2684 * If the used [http.Client] completes with an error when making a REST call, | 2532 * If the used [http.Client] completes with an error when making a REST call, |
2685 * this method will complete with the same error. | 2533 * this method will complete with the same error. |
2686 */ | 2534 */ |
2687 async.Future<OperationAggregatedList> aggregatedList(core.String project, {cor
e.String filter, core.int maxResults, core.String pageToken}) { | 2535 async.Future<Operation> delete(core.String project, core.String address) { |
2688 var _url = null; | 2536 var _url = null; |
2689 var _queryParams = new core.Map(); | 2537 var _queryParams = new core.Map(); |
2690 var _uploadMedia = null; | 2538 var _uploadMedia = null; |
2691 var _uploadOptions = null; | 2539 var _uploadOptions = null; |
2692 var _downloadOptions = commons.DownloadOptions.Metadata; | 2540 var _downloadOptions = commons.DownloadOptions.Metadata; |
2693 var _body = null; | 2541 var _body = null; |
2694 | 2542 |
2695 if (project == null) { | 2543 if (project == null) { |
2696 throw new core.ArgumentError("Parameter project is required."); | 2544 throw new core.ArgumentError("Parameter project is required."); |
2697 } | 2545 } |
2698 if (filter != null) { | 2546 if (address == null) { |
2699 _queryParams["filter"] = [filter]; | 2547 throw new core.ArgumentError("Parameter address is required."); |
2700 } | |
2701 if (maxResults != null) { | |
2702 _queryParams["maxResults"] = ["${maxResults}"]; | |
2703 } | |
2704 if (pageToken != null) { | |
2705 _queryParams["pageToken"] = [pageToken]; | |
2706 } | 2548 } |
2707 | 2549 |
2708 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/operations'; | 2550 _url = commons.Escaper.ecapeVariable('$project') + '/global/addresses/' + co
mmons.Escaper.ecapeVariable('$address'); |
2709 | 2551 |
2710 var _response = _requester.request(_url, | 2552 var _response = _requester.request(_url, |
2711 "GET", | 2553 "DELETE", |
2712 body: _body, | 2554 body: _body, |
2713 queryParams: _queryParams, | 2555 queryParams: _queryParams, |
2714 uploadOptions: _uploadOptions, | 2556 uploadOptions: _uploadOptions, |
2715 uploadMedia: _uploadMedia, | 2557 uploadMedia: _uploadMedia, |
2716 downloadOptions: _downloadOptions); | 2558 downloadOptions: _downloadOptions); |
2717 return _response.then((data) => new OperationAggregatedList.fromJson(data)); | 2559 return _response.then((data) => new Operation.fromJson(data)); |
2718 } | 2560 } |
2719 | 2561 |
2720 /** | 2562 /** |
2721 * Deletes the specified Operations resource. | 2563 * Returns the specified address resource. |
2722 * | 2564 * |
2723 * Request parameters: | 2565 * Request parameters: |
2724 * | 2566 * |
2725 * [project] - Project ID for this request. | 2567 * [project] - Project ID for this request. |
2726 * Value must have pattern | 2568 * Value must have pattern |
2727 * "(?:(?:[-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])?))". | 2569 * "(?:(?:[-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])?))". |
2728 * | 2570 * |
2729 * [operation] - Name of the Operations resource to delete. | 2571 * [address] - Name of the address resource to return. |
2730 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 2572 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
2731 * | 2573 * |
| 2574 * Completes with a [Address]. |
| 2575 * |
2732 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2576 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2733 * error. | 2577 * error. |
2734 * | 2578 * |
2735 * If the used [http.Client] completes with an error when making a REST call, | 2579 * If the used [http.Client] completes with an error when making a REST call, |
2736 * this method will complete with the same error. | 2580 * this method will complete with the same error. |
2737 */ | 2581 */ |
2738 async.Future delete(core.String project, core.String operation) { | 2582 async.Future<Address> get(core.String project, core.String address) { |
2739 var _url = null; | 2583 var _url = null; |
2740 var _queryParams = new core.Map(); | 2584 var _queryParams = new core.Map(); |
2741 var _uploadMedia = null; | 2585 var _uploadMedia = null; |
2742 var _uploadOptions = null; | 2586 var _uploadOptions = null; |
2743 var _downloadOptions = commons.DownloadOptions.Metadata; | 2587 var _downloadOptions = commons.DownloadOptions.Metadata; |
2744 var _body = null; | 2588 var _body = null; |
2745 | 2589 |
2746 if (project == null) { | 2590 if (project == null) { |
2747 throw new core.ArgumentError("Parameter project is required."); | 2591 throw new core.ArgumentError("Parameter project is required."); |
2748 } | 2592 } |
2749 if (operation == null) { | 2593 if (address == null) { |
2750 throw new core.ArgumentError("Parameter operation is required."); | 2594 throw new core.ArgumentError("Parameter address is required."); |
2751 } | 2595 } |
2752 | 2596 |
2753 _downloadOptions = null; | 2597 _url = commons.Escaper.ecapeVariable('$project') + '/global/addresses/' + co
mmons.Escaper.ecapeVariable('$address'); |
2754 | |
2755 _url = commons.Escaper.ecapeVariable('$project') + '/global/operations/' + c
ommons.Escaper.ecapeVariable('$operation'); | |
2756 | 2598 |
2757 var _response = _requester.request(_url, | 2599 var _response = _requester.request(_url, |
2758 "DELETE", | 2600 "GET", |
2759 body: _body, | 2601 body: _body, |
2760 queryParams: _queryParams, | 2602 queryParams: _queryParams, |
2761 uploadOptions: _uploadOptions, | 2603 uploadOptions: _uploadOptions, |
2762 uploadMedia: _uploadMedia, | 2604 uploadMedia: _uploadMedia, |
2763 downloadOptions: _downloadOptions); | 2605 downloadOptions: _downloadOptions); |
2764 return _response.then((data) => null); | 2606 return _response.then((data) => new Address.fromJson(data)); |
2765 } | 2607 } |
2766 | 2608 |
2767 /** | 2609 /** |
2768 * Retrieves the specified Operations resource. | 2610 * Creates an address resource in the specified project using the data |
| 2611 * included in the request. |
| 2612 * |
| 2613 * [request] - The metadata request object. |
2769 * | 2614 * |
2770 * Request parameters: | 2615 * Request parameters: |
2771 * | 2616 * |
2772 * [project] - Project ID for this request. | 2617 * [project] - Project ID for this request. |
2773 * Value must have pattern | 2618 * Value must have pattern |
2774 * "(?:(?:[-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])?))". | 2619 * "(?:(?:[-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])?))". |
2775 * | 2620 * |
2776 * [operation] - Name of the Operations resource to return. | |
2777 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
2778 * | |
2779 * Completes with a [Operation]. | 2621 * Completes with a [Operation]. |
2780 * | 2622 * |
2781 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2623 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2782 * error. | 2624 * error. |
2783 * | 2625 * |
2784 * If the used [http.Client] completes with an error when making a REST call, | 2626 * If the used [http.Client] completes with an error when making a REST call, |
2785 * this method will complete with the same error. | 2627 * this method will complete with the same error. |
2786 */ | 2628 */ |
2787 async.Future<Operation> get(core.String project, core.String operation) { | 2629 async.Future<Operation> insert(Address request, core.String project) { |
2788 var _url = null; | 2630 var _url = null; |
2789 var _queryParams = new core.Map(); | 2631 var _queryParams = new core.Map(); |
2790 var _uploadMedia = null; | 2632 var _uploadMedia = null; |
2791 var _uploadOptions = null; | 2633 var _uploadOptions = null; |
2792 var _downloadOptions = commons.DownloadOptions.Metadata; | 2634 var _downloadOptions = commons.DownloadOptions.Metadata; |
2793 var _body = null; | 2635 var _body = null; |
2794 | 2636 |
| 2637 if (request != null) { |
| 2638 _body = convert.JSON.encode((request).toJson()); |
| 2639 } |
2795 if (project == null) { | 2640 if (project == null) { |
2796 throw new core.ArgumentError("Parameter project is required."); | 2641 throw new core.ArgumentError("Parameter project is required."); |
2797 } | 2642 } |
2798 if (operation == null) { | |
2799 throw new core.ArgumentError("Parameter operation is required."); | |
2800 } | |
2801 | 2643 |
2802 _url = commons.Escaper.ecapeVariable('$project') + '/global/operations/' + c
ommons.Escaper.ecapeVariable('$operation'); | 2644 _url = commons.Escaper.ecapeVariable('$project') + '/global/addresses'; |
2803 | 2645 |
2804 var _response = _requester.request(_url, | 2646 var _response = _requester.request(_url, |
2805 "GET", | 2647 "POST", |
2806 body: _body, | 2648 body: _body, |
2807 queryParams: _queryParams, | 2649 queryParams: _queryParams, |
2808 uploadOptions: _uploadOptions, | 2650 uploadOptions: _uploadOptions, |
2809 uploadMedia: _uploadMedia, | 2651 uploadMedia: _uploadMedia, |
2810 downloadOptions: _downloadOptions); | 2652 downloadOptions: _downloadOptions); |
2811 return _response.then((data) => new Operation.fromJson(data)); | 2653 return _response.then((data) => new Operation.fromJson(data)); |
2812 } | 2654 } |
2813 | 2655 |
2814 /** | 2656 /** |
2815 * Retrieves the list of Operation resources contained within the specified | 2657 * Retrieves the list of global address resources. |
2816 * project. | |
2817 * | 2658 * |
2818 * Request parameters: | 2659 * Request parameters: |
2819 * | 2660 * |
2820 * [project] - Project ID for this request. | 2661 * [project] - Project ID for this request. |
2821 * Value must have pattern | 2662 * Value must have pattern |
2822 * "(?:(?:[-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])?))". | 2663 * "(?:(?:[-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])?))". |
2823 * | 2664 * |
2824 * [filter] - Sets a filter expression for filtering listed resources, in the | 2665 * [filter] - Sets a filter expression for filtering listed resources, in the |
2825 * form filter={expression}. Your {expression} must contain the following: | 2666 * form filter={expression}. Your {expression} must be in the format: |
2826 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 2667 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
2827 * | 2668 * |
2828 * - FIELD_NAME: The name of the field you want to compare. The field name | 2669 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
2829 * must be valid for the type of resource being filtered. Only atomic field | 2670 * field types are supported (string, number, boolean). The COMPARISON_STRING |
2830 * types are supported (string, number, boolean). Array and object fields are | 2671 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
2831 * not currently supported. | 2672 * string value to filter to. The literal value must be valid for the type of |
2832 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 2673 * field (string, number, boolean). For string fields, the literal value is |
2833 * equals). | 2674 * interpreted as a regular expression using RE2 syntax. The literal value |
2834 * - LITERAL_STRING: The literal string value to filter to. The literal value | 2675 * must match the entire field. |
2835 * must be valid for the type of field (string, number, boolean). For string | 2676 * |
2836 * fields, the literal value is interpreted as a regular expression using RE2 | 2677 * For example, filter=name ne example-instance. |
2837 * syntax. The literal value must match the entire field. For example, you | |
2838 * can filter by the name of a resource: | |
2839 * filter=name ne example-instance | |
2840 * The above filter returns only results whose name field does not equal | |
2841 * example-instance. You can also enclose your literal string in single, | |
2842 * double, or no quotes. | |
2843 * | 2678 * |
2844 * [maxResults] - Maximum count of results to be returned. | 2679 * [maxResults] - Maximum count of results to be returned. |
2845 * Value must be between "0" and "500". | 2680 * Value must be between "0" and "500". |
2846 * | 2681 * |
2847 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 2682 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
2848 * to list the next page of results. Set pageToken to the nextPageToken | 2683 * to list the next page of results. Set pageToken to the nextPageToken |
2849 * returned by a previous list request. | 2684 * returned by a previous list request. |
2850 * | 2685 * |
2851 * Completes with a [OperationList]. | 2686 * Completes with a [AddressList]. |
2852 * | 2687 * |
2853 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2688 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2854 * error. | 2689 * error. |
2855 * | 2690 * |
2856 * If the used [http.Client] completes with an error when making a REST call, | 2691 * If the used [http.Client] completes with an error when making a REST call, |
2857 * this method will complete with the same error. | 2692 * this method will complete with the same error. |
2858 */ | 2693 */ |
2859 async.Future<OperationList> list(core.String project, {core.String filter, cor
e.int maxResults, core.String pageToken}) { | 2694 async.Future<AddressList> list(core.String project, {core.String filter, core.
int maxResults, core.String pageToken}) { |
2860 var _url = null; | 2695 var _url = null; |
2861 var _queryParams = new core.Map(); | 2696 var _queryParams = new core.Map(); |
2862 var _uploadMedia = null; | 2697 var _uploadMedia = null; |
2863 var _uploadOptions = null; | 2698 var _uploadOptions = null; |
2864 var _downloadOptions = commons.DownloadOptions.Metadata; | 2699 var _downloadOptions = commons.DownloadOptions.Metadata; |
2865 var _body = null; | 2700 var _body = null; |
2866 | 2701 |
2867 if (project == null) { | 2702 if (project == null) { |
2868 throw new core.ArgumentError("Parameter project is required."); | 2703 throw new core.ArgumentError("Parameter project is required."); |
2869 } | 2704 } |
2870 if (filter != null) { | 2705 if (filter != null) { |
2871 _queryParams["filter"] = [filter]; | 2706 _queryParams["filter"] = [filter]; |
2872 } | 2707 } |
2873 if (maxResults != null) { | 2708 if (maxResults != null) { |
2874 _queryParams["maxResults"] = ["${maxResults}"]; | 2709 _queryParams["maxResults"] = ["${maxResults}"]; |
2875 } | 2710 } |
2876 if (pageToken != null) { | 2711 if (pageToken != null) { |
2877 _queryParams["pageToken"] = [pageToken]; | 2712 _queryParams["pageToken"] = [pageToken]; |
2878 } | 2713 } |
2879 | 2714 |
2880 _url = commons.Escaper.ecapeVariable('$project') + '/global/operations'; | 2715 _url = commons.Escaper.ecapeVariable('$project') + '/global/addresses'; |
2881 | 2716 |
2882 var _response = _requester.request(_url, | 2717 var _response = _requester.request(_url, |
2883 "GET", | 2718 "GET", |
2884 body: _body, | 2719 body: _body, |
2885 queryParams: _queryParams, | 2720 queryParams: _queryParams, |
2886 uploadOptions: _uploadOptions, | 2721 uploadOptions: _uploadOptions, |
2887 uploadMedia: _uploadMedia, | 2722 uploadMedia: _uploadMedia, |
2888 downloadOptions: _downloadOptions); | 2723 downloadOptions: _downloadOptions); |
2889 return _response.then((data) => new OperationList.fromJson(data)); | 2724 return _response.then((data) => new AddressList.fromJson(data)); |
2890 } | 2725 } |
2891 | 2726 |
2892 } | 2727 } |
2893 | 2728 |
2894 | 2729 |
2895 class HttpHealthChecksResourceApi { | 2730 class GlobalForwardingRulesResourceApi { |
2896 final commons.ApiRequester _requester; | 2731 final commons.ApiRequester _requester; |
2897 | 2732 |
2898 HttpHealthChecksResourceApi(commons.ApiRequester client) : | 2733 GlobalForwardingRulesResourceApi(commons.ApiRequester client) : |
2899 _requester = client; | 2734 _requester = client; |
2900 | 2735 |
2901 /** | 2736 /** |
2902 * Deletes the specified HttpHealthCheck resource. | 2737 * Deletes the specified ForwardingRule resource. |
2903 * | 2738 * |
2904 * Request parameters: | 2739 * Request parameters: |
2905 * | 2740 * |
2906 * [project] - Name of the project scoping this request. | 2741 * [project] - Name of the project scoping this request. |
2907 * Value must have pattern | 2742 * Value must have pattern |
2908 * "(?:(?:[-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])?))". | 2743 * "(?:(?:[-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])?))". |
2909 * | 2744 * |
2910 * [httpHealthCheck] - Name of the HttpHealthCheck resource to delete. | 2745 * [forwardingRule] - Name of the ForwardingRule resource to delete. |
2911 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 2746 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
2912 * | 2747 * |
2913 * Completes with a [Operation]. | 2748 * Completes with a [Operation]. |
2914 * | 2749 * |
2915 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2750 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2916 * error. | 2751 * error. |
2917 * | 2752 * |
2918 * If the used [http.Client] completes with an error when making a REST call, | 2753 * If the used [http.Client] completes with an error when making a REST call, |
2919 * this method will complete with the same error. | 2754 * this method will complete with the same error. |
2920 */ | 2755 */ |
2921 async.Future<Operation> delete(core.String project, core.String httpHealthChec
k) { | 2756 async.Future<Operation> delete(core.String project, core.String forwardingRule
) { |
2922 var _url = null; | 2757 var _url = null; |
2923 var _queryParams = new core.Map(); | 2758 var _queryParams = new core.Map(); |
2924 var _uploadMedia = null; | 2759 var _uploadMedia = null; |
2925 var _uploadOptions = null; | 2760 var _uploadOptions = null; |
2926 var _downloadOptions = commons.DownloadOptions.Metadata; | 2761 var _downloadOptions = commons.DownloadOptions.Metadata; |
2927 var _body = null; | 2762 var _body = null; |
2928 | 2763 |
2929 if (project == null) { | 2764 if (project == null) { |
2930 throw new core.ArgumentError("Parameter project is required."); | 2765 throw new core.ArgumentError("Parameter project is required."); |
2931 } | 2766 } |
2932 if (httpHealthCheck == null) { | 2767 if (forwardingRule == null) { |
2933 throw new core.ArgumentError("Parameter httpHealthCheck is required."); | 2768 throw new core.ArgumentError("Parameter forwardingRule is required."); |
2934 } | 2769 } |
2935 | 2770 |
2936 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
/' + commons.Escaper.ecapeVariable('$httpHealthCheck'); | 2771 _url = commons.Escaper.ecapeVariable('$project') + '/global/forwardingRules/
' + commons.Escaper.ecapeVariable('$forwardingRule'); |
2937 | 2772 |
2938 var _response = _requester.request(_url, | 2773 var _response = _requester.request(_url, |
2939 "DELETE", | 2774 "DELETE", |
2940 body: _body, | 2775 body: _body, |
2941 queryParams: _queryParams, | 2776 queryParams: _queryParams, |
2942 uploadOptions: _uploadOptions, | 2777 uploadOptions: _uploadOptions, |
2943 uploadMedia: _uploadMedia, | 2778 uploadMedia: _uploadMedia, |
2944 downloadOptions: _downloadOptions); | 2779 downloadOptions: _downloadOptions); |
2945 return _response.then((data) => new Operation.fromJson(data)); | 2780 return _response.then((data) => new Operation.fromJson(data)); |
2946 } | 2781 } |
2947 | 2782 |
2948 /** | 2783 /** |
2949 * Returns the specified HttpHealthCheck resource. | 2784 * Returns the specified ForwardingRule resource. |
2950 * | 2785 * |
2951 * Request parameters: | 2786 * Request parameters: |
2952 * | 2787 * |
2953 * [project] - Name of the project scoping this request. | 2788 * [project] - Name of the project scoping this request. |
2954 * Value must have pattern | 2789 * Value must have pattern |
2955 * "(?:(?:[-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])?))". | 2790 * "(?:(?:[-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])?))". |
2956 * | 2791 * |
2957 * [httpHealthCheck] - Name of the HttpHealthCheck resource to return. | 2792 * [forwardingRule] - Name of the ForwardingRule resource to return. |
2958 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 2793 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
2959 * | 2794 * |
2960 * Completes with a [HttpHealthCheck]. | 2795 * Completes with a [ForwardingRule]. |
2961 * | 2796 * |
2962 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2797 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
2963 * error. | 2798 * error. |
2964 * | 2799 * |
2965 * If the used [http.Client] completes with an error when making a REST call, | 2800 * If the used [http.Client] completes with an error when making a REST call, |
2966 * this method will complete with the same error. | 2801 * this method will complete with the same error. |
2967 */ | 2802 */ |
2968 async.Future<HttpHealthCheck> get(core.String project, core.String httpHealthC
heck) { | 2803 async.Future<ForwardingRule> get(core.String project, core.String forwardingRu
le) { |
2969 var _url = null; | 2804 var _url = null; |
2970 var _queryParams = new core.Map(); | 2805 var _queryParams = new core.Map(); |
2971 var _uploadMedia = null; | 2806 var _uploadMedia = null; |
2972 var _uploadOptions = null; | 2807 var _uploadOptions = null; |
2973 var _downloadOptions = commons.DownloadOptions.Metadata; | 2808 var _downloadOptions = commons.DownloadOptions.Metadata; |
2974 var _body = null; | 2809 var _body = null; |
2975 | 2810 |
2976 if (project == null) { | 2811 if (project == null) { |
2977 throw new core.ArgumentError("Parameter project is required."); | 2812 throw new core.ArgumentError("Parameter project is required."); |
2978 } | 2813 } |
2979 if (httpHealthCheck == null) { | 2814 if (forwardingRule == null) { |
2980 throw new core.ArgumentError("Parameter httpHealthCheck is required."); | 2815 throw new core.ArgumentError("Parameter forwardingRule is required."); |
2981 } | 2816 } |
2982 | 2817 |
2983 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
/' + commons.Escaper.ecapeVariable('$httpHealthCheck'); | 2818 _url = commons.Escaper.ecapeVariable('$project') + '/global/forwardingRules/
' + commons.Escaper.ecapeVariable('$forwardingRule'); |
2984 | 2819 |
2985 var _response = _requester.request(_url, | 2820 var _response = _requester.request(_url, |
2986 "GET", | 2821 "GET", |
2987 body: _body, | 2822 body: _body, |
2988 queryParams: _queryParams, | 2823 queryParams: _queryParams, |
2989 uploadOptions: _uploadOptions, | 2824 uploadOptions: _uploadOptions, |
2990 uploadMedia: _uploadMedia, | 2825 uploadMedia: _uploadMedia, |
2991 downloadOptions: _downloadOptions); | 2826 downloadOptions: _downloadOptions); |
2992 return _response.then((data) => new HttpHealthCheck.fromJson(data)); | 2827 return _response.then((data) => new ForwardingRule.fromJson(data)); |
2993 } | 2828 } |
2994 | 2829 |
2995 /** | 2830 /** |
2996 * Creates a HttpHealthCheck resource in the specified project using the data | 2831 * Creates a ForwardingRule resource in the specified project and region using |
2997 * included in the request. | 2832 * the data included in the request. |
2998 * | 2833 * |
2999 * [request] - The metadata request object. | 2834 * [request] - The metadata request object. |
3000 * | 2835 * |
3001 * Request parameters: | 2836 * Request parameters: |
3002 * | 2837 * |
3003 * [project] - Name of the project scoping this request. | 2838 * [project] - Name of the project scoping this request. |
3004 * Value must have pattern | 2839 * Value must have pattern |
3005 * "(?:(?:[-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])?))". | 2840 * "(?:(?:[-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])?))". |
3006 * | 2841 * |
3007 * Completes with a [Operation]. | 2842 * Completes with a [Operation]. |
3008 * | 2843 * |
3009 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2844 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3010 * error. | 2845 * error. |
3011 * | 2846 * |
3012 * If the used [http.Client] completes with an error when making a REST call, | 2847 * If the used [http.Client] completes with an error when making a REST call, |
3013 * this method will complete with the same error. | 2848 * this method will complete with the same error. |
3014 */ | 2849 */ |
3015 async.Future<Operation> insert(HttpHealthCheck request, core.String project) { | 2850 async.Future<Operation> insert(ForwardingRule request, core.String project) { |
3016 var _url = null; | 2851 var _url = null; |
3017 var _queryParams = new core.Map(); | 2852 var _queryParams = new core.Map(); |
3018 var _uploadMedia = null; | 2853 var _uploadMedia = null; |
3019 var _uploadOptions = null; | 2854 var _uploadOptions = null; |
3020 var _downloadOptions = commons.DownloadOptions.Metadata; | 2855 var _downloadOptions = commons.DownloadOptions.Metadata; |
3021 var _body = null; | 2856 var _body = null; |
3022 | 2857 |
3023 if (request != null) { | 2858 if (request != null) { |
3024 _body = convert.JSON.encode((request).toJson()); | 2859 _body = convert.JSON.encode((request).toJson()); |
3025 } | 2860 } |
3026 if (project == null) { | 2861 if (project == null) { |
3027 throw new core.ArgumentError("Parameter project is required."); | 2862 throw new core.ArgumentError("Parameter project is required."); |
3028 } | 2863 } |
3029 | 2864 |
3030 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
'; | 2865 _url = commons.Escaper.ecapeVariable('$project') + '/global/forwardingRules'
; |
3031 | 2866 |
3032 var _response = _requester.request(_url, | 2867 var _response = _requester.request(_url, |
3033 "POST", | 2868 "POST", |
3034 body: _body, | 2869 body: _body, |
3035 queryParams: _queryParams, | 2870 queryParams: _queryParams, |
3036 uploadOptions: _uploadOptions, | 2871 uploadOptions: _uploadOptions, |
3037 uploadMedia: _uploadMedia, | 2872 uploadMedia: _uploadMedia, |
3038 downloadOptions: _downloadOptions); | 2873 downloadOptions: _downloadOptions); |
3039 return _response.then((data) => new Operation.fromJson(data)); | 2874 return _response.then((data) => new Operation.fromJson(data)); |
3040 } | 2875 } |
3041 | 2876 |
3042 /** | 2877 /** |
3043 * Retrieves the list of HttpHealthCheck resources available to the specified | 2878 * Retrieves the list of ForwardingRule resources available to the specified |
3044 * project. | 2879 * project. |
3045 * | 2880 * |
3046 * Request parameters: | 2881 * Request parameters: |
3047 * | 2882 * |
3048 * [project] - Name of the project scoping this request. | 2883 * [project] - Name of the project scoping this request. |
3049 * Value must have pattern | 2884 * Value must have pattern |
3050 * "(?:(?:[-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])?))". | 2885 * "(?:(?:[-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])?))". |
3051 * | 2886 * |
3052 * [filter] - Sets a filter expression for filtering listed resources, in the | 2887 * [filter] - Sets a filter expression for filtering listed resources, in the |
3053 * form filter={expression}. Your {expression} must contain the following: | 2888 * form filter={expression}. Your {expression} must be in the format: |
3054 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 2889 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
3055 * | 2890 * |
3056 * - FIELD_NAME: The name of the field you want to compare. The field name | 2891 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
3057 * must be valid for the type of resource being filtered. Only atomic field | 2892 * field types are supported (string, number, boolean). The COMPARISON_STRING |
3058 * types are supported (string, number, boolean). Array and object fields are | 2893 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
3059 * not currently supported. | 2894 * string value to filter to. The literal value must be valid for the type of |
3060 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 2895 * field (string, number, boolean). For string fields, the literal value is |
3061 * equals). | 2896 * interpreted as a regular expression using RE2 syntax. The literal value |
3062 * - LITERAL_STRING: The literal string value to filter to. The literal value | 2897 * must match the entire field. |
3063 * must be valid for the type of field (string, number, boolean). For string | 2898 * |
3064 * fields, the literal value is interpreted as a regular expression using RE2 | 2899 * For example, filter=name ne example-instance. |
3065 * syntax. The literal value must match the entire field. For example, you | |
3066 * can filter by the name of a resource: | |
3067 * filter=name ne example-instance | |
3068 * The above filter returns only results whose name field does not equal | |
3069 * example-instance. You can also enclose your literal string in single, | |
3070 * double, or no quotes. | |
3071 * | 2900 * |
3072 * [maxResults] - Maximum count of results to be returned. | 2901 * [maxResults] - Maximum count of results to be returned. |
3073 * Value must be between "0" and "500". | 2902 * Value must be between "0" and "500". |
3074 * | 2903 * |
3075 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 2904 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
3076 * to list the next page of results. Set pageToken to the nextPageToken | 2905 * to list the next page of results. Set pageToken to the nextPageToken |
3077 * returned by a previous list request. | 2906 * returned by a previous list request. |
3078 * | 2907 * |
3079 * Completes with a [HttpHealthCheckList]. | 2908 * Completes with a [ForwardingRuleList]. |
3080 * | 2909 * |
3081 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2910 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3082 * error. | 2911 * error. |
3083 * | 2912 * |
3084 * If the used [http.Client] completes with an error when making a REST call, | 2913 * If the used [http.Client] completes with an error when making a REST call, |
3085 * this method will complete with the same error. | 2914 * this method will complete with the same error. |
3086 */ | 2915 */ |
3087 async.Future<HttpHealthCheckList> list(core.String project, {core.String filte
r, core.int maxResults, core.String pageToken}) { | 2916 async.Future<ForwardingRuleList> list(core.String project, {core.String filter
, core.int maxResults, core.String pageToken}) { |
3088 var _url = null; | 2917 var _url = null; |
3089 var _queryParams = new core.Map(); | 2918 var _queryParams = new core.Map(); |
3090 var _uploadMedia = null; | 2919 var _uploadMedia = null; |
3091 var _uploadOptions = null; | 2920 var _uploadOptions = null; |
3092 var _downloadOptions = commons.DownloadOptions.Metadata; | 2921 var _downloadOptions = commons.DownloadOptions.Metadata; |
3093 var _body = null; | 2922 var _body = null; |
3094 | 2923 |
3095 if (project == null) { | 2924 if (project == null) { |
3096 throw new core.ArgumentError("Parameter project is required."); | 2925 throw new core.ArgumentError("Parameter project is required."); |
3097 } | 2926 } |
3098 if (filter != null) { | 2927 if (filter != null) { |
3099 _queryParams["filter"] = [filter]; | 2928 _queryParams["filter"] = [filter]; |
3100 } | 2929 } |
3101 if (maxResults != null) { | 2930 if (maxResults != null) { |
3102 _queryParams["maxResults"] = ["${maxResults}"]; | 2931 _queryParams["maxResults"] = ["${maxResults}"]; |
3103 } | 2932 } |
3104 if (pageToken != null) { | 2933 if (pageToken != null) { |
3105 _queryParams["pageToken"] = [pageToken]; | 2934 _queryParams["pageToken"] = [pageToken]; |
3106 } | 2935 } |
3107 | 2936 |
3108 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
'; | 2937 _url = commons.Escaper.ecapeVariable('$project') + '/global/forwardingRules'
; |
3109 | 2938 |
3110 var _response = _requester.request(_url, | 2939 var _response = _requester.request(_url, |
3111 "GET", | 2940 "GET", |
3112 body: _body, | 2941 body: _body, |
3113 queryParams: _queryParams, | 2942 queryParams: _queryParams, |
3114 uploadOptions: _uploadOptions, | 2943 uploadOptions: _uploadOptions, |
3115 uploadMedia: _uploadMedia, | 2944 uploadMedia: _uploadMedia, |
3116 downloadOptions: _downloadOptions); | 2945 downloadOptions: _downloadOptions); |
3117 return _response.then((data) => new HttpHealthCheckList.fromJson(data)); | 2946 return _response.then((data) => new ForwardingRuleList.fromJson(data)); |
3118 } | 2947 } |
3119 | 2948 |
3120 /** | 2949 /** |
3121 * Updates a HttpHealthCheck resource in the specified project using the data | 2950 * Changes target url for forwarding rule. |
3122 * included in the request. This method supports patch semantics. | |
3123 * | 2951 * |
3124 * [request] - The metadata request object. | 2952 * [request] - The metadata request object. |
3125 * | 2953 * |
3126 * Request parameters: | 2954 * Request parameters: |
3127 * | 2955 * |
3128 * [project] - Name of the project scoping this request. | 2956 * [project] - Name of the project scoping this request. |
3129 * Value must have pattern | 2957 * Value must have pattern |
3130 * "(?:(?:[-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])?))". | 2958 * "(?:(?:[-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])?))". |
3131 * | 2959 * |
3132 * [httpHealthCheck] - Name of the HttpHealthCheck resource to update. | 2960 * [forwardingRule] - Name of the ForwardingRule resource in which target is |
| 2961 * to be set. |
3133 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 2962 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
3134 * | 2963 * |
3135 * Completes with a [Operation]. | 2964 * Completes with a [Operation]. |
3136 * | 2965 * |
3137 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 2966 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3138 * error. | 2967 * error. |
3139 * | 2968 * |
3140 * If the used [http.Client] completes with an error when making a REST call, | 2969 * If the used [http.Client] completes with an error when making a REST call, |
3141 * this method will complete with the same error. | 2970 * this method will complete with the same error. |
3142 */ | 2971 */ |
3143 async.Future<Operation> patch(HttpHealthCheck request, core.String project, co
re.String httpHealthCheck) { | 2972 async.Future<Operation> setTarget(TargetReference request, core.String project
, core.String forwardingRule) { |
3144 var _url = null; | 2973 var _url = null; |
3145 var _queryParams = new core.Map(); | 2974 var _queryParams = new core.Map(); |
3146 var _uploadMedia = null; | 2975 var _uploadMedia = null; |
3147 var _uploadOptions = null; | 2976 var _uploadOptions = null; |
3148 var _downloadOptions = commons.DownloadOptions.Metadata; | 2977 var _downloadOptions = commons.DownloadOptions.Metadata; |
3149 var _body = null; | 2978 var _body = null; |
3150 | 2979 |
3151 if (request != null) { | 2980 if (request != null) { |
3152 _body = convert.JSON.encode((request).toJson()); | 2981 _body = convert.JSON.encode((request).toJson()); |
3153 } | 2982 } |
3154 if (project == null) { | 2983 if (project == null) { |
3155 throw new core.ArgumentError("Parameter project is required."); | 2984 throw new core.ArgumentError("Parameter project is required."); |
3156 } | 2985 } |
3157 if (httpHealthCheck == null) { | 2986 if (forwardingRule == null) { |
3158 throw new core.ArgumentError("Parameter httpHealthCheck is required."); | 2987 throw new core.ArgumentError("Parameter forwardingRule is required."); |
3159 } | 2988 } |
3160 | 2989 |
3161 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
/' + commons.Escaper.ecapeVariable('$httpHealthCheck'); | 2990 _url = commons.Escaper.ecapeVariable('$project') + '/global/forwardingRules/
' + commons.Escaper.ecapeVariable('$forwardingRule') + '/setTarget'; |
3162 | 2991 |
3163 var _response = _requester.request(_url, | 2992 var _response = _requester.request(_url, |
3164 "PATCH", | 2993 "POST", |
3165 body: _body, | 2994 body: _body, |
3166 queryParams: _queryParams, | 2995 queryParams: _queryParams, |
3167 uploadOptions: _uploadOptions, | 2996 uploadOptions: _uploadOptions, |
3168 uploadMedia: _uploadMedia, | 2997 uploadMedia: _uploadMedia, |
3169 downloadOptions: _downloadOptions); | 2998 downloadOptions: _downloadOptions); |
3170 return _response.then((data) => new Operation.fromJson(data)); | 2999 return _response.then((data) => new Operation.fromJson(data)); |
3171 } | 3000 } |
3172 | 3001 |
| 3002 } |
| 3003 |
| 3004 |
| 3005 class GlobalOperationsResourceApi { |
| 3006 final commons.ApiRequester _requester; |
| 3007 |
| 3008 GlobalOperationsResourceApi(commons.ApiRequester client) : |
| 3009 _requester = client; |
| 3010 |
3173 /** | 3011 /** |
3174 * Updates a HttpHealthCheck resource in the specified project using the data | 3012 * Retrieves the list of all operations grouped by scope. |
3175 * included in the request. | |
3176 * | |
3177 * [request] - The metadata request object. | |
3178 * | 3013 * |
3179 * Request parameters: | 3014 * Request parameters: |
3180 * | 3015 * |
3181 * [project] - Name of the project scoping this request. | 3016 * [project] - Project ID for this request. |
3182 * Value must have pattern | 3017 * Value must have pattern |
3183 * "(?:(?:[-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])?))". | 3018 * "(?:(?:[-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])?))". |
3184 * | 3019 * |
3185 * [httpHealthCheck] - Name of the HttpHealthCheck resource to update. | 3020 * [filter] - Sets a filter expression for filtering listed resources, in the |
3186 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 3021 * form filter={expression}. Your {expression} must be in the format: |
| 3022 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
3187 * | 3023 * |
3188 * Completes with a [Operation]. | 3024 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 3025 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 3026 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 3027 * string value to filter to. The literal value must be valid for the type of |
| 3028 * field (string, number, boolean). For string fields, the literal value is |
| 3029 * interpreted as a regular expression using RE2 syntax. The literal value |
| 3030 * must match the entire field. |
| 3031 * |
| 3032 * For example, filter=name ne example-instance. |
| 3033 * |
| 3034 * [maxResults] - Maximum count of results to be returned. |
| 3035 * Value must be between "0" and "500". |
| 3036 * |
| 3037 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 3038 * to list the next page of results. Set pageToken to the nextPageToken |
| 3039 * returned by a previous list request. |
| 3040 * |
| 3041 * Completes with a [OperationAggregatedList]. |
3189 * | 3042 * |
3190 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3043 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3191 * error. | 3044 * error. |
3192 * | 3045 * |
3193 * If the used [http.Client] completes with an error when making a REST call, | 3046 * If the used [http.Client] completes with an error when making a REST call, |
3194 * this method will complete with the same error. | 3047 * this method will complete with the same error. |
3195 */ | 3048 */ |
3196 async.Future<Operation> update(HttpHealthCheck request, core.String project, c
ore.String httpHealthCheck) { | 3049 async.Future<OperationAggregatedList> aggregatedList(core.String project, {cor
e.String filter, core.int maxResults, core.String pageToken}) { |
3197 var _url = null; | 3050 var _url = null; |
3198 var _queryParams = new core.Map(); | 3051 var _queryParams = new core.Map(); |
3199 var _uploadMedia = null; | 3052 var _uploadMedia = null; |
3200 var _uploadOptions = null; | 3053 var _uploadOptions = null; |
3201 var _downloadOptions = commons.DownloadOptions.Metadata; | 3054 var _downloadOptions = commons.DownloadOptions.Metadata; |
3202 var _body = null; | 3055 var _body = null; |
3203 | 3056 |
3204 if (request != null) { | |
3205 _body = convert.JSON.encode((request).toJson()); | |
3206 } | |
3207 if (project == null) { | 3057 if (project == null) { |
3208 throw new core.ArgumentError("Parameter project is required."); | 3058 throw new core.ArgumentError("Parameter project is required."); |
3209 } | 3059 } |
3210 if (httpHealthCheck == null) { | 3060 if (filter != null) { |
3211 throw new core.ArgumentError("Parameter httpHealthCheck is required."); | 3061 _queryParams["filter"] = [filter]; |
| 3062 } |
| 3063 if (maxResults != null) { |
| 3064 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3065 } |
| 3066 if (pageToken != null) { |
| 3067 _queryParams["pageToken"] = [pageToken]; |
3212 } | 3068 } |
3213 | 3069 |
3214 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
/' + commons.Escaper.ecapeVariable('$httpHealthCheck'); | 3070 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/operations'; |
3215 | 3071 |
3216 var _response = _requester.request(_url, | 3072 var _response = _requester.request(_url, |
3217 "PUT", | 3073 "GET", |
3218 body: _body, | 3074 body: _body, |
3219 queryParams: _queryParams, | 3075 queryParams: _queryParams, |
3220 uploadOptions: _uploadOptions, | 3076 uploadOptions: _uploadOptions, |
3221 uploadMedia: _uploadMedia, | 3077 uploadMedia: _uploadMedia, |
3222 downloadOptions: _downloadOptions); | 3078 downloadOptions: _downloadOptions); |
3223 return _response.then((data) => new Operation.fromJson(data)); | 3079 return _response.then((data) => new OperationAggregatedList.fromJson(data)); |
3224 } | 3080 } |
3225 | 3081 |
3226 } | |
3227 | |
3228 | |
3229 class ImagesResourceApi { | |
3230 final commons.ApiRequester _requester; | |
3231 | |
3232 ImagesResourceApi(commons.ApiRequester client) : | |
3233 _requester = client; | |
3234 | |
3235 /** | 3082 /** |
3236 * Deletes the specified image resource. | 3083 * Deletes the specified Operations resource. |
3237 * | 3084 * |
3238 * Request parameters: | 3085 * Request parameters: |
3239 * | 3086 * |
3240 * [project] - Project ID for this request. | 3087 * [project] - Project ID for this request. |
3241 * Value must have pattern | 3088 * Value must have pattern |
3242 * "(?:(?:[-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])?))". | 3089 * "(?:(?:[-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])?))". |
3243 * | 3090 * |
3244 * [image] - Name of the image resource to delete. | 3091 * [operation] - Name of the Operations resource to delete. |
3245 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 3092 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
3246 * | 3093 * |
3247 * Completes with a [Operation]. | |
3248 * | |
3249 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3094 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3250 * error. | 3095 * error. |
3251 * | 3096 * |
3252 * If the used [http.Client] completes with an error when making a REST call, | 3097 * If the used [http.Client] completes with an error when making a REST call, |
3253 * this method will complete with the same error. | 3098 * this method will complete with the same error. |
3254 */ | 3099 */ |
3255 async.Future<Operation> delete(core.String project, core.String image) { | 3100 async.Future delete(core.String project, core.String operation) { |
3256 var _url = null; | 3101 var _url = null; |
3257 var _queryParams = new core.Map(); | 3102 var _queryParams = new core.Map(); |
3258 var _uploadMedia = null; | 3103 var _uploadMedia = null; |
3259 var _uploadOptions = null; | 3104 var _uploadOptions = null; |
3260 var _downloadOptions = commons.DownloadOptions.Metadata; | 3105 var _downloadOptions = commons.DownloadOptions.Metadata; |
3261 var _body = null; | 3106 var _body = null; |
3262 | 3107 |
3263 if (project == null) { | 3108 if (project == null) { |
3264 throw new core.ArgumentError("Parameter project is required."); | 3109 throw new core.ArgumentError("Parameter project is required."); |
3265 } | 3110 } |
3266 if (image == null) { | 3111 if (operation == null) { |
3267 throw new core.ArgumentError("Parameter image is required."); | 3112 throw new core.ArgumentError("Parameter operation is required."); |
3268 } | 3113 } |
3269 | 3114 |
3270 _url = commons.Escaper.ecapeVariable('$project') + '/global/images/' + commo
ns.Escaper.ecapeVariable('$image'); | 3115 _downloadOptions = null; |
| 3116 |
| 3117 _url = commons.Escaper.ecapeVariable('$project') + '/global/operations/' + c
ommons.Escaper.ecapeVariable('$operation'); |
3271 | 3118 |
3272 var _response = _requester.request(_url, | 3119 var _response = _requester.request(_url, |
3273 "DELETE", | 3120 "DELETE", |
3274 body: _body, | 3121 body: _body, |
3275 queryParams: _queryParams, | 3122 queryParams: _queryParams, |
3276 uploadOptions: _uploadOptions, | 3123 uploadOptions: _uploadOptions, |
3277 uploadMedia: _uploadMedia, | 3124 uploadMedia: _uploadMedia, |
3278 downloadOptions: _downloadOptions); | 3125 downloadOptions: _downloadOptions); |
3279 return _response.then((data) => new Operation.fromJson(data)); | 3126 return _response.then((data) => null); |
3280 } | 3127 } |
3281 | 3128 |
3282 /** | 3129 /** |
3283 * Sets the deprecation status of an image. | 3130 * Retrieves the specified Operations resource. |
3284 * | |
3285 * If an empty request body is given, clears the deprecation status instead. | |
3286 * | |
3287 * [request] - The metadata request object. | |
3288 * | 3131 * |
3289 * Request parameters: | 3132 * Request parameters: |
3290 * | 3133 * |
3291 * [project] - Project ID for this request. | 3134 * [project] - Project ID for this request. |
3292 * Value must have pattern | 3135 * Value must have pattern |
3293 * "(?:(?:[-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])?))". | 3136 * "(?:(?:[-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])?))". |
3294 * | 3137 * |
3295 * [image] - Image name. | 3138 * [operation] - Name of the Operations resource to return. |
3296 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 3139 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
3297 * | 3140 * |
3298 * Completes with a [Operation]. | 3141 * Completes with a [Operation]. |
3299 * | 3142 * |
3300 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3143 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3301 * error. | 3144 * error. |
3302 * | 3145 * |
3303 * If the used [http.Client] completes with an error when making a REST call, | 3146 * If the used [http.Client] completes with an error when making a REST call, |
3304 * this method will complete with the same error. | 3147 * this method will complete with the same error. |
3305 */ | 3148 */ |
3306 async.Future<Operation> deprecate(DeprecationStatus request, core.String proje
ct, core.String image) { | 3149 async.Future<Operation> get(core.String project, core.String operation) { |
3307 var _url = null; | 3150 var _url = null; |
3308 var _queryParams = new core.Map(); | 3151 var _queryParams = new core.Map(); |
3309 var _uploadMedia = null; | 3152 var _uploadMedia = null; |
3310 var _uploadOptions = null; | 3153 var _uploadOptions = null; |
3311 var _downloadOptions = commons.DownloadOptions.Metadata; | 3154 var _downloadOptions = commons.DownloadOptions.Metadata; |
3312 var _body = null; | 3155 var _body = null; |
3313 | 3156 |
3314 if (request != null) { | |
3315 _body = convert.JSON.encode((request).toJson()); | |
3316 } | |
3317 if (project == null) { | 3157 if (project == null) { |
3318 throw new core.ArgumentError("Parameter project is required."); | 3158 throw new core.ArgumentError("Parameter project is required."); |
3319 } | 3159 } |
3320 if (image == null) { | 3160 if (operation == null) { |
3321 throw new core.ArgumentError("Parameter image is required."); | 3161 throw new core.ArgumentError("Parameter operation is required."); |
3322 } | 3162 } |
3323 | 3163 |
3324 _url = commons.Escaper.ecapeVariable('$project') + '/global/images/' + commo
ns.Escaper.ecapeVariable('$image') + '/deprecate'; | 3164 _url = commons.Escaper.ecapeVariable('$project') + '/global/operations/' + c
ommons.Escaper.ecapeVariable('$operation'); |
3325 | 3165 |
3326 var _response = _requester.request(_url, | 3166 var _response = _requester.request(_url, |
3327 "POST", | 3167 "GET", |
3328 body: _body, | 3168 body: _body, |
3329 queryParams: _queryParams, | 3169 queryParams: _queryParams, |
3330 uploadOptions: _uploadOptions, | 3170 uploadOptions: _uploadOptions, |
3331 uploadMedia: _uploadMedia, | 3171 uploadMedia: _uploadMedia, |
3332 downloadOptions: _downloadOptions); | 3172 downloadOptions: _downloadOptions); |
3333 return _response.then((data) => new Operation.fromJson(data)); | 3173 return _response.then((data) => new Operation.fromJson(data)); |
3334 } | 3174 } |
3335 | 3175 |
3336 /** | 3176 /** |
3337 * Returns the specified image resource. | 3177 * Retrieves the list of Operation resources contained within the specified |
| 3178 * project. |
3338 * | 3179 * |
3339 * Request parameters: | 3180 * Request parameters: |
3340 * | 3181 * |
3341 * [project] - Project ID for this request. | 3182 * [project] - Project ID for this request. |
3342 * Value must have pattern | 3183 * Value must have pattern |
3343 * "(?:(?:[-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])?))". | 3184 * "(?:(?:[-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])?))". |
3344 * | 3185 * |
3345 * [image] - Name of the image resource to return. | 3186 * [filter] - Sets a filter expression for filtering listed resources, in the |
3346 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 3187 * form filter={expression}. Your {expression} must be in the format: |
| 3188 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
3347 * | 3189 * |
3348 * Completes with a [Image]. | 3190 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 3191 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 3192 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 3193 * string value to filter to. The literal value must be valid for the type of |
| 3194 * field (string, number, boolean). For string fields, the literal value is |
| 3195 * interpreted as a regular expression using RE2 syntax. The literal value |
| 3196 * must match the entire field. |
| 3197 * |
| 3198 * For example, filter=name ne example-instance. |
| 3199 * |
| 3200 * [maxResults] - Maximum count of results to be returned. |
| 3201 * Value must be between "0" and "500". |
| 3202 * |
| 3203 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 3204 * to list the next page of results. Set pageToken to the nextPageToken |
| 3205 * returned by a previous list request. |
| 3206 * |
| 3207 * Completes with a [OperationList]. |
3349 * | 3208 * |
3350 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3209 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3351 * error. | 3210 * error. |
3352 * | 3211 * |
3353 * If the used [http.Client] completes with an error when making a REST call, | 3212 * If the used [http.Client] completes with an error when making a REST call, |
3354 * this method will complete with the same error. | 3213 * this method will complete with the same error. |
3355 */ | 3214 */ |
3356 async.Future<Image> get(core.String project, core.String image) { | 3215 async.Future<OperationList> list(core.String project, {core.String filter, cor
e.int maxResults, core.String pageToken}) { |
3357 var _url = null; | 3216 var _url = null; |
3358 var _queryParams = new core.Map(); | 3217 var _queryParams = new core.Map(); |
3359 var _uploadMedia = null; | 3218 var _uploadMedia = null; |
3360 var _uploadOptions = null; | 3219 var _uploadOptions = null; |
3361 var _downloadOptions = commons.DownloadOptions.Metadata; | 3220 var _downloadOptions = commons.DownloadOptions.Metadata; |
3362 var _body = null; | 3221 var _body = null; |
3363 | 3222 |
3364 if (project == null) { | 3223 if (project == null) { |
3365 throw new core.ArgumentError("Parameter project is required."); | 3224 throw new core.ArgumentError("Parameter project is required."); |
3366 } | 3225 } |
3367 if (image == null) { | 3226 if (filter != null) { |
3368 throw new core.ArgumentError("Parameter image is required."); | 3227 _queryParams["filter"] = [filter]; |
| 3228 } |
| 3229 if (maxResults != null) { |
| 3230 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3231 } |
| 3232 if (pageToken != null) { |
| 3233 _queryParams["pageToken"] = [pageToken]; |
3369 } | 3234 } |
3370 | 3235 |
3371 _url = commons.Escaper.ecapeVariable('$project') + '/global/images/' + commo
ns.Escaper.ecapeVariable('$image'); | 3236 _url = commons.Escaper.ecapeVariable('$project') + '/global/operations'; |
3372 | 3237 |
3373 var _response = _requester.request(_url, | 3238 var _response = _requester.request(_url, |
3374 "GET", | 3239 "GET", |
3375 body: _body, | 3240 body: _body, |
3376 queryParams: _queryParams, | 3241 queryParams: _queryParams, |
3377 uploadOptions: _uploadOptions, | 3242 uploadOptions: _uploadOptions, |
3378 uploadMedia: _uploadMedia, | 3243 uploadMedia: _uploadMedia, |
3379 downloadOptions: _downloadOptions); | 3244 downloadOptions: _downloadOptions); |
3380 return _response.then((data) => new Image.fromJson(data)); | 3245 return _response.then((data) => new OperationList.fromJson(data)); |
3381 } | 3246 } |
3382 | 3247 |
| 3248 } |
| 3249 |
| 3250 |
| 3251 class HttpHealthChecksResourceApi { |
| 3252 final commons.ApiRequester _requester; |
| 3253 |
| 3254 HttpHealthChecksResourceApi(commons.ApiRequester client) : |
| 3255 _requester = client; |
| 3256 |
3383 /** | 3257 /** |
3384 * Creates an image resource in the specified project using the data included | 3258 * Deletes the specified HttpHealthCheck resource. |
3385 * in the request. | |
3386 * | |
3387 * [request] - The metadata request object. | |
3388 * | 3259 * |
3389 * Request parameters: | 3260 * Request parameters: |
3390 * | 3261 * |
3391 * [project] - Project ID for this request. | 3262 * [project] - Name of the project scoping this request. |
3392 * Value must have pattern | 3263 * Value must have pattern |
3393 * "(?:(?:[-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])?))". | 3264 * "(?:(?:[-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])?))". |
3394 * | 3265 * |
| 3266 * [httpHealthCheck] - Name of the HttpHealthCheck resource to delete. |
| 3267 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 3268 * |
3395 * Completes with a [Operation]. | 3269 * Completes with a [Operation]. |
3396 * | 3270 * |
3397 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3271 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3398 * error. | 3272 * error. |
3399 * | 3273 * |
3400 * If the used [http.Client] completes with an error when making a REST call, | 3274 * If the used [http.Client] completes with an error when making a REST call, |
3401 * this method will complete with the same error. | 3275 * this method will complete with the same error. |
3402 */ | 3276 */ |
3403 async.Future<Operation> insert(Image request, core.String project) { | 3277 async.Future<Operation> delete(core.String project, core.String httpHealthChec
k) { |
3404 var _url = null; | 3278 var _url = null; |
3405 var _queryParams = new core.Map(); | 3279 var _queryParams = new core.Map(); |
3406 var _uploadMedia = null; | 3280 var _uploadMedia = null; |
3407 var _uploadOptions = null; | 3281 var _uploadOptions = null; |
3408 var _downloadOptions = commons.DownloadOptions.Metadata; | 3282 var _downloadOptions = commons.DownloadOptions.Metadata; |
3409 var _body = null; | 3283 var _body = null; |
3410 | 3284 |
3411 if (request != null) { | |
3412 _body = convert.JSON.encode((request).toJson()); | |
3413 } | |
3414 if (project == null) { | 3285 if (project == null) { |
3415 throw new core.ArgumentError("Parameter project is required."); | 3286 throw new core.ArgumentError("Parameter project is required."); |
3416 } | 3287 } |
| 3288 if (httpHealthCheck == null) { |
| 3289 throw new core.ArgumentError("Parameter httpHealthCheck is required."); |
| 3290 } |
3417 | 3291 |
3418 _url = commons.Escaper.ecapeVariable('$project') + '/global/images'; | 3292 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
/' + commons.Escaper.ecapeVariable('$httpHealthCheck'); |
3419 | 3293 |
3420 var _response = _requester.request(_url, | 3294 var _response = _requester.request(_url, |
3421 "POST", | 3295 "DELETE", |
3422 body: _body, | 3296 body: _body, |
3423 queryParams: _queryParams, | 3297 queryParams: _queryParams, |
3424 uploadOptions: _uploadOptions, | 3298 uploadOptions: _uploadOptions, |
3425 uploadMedia: _uploadMedia, | 3299 uploadMedia: _uploadMedia, |
3426 downloadOptions: _downloadOptions); | 3300 downloadOptions: _downloadOptions); |
3427 return _response.then((data) => new Operation.fromJson(data)); | 3301 return _response.then((data) => new Operation.fromJson(data)); |
3428 } | 3302 } |
3429 | 3303 |
3430 /** | 3304 /** |
3431 * Retrieves the list of image resources available to the specified project. | 3305 * Returns the specified HttpHealthCheck resource. |
3432 * | 3306 * |
3433 * Request parameters: | 3307 * Request parameters: |
3434 * | 3308 * |
3435 * [project] - Project ID for this request. | 3309 * [project] - Name of the project scoping this request. |
3436 * Value must have pattern | 3310 * Value must have pattern |
3437 * "(?:(?:[-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])?))". | 3311 * "(?:(?:[-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])?))". |
3438 * | 3312 * |
3439 * [filter] - Sets a filter expression for filtering listed resources, in the | 3313 * [httpHealthCheck] - Name of the HttpHealthCheck resource to return. |
3440 * form filter={expression}. Your {expression} must contain the following: | 3314 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
3441 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
3442 * | 3315 * |
3443 * - FIELD_NAME: The name of the field you want to compare. The field name | 3316 * Completes with a [HttpHealthCheck]. |
3444 * must be valid for the type of resource being filtered. Only atomic field | |
3445 * types are supported (string, number, boolean). Array and object fields are | |
3446 * not currently supported. | |
3447 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
3448 * equals). | |
3449 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
3450 * must be valid for the type of field (string, number, boolean). For string | |
3451 * fields, the literal value is interpreted as a regular expression using RE2 | |
3452 * syntax. The literal value must match the entire field. For example, you | |
3453 * can filter by the name of a resource: | |
3454 * filter=name ne example-instance | |
3455 * The above filter returns only results whose name field does not equal | |
3456 * example-instance. You can also enclose your literal string in single, | |
3457 * double, or no quotes. | |
3458 * | |
3459 * [maxResults] - Maximum count of results to be returned. | |
3460 * Value must be between "0" and "500". | |
3461 * | |
3462 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
3463 * to list the next page of results. Set pageToken to the nextPageToken | |
3464 * returned by a previous list request. | |
3465 * | |
3466 * Completes with a [ImageList]. | |
3467 * | 3317 * |
3468 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3318 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3469 * error. | 3319 * error. |
3470 * | 3320 * |
3471 * If the used [http.Client] completes with an error when making a REST call, | 3321 * If the used [http.Client] completes with an error when making a REST call, |
3472 * this method will complete with the same error. | 3322 * this method will complete with the same error. |
3473 */ | 3323 */ |
3474 async.Future<ImageList> list(core.String project, {core.String filter, core.in
t maxResults, core.String pageToken}) { | 3324 async.Future<HttpHealthCheck> get(core.String project, core.String httpHealthC
heck) { |
3475 var _url = null; | 3325 var _url = null; |
3476 var _queryParams = new core.Map(); | 3326 var _queryParams = new core.Map(); |
3477 var _uploadMedia = null; | 3327 var _uploadMedia = null; |
3478 var _uploadOptions = null; | 3328 var _uploadOptions = null; |
3479 var _downloadOptions = commons.DownloadOptions.Metadata; | 3329 var _downloadOptions = commons.DownloadOptions.Metadata; |
3480 var _body = null; | 3330 var _body = null; |
3481 | 3331 |
3482 if (project == null) { | 3332 if (project == null) { |
3483 throw new core.ArgumentError("Parameter project is required."); | 3333 throw new core.ArgumentError("Parameter project is required."); |
3484 } | 3334 } |
3485 if (filter != null) { | 3335 if (httpHealthCheck == null) { |
3486 _queryParams["filter"] = [filter]; | 3336 throw new core.ArgumentError("Parameter httpHealthCheck is required."); |
3487 } | |
3488 if (maxResults != null) { | |
3489 _queryParams["maxResults"] = ["${maxResults}"]; | |
3490 } | |
3491 if (pageToken != null) { | |
3492 _queryParams["pageToken"] = [pageToken]; | |
3493 } | 3337 } |
3494 | 3338 |
3495 _url = commons.Escaper.ecapeVariable('$project') + '/global/images'; | 3339 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
/' + commons.Escaper.ecapeVariable('$httpHealthCheck'); |
3496 | 3340 |
3497 var _response = _requester.request(_url, | 3341 var _response = _requester.request(_url, |
3498 "GET", | 3342 "GET", |
3499 body: _body, | 3343 body: _body, |
3500 queryParams: _queryParams, | 3344 queryParams: _queryParams, |
3501 uploadOptions: _uploadOptions, | 3345 uploadOptions: _uploadOptions, |
3502 uploadMedia: _uploadMedia, | 3346 uploadMedia: _uploadMedia, |
3503 downloadOptions: _downloadOptions); | 3347 downloadOptions: _downloadOptions); |
3504 return _response.then((data) => new ImageList.fromJson(data)); | 3348 return _response.then((data) => new HttpHealthCheck.fromJson(data)); |
3505 } | 3349 } |
3506 | 3350 |
3507 } | |
3508 | |
3509 | |
3510 class InstanceGroupManagersResourceApi { | |
3511 final commons.ApiRequester _requester; | |
3512 | |
3513 InstanceGroupManagersResourceApi(commons.ApiRequester client) : | |
3514 _requester = client; | |
3515 | |
3516 /** | 3351 /** |
3517 * Removes the specified instances from the managed instance group, and from | 3352 * Creates a HttpHealthCheck resource in the specified project using the data |
3518 * any target pools where they are a member. The instances are not deleted. | 3353 * included in the request. |
3519 * The managed instance group automatically reduces its targetSize value by | |
3520 * the number of instances that you abandon from the group. | |
3521 * | 3354 * |
3522 * [request] - The metadata request object. | 3355 * [request] - The metadata request object. |
3523 * | 3356 * |
3524 * Request parameters: | 3357 * Request parameters: |
3525 * | 3358 * |
3526 * [project] - The project ID for this request. | 3359 * [project] - Name of the project scoping this request. |
3527 * Value must have pattern | 3360 * Value must have pattern |
3528 * "(?:(?:[-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])?))". | 3361 * "(?:(?:[-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])?))". |
3529 * | 3362 * |
3530 * [zone] - The URL of the zone where the managed instance group is located. | |
3531 * | |
3532 * [instanceGroupManager] - The name of the instance group manager. | |
3533 * | |
3534 * Completes with a [Operation]. | 3363 * Completes with a [Operation]. |
3535 * | 3364 * |
3536 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3365 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3537 * error. | 3366 * error. |
3538 * | 3367 * |
3539 * If the used [http.Client] completes with an error when making a REST call, | 3368 * If the used [http.Client] completes with an error when making a REST call, |
3540 * this method will complete with the same error. | 3369 * this method will complete with the same error. |
3541 */ | 3370 */ |
3542 async.Future<Operation> abandonInstances(InstanceGroupManagersAbandonInstances
Request request, core.String project, core.String zone, core.String instanceGrou
pManager) { | 3371 async.Future<Operation> insert(HttpHealthCheck request, core.String project) { |
3543 var _url = null; | 3372 var _url = null; |
3544 var _queryParams = new core.Map(); | 3373 var _queryParams = new core.Map(); |
3545 var _uploadMedia = null; | 3374 var _uploadMedia = null; |
3546 var _uploadOptions = null; | 3375 var _uploadOptions = null; |
3547 var _downloadOptions = commons.DownloadOptions.Metadata; | 3376 var _downloadOptions = commons.DownloadOptions.Metadata; |
3548 var _body = null; | 3377 var _body = null; |
3549 | 3378 |
3550 if (request != null) { | 3379 if (request != null) { |
3551 _body = convert.JSON.encode((request).toJson()); | 3380 _body = convert.JSON.encode((request).toJson()); |
3552 } | 3381 } |
3553 if (project == null) { | 3382 if (project == null) { |
3554 throw new core.ArgumentError("Parameter project is required."); | 3383 throw new core.ArgumentError("Parameter project is required."); |
3555 } | 3384 } |
3556 if (zone == null) { | |
3557 throw new core.ArgumentError("Parameter zone is required."); | |
3558 } | |
3559 if (instanceGroupManager == null) { | |
3560 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); | |
3561 } | |
3562 | 3385 |
3563 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/abandonInstances'; | 3386 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
'; |
3564 | 3387 |
3565 var _response = _requester.request(_url, | 3388 var _response = _requester.request(_url, |
3566 "POST", | 3389 "POST", |
3567 body: _body, | 3390 body: _body, |
3568 queryParams: _queryParams, | 3391 queryParams: _queryParams, |
3569 uploadOptions: _uploadOptions, | 3392 uploadOptions: _uploadOptions, |
3570 uploadMedia: _uploadMedia, | 3393 uploadMedia: _uploadMedia, |
3571 downloadOptions: _downloadOptions); | 3394 downloadOptions: _downloadOptions); |
3572 return _response.then((data) => new Operation.fromJson(data)); | 3395 return _response.then((data) => new Operation.fromJson(data)); |
3573 } | 3396 } |
3574 | 3397 |
3575 /** | 3398 /** |
3576 * Retrieves the list of managed instance groups, and groups them by project | 3399 * Retrieves the list of HttpHealthCheck resources available to the specified |
3577 * and zone. | 3400 * project. |
3578 * | 3401 * |
3579 * Request parameters: | 3402 * Request parameters: |
3580 * | 3403 * |
3581 * [project] - The project ID for this request. | 3404 * [project] - Name of the project scoping this request. |
3582 * Value must have pattern | 3405 * Value must have pattern |
3583 * "(?:(?:[-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])?))". | 3406 * "(?:(?:[-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])?))". |
3584 * | 3407 * |
3585 * [filter] - Sets a filter expression for filtering listed resources, in the | 3408 * [filter] - Sets a filter expression for filtering listed resources, in the |
3586 * form filter={expression}. Your {expression} must contain the following: | 3409 * form filter={expression}. Your {expression} must be in the format: |
3587 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 3410 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
3588 * | 3411 * |
3589 * - FIELD_NAME: The name of the field you want to compare. The field name | 3412 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
3590 * must be valid for the type of resource being filtered. Only atomic field | 3413 * field types are supported (string, number, boolean). The COMPARISON_STRING |
3591 * types are supported (string, number, boolean). Array and object fields are | 3414 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
3592 * not currently supported. | 3415 * string value to filter to. The literal value must be valid for the type of |
3593 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 3416 * field (string, number, boolean). For string fields, the literal value is |
3594 * equals). | 3417 * interpreted as a regular expression using RE2 syntax. The literal value |
3595 * - LITERAL_STRING: The literal string value to filter to. The literal value | 3418 * must match the entire field. |
3596 * must be valid for the type of field (string, number, boolean). For string | 3419 * |
3597 * fields, the literal value is interpreted as a regular expression using RE2 | 3420 * For example, filter=name ne example-instance. |
3598 * syntax. The literal value must match the entire field. For example, you | |
3599 * can filter by the name of a resource: | |
3600 * filter=name ne example-instance | |
3601 * The above filter returns only results whose name field does not equal | |
3602 * example-instance. You can also enclose your literal string in single, | |
3603 * double, or no quotes. | |
3604 * | 3421 * |
3605 * [maxResults] - Maximum count of results to be returned. | 3422 * [maxResults] - Maximum count of results to be returned. |
3606 * Value must be between "0" and "500". | 3423 * Value must be between "0" and "500". |
3607 * | 3424 * |
3608 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 3425 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
3609 * to list the next page of results. Set pageToken to the nextPageToken | 3426 * to list the next page of results. Set pageToken to the nextPageToken |
3610 * returned by a previous list request. | 3427 * returned by a previous list request. |
3611 * | 3428 * |
3612 * Completes with a [InstanceGroupManagerAggregatedList]. | 3429 * Completes with a [HttpHealthCheckList]. |
3613 * | 3430 * |
3614 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3431 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3615 * error. | 3432 * error. |
3616 * | 3433 * |
3617 * If the used [http.Client] completes with an error when making a REST call, | 3434 * If the used [http.Client] completes with an error when making a REST call, |
3618 * this method will complete with the same error. | 3435 * this method will complete with the same error. |
3619 */ | 3436 */ |
3620 async.Future<InstanceGroupManagerAggregatedList> aggregatedList(core.String pr
oject, {core.String filter, core.int maxResults, core.String pageToken}) { | 3437 async.Future<HttpHealthCheckList> list(core.String project, {core.String filte
r, core.int maxResults, core.String pageToken}) { |
3621 var _url = null; | 3438 var _url = null; |
3622 var _queryParams = new core.Map(); | 3439 var _queryParams = new core.Map(); |
3623 var _uploadMedia = null; | 3440 var _uploadMedia = null; |
3624 var _uploadOptions = null; | 3441 var _uploadOptions = null; |
3625 var _downloadOptions = commons.DownloadOptions.Metadata; | 3442 var _downloadOptions = commons.DownloadOptions.Metadata; |
3626 var _body = null; | 3443 var _body = null; |
3627 | 3444 |
3628 if (project == null) { | 3445 if (project == null) { |
3629 throw new core.ArgumentError("Parameter project is required."); | 3446 throw new core.ArgumentError("Parameter project is required."); |
3630 } | 3447 } |
3631 if (filter != null) { | 3448 if (filter != null) { |
3632 _queryParams["filter"] = [filter]; | 3449 _queryParams["filter"] = [filter]; |
3633 } | 3450 } |
3634 if (maxResults != null) { | 3451 if (maxResults != null) { |
3635 _queryParams["maxResults"] = ["${maxResults}"]; | 3452 _queryParams["maxResults"] = ["${maxResults}"]; |
3636 } | 3453 } |
3637 if (pageToken != null) { | 3454 if (pageToken != null) { |
3638 _queryParams["pageToken"] = [pageToken]; | 3455 _queryParams["pageToken"] = [pageToken]; |
3639 } | 3456 } |
3640 | 3457 |
3641 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/instanceGrou
pManagers'; | 3458 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
'; |
3642 | 3459 |
3643 var _response = _requester.request(_url, | 3460 var _response = _requester.request(_url, |
3644 "GET", | 3461 "GET", |
3645 body: _body, | 3462 body: _body, |
3646 queryParams: _queryParams, | 3463 queryParams: _queryParams, |
3647 uploadOptions: _uploadOptions, | 3464 uploadOptions: _uploadOptions, |
3648 uploadMedia: _uploadMedia, | 3465 uploadMedia: _uploadMedia, |
3649 downloadOptions: _downloadOptions); | 3466 downloadOptions: _downloadOptions); |
3650 return _response.then((data) => new InstanceGroupManagerAggregatedList.fromJ
son(data)); | 3467 return _response.then((data) => new HttpHealthCheckList.fromJson(data)); |
3651 } | 3468 } |
3652 | 3469 |
3653 /** | 3470 /** |
3654 * Deletes the specified managed instance group resource. | 3471 * Updates a HttpHealthCheck resource in the specified project using the data |
| 3472 * included in the request. This method supports patch semantics. |
| 3473 * |
| 3474 * [request] - The metadata request object. |
3655 * | 3475 * |
3656 * Request parameters: | 3476 * Request parameters: |
3657 * | 3477 * |
3658 * [project] - The project ID for this request. | 3478 * [project] - Name of the project scoping this request. |
3659 * Value must have pattern | 3479 * Value must have pattern |
3660 * "(?:(?:[-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])?))". | 3480 * "(?:(?:[-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])?))". |
3661 * | 3481 * |
3662 * [zone] - The URL of the zone where the managed instance group is located. | 3482 * [httpHealthCheck] - Name of the HttpHealthCheck resource to update. |
3663 * | 3483 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
3664 * [instanceGroupManager] - The name of the instance group manager to delete. | |
3665 * | 3484 * |
3666 * Completes with a [Operation]. | 3485 * Completes with a [Operation]. |
3667 * | 3486 * |
3668 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3487 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3669 * error. | 3488 * error. |
3670 * | 3489 * |
3671 * If the used [http.Client] completes with an error when making a REST call, | 3490 * If the used [http.Client] completes with an error when making a REST call, |
3672 * this method will complete with the same error. | 3491 * this method will complete with the same error. |
3673 */ | 3492 */ |
3674 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing instanceGroupManager) { | 3493 async.Future<Operation> patch(HttpHealthCheck request, core.String project, co
re.String httpHealthCheck) { |
3675 var _url = null; | 3494 var _url = null; |
3676 var _queryParams = new core.Map(); | 3495 var _queryParams = new core.Map(); |
3677 var _uploadMedia = null; | 3496 var _uploadMedia = null; |
3678 var _uploadOptions = null; | 3497 var _uploadOptions = null; |
3679 var _downloadOptions = commons.DownloadOptions.Metadata; | 3498 var _downloadOptions = commons.DownloadOptions.Metadata; |
3680 var _body = null; | 3499 var _body = null; |
3681 | 3500 |
| 3501 if (request != null) { |
| 3502 _body = convert.JSON.encode((request).toJson()); |
| 3503 } |
3682 if (project == null) { | 3504 if (project == null) { |
3683 throw new core.ArgumentError("Parameter project is required."); | 3505 throw new core.ArgumentError("Parameter project is required."); |
3684 } | 3506 } |
3685 if (zone == null) { | 3507 if (httpHealthCheck == null) { |
3686 throw new core.ArgumentError("Parameter zone is required."); | 3508 throw new core.ArgumentError("Parameter httpHealthCheck is required."); |
3687 } | |
3688 if (instanceGroupManager == null) { | |
3689 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); | |
3690 } | 3509 } |
3691 | 3510 |
3692 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager'); | 3511 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
/' + commons.Escaper.ecapeVariable('$httpHealthCheck'); |
3693 | 3512 |
3694 var _response = _requester.request(_url, | 3513 var _response = _requester.request(_url, |
3695 "DELETE", | 3514 "PATCH", |
3696 body: _body, | 3515 body: _body, |
3697 queryParams: _queryParams, | 3516 queryParams: _queryParams, |
3698 uploadOptions: _uploadOptions, | 3517 uploadOptions: _uploadOptions, |
3699 uploadMedia: _uploadMedia, | 3518 uploadMedia: _uploadMedia, |
3700 downloadOptions: _downloadOptions); | 3519 downloadOptions: _downloadOptions); |
3701 return _response.then((data) => new Operation.fromJson(data)); | 3520 return _response.then((data) => new Operation.fromJson(data)); |
3702 } | 3521 } |
3703 | 3522 |
3704 /** | 3523 /** |
3705 * Deletes the specified instances. The instances are deleted and removed from | 3524 * Updates a HttpHealthCheck resource in the specified project using the data |
3706 * the instance group and any target pools where they are a member. The | 3525 * included in the request. |
3707 * managed instance group automatically reduces its targetSize value by the | |
3708 * number of instances that you delete. | |
3709 * | 3526 * |
3710 * [request] - The metadata request object. | 3527 * [request] - The metadata request object. |
3711 * | 3528 * |
3712 * Request parameters: | 3529 * Request parameters: |
3713 * | 3530 * |
3714 * [project] - The project ID for this request. | 3531 * [project] - Name of the project scoping this request. |
3715 * Value must have pattern | 3532 * Value must have pattern |
3716 * "(?:(?:[-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])?))". | 3533 * "(?:(?:[-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])?))". |
3717 * | 3534 * |
3718 * [zone] - The URL of the zone where the managed instance group is located. | 3535 * [httpHealthCheck] - Name of the HttpHealthCheck resource to update. |
3719 * | 3536 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
3720 * [instanceGroupManager] - The name of the instance group manager. | |
3721 * | 3537 * |
3722 * Completes with a [Operation]. | 3538 * Completes with a [Operation]. |
3723 * | 3539 * |
3724 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3540 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3725 * error. | 3541 * error. |
3726 * | 3542 * |
3727 * If the used [http.Client] completes with an error when making a REST call, | 3543 * If the used [http.Client] completes with an error when making a REST call, |
3728 * this method will complete with the same error. | 3544 * this method will complete with the same error. |
3729 */ | 3545 */ |
3730 async.Future<Operation> deleteInstances(InstanceGroupManagersDeleteInstancesRe
quest request, core.String project, core.String zone, core.String instanceGroupM
anager) { | 3546 async.Future<Operation> update(HttpHealthCheck request, core.String project, c
ore.String httpHealthCheck) { |
3731 var _url = null; | 3547 var _url = null; |
3732 var _queryParams = new core.Map(); | 3548 var _queryParams = new core.Map(); |
3733 var _uploadMedia = null; | 3549 var _uploadMedia = null; |
3734 var _uploadOptions = null; | 3550 var _uploadOptions = null; |
3735 var _downloadOptions = commons.DownloadOptions.Metadata; | 3551 var _downloadOptions = commons.DownloadOptions.Metadata; |
3736 var _body = null; | 3552 var _body = null; |
3737 | 3553 |
3738 if (request != null) { | 3554 if (request != null) { |
3739 _body = convert.JSON.encode((request).toJson()); | 3555 _body = convert.JSON.encode((request).toJson()); |
3740 } | 3556 } |
3741 if (project == null) { | 3557 if (project == null) { |
3742 throw new core.ArgumentError("Parameter project is required."); | 3558 throw new core.ArgumentError("Parameter project is required."); |
3743 } | 3559 } |
3744 if (zone == null) { | 3560 if (httpHealthCheck == null) { |
3745 throw new core.ArgumentError("Parameter zone is required."); | 3561 throw new core.ArgumentError("Parameter httpHealthCheck is required."); |
3746 } | |
3747 if (instanceGroupManager == null) { | |
3748 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); | |
3749 } | 3562 } |
3750 | 3563 |
3751 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/deleteInstances'; | 3564 _url = commons.Escaper.ecapeVariable('$project') + '/global/httpHealthChecks
/' + commons.Escaper.ecapeVariable('$httpHealthCheck'); |
3752 | 3565 |
3753 var _response = _requester.request(_url, | 3566 var _response = _requester.request(_url, |
3754 "POST", | 3567 "PUT", |
3755 body: _body, | 3568 body: _body, |
3756 queryParams: _queryParams, | 3569 queryParams: _queryParams, |
3757 uploadOptions: _uploadOptions, | 3570 uploadOptions: _uploadOptions, |
3758 uploadMedia: _uploadMedia, | 3571 uploadMedia: _uploadMedia, |
3759 downloadOptions: _downloadOptions); | 3572 downloadOptions: _downloadOptions); |
3760 return _response.then((data) => new Operation.fromJson(data)); | 3573 return _response.then((data) => new Operation.fromJson(data)); |
3761 } | 3574 } |
3762 | 3575 |
| 3576 } |
| 3577 |
| 3578 |
| 3579 class ImagesResourceApi { |
| 3580 final commons.ApiRequester _requester; |
| 3581 |
| 3582 ImagesResourceApi(commons.ApiRequester client) : |
| 3583 _requester = client; |
| 3584 |
3763 /** | 3585 /** |
3764 * Returns the specified managed instance group resource. | 3586 * Deletes the specified image resource. |
3765 * | 3587 * |
3766 * Request parameters: | 3588 * Request parameters: |
3767 * | 3589 * |
3768 * [project] - The project ID for this request. | 3590 * [project] - Project ID for this request. |
3769 * Value must have pattern | 3591 * Value must have pattern |
3770 * "(?:(?:[-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])?))". | 3592 * "(?:(?:[-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])?))". |
3771 * | 3593 * |
3772 * [zone] - The URL of the zone where the managed instance group is located. | 3594 * [image] - Name of the image resource to delete. |
| 3595 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
3773 * | 3596 * |
3774 * [instanceGroupManager] - The name of the instance group manager resource. | 3597 * Completes with a [Operation]. |
3775 * | |
3776 * Completes with a [InstanceGroupManager]. | |
3777 * | 3598 * |
3778 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3599 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3779 * error. | 3600 * error. |
3780 * | 3601 * |
3781 * If the used [http.Client] completes with an error when making a REST call, | 3602 * If the used [http.Client] completes with an error when making a REST call, |
3782 * this method will complete with the same error. | 3603 * this method will complete with the same error. |
3783 */ | 3604 */ |
3784 async.Future<InstanceGroupManager> get(core.String project, core.String zone,
core.String instanceGroupManager) { | 3605 async.Future<Operation> delete(core.String project, core.String image) { |
3785 var _url = null; | 3606 var _url = null; |
3786 var _queryParams = new core.Map(); | 3607 var _queryParams = new core.Map(); |
3787 var _uploadMedia = null; | 3608 var _uploadMedia = null; |
3788 var _uploadOptions = null; | 3609 var _uploadOptions = null; |
3789 var _downloadOptions = commons.DownloadOptions.Metadata; | 3610 var _downloadOptions = commons.DownloadOptions.Metadata; |
3790 var _body = null; | 3611 var _body = null; |
3791 | 3612 |
3792 if (project == null) { | 3613 if (project == null) { |
3793 throw new core.ArgumentError("Parameter project is required."); | 3614 throw new core.ArgumentError("Parameter project is required."); |
3794 } | 3615 } |
3795 if (zone == null) { | 3616 if (image == null) { |
3796 throw new core.ArgumentError("Parameter zone is required."); | 3617 throw new core.ArgumentError("Parameter image is required."); |
3797 } | |
3798 if (instanceGroupManager == null) { | |
3799 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); | |
3800 } | 3618 } |
3801 | 3619 |
3802 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager'); | 3620 _url = commons.Escaper.ecapeVariable('$project') + '/global/images/' + commo
ns.Escaper.ecapeVariable('$image'); |
3803 | 3621 |
3804 var _response = _requester.request(_url, | 3622 var _response = _requester.request(_url, |
3805 "GET", | 3623 "DELETE", |
3806 body: _body, | 3624 body: _body, |
3807 queryParams: _queryParams, | 3625 queryParams: _queryParams, |
3808 uploadOptions: _uploadOptions, | 3626 uploadOptions: _uploadOptions, |
3809 uploadMedia: _uploadMedia, | 3627 uploadMedia: _uploadMedia, |
3810 downloadOptions: _downloadOptions); | 3628 downloadOptions: _downloadOptions); |
3811 return _response.then((data) => new InstanceGroupManager.fromJson(data)); | 3629 return _response.then((data) => new Operation.fromJson(data)); |
3812 } | 3630 } |
3813 | 3631 |
3814 /** | 3632 /** |
3815 * Creates a managed instance group resource in the specified project using | 3633 * Sets the deprecation status of an image. |
3816 * the data that is included in the request. | 3634 * |
| 3635 * If an empty request body is given, clears the deprecation status instead. |
3817 * | 3636 * |
3818 * [request] - The metadata request object. | 3637 * [request] - The metadata request object. |
3819 * | 3638 * |
3820 * Request parameters: | 3639 * Request parameters: |
3821 * | 3640 * |
3822 * [project] - The project ID for this request. | 3641 * [project] - Project ID for this request. |
3823 * Value must have pattern | 3642 * Value must have pattern |
3824 * "(?:(?:[-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])?))". | 3643 * "(?:(?:[-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])?))". |
3825 * | 3644 * |
3826 * [zone] - The URL of the zone where the managed instance group is located. | 3645 * [image] - Image name. |
| 3646 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
3827 * | 3647 * |
3828 * Completes with a [Operation]. | 3648 * Completes with a [Operation]. |
3829 * | 3649 * |
3830 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3650 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3831 * error. | 3651 * error. |
3832 * | 3652 * |
3833 * If the used [http.Client] completes with an error when making a REST call, | 3653 * If the used [http.Client] completes with an error when making a REST call, |
3834 * this method will complete with the same error. | 3654 * this method will complete with the same error. |
3835 */ | 3655 */ |
3836 async.Future<Operation> insert(InstanceGroupManager request, core.String proje
ct, core.String zone) { | 3656 async.Future<Operation> deprecate(DeprecationStatus request, core.String proje
ct, core.String image) { |
3837 var _url = null; | 3657 var _url = null; |
3838 var _queryParams = new core.Map(); | 3658 var _queryParams = new core.Map(); |
3839 var _uploadMedia = null; | 3659 var _uploadMedia = null; |
3840 var _uploadOptions = null; | 3660 var _uploadOptions = null; |
3841 var _downloadOptions = commons.DownloadOptions.Metadata; | 3661 var _downloadOptions = commons.DownloadOptions.Metadata; |
3842 var _body = null; | 3662 var _body = null; |
3843 | 3663 |
3844 if (request != null) { | 3664 if (request != null) { |
3845 _body = convert.JSON.encode((request).toJson()); | 3665 _body = convert.JSON.encode((request).toJson()); |
3846 } | 3666 } |
3847 if (project == null) { | 3667 if (project == null) { |
3848 throw new core.ArgumentError("Parameter project is required."); | 3668 throw new core.ArgumentError("Parameter project is required."); |
3849 } | 3669 } |
3850 if (zone == null) { | 3670 if (image == null) { |
3851 throw new core.ArgumentError("Parameter zone is required."); | 3671 throw new core.ArgumentError("Parameter image is required."); |
3852 } | 3672 } |
3853 | 3673 |
3854 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers'; | 3674 _url = commons.Escaper.ecapeVariable('$project') + '/global/images/' + commo
ns.Escaper.ecapeVariable('$image') + '/deprecate'; |
3855 | 3675 |
3856 var _response = _requester.request(_url, | 3676 var _response = _requester.request(_url, |
3857 "POST", | 3677 "POST", |
3858 body: _body, | 3678 body: _body, |
3859 queryParams: _queryParams, | 3679 queryParams: _queryParams, |
3860 uploadOptions: _uploadOptions, | 3680 uploadOptions: _uploadOptions, |
3861 uploadMedia: _uploadMedia, | 3681 uploadMedia: _uploadMedia, |
3862 downloadOptions: _downloadOptions); | 3682 downloadOptions: _downloadOptions); |
3863 return _response.then((data) => new Operation.fromJson(data)); | 3683 return _response.then((data) => new Operation.fromJson(data)); |
3864 } | 3684 } |
3865 | 3685 |
3866 /** | 3686 /** |
3867 * Retrieves a list of managed instance groups that are contained within the | 3687 * Returns the specified image resource. |
3868 * specified project and zone. | |
3869 * | 3688 * |
3870 * Request parameters: | 3689 * Request parameters: |
3871 * | 3690 * |
3872 * [project] - The project ID for this request. | 3691 * [project] - Project ID for this request. |
3873 * Value must have pattern | 3692 * Value must have pattern |
3874 * "(?:(?:[-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])?))". | 3693 * "(?:(?:[-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])?))". |
3875 * | 3694 * |
3876 * [zone] - The URL of the zone where the managed instance group is located. | 3695 * [image] - Name of the image resource to return. |
| 3696 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
3877 * | 3697 * |
3878 * [filter] - Sets a filter expression for filtering listed resources, in the | 3698 * Completes with a [Image]. |
3879 * form filter={expression}. Your {expression} must contain the following: | |
3880 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
3881 * | |
3882 * - FIELD_NAME: The name of the field you want to compare. The field name | |
3883 * must be valid for the type of resource being filtered. Only atomic field | |
3884 * types are supported (string, number, boolean). Array and object fields are | |
3885 * not currently supported. | |
3886 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
3887 * equals). | |
3888 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
3889 * must be valid for the type of field (string, number, boolean). For string | |
3890 * fields, the literal value is interpreted as a regular expression using RE2 | |
3891 * syntax. The literal value must match the entire field. For example, you | |
3892 * can filter by the name of a resource: | |
3893 * filter=name ne example-instance | |
3894 * The above filter returns only results whose name field does not equal | |
3895 * example-instance. You can also enclose your literal string in single, | |
3896 * double, or no quotes. | |
3897 * | |
3898 * [maxResults] - Maximum count of results to be returned. | |
3899 * Value must be between "0" and "500". | |
3900 * | |
3901 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
3902 * to list the next page of results. Set pageToken to the nextPageToken | |
3903 * returned by a previous list request. | |
3904 * | |
3905 * Completes with a [InstanceGroupManagerList]. | |
3906 * | 3699 * |
3907 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3700 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3908 * error. | 3701 * error. |
3909 * | 3702 * |
3910 * If the used [http.Client] completes with an error when making a REST call, | 3703 * If the used [http.Client] completes with an error when making a REST call, |
3911 * this method will complete with the same error. | 3704 * this method will complete with the same error. |
3912 */ | 3705 */ |
3913 async.Future<InstanceGroupManagerList> list(core.String project, core.String z
one, {core.String filter, core.int maxResults, core.String pageToken}) { | 3706 async.Future<Image> get(core.String project, core.String image) { |
3914 var _url = null; | 3707 var _url = null; |
3915 var _queryParams = new core.Map(); | 3708 var _queryParams = new core.Map(); |
3916 var _uploadMedia = null; | 3709 var _uploadMedia = null; |
3917 var _uploadOptions = null; | 3710 var _uploadOptions = null; |
3918 var _downloadOptions = commons.DownloadOptions.Metadata; | 3711 var _downloadOptions = commons.DownloadOptions.Metadata; |
3919 var _body = null; | 3712 var _body = null; |
3920 | 3713 |
3921 if (project == null) { | 3714 if (project == null) { |
3922 throw new core.ArgumentError("Parameter project is required."); | 3715 throw new core.ArgumentError("Parameter project is required."); |
3923 } | 3716 } |
3924 if (zone == null) { | 3717 if (image == null) { |
3925 throw new core.ArgumentError("Parameter zone is required."); | 3718 throw new core.ArgumentError("Parameter image is required."); |
3926 } | |
3927 if (filter != null) { | |
3928 _queryParams["filter"] = [filter]; | |
3929 } | |
3930 if (maxResults != null) { | |
3931 _queryParams["maxResults"] = ["${maxResults}"]; | |
3932 } | |
3933 if (pageToken != null) { | |
3934 _queryParams["pageToken"] = [pageToken]; | |
3935 } | 3719 } |
3936 | 3720 |
3937 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers'; | 3721 _url = commons.Escaper.ecapeVariable('$project') + '/global/images/' + commo
ns.Escaper.ecapeVariable('$image'); |
3938 | 3722 |
3939 var _response = _requester.request(_url, | 3723 var _response = _requester.request(_url, |
3940 "GET", | 3724 "GET", |
3941 body: _body, | 3725 body: _body, |
3942 queryParams: _queryParams, | 3726 queryParams: _queryParams, |
3943 uploadOptions: _uploadOptions, | 3727 uploadOptions: _uploadOptions, |
3944 uploadMedia: _uploadMedia, | 3728 uploadMedia: _uploadMedia, |
3945 downloadOptions: _downloadOptions); | 3729 downloadOptions: _downloadOptions); |
3946 return _response.then((data) => new InstanceGroupManagerList.fromJson(data))
; | 3730 return _response.then((data) => new Image.fromJson(data)); |
3947 } | 3731 } |
3948 | 3732 |
3949 /** | 3733 /** |
3950 * Lists managed instances. | 3734 * Creates an image resource in the specified project using the data included |
| 3735 * in the request. |
| 3736 * |
| 3737 * [request] - The metadata request object. |
3951 * | 3738 * |
3952 * Request parameters: | 3739 * Request parameters: |
3953 * | 3740 * |
3954 * [project] - The project ID for this request. | 3741 * [project] - Project ID for this request. |
3955 * Value must have pattern | 3742 * Value must have pattern |
3956 * "(?:(?:[-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])?))". | 3743 * "(?:(?:[-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])?))". |
3957 * | 3744 * |
3958 * [zone] - The URL of the zone where the managed instance group is located. | 3745 * Completes with a [Operation]. |
3959 * | |
3960 * [instanceGroupManager] - The name of the managed instance group. | |
3961 * | |
3962 * Completes with a [InstanceGroupManagersListManagedInstancesResponse]. | |
3963 * | 3746 * |
3964 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3747 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
3965 * error. | 3748 * error. |
3966 * | 3749 * |
3967 * If the used [http.Client] completes with an error when making a REST call, | 3750 * If the used [http.Client] completes with an error when making a REST call, |
3968 * this method will complete with the same error. | 3751 * this method will complete with the same error. |
3969 */ | 3752 */ |
3970 async.Future<InstanceGroupManagersListManagedInstancesResponse> listManagedIns
tances(core.String project, core.String zone, core.String instanceGroupManager)
{ | 3753 async.Future<Operation> insert(Image request, core.String project) { |
3971 var _url = null; | 3754 var _url = null; |
3972 var _queryParams = new core.Map(); | 3755 var _queryParams = new core.Map(); |
3973 var _uploadMedia = null; | 3756 var _uploadMedia = null; |
3974 var _uploadOptions = null; | 3757 var _uploadOptions = null; |
3975 var _downloadOptions = commons.DownloadOptions.Metadata; | 3758 var _downloadOptions = commons.DownloadOptions.Metadata; |
3976 var _body = null; | 3759 var _body = null; |
3977 | 3760 |
| 3761 if (request != null) { |
| 3762 _body = convert.JSON.encode((request).toJson()); |
| 3763 } |
3978 if (project == null) { | 3764 if (project == null) { |
3979 throw new core.ArgumentError("Parameter project is required."); | 3765 throw new core.ArgumentError("Parameter project is required."); |
3980 } | 3766 } |
3981 if (zone == null) { | |
3982 throw new core.ArgumentError("Parameter zone is required."); | |
3983 } | |
3984 if (instanceGroupManager == null) { | |
3985 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); | |
3986 } | |
3987 | 3767 |
3988 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/listManagedInstances'; | 3768 _url = commons.Escaper.ecapeVariable('$project') + '/global/images'; |
3989 | 3769 |
3990 var _response = _requester.request(_url, | 3770 var _response = _requester.request(_url, |
3991 "POST", | 3771 "POST", |
3992 body: _body, | 3772 body: _body, |
3993 queryParams: _queryParams, | 3773 queryParams: _queryParams, |
3994 uploadOptions: _uploadOptions, | 3774 uploadOptions: _uploadOptions, |
3995 uploadMedia: _uploadMedia, | 3775 uploadMedia: _uploadMedia, |
3996 downloadOptions: _downloadOptions); | 3776 downloadOptions: _downloadOptions); |
3997 return _response.then((data) => new InstanceGroupManagersListManagedInstance
sResponse.fromJson(data)); | 3777 return _response.then((data) => new Operation.fromJson(data)); |
3998 } | 3778 } |
3999 | 3779 |
4000 /** | 3780 /** |
4001 * Recreates the specified instances. The instances are deleted, then | 3781 * Retrieves the list of image resources available to the specified project. |
4002 * recreated using the managed instance group's current instance template. | |
4003 * | |
4004 * [request] - The metadata request object. | |
4005 * | 3782 * |
4006 * Request parameters: | 3783 * Request parameters: |
4007 * | 3784 * |
4008 * [project] - The project ID for this request. | 3785 * [project] - Project ID for this request. |
4009 * Value must have pattern | 3786 * Value must have pattern |
4010 * "(?:(?:[-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])?))". | 3787 * "(?:(?:[-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])?))". |
4011 * | 3788 * |
4012 * [zone] - The URL of the zone where the managed instance group is located. | 3789 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 3790 * form filter={expression}. Your {expression} must be in the format: |
| 3791 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
4013 * | 3792 * |
4014 * [instanceGroupManager] - The name of the instance group manager. | 3793 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 3794 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 3795 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 3796 * string value to filter to. The literal value must be valid for the type of |
| 3797 * field (string, number, boolean). For string fields, the literal value is |
| 3798 * interpreted as a regular expression using RE2 syntax. The literal value |
| 3799 * must match the entire field. |
4015 * | 3800 * |
4016 * Completes with a [Operation]. | 3801 * For example, filter=name ne example-instance. |
| 3802 * |
| 3803 * [maxResults] - Maximum count of results to be returned. |
| 3804 * Value must be between "0" and "500". |
| 3805 * |
| 3806 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 3807 * to list the next page of results. Set pageToken to the nextPageToken |
| 3808 * returned by a previous list request. |
| 3809 * |
| 3810 * Completes with a [ImageList]. |
4017 * | 3811 * |
4018 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3812 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4019 * error. | 3813 * error. |
4020 * | 3814 * |
4021 * If the used [http.Client] completes with an error when making a REST call, | 3815 * If the used [http.Client] completes with an error when making a REST call, |
4022 * this method will complete with the same error. | 3816 * this method will complete with the same error. |
4023 */ | 3817 */ |
4024 async.Future<Operation> recreateInstances(InstanceGroupManagersRecreateInstanc
esRequest request, core.String project, core.String zone, core.String instanceGr
oupManager) { | 3818 async.Future<ImageList> list(core.String project, {core.String filter, core.in
t maxResults, core.String pageToken}) { |
4025 var _url = null; | 3819 var _url = null; |
4026 var _queryParams = new core.Map(); | 3820 var _queryParams = new core.Map(); |
4027 var _uploadMedia = null; | 3821 var _uploadMedia = null; |
4028 var _uploadOptions = null; | 3822 var _uploadOptions = null; |
4029 var _downloadOptions = commons.DownloadOptions.Metadata; | 3823 var _downloadOptions = commons.DownloadOptions.Metadata; |
4030 var _body = null; | 3824 var _body = null; |
4031 | 3825 |
4032 if (request != null) { | |
4033 _body = convert.JSON.encode((request).toJson()); | |
4034 } | |
4035 if (project == null) { | 3826 if (project == null) { |
4036 throw new core.ArgumentError("Parameter project is required."); | 3827 throw new core.ArgumentError("Parameter project is required."); |
4037 } | 3828 } |
4038 if (zone == null) { | 3829 if (filter != null) { |
4039 throw new core.ArgumentError("Parameter zone is required."); | 3830 _queryParams["filter"] = [filter]; |
4040 } | 3831 } |
4041 if (instanceGroupManager == null) { | 3832 if (maxResults != null) { |
4042 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); | 3833 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3834 } |
| 3835 if (pageToken != null) { |
| 3836 _queryParams["pageToken"] = [pageToken]; |
4043 } | 3837 } |
4044 | 3838 |
4045 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/recreateInstances'; | 3839 _url = commons.Escaper.ecapeVariable('$project') + '/global/images'; |
4046 | 3840 |
4047 var _response = _requester.request(_url, | 3841 var _response = _requester.request(_url, |
4048 "POST", | 3842 "GET", |
4049 body: _body, | 3843 body: _body, |
4050 queryParams: _queryParams, | 3844 queryParams: _queryParams, |
4051 uploadOptions: _uploadOptions, | 3845 uploadOptions: _uploadOptions, |
4052 uploadMedia: _uploadMedia, | 3846 uploadMedia: _uploadMedia, |
4053 downloadOptions: _downloadOptions); | 3847 downloadOptions: _downloadOptions); |
4054 return _response.then((data) => new Operation.fromJson(data)); | 3848 return _response.then((data) => new ImageList.fromJson(data)); |
4055 } | 3849 } |
4056 | 3850 |
| 3851 } |
| 3852 |
| 3853 |
| 3854 class InstanceGroupManagersResourceApi { |
| 3855 final commons.ApiRequester _requester; |
| 3856 |
| 3857 InstanceGroupManagersResourceApi(commons.ApiRequester client) : |
| 3858 _requester = client; |
| 3859 |
4057 /** | 3860 /** |
4058 * Resizes the managed instance group. If you increase the size, the group | 3861 * Removes the specified instances from the managed instance group, and from |
4059 * creates new instances using the current instance template. If you decrease | 3862 * any target pools where they are a member. The instances are not deleted. |
4060 * the size, the group removes instances in the order that is outlined in | 3863 * The managed instance group automatically reduces its targetSize value by |
4061 * Resizing a managed instance group. | 3864 * the number of instances that you abandon from the group. |
| 3865 * |
| 3866 * [request] - The metadata request object. |
4062 * | 3867 * |
4063 * Request parameters: | 3868 * Request parameters: |
4064 * | 3869 * |
4065 * [project] - The project ID for this request. | 3870 * [project] - The project ID for this request. |
4066 * Value must have pattern | 3871 * Value must have pattern |
4067 * "(?:(?:[-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])?))". | 3872 * "(?:(?:[-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])?))". |
4068 * | 3873 * |
4069 * [zone] - The URL of the zone where the managed instance group is located. | 3874 * [zone] - The URL of the zone where the managed instance group is located. |
4070 * | 3875 * |
4071 * [instanceGroupManager] - The name of the instance group manager. | 3876 * [instanceGroupManager] - The name of the instance group manager. |
4072 * | 3877 * |
4073 * [size] - The number of running instances that the managed instance group | |
4074 * should maintain at any given time. The group automatically adds or removes | |
4075 * instances to maintain the number of instances specified by this parameter. | |
4076 * | |
4077 * Completes with a [Operation]. | 3878 * Completes with a [Operation]. |
4078 * | 3879 * |
4079 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3880 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4080 * error. | 3881 * error. |
4081 * | 3882 * |
4082 * If the used [http.Client] completes with an error when making a REST call, | 3883 * If the used [http.Client] completes with an error when making a REST call, |
4083 * this method will complete with the same error. | 3884 * this method will complete with the same error. |
4084 */ | 3885 */ |
4085 async.Future<Operation> resize(core.String project, core.String zone, core.Str
ing instanceGroupManager, core.int size) { | 3886 async.Future<Operation> abandonInstances(InstanceGroupManagersAbandonInstances
Request request, core.String project, core.String zone, core.String instanceGrou
pManager) { |
4086 var _url = null; | 3887 var _url = null; |
4087 var _queryParams = new core.Map(); | 3888 var _queryParams = new core.Map(); |
4088 var _uploadMedia = null; | 3889 var _uploadMedia = null; |
4089 var _uploadOptions = null; | 3890 var _uploadOptions = null; |
4090 var _downloadOptions = commons.DownloadOptions.Metadata; | 3891 var _downloadOptions = commons.DownloadOptions.Metadata; |
4091 var _body = null; | 3892 var _body = null; |
4092 | 3893 |
| 3894 if (request != null) { |
| 3895 _body = convert.JSON.encode((request).toJson()); |
| 3896 } |
4093 if (project == null) { | 3897 if (project == null) { |
4094 throw new core.ArgumentError("Parameter project is required."); | 3898 throw new core.ArgumentError("Parameter project is required."); |
4095 } | 3899 } |
4096 if (zone == null) { | 3900 if (zone == null) { |
4097 throw new core.ArgumentError("Parameter zone is required."); | 3901 throw new core.ArgumentError("Parameter zone is required."); |
4098 } | 3902 } |
4099 if (instanceGroupManager == null) { | 3903 if (instanceGroupManager == null) { |
4100 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); | 3904 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); |
4101 } | 3905 } |
4102 if (size == null) { | |
4103 throw new core.ArgumentError("Parameter size is required."); | |
4104 } | |
4105 _queryParams["size"] = ["${size}"]; | |
4106 | 3906 |
4107 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/resize'; | 3907 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/abandonInstances'; |
4108 | 3908 |
4109 var _response = _requester.request(_url, | 3909 var _response = _requester.request(_url, |
4110 "POST", | 3910 "POST", |
4111 body: _body, | 3911 body: _body, |
4112 queryParams: _queryParams, | 3912 queryParams: _queryParams, |
4113 uploadOptions: _uploadOptions, | 3913 uploadOptions: _uploadOptions, |
4114 uploadMedia: _uploadMedia, | 3914 uploadMedia: _uploadMedia, |
4115 downloadOptions: _downloadOptions); | 3915 downloadOptions: _downloadOptions); |
4116 return _response.then((data) => new Operation.fromJson(data)); | 3916 return _response.then((data) => new Operation.fromJson(data)); |
4117 } | 3917 } |
4118 | 3918 |
4119 /** | 3919 /** |
4120 * Specifies the instance template to use when creating new instances in this | 3920 * Retrieves the list of managed instance groups, and groups them by project |
4121 * group. The templates for existing instances in the group do not change | 3921 * and zone. |
4122 * unless you recreate them. | |
4123 * | |
4124 * [request] - The metadata request object. | |
4125 * | 3922 * |
4126 * Request parameters: | 3923 * Request parameters: |
4127 * | 3924 * |
4128 * [project] - The project ID for this request. | 3925 * [project] - The project ID for this request. |
4129 * Value must have pattern | 3926 * 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])?))". | 3927 * "(?:(?:[-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 * | 3928 * |
4132 * [zone] - The URL of the zone where the managed instance group is located. | 3929 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 3930 * form filter={expression}. Your {expression} must be in the format: |
| 3931 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
4133 * | 3932 * |
4134 * [instanceGroupManager] - The name of the instance group manager. | 3933 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 3934 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 3935 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 3936 * string value to filter to. The literal value must be valid for the type of |
| 3937 * field (string, number, boolean). For string fields, the literal value is |
| 3938 * interpreted as a regular expression using RE2 syntax. The literal value |
| 3939 * must match the entire field. |
4135 * | 3940 * |
4136 * Completes with a [Operation]. | 3941 * For example, filter=name ne example-instance. |
| 3942 * |
| 3943 * [maxResults] - Maximum count of results to be returned. |
| 3944 * Value must be between "0" and "500". |
| 3945 * |
| 3946 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 3947 * to list the next page of results. Set pageToken to the nextPageToken |
| 3948 * returned by a previous list request. |
| 3949 * |
| 3950 * Completes with a [InstanceGroupManagerAggregatedList]. |
4137 * | 3951 * |
4138 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 3952 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4139 * error. | 3953 * error. |
4140 * | 3954 * |
4141 * If the used [http.Client] completes with an error when making a REST call, | 3955 * If the used [http.Client] completes with an error when making a REST call, |
4142 * this method will complete with the same error. | 3956 * this method will complete with the same error. |
4143 */ | 3957 */ |
4144 async.Future<Operation> setInstanceTemplate(InstanceGroupManagersSetInstanceTe
mplateRequest request, core.String project, core.String zone, core.String instan
ceGroupManager) { | 3958 async.Future<InstanceGroupManagerAggregatedList> aggregatedList(core.String pr
oject, {core.String filter, core.int maxResults, core.String pageToken}) { |
4145 var _url = null; | 3959 var _url = null; |
4146 var _queryParams = new core.Map(); | 3960 var _queryParams = new core.Map(); |
4147 var _uploadMedia = null; | 3961 var _uploadMedia = null; |
4148 var _uploadOptions = null; | 3962 var _uploadOptions = null; |
4149 var _downloadOptions = commons.DownloadOptions.Metadata; | 3963 var _downloadOptions = commons.DownloadOptions.Metadata; |
4150 var _body = null; | 3964 var _body = null; |
4151 | 3965 |
4152 if (request != null) { | |
4153 _body = convert.JSON.encode((request).toJson()); | |
4154 } | |
4155 if (project == null) { | 3966 if (project == null) { |
4156 throw new core.ArgumentError("Parameter project is required."); | 3967 throw new core.ArgumentError("Parameter project is required."); |
4157 } | 3968 } |
4158 if (zone == null) { | 3969 if (filter != null) { |
4159 throw new core.ArgumentError("Parameter zone is required."); | 3970 _queryParams["filter"] = [filter]; |
4160 } | 3971 } |
4161 if (instanceGroupManager == null) { | 3972 if (maxResults != null) { |
4162 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); | 3973 _queryParams["maxResults"] = ["${maxResults}"]; |
| 3974 } |
| 3975 if (pageToken != null) { |
| 3976 _queryParams["pageToken"] = [pageToken]; |
4163 } | 3977 } |
4164 | 3978 |
4165 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/setInstanceTemplate'; | 3979 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/instanceGrou
pManagers'; |
4166 | 3980 |
4167 var _response = _requester.request(_url, | 3981 var _response = _requester.request(_url, |
4168 "POST", | 3982 "GET", |
4169 body: _body, | 3983 body: _body, |
4170 queryParams: _queryParams, | 3984 queryParams: _queryParams, |
4171 uploadOptions: _uploadOptions, | 3985 uploadOptions: _uploadOptions, |
4172 uploadMedia: _uploadMedia, | 3986 uploadMedia: _uploadMedia, |
4173 downloadOptions: _downloadOptions); | 3987 downloadOptions: _downloadOptions); |
4174 return _response.then((data) => new Operation.fromJson(data)); | 3988 return _response.then((data) => new InstanceGroupManagerAggregatedList.fromJ
son(data)); |
4175 } | 3989 } |
4176 | 3990 |
4177 /** | 3991 /** |
4178 * Modifies the target pools to which all new instances in this group are | 3992 * Deletes the specified managed instance group resource. |
4179 * assigned. The target pools for existing instances in the group do not | |
4180 * change unless you recreate them. | |
4181 * | |
4182 * [request] - The metadata request object. | |
4183 * | 3993 * |
4184 * Request parameters: | 3994 * Request parameters: |
4185 * | 3995 * |
4186 * [project] - The project ID for this request. | 3996 * [project] - The project ID for this request. |
4187 * Value must have pattern | 3997 * Value must have pattern |
4188 * "(?:(?:[-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])?))". | 3998 * "(?:(?:[-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])?))". |
4189 * | 3999 * |
4190 * [zone] - The URL of the zone where the managed instance group is located. | 4000 * [zone] - The URL of the zone where the managed instance group is located. |
4191 * | 4001 * |
4192 * [instanceGroupManager] - The name of the instance group manager. | 4002 * [instanceGroupManager] - The name of the instance group manager to delete. |
4193 * | 4003 * |
4194 * Completes with a [Operation]. | 4004 * Completes with a [Operation]. |
4195 * | 4005 * |
4196 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4006 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4197 * error. | 4007 * error. |
4198 * | 4008 * |
4199 * If the used [http.Client] completes with an error when making a REST call, | 4009 * If the used [http.Client] completes with an error when making a REST call, |
4200 * this method will complete with the same error. | 4010 * this method will complete with the same error. |
4201 */ | 4011 */ |
4202 async.Future<Operation> setTargetPools(InstanceGroupManagersSetTargetPoolsRequ
est request, core.String project, core.String zone, core.String instanceGroupMan
ager) { | 4012 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing instanceGroupManager) { |
4203 var _url = null; | 4013 var _url = null; |
4204 var _queryParams = new core.Map(); | 4014 var _queryParams = new core.Map(); |
4205 var _uploadMedia = null; | 4015 var _uploadMedia = null; |
4206 var _uploadOptions = null; | 4016 var _uploadOptions = null; |
4207 var _downloadOptions = commons.DownloadOptions.Metadata; | 4017 var _downloadOptions = commons.DownloadOptions.Metadata; |
4208 var _body = null; | 4018 var _body = null; |
4209 | 4019 |
4210 if (request != null) { | |
4211 _body = convert.JSON.encode((request).toJson()); | |
4212 } | |
4213 if (project == null) { | 4020 if (project == null) { |
4214 throw new core.ArgumentError("Parameter project is required."); | 4021 throw new core.ArgumentError("Parameter project is required."); |
4215 } | 4022 } |
4216 if (zone == null) { | 4023 if (zone == null) { |
4217 throw new core.ArgumentError("Parameter zone is required."); | 4024 throw new core.ArgumentError("Parameter zone is required."); |
4218 } | 4025 } |
4219 if (instanceGroupManager == null) { | 4026 if (instanceGroupManager == null) { |
4220 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); | 4027 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); |
4221 } | 4028 } |
4222 | 4029 |
4223 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/setTargetPools'; | 4030 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager'); |
4224 | 4031 |
4225 var _response = _requester.request(_url, | 4032 var _response = _requester.request(_url, |
4226 "POST", | 4033 "DELETE", |
4227 body: _body, | 4034 body: _body, |
4228 queryParams: _queryParams, | 4035 queryParams: _queryParams, |
4229 uploadOptions: _uploadOptions, | 4036 uploadOptions: _uploadOptions, |
4230 uploadMedia: _uploadMedia, | 4037 uploadMedia: _uploadMedia, |
4231 downloadOptions: _downloadOptions); | 4038 downloadOptions: _downloadOptions); |
4232 return _response.then((data) => new Operation.fromJson(data)); | 4039 return _response.then((data) => new Operation.fromJson(data)); |
4233 } | 4040 } |
4234 | 4041 |
4235 } | |
4236 | |
4237 | |
4238 class InstanceGroupsResourceApi { | |
4239 final commons.ApiRequester _requester; | |
4240 | |
4241 InstanceGroupsResourceApi(commons.ApiRequester client) : | |
4242 _requester = client; | |
4243 | |
4244 /** | 4042 /** |
4245 * Adds a list of instances to an instance group. All of the instances in the | 4043 * Deletes the specified instances. The instances are deleted and removed from |
4246 * instance group must be in the same network. | 4044 * the instance group and any target pools where they are a member. The |
| 4045 * managed instance group automatically reduces its targetSize value by the |
| 4046 * number of instances that you delete. |
4247 * | 4047 * |
4248 * [request] - The metadata request object. | 4048 * [request] - The metadata request object. |
4249 * | 4049 * |
4250 * Request parameters: | 4050 * Request parameters: |
4251 * | 4051 * |
4252 * [project] - The project ID for this request. | 4052 * [project] - The project ID for this request. |
4253 * Value must have pattern | 4053 * Value must have pattern |
4254 * "(?:(?:[-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])?))". | 4054 * "(?:(?:[-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])?))". |
4255 * | 4055 * |
4256 * [zone] - The URL of the zone where the instance group is located. | 4056 * [zone] - The URL of the zone where the managed instance group is located. |
4257 * | 4057 * |
4258 * [instanceGroup] - The name of the instance group where you are adding | 4058 * [instanceGroupManager] - The name of the instance group manager. |
4259 * instances. | |
4260 * | 4059 * |
4261 * Completes with a [Operation]. | 4060 * Completes with a [Operation]. |
4262 * | 4061 * |
4263 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4062 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4264 * error. | 4063 * error. |
4265 * | 4064 * |
4266 * If the used [http.Client] completes with an error when making a REST call, | 4065 * If the used [http.Client] completes with an error when making a REST call, |
4267 * this method will complete with the same error. | 4066 * this method will complete with the same error. |
4268 */ | 4067 */ |
4269 async.Future<Operation> addInstances(InstanceGroupsAddInstancesRequest request
, core.String project, core.String zone, core.String instanceGroup) { | 4068 async.Future<Operation> deleteInstances(InstanceGroupManagersDeleteInstancesRe
quest request, core.String project, core.String zone, core.String instanceGroupM
anager) { |
4270 var _url = null; | 4069 var _url = null; |
4271 var _queryParams = new core.Map(); | 4070 var _queryParams = new core.Map(); |
4272 var _uploadMedia = null; | 4071 var _uploadMedia = null; |
4273 var _uploadOptions = null; | 4072 var _uploadOptions = null; |
4274 var _downloadOptions = commons.DownloadOptions.Metadata; | 4073 var _downloadOptions = commons.DownloadOptions.Metadata; |
4275 var _body = null; | 4074 var _body = null; |
4276 | 4075 |
4277 if (request != null) { | 4076 if (request != null) { |
4278 _body = convert.JSON.encode((request).toJson()); | 4077 _body = convert.JSON.encode((request).toJson()); |
4279 } | 4078 } |
4280 if (project == null) { | 4079 if (project == null) { |
4281 throw new core.ArgumentError("Parameter project is required."); | 4080 throw new core.ArgumentError("Parameter project is required."); |
4282 } | 4081 } |
4283 if (zone == null) { | 4082 if (zone == null) { |
4284 throw new core.ArgumentError("Parameter zone is required."); | 4083 throw new core.ArgumentError("Parameter zone is required."); |
4285 } | 4084 } |
4286 if (instanceGroup == null) { | 4085 if (instanceGroupManager == null) { |
4287 throw new core.ArgumentError("Parameter instanceGroup is required."); | 4086 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); |
4288 } | 4087 } |
4289 | 4088 |
4290 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup') + '/addInstances'; | 4089 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/deleteInstances'; |
4291 | 4090 |
4292 var _response = _requester.request(_url, | 4091 var _response = _requester.request(_url, |
4293 "POST", | 4092 "POST", |
4294 body: _body, | 4093 body: _body, |
4295 queryParams: _queryParams, | 4094 queryParams: _queryParams, |
4296 uploadOptions: _uploadOptions, | 4095 uploadOptions: _uploadOptions, |
4297 uploadMedia: _uploadMedia, | 4096 uploadMedia: _uploadMedia, |
4298 downloadOptions: _downloadOptions); | 4097 downloadOptions: _downloadOptions); |
4299 return _response.then((data) => new Operation.fromJson(data)); | 4098 return _response.then((data) => new Operation.fromJson(data)); |
4300 } | 4099 } |
4301 | 4100 |
4302 /** | 4101 /** |
4303 * Retrieves the list of instance groups, and sorts them by zone. | 4102 * Returns the specified managed instance group resource. |
4304 * | 4103 * |
4305 * Request parameters: | 4104 * Request parameters: |
4306 * | 4105 * |
4307 * [project] - The project ID for this request. | 4106 * [project] - The project ID for this request. |
4308 * Value must have pattern | 4107 * Value must have pattern |
4309 * "(?:(?:[-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])?))". | 4108 * "(?:(?:[-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])?))". |
4310 * | 4109 * |
4311 * [filter] - Sets a filter expression for filtering listed resources, in the | 4110 * [zone] - The URL of the zone where the managed instance group is located. |
4312 * form filter={expression}. Your {expression} must contain the following: | |
4313 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
4314 * | 4111 * |
4315 * - FIELD_NAME: The name of the field you want to compare. The field name | 4112 * [instanceGroupManager] - The name of the instance group manager resource. |
4316 * must be valid for the type of resource being filtered. Only atomic field | |
4317 * types are supported (string, number, boolean). Array and object fields are | |
4318 * not currently supported. | |
4319 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
4320 * equals). | |
4321 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
4322 * must be valid for the type of field (string, number, boolean). For string | |
4323 * fields, the literal value is interpreted as a regular expression using RE2 | |
4324 * syntax. The literal value must match the entire field. For example, you | |
4325 * can filter by the name of a resource: | |
4326 * filter=name ne example-instance | |
4327 * The above filter returns only results whose name field does not equal | |
4328 * example-instance. You can also enclose your literal string in single, | |
4329 * double, or no quotes. | |
4330 * | 4113 * |
4331 * [maxResults] - Maximum count of results to be returned. | 4114 * Completes with a [InstanceGroupManager]. |
4332 * Value must be between "0" and "500". | |
4333 * | |
4334 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
4335 * to list the next page of results. Set pageToken to the nextPageToken | |
4336 * returned by a previous list request. | |
4337 * | |
4338 * Completes with a [InstanceGroupAggregatedList]. | |
4339 * | 4115 * |
4340 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4116 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4341 * error. | 4117 * error. |
4342 * | 4118 * |
4343 * If the used [http.Client] completes with an error when making a REST call, | 4119 * If the used [http.Client] completes with an error when making a REST call, |
4344 * this method will complete with the same error. | 4120 * this method will complete with the same error. |
4345 */ | 4121 */ |
4346 async.Future<InstanceGroupAggregatedList> aggregatedList(core.String project,
{core.String filter, core.int maxResults, core.String pageToken}) { | 4122 async.Future<InstanceGroupManager> get(core.String project, core.String zone,
core.String instanceGroupManager) { |
4347 var _url = null; | 4123 var _url = null; |
4348 var _queryParams = new core.Map(); | 4124 var _queryParams = new core.Map(); |
4349 var _uploadMedia = null; | 4125 var _uploadMedia = null; |
4350 var _uploadOptions = null; | 4126 var _uploadOptions = null; |
4351 var _downloadOptions = commons.DownloadOptions.Metadata; | 4127 var _downloadOptions = commons.DownloadOptions.Metadata; |
4352 var _body = null; | 4128 var _body = null; |
4353 | 4129 |
4354 if (project == null) { | 4130 if (project == null) { |
4355 throw new core.ArgumentError("Parameter project is required."); | 4131 throw new core.ArgumentError("Parameter project is required."); |
4356 } | 4132 } |
4357 if (filter != null) { | 4133 if (zone == null) { |
4358 _queryParams["filter"] = [filter]; | 4134 throw new core.ArgumentError("Parameter zone is required."); |
4359 } | 4135 } |
4360 if (maxResults != null) { | 4136 if (instanceGroupManager == null) { |
4361 _queryParams["maxResults"] = ["${maxResults}"]; | 4137 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); |
4362 } | |
4363 if (pageToken != null) { | |
4364 _queryParams["pageToken"] = [pageToken]; | |
4365 } | 4138 } |
4366 | 4139 |
4367 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/instanceGrou
ps'; | 4140 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager'); |
4368 | 4141 |
4369 var _response = _requester.request(_url, | 4142 var _response = _requester.request(_url, |
4370 "GET", | 4143 "GET", |
4371 body: _body, | 4144 body: _body, |
4372 queryParams: _queryParams, | 4145 queryParams: _queryParams, |
4373 uploadOptions: _uploadOptions, | 4146 uploadOptions: _uploadOptions, |
4374 uploadMedia: _uploadMedia, | 4147 uploadMedia: _uploadMedia, |
4375 downloadOptions: _downloadOptions); | 4148 downloadOptions: _downloadOptions); |
4376 return _response.then((data) => new InstanceGroupAggregatedList.fromJson(dat
a)); | 4149 return _response.then((data) => new InstanceGroupManager.fromJson(data)); |
4377 } | 4150 } |
4378 | 4151 |
4379 /** | 4152 /** |
4380 * Deletes the specified instance group. | 4153 * Creates a managed instance group resource in the specified project using |
| 4154 * the data that is included in the request. |
| 4155 * |
| 4156 * [request] - The metadata request object. |
4381 * | 4157 * |
4382 * Request parameters: | 4158 * Request parameters: |
4383 * | 4159 * |
4384 * [project] - The project ID for this request. | 4160 * [project] - The project ID for this request. |
4385 * Value must have pattern | 4161 * Value must have pattern |
4386 * "(?:(?:[-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])?))". | 4162 * "(?:(?:[-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])?))". |
4387 * | 4163 * |
4388 * [zone] - The URL of the zone where the instance group is located. | 4164 * [zone] - The URL of the zone where the managed instance group is located. |
4389 * | |
4390 * [instanceGroup] - The name of the instance group to delete. | |
4391 * | 4165 * |
4392 * Completes with a [Operation]. | 4166 * Completes with a [Operation]. |
4393 * | 4167 * |
4394 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4168 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4395 * error. | 4169 * error. |
4396 * | 4170 * |
4397 * If the used [http.Client] completes with an error when making a REST call, | 4171 * If the used [http.Client] completes with an error when making a REST call, |
4398 * this method will complete with the same error. | 4172 * this method will complete with the same error. |
4399 */ | 4173 */ |
4400 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing instanceGroup) { | 4174 async.Future<Operation> insert(InstanceGroupManager request, core.String proje
ct, core.String zone) { |
4401 var _url = null; | 4175 var _url = null; |
4402 var _queryParams = new core.Map(); | 4176 var _queryParams = new core.Map(); |
4403 var _uploadMedia = null; | 4177 var _uploadMedia = null; |
4404 var _uploadOptions = null; | 4178 var _uploadOptions = null; |
4405 var _downloadOptions = commons.DownloadOptions.Metadata; | 4179 var _downloadOptions = commons.DownloadOptions.Metadata; |
4406 var _body = null; | 4180 var _body = null; |
4407 | 4181 |
| 4182 if (request != null) { |
| 4183 _body = convert.JSON.encode((request).toJson()); |
| 4184 } |
4408 if (project == null) { | 4185 if (project == null) { |
4409 throw new core.ArgumentError("Parameter project is required."); | 4186 throw new core.ArgumentError("Parameter project is required."); |
4410 } | 4187 } |
4411 if (zone == null) { | 4188 if (zone == null) { |
4412 throw new core.ArgumentError("Parameter zone is required."); | 4189 throw new core.ArgumentError("Parameter zone is required."); |
4413 } | 4190 } |
4414 if (instanceGroup == null) { | |
4415 throw new core.ArgumentError("Parameter instanceGroup is required."); | |
4416 } | |
4417 | 4191 |
4418 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup'); | 4192 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers'; |
4419 | 4193 |
4420 var _response = _requester.request(_url, | 4194 var _response = _requester.request(_url, |
4421 "DELETE", | 4195 "POST", |
4422 body: _body, | 4196 body: _body, |
4423 queryParams: _queryParams, | 4197 queryParams: _queryParams, |
4424 uploadOptions: _uploadOptions, | 4198 uploadOptions: _uploadOptions, |
4425 uploadMedia: _uploadMedia, | 4199 uploadMedia: _uploadMedia, |
4426 downloadOptions: _downloadOptions); | 4200 downloadOptions: _downloadOptions); |
4427 return _response.then((data) => new Operation.fromJson(data)); | 4201 return _response.then((data) => new Operation.fromJson(data)); |
4428 } | 4202 } |
4429 | 4203 |
4430 /** | 4204 /** |
4431 * Returns the specified instance group resource. | 4205 * Retrieves a list of managed instance groups that are contained within the |
| 4206 * specified project and zone. |
4432 * | 4207 * |
4433 * Request parameters: | 4208 * Request parameters: |
4434 * | 4209 * |
4435 * [project] - The project ID for this request. | 4210 * [project] - The project ID for this request. |
4436 * Value must have pattern | 4211 * Value must have pattern |
4437 * "(?:(?:[-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])?))". | 4212 * "(?:(?:[-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])?))". |
4438 * | 4213 * |
4439 * [zone] - The URL of the zone where the instance group is located. | 4214 * [zone] - The URL of the zone where the managed instance group is located. |
4440 * | 4215 * |
4441 * [instanceGroup] - The name of the instance group. | 4216 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 4217 * form filter={expression}. Your {expression} must be in the format: |
| 4218 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
4442 * | 4219 * |
4443 * Completes with a [InstanceGroup]. | 4220 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 4221 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 4222 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 4223 * string value to filter to. The literal value must be valid for the type of |
| 4224 * field (string, number, boolean). For string fields, the literal value is |
| 4225 * interpreted as a regular expression using RE2 syntax. The literal value |
| 4226 * must match the entire field. |
| 4227 * |
| 4228 * For example, filter=name ne example-instance. |
| 4229 * |
| 4230 * [maxResults] - Maximum count of results to be returned. |
| 4231 * Value must be between "0" and "500". |
| 4232 * |
| 4233 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 4234 * to list the next page of results. Set pageToken to the nextPageToken |
| 4235 * returned by a previous list request. |
| 4236 * |
| 4237 * Completes with a [InstanceGroupManagerList]. |
4444 * | 4238 * |
4445 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4239 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4446 * error. | 4240 * error. |
4447 * | 4241 * |
4448 * If the used [http.Client] completes with an error when making a REST call, | 4242 * If the used [http.Client] completes with an error when making a REST call, |
4449 * this method will complete with the same error. | 4243 * this method will complete with the same error. |
4450 */ | 4244 */ |
4451 async.Future<InstanceGroup> get(core.String project, core.String zone, core.St
ring instanceGroup) { | 4245 async.Future<InstanceGroupManagerList> list(core.String project, core.String z
one, {core.String filter, core.int maxResults, core.String pageToken}) { |
4452 var _url = null; | 4246 var _url = null; |
4453 var _queryParams = new core.Map(); | 4247 var _queryParams = new core.Map(); |
4454 var _uploadMedia = null; | 4248 var _uploadMedia = null; |
4455 var _uploadOptions = null; | 4249 var _uploadOptions = null; |
4456 var _downloadOptions = commons.DownloadOptions.Metadata; | 4250 var _downloadOptions = commons.DownloadOptions.Metadata; |
4457 var _body = null; | 4251 var _body = null; |
4458 | 4252 |
4459 if (project == null) { | 4253 if (project == null) { |
4460 throw new core.ArgumentError("Parameter project is required."); | 4254 throw new core.ArgumentError("Parameter project is required."); |
4461 } | 4255 } |
4462 if (zone == null) { | 4256 if (zone == null) { |
4463 throw new core.ArgumentError("Parameter zone is required."); | 4257 throw new core.ArgumentError("Parameter zone is required."); |
4464 } | 4258 } |
4465 if (instanceGroup == null) { | 4259 if (filter != null) { |
4466 throw new core.ArgumentError("Parameter instanceGroup is required."); | 4260 _queryParams["filter"] = [filter]; |
| 4261 } |
| 4262 if (maxResults != null) { |
| 4263 _queryParams["maxResults"] = ["${maxResults}"]; |
| 4264 } |
| 4265 if (pageToken != null) { |
| 4266 _queryParams["pageToken"] = [pageToken]; |
4467 } | 4267 } |
4468 | 4268 |
4469 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup'); | 4269 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers'; |
4470 | 4270 |
4471 var _response = _requester.request(_url, | 4271 var _response = _requester.request(_url, |
4472 "GET", | 4272 "GET", |
4473 body: _body, | 4273 body: _body, |
4474 queryParams: _queryParams, | 4274 queryParams: _queryParams, |
4475 uploadOptions: _uploadOptions, | 4275 uploadOptions: _uploadOptions, |
4476 uploadMedia: _uploadMedia, | 4276 uploadMedia: _uploadMedia, |
4477 downloadOptions: _downloadOptions); | 4277 downloadOptions: _downloadOptions); |
4478 return _response.then((data) => new InstanceGroup.fromJson(data)); | 4278 return _response.then((data) => new InstanceGroupManagerList.fromJson(data))
; |
4479 } | 4279 } |
4480 | 4280 |
4481 /** | 4281 /** |
4482 * Creates an instance group in the specified project using the parameters | 4282 * Lists managed instances. |
4483 * that are included in the request. | |
4484 * | |
4485 * [request] - The metadata request object. | |
4486 * | 4283 * |
4487 * Request parameters: | 4284 * Request parameters: |
4488 * | 4285 * |
4489 * [project] - The project ID for this request. | 4286 * [project] - The project ID for this request. |
4490 * Value must have pattern | 4287 * Value must have pattern |
4491 * "(?:(?:[-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])?))". | 4288 * "(?:(?:[-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])?))". |
4492 * | 4289 * |
4493 * [zone] - The URL of the zone where the instance group is located. | 4290 * [zone] - The URL of the zone where the managed instance group is located. |
4494 * | 4291 * |
4495 * Completes with a [Operation]. | 4292 * [instanceGroupManager] - The name of the managed instance group. |
| 4293 * |
| 4294 * Completes with a [InstanceGroupManagersListManagedInstancesResponse]. |
4496 * | 4295 * |
4497 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4296 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4498 * error. | 4297 * error. |
4499 * | 4298 * |
4500 * If the used [http.Client] completes with an error when making a REST call, | 4299 * If the used [http.Client] completes with an error when making a REST call, |
4501 * this method will complete with the same error. | 4300 * this method will complete with the same error. |
4502 */ | 4301 */ |
4503 async.Future<Operation> insert(InstanceGroup request, core.String project, cor
e.String zone) { | 4302 async.Future<InstanceGroupManagersListManagedInstancesResponse> listManagedIns
tances(core.String project, core.String zone, core.String instanceGroupManager)
{ |
4504 var _url = null; | 4303 var _url = null; |
4505 var _queryParams = new core.Map(); | 4304 var _queryParams = new core.Map(); |
4506 var _uploadMedia = null; | 4305 var _uploadMedia = null; |
4507 var _uploadOptions = null; | 4306 var _uploadOptions = null; |
4508 var _downloadOptions = commons.DownloadOptions.Metadata; | 4307 var _downloadOptions = commons.DownloadOptions.Metadata; |
4509 var _body = null; | 4308 var _body = null; |
4510 | 4309 |
4511 if (request != null) { | |
4512 _body = convert.JSON.encode((request).toJson()); | |
4513 } | |
4514 if (project == null) { | 4310 if (project == null) { |
4515 throw new core.ArgumentError("Parameter project is required."); | 4311 throw new core.ArgumentError("Parameter project is required."); |
4516 } | 4312 } |
4517 if (zone == null) { | 4313 if (zone == null) { |
4518 throw new core.ArgumentError("Parameter zone is required."); | 4314 throw new core.ArgumentError("Parameter zone is required."); |
4519 } | 4315 } |
| 4316 if (instanceGroupManager == null) { |
| 4317 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); |
| 4318 } |
4520 | 4319 |
4521 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups'; | 4320 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/listManagedInstances'; |
4522 | 4321 |
4523 var _response = _requester.request(_url, | 4322 var _response = _requester.request(_url, |
4524 "POST", | 4323 "POST", |
4525 body: _body, | 4324 body: _body, |
4526 queryParams: _queryParams, | 4325 queryParams: _queryParams, |
4527 uploadOptions: _uploadOptions, | 4326 uploadOptions: _uploadOptions, |
4528 uploadMedia: _uploadMedia, | 4327 uploadMedia: _uploadMedia, |
4529 downloadOptions: _downloadOptions); | 4328 downloadOptions: _downloadOptions); |
4530 return _response.then((data) => new Operation.fromJson(data)); | 4329 return _response.then((data) => new InstanceGroupManagersListManagedInstance
sResponse.fromJson(data)); |
4531 } | 4330 } |
4532 | 4331 |
4533 /** | 4332 /** |
4534 * Retrieves the list of instance groups that are located in the specified | 4333 * Recreates the specified instances. The instances are deleted, then |
4535 * project and zone. | 4334 * recreated using the managed instance group's current instance template. |
| 4335 * |
| 4336 * [request] - The metadata request object. |
4536 * | 4337 * |
4537 * Request parameters: | 4338 * Request parameters: |
4538 * | 4339 * |
4539 * [project] - The project ID for this request. | 4340 * [project] - The project ID for this request. |
4540 * Value must have pattern | 4341 * Value must have pattern |
4541 * "(?:(?:[-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])?))". | 4342 * "(?:(?:[-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])?))". |
4542 * | 4343 * |
4543 * [zone] - The URL of the zone where the instance group is located. | 4344 * [zone] - The URL of the zone where the managed instance group is located. |
4544 * | 4345 * |
4545 * [filter] - Sets a filter expression for filtering listed resources, in the | 4346 * [instanceGroupManager] - The name of the instance group manager. |
4546 * form filter={expression}. Your {expression} must contain the following: | |
4547 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
4548 * | 4347 * |
4549 * - FIELD_NAME: The name of the field you want to compare. The field name | 4348 * Completes with a [Operation]. |
4550 * must be valid for the type of resource being filtered. Only atomic field | |
4551 * types are supported (string, number, boolean). Array and object fields are | |
4552 * not currently supported. | |
4553 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
4554 * equals). | |
4555 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
4556 * must be valid for the type of field (string, number, boolean). For string | |
4557 * fields, the literal value is interpreted as a regular expression using RE2 | |
4558 * syntax. The literal value must match the entire field. For example, you | |
4559 * can filter by the name of a resource: | |
4560 * filter=name ne example-instance | |
4561 * The above filter returns only results whose name field does not equal | |
4562 * example-instance. You can also enclose your literal string in single, | |
4563 * double, or no quotes. | |
4564 * | |
4565 * [maxResults] - Maximum count of results to be returned. | |
4566 * Value must be between "0" and "500". | |
4567 * | |
4568 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
4569 * to list the next page of results. Set pageToken to the nextPageToken | |
4570 * returned by a previous list request. | |
4571 * | |
4572 * Completes with a [InstanceGroupList]. | |
4573 * | 4349 * |
4574 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4350 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4575 * error. | 4351 * error. |
4576 * | 4352 * |
4577 * If the used [http.Client] completes with an error when making a REST call, | 4353 * If the used [http.Client] completes with an error when making a REST call, |
4578 * this method will complete with the same error. | 4354 * this method will complete with the same error. |
4579 */ | 4355 */ |
4580 async.Future<InstanceGroupList> list(core.String project, core.String zone, {c
ore.String filter, core.int maxResults, core.String pageToken}) { | 4356 async.Future<Operation> recreateInstances(InstanceGroupManagersRecreateInstanc
esRequest request, core.String project, core.String zone, core.String instanceGr
oupManager) { |
4581 var _url = null; | 4357 var _url = null; |
4582 var _queryParams = new core.Map(); | 4358 var _queryParams = new core.Map(); |
4583 var _uploadMedia = null; | 4359 var _uploadMedia = null; |
4584 var _uploadOptions = null; | 4360 var _uploadOptions = null; |
4585 var _downloadOptions = commons.DownloadOptions.Metadata; | 4361 var _downloadOptions = commons.DownloadOptions.Metadata; |
4586 var _body = null; | 4362 var _body = null; |
4587 | 4363 |
| 4364 if (request != null) { |
| 4365 _body = convert.JSON.encode((request).toJson()); |
| 4366 } |
4588 if (project == null) { | 4367 if (project == null) { |
4589 throw new core.ArgumentError("Parameter project is required."); | 4368 throw new core.ArgumentError("Parameter project is required."); |
4590 } | 4369 } |
4591 if (zone == null) { | 4370 if (zone == null) { |
4592 throw new core.ArgumentError("Parameter zone is required."); | 4371 throw new core.ArgumentError("Parameter zone is required."); |
4593 } | 4372 } |
4594 if (filter != null) { | 4373 if (instanceGroupManager == null) { |
4595 _queryParams["filter"] = [filter]; | 4374 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); |
4596 } | |
4597 if (maxResults != null) { | |
4598 _queryParams["maxResults"] = ["${maxResults}"]; | |
4599 } | |
4600 if (pageToken != null) { | |
4601 _queryParams["pageToken"] = [pageToken]; | |
4602 } | 4375 } |
4603 | 4376 |
4604 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups'; | 4377 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/recreateInstances'; |
4605 | 4378 |
4606 var _response = _requester.request(_url, | 4379 var _response = _requester.request(_url, |
4607 "GET", | 4380 "POST", |
4608 body: _body, | 4381 body: _body, |
4609 queryParams: _queryParams, | 4382 queryParams: _queryParams, |
4610 uploadOptions: _uploadOptions, | 4383 uploadOptions: _uploadOptions, |
4611 uploadMedia: _uploadMedia, | 4384 uploadMedia: _uploadMedia, |
4612 downloadOptions: _downloadOptions); | 4385 downloadOptions: _downloadOptions); |
4613 return _response.then((data) => new InstanceGroupList.fromJson(data)); | 4386 return _response.then((data) => new Operation.fromJson(data)); |
4614 } | 4387 } |
4615 | 4388 |
4616 /** | 4389 /** |
4617 * Lists instances in an instance group. The parameters for this method | 4390 * Resizes the managed instance group. If you increase the size, the group |
4618 * specify whether the list filters instances by state and named ports | 4391 * creates new instances using the current instance template. If you decrease |
4619 * information. | 4392 * the size, the group removes instances in the order that is outlined in |
4620 * | 4393 * Resizing a managed instance group. |
4621 * [request] - The metadata request object. | |
4622 * | 4394 * |
4623 * Request parameters: | 4395 * Request parameters: |
4624 * | 4396 * |
4625 * [project] - The project ID for this request. | 4397 * [project] - The project ID for this request. |
4626 * Value must have pattern | 4398 * Value must have pattern |
4627 * "(?:(?:[-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])?))". | 4399 * "(?:(?:[-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])?))". |
4628 * | 4400 * |
4629 * [zone] - The URL of the zone where the instance group is located. | 4401 * [zone] - The URL of the zone where the managed instance group is located. |
4630 * | 4402 * |
4631 * [instanceGroup] - The name of the instance group from which you want to | 4403 * [instanceGroupManager] - The name of the instance group manager. |
4632 * generate a list of included instances. | |
4633 * | 4404 * |
4634 * [filter] - Sets a filter expression for filtering listed resources, in the | 4405 * [size] - The number of running instances that the managed instance group |
4635 * form filter={expression}. Your {expression} must contain the following: | 4406 * should maintain at any given time. The group automatically adds or removes |
4636 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 4407 * instances to maintain the number of instances specified by this parameter. |
4637 * | 4408 * |
4638 * - FIELD_NAME: The name of the field you want to compare. The field name | 4409 * Completes with a [Operation]. |
4639 * must be valid for the type of resource being filtered. Only atomic field | |
4640 * types are supported (string, number, boolean). Array and object fields are | |
4641 * not currently supported. | |
4642 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
4643 * equals). | |
4644 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
4645 * must be valid for the type of field (string, number, boolean). For string | |
4646 * fields, the literal value is interpreted as a regular expression using RE2 | |
4647 * syntax. The literal value must match the entire field. For example, you | |
4648 * can filter by the name of a resource: | |
4649 * filter=name ne example-instance | |
4650 * The above filter returns only results whose name field does not equal | |
4651 * example-instance. You can also enclose your literal string in single, | |
4652 * double, or no quotes. | |
4653 * | |
4654 * [maxResults] - Maximum count of results to be returned. | |
4655 * Value must be between "0" and "500". | |
4656 * | |
4657 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
4658 * to list the next page of results. Set pageToken to the nextPageToken | |
4659 * returned by a previous list request. | |
4660 * | |
4661 * Completes with a [InstanceGroupsListInstances]. | |
4662 * | 4410 * |
4663 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4411 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4664 * error. | 4412 * error. |
4665 * | 4413 * |
4666 * If the used [http.Client] completes with an error when making a REST call, | 4414 * If the used [http.Client] completes with an error when making a REST call, |
4667 * this method will complete with the same error. | 4415 * this method will complete with the same error. |
4668 */ | 4416 */ |
4669 async.Future<InstanceGroupsListInstances> listInstances(InstanceGroupsListInst
ancesRequest request, core.String project, core.String zone, core.String instanc
eGroup, {core.String filter, core.int maxResults, core.String pageToken}) { | 4417 async.Future<Operation> resize(core.String project, core.String zone, core.Str
ing instanceGroupManager, core.int size) { |
4670 var _url = null; | 4418 var _url = null; |
4671 var _queryParams = new core.Map(); | 4419 var _queryParams = new core.Map(); |
4672 var _uploadMedia = null; | 4420 var _uploadMedia = null; |
4673 var _uploadOptions = null; | 4421 var _uploadOptions = null; |
4674 var _downloadOptions = commons.DownloadOptions.Metadata; | 4422 var _downloadOptions = commons.DownloadOptions.Metadata; |
4675 var _body = null; | 4423 var _body = null; |
4676 | 4424 |
4677 if (request != null) { | |
4678 _body = convert.JSON.encode((request).toJson()); | |
4679 } | |
4680 if (project == null) { | 4425 if (project == null) { |
4681 throw new core.ArgumentError("Parameter project is required."); | 4426 throw new core.ArgumentError("Parameter project is required."); |
4682 } | 4427 } |
4683 if (zone == null) { | 4428 if (zone == null) { |
4684 throw new core.ArgumentError("Parameter zone is required."); | 4429 throw new core.ArgumentError("Parameter zone is required."); |
4685 } | 4430 } |
4686 if (instanceGroup == null) { | 4431 if (instanceGroupManager == null) { |
4687 throw new core.ArgumentError("Parameter instanceGroup is required."); | 4432 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); |
4688 } | 4433 } |
4689 if (filter != null) { | 4434 if (size == null) { |
4690 _queryParams["filter"] = [filter]; | 4435 throw new core.ArgumentError("Parameter size is required."); |
4691 } | 4436 } |
4692 if (maxResults != null) { | 4437 _queryParams["size"] = ["${size}"]; |
4693 _queryParams["maxResults"] = ["${maxResults}"]; | |
4694 } | |
4695 if (pageToken != null) { | |
4696 _queryParams["pageToken"] = [pageToken]; | |
4697 } | |
4698 | 4438 |
4699 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup') + '/listInstances'; | 4439 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/resize'; |
4700 | 4440 |
4701 var _response = _requester.request(_url, | 4441 var _response = _requester.request(_url, |
4702 "POST", | 4442 "POST", |
4703 body: _body, | 4443 body: _body, |
4704 queryParams: _queryParams, | 4444 queryParams: _queryParams, |
4705 uploadOptions: _uploadOptions, | 4445 uploadOptions: _uploadOptions, |
4706 uploadMedia: _uploadMedia, | 4446 uploadMedia: _uploadMedia, |
4707 downloadOptions: _downloadOptions); | 4447 downloadOptions: _downloadOptions); |
4708 return _response.then((data) => new InstanceGroupsListInstances.fromJson(dat
a)); | 4448 return _response.then((data) => new Operation.fromJson(data)); |
4709 } | 4449 } |
4710 | 4450 |
4711 /** | 4451 /** |
4712 * Removes a list of instances from an instance group. | 4452 * Specifies the instance template to use when creating new instances in this |
| 4453 * group. The templates for existing instances in the group do not change |
| 4454 * unless you recreate them. |
4713 * | 4455 * |
4714 * [request] - The metadata request object. | 4456 * [request] - The metadata request object. |
4715 * | 4457 * |
4716 * Request parameters: | 4458 * Request parameters: |
4717 * | 4459 * |
4718 * [project] - The project ID for this request. | 4460 * [project] - The project ID for this request. |
4719 * Value must have pattern | 4461 * Value must have pattern |
4720 * "(?:(?:[-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])?))". | 4462 * "(?:(?:[-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])?))". |
4721 * | 4463 * |
4722 * [zone] - The URL of the zone where the instance group is located. | 4464 * [zone] - The URL of the zone where the managed instance group is located. |
4723 * | 4465 * |
4724 * [instanceGroup] - The name of the instance group where the specified | 4466 * [instanceGroupManager] - The name of the instance group manager. |
4725 * instances will be removed. | |
4726 * | 4467 * |
4727 * Completes with a [Operation]. | 4468 * Completes with a [Operation]. |
4728 * | 4469 * |
4729 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4470 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4730 * error. | 4471 * error. |
4731 * | 4472 * |
4732 * If the used [http.Client] completes with an error when making a REST call, | 4473 * If the used [http.Client] completes with an error when making a REST call, |
4733 * this method will complete with the same error. | 4474 * this method will complete with the same error. |
4734 */ | 4475 */ |
4735 async.Future<Operation> removeInstances(InstanceGroupsRemoveInstancesRequest r
equest, core.String project, core.String zone, core.String instanceGroup) { | 4476 async.Future<Operation> setInstanceTemplate(InstanceGroupManagersSetInstanceTe
mplateRequest request, core.String project, core.String zone, core.String instan
ceGroupManager) { |
4736 var _url = null; | 4477 var _url = null; |
4737 var _queryParams = new core.Map(); | 4478 var _queryParams = new core.Map(); |
4738 var _uploadMedia = null; | 4479 var _uploadMedia = null; |
4739 var _uploadOptions = null; | 4480 var _uploadOptions = null; |
4740 var _downloadOptions = commons.DownloadOptions.Metadata; | 4481 var _downloadOptions = commons.DownloadOptions.Metadata; |
4741 var _body = null; | 4482 var _body = null; |
4742 | 4483 |
4743 if (request != null) { | 4484 if (request != null) { |
4744 _body = convert.JSON.encode((request).toJson()); | 4485 _body = convert.JSON.encode((request).toJson()); |
4745 } | 4486 } |
4746 if (project == null) { | 4487 if (project == null) { |
4747 throw new core.ArgumentError("Parameter project is required."); | 4488 throw new core.ArgumentError("Parameter project is required."); |
4748 } | 4489 } |
4749 if (zone == null) { | 4490 if (zone == null) { |
4750 throw new core.ArgumentError("Parameter zone is required."); | 4491 throw new core.ArgumentError("Parameter zone is required."); |
4751 } | 4492 } |
4752 if (instanceGroup == null) { | 4493 if (instanceGroupManager == null) { |
4753 throw new core.ArgumentError("Parameter instanceGroup is required."); | 4494 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); |
4754 } | 4495 } |
4755 | 4496 |
4756 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup') + '/removeInstances'; | 4497 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/setInstanceTemplate'; |
4757 | 4498 |
4758 var _response = _requester.request(_url, | 4499 var _response = _requester.request(_url, |
4759 "POST", | 4500 "POST", |
4760 body: _body, | 4501 body: _body, |
4761 queryParams: _queryParams, | 4502 queryParams: _queryParams, |
4762 uploadOptions: _uploadOptions, | 4503 uploadOptions: _uploadOptions, |
4763 uploadMedia: _uploadMedia, | 4504 uploadMedia: _uploadMedia, |
4764 downloadOptions: _downloadOptions); | 4505 downloadOptions: _downloadOptions); |
4765 return _response.then((data) => new Operation.fromJson(data)); | 4506 return _response.then((data) => new Operation.fromJson(data)); |
4766 } | 4507 } |
4767 | 4508 |
4768 /** | 4509 /** |
4769 * Sets the named ports in an instance group. | 4510 * Modifies the target pools to which all new instances in this group are |
| 4511 * assigned. The target pools for existing instances in the group do not |
| 4512 * change unless you recreate them. |
4770 * | 4513 * |
4771 * [request] - The metadata request object. | 4514 * [request] - The metadata request object. |
4772 * | 4515 * |
4773 * Request parameters: | 4516 * Request parameters: |
4774 * | 4517 * |
4775 * [project] - The project ID for this request. | 4518 * [project] - The project ID for this request. |
4776 * Value must have pattern | 4519 * Value must have pattern |
4777 * "(?:(?:[-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])?))". | 4520 * "(?:(?:[-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])?))". |
4778 * | 4521 * |
4779 * [zone] - The URL of the zone where the instance group is located. | 4522 * [zone] - The URL of the zone where the managed instance group is located. |
4780 * | 4523 * |
4781 * [instanceGroup] - The name of the instance group where the named ports are | 4524 * [instanceGroupManager] - The name of the instance group manager. |
4782 * updated. | |
4783 * | 4525 * |
4784 * Completes with a [Operation]. | 4526 * Completes with a [Operation]. |
4785 * | 4527 * |
4786 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4528 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4787 * error. | 4529 * error. |
4788 * | 4530 * |
4789 * If the used [http.Client] completes with an error when making a REST call, | 4531 * If the used [http.Client] completes with an error when making a REST call, |
4790 * this method will complete with the same error. | 4532 * this method will complete with the same error. |
4791 */ | 4533 */ |
4792 async.Future<Operation> setNamedPorts(InstanceGroupsSetNamedPortsRequest reque
st, core.String project, core.String zone, core.String instanceGroup) { | 4534 async.Future<Operation> setTargetPools(InstanceGroupManagersSetTargetPoolsRequ
est request, core.String project, core.String zone, core.String instanceGroupMan
ager) { |
4793 var _url = null; | 4535 var _url = null; |
4794 var _queryParams = new core.Map(); | 4536 var _queryParams = new core.Map(); |
4795 var _uploadMedia = null; | 4537 var _uploadMedia = null; |
4796 var _uploadOptions = null; | 4538 var _uploadOptions = null; |
4797 var _downloadOptions = commons.DownloadOptions.Metadata; | 4539 var _downloadOptions = commons.DownloadOptions.Metadata; |
4798 var _body = null; | 4540 var _body = null; |
4799 | 4541 |
4800 if (request != null) { | 4542 if (request != null) { |
4801 _body = convert.JSON.encode((request).toJson()); | 4543 _body = convert.JSON.encode((request).toJson()); |
4802 } | 4544 } |
4803 if (project == null) { | 4545 if (project == null) { |
4804 throw new core.ArgumentError("Parameter project is required."); | 4546 throw new core.ArgumentError("Parameter project is required."); |
4805 } | 4547 } |
4806 if (zone == null) { | 4548 if (zone == null) { |
4807 throw new core.ArgumentError("Parameter zone is required."); | 4549 throw new core.ArgumentError("Parameter zone is required."); |
4808 } | 4550 } |
4809 if (instanceGroup == null) { | 4551 if (instanceGroupManager == null) { |
4810 throw new core.ArgumentError("Parameter instanceGroup is required."); | 4552 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); |
4811 } | 4553 } |
4812 | 4554 |
4813 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup') + '/setNamedPorts'; | 4555 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroupManagers/' + commons.Escaper.ecapeVar
iable('$instanceGroupManager') + '/setTargetPools'; |
4814 | 4556 |
4815 var _response = _requester.request(_url, | 4557 var _response = _requester.request(_url, |
4816 "POST", | 4558 "POST", |
4817 body: _body, | 4559 body: _body, |
4818 queryParams: _queryParams, | 4560 queryParams: _queryParams, |
4819 uploadOptions: _uploadOptions, | 4561 uploadOptions: _uploadOptions, |
4820 uploadMedia: _uploadMedia, | 4562 uploadMedia: _uploadMedia, |
4821 downloadOptions: _downloadOptions); | 4563 downloadOptions: _downloadOptions); |
4822 return _response.then((data) => new Operation.fromJson(data)); | 4564 return _response.then((data) => new Operation.fromJson(data)); |
4823 } | 4565 } |
4824 | 4566 |
4825 } | 4567 } |
4826 | 4568 |
4827 | 4569 |
4828 class InstanceTemplatesResourceApi { | 4570 class InstanceGroupsResourceApi { |
4829 final commons.ApiRequester _requester; | 4571 final commons.ApiRequester _requester; |
4830 | 4572 |
4831 InstanceTemplatesResourceApi(commons.ApiRequester client) : | 4573 InstanceGroupsResourceApi(commons.ApiRequester client) : |
4832 _requester = client; | 4574 _requester = client; |
4833 | 4575 |
4834 /** | 4576 /** |
4835 * Deletes the specified instance template. | 4577 * Adds a list of instances to an instance group. All of the instances in the |
| 4578 * instance group must be in the same network. |
| 4579 * |
| 4580 * [request] - The metadata request object. |
4836 * | 4581 * |
4837 * Request parameters: | 4582 * Request parameters: |
4838 * | 4583 * |
4839 * [project] - The project ID for this request. | 4584 * [project] - The project ID for this request. |
4840 * Value must have pattern | 4585 * Value must have pattern |
4841 * "(?:(?:[-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])?))". | 4586 * "(?:(?:[-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])?))". |
4842 * | 4587 * |
4843 * [instanceTemplate] - The name of the instance template to delete. | 4588 * [zone] - The URL of the zone where the instance group is located. |
4844 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 4589 * |
| 4590 * [instanceGroup] - The name of the instance group where you are adding |
| 4591 * instances. |
4845 * | 4592 * |
4846 * Completes with a [Operation]. | 4593 * Completes with a [Operation]. |
4847 * | 4594 * |
4848 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4595 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4849 * error. | 4596 * error. |
4850 * | 4597 * |
4851 * If the used [http.Client] completes with an error when making a REST call, | 4598 * If the used [http.Client] completes with an error when making a REST call, |
4852 * this method will complete with the same error. | 4599 * this method will complete with the same error. |
4853 */ | 4600 */ |
4854 async.Future<Operation> delete(core.String project, core.String instanceTempla
te) { | 4601 async.Future<Operation> addInstances(InstanceGroupsAddInstancesRequest request
, core.String project, core.String zone, core.String instanceGroup) { |
4855 var _url = null; | 4602 var _url = null; |
4856 var _queryParams = new core.Map(); | 4603 var _queryParams = new core.Map(); |
4857 var _uploadMedia = null; | 4604 var _uploadMedia = null; |
4858 var _uploadOptions = null; | 4605 var _uploadOptions = null; |
4859 var _downloadOptions = commons.DownloadOptions.Metadata; | 4606 var _downloadOptions = commons.DownloadOptions.Metadata; |
4860 var _body = null; | 4607 var _body = null; |
4861 | 4608 |
| 4609 if (request != null) { |
| 4610 _body = convert.JSON.encode((request).toJson()); |
| 4611 } |
4862 if (project == null) { | 4612 if (project == null) { |
4863 throw new core.ArgumentError("Parameter project is required."); | 4613 throw new core.ArgumentError("Parameter project is required."); |
4864 } | 4614 } |
4865 if (instanceTemplate == null) { | 4615 if (zone == null) { |
4866 throw new core.ArgumentError("Parameter instanceTemplate is required."); | 4616 throw new core.ArgumentError("Parameter zone is required."); |
| 4617 } |
| 4618 if (instanceGroup == null) { |
| 4619 throw new core.ArgumentError("Parameter instanceGroup is required."); |
4867 } | 4620 } |
4868 | 4621 |
4869 _url = commons.Escaper.ecapeVariable('$project') + '/global/instanceTemplate
s/' + commons.Escaper.ecapeVariable('$instanceTemplate'); | 4622 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup') + '/addInstances'; |
4870 | 4623 |
4871 var _response = _requester.request(_url, | 4624 var _response = _requester.request(_url, |
4872 "DELETE", | 4625 "POST", |
4873 body: _body, | 4626 body: _body, |
4874 queryParams: _queryParams, | 4627 queryParams: _queryParams, |
4875 uploadOptions: _uploadOptions, | 4628 uploadOptions: _uploadOptions, |
4876 uploadMedia: _uploadMedia, | 4629 uploadMedia: _uploadMedia, |
4877 downloadOptions: _downloadOptions); | 4630 downloadOptions: _downloadOptions); |
4878 return _response.then((data) => new Operation.fromJson(data)); | 4631 return _response.then((data) => new Operation.fromJson(data)); |
4879 } | 4632 } |
4880 | 4633 |
4881 /** | 4634 /** |
4882 * Returns the specified instance template resource. | 4635 * Retrieves the list of instance groups, and sorts them by zone. |
4883 * | 4636 * |
4884 * Request parameters: | 4637 * Request parameters: |
4885 * | 4638 * |
4886 * [project] - The project ID for this request. | 4639 * [project] - The project ID for this request. |
4887 * Value must have pattern | 4640 * Value must have pattern |
4888 * "(?:(?:[-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])?))". | 4641 * "(?:(?:[-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])?))". |
4889 * | 4642 * |
4890 * [instanceTemplate] - The name of the instance template. | 4643 * [filter] - Sets a filter expression for filtering listed resources, in the |
4891 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 4644 * form filter={expression}. Your {expression} must be in the format: |
| 4645 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
4892 * | 4646 * |
4893 * Completes with a [InstanceTemplate]. | 4647 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 4648 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 4649 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 4650 * string value to filter to. The literal value must be valid for the type of |
| 4651 * field (string, number, boolean). For string fields, the literal value is |
| 4652 * interpreted as a regular expression using RE2 syntax. The literal value |
| 4653 * must match the entire field. |
| 4654 * |
| 4655 * For example, filter=name ne example-instance. |
| 4656 * |
| 4657 * [maxResults] - Maximum count of results to be returned. |
| 4658 * Value must be between "0" and "500". |
| 4659 * |
| 4660 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 4661 * to list the next page of results. Set pageToken to the nextPageToken |
| 4662 * returned by a previous list request. |
| 4663 * |
| 4664 * Completes with a [InstanceGroupAggregatedList]. |
4894 * | 4665 * |
4895 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4666 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4896 * error. | 4667 * error. |
4897 * | 4668 * |
4898 * If the used [http.Client] completes with an error when making a REST call, | 4669 * If the used [http.Client] completes with an error when making a REST call, |
4899 * this method will complete with the same error. | 4670 * this method will complete with the same error. |
4900 */ | 4671 */ |
4901 async.Future<InstanceTemplate> get(core.String project, core.String instanceTe
mplate) { | 4672 async.Future<InstanceGroupAggregatedList> aggregatedList(core.String project,
{core.String filter, core.int maxResults, core.String pageToken}) { |
4902 var _url = null; | 4673 var _url = null; |
4903 var _queryParams = new core.Map(); | 4674 var _queryParams = new core.Map(); |
4904 var _uploadMedia = null; | 4675 var _uploadMedia = null; |
4905 var _uploadOptions = null; | 4676 var _uploadOptions = null; |
4906 var _downloadOptions = commons.DownloadOptions.Metadata; | 4677 var _downloadOptions = commons.DownloadOptions.Metadata; |
4907 var _body = null; | 4678 var _body = null; |
4908 | 4679 |
4909 if (project == null) { | 4680 if (project == null) { |
4910 throw new core.ArgumentError("Parameter project is required."); | 4681 throw new core.ArgumentError("Parameter project is required."); |
4911 } | 4682 } |
4912 if (instanceTemplate == null) { | 4683 if (filter != null) { |
4913 throw new core.ArgumentError("Parameter instanceTemplate is required."); | 4684 _queryParams["filter"] = [filter]; |
| 4685 } |
| 4686 if (maxResults != null) { |
| 4687 _queryParams["maxResults"] = ["${maxResults}"]; |
| 4688 } |
| 4689 if (pageToken != null) { |
| 4690 _queryParams["pageToken"] = [pageToken]; |
4914 } | 4691 } |
4915 | 4692 |
4916 _url = commons.Escaper.ecapeVariable('$project') + '/global/instanceTemplate
s/' + commons.Escaper.ecapeVariable('$instanceTemplate'); | 4693 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/instanceGrou
ps'; |
4917 | 4694 |
4918 var _response = _requester.request(_url, | 4695 var _response = _requester.request(_url, |
4919 "GET", | 4696 "GET", |
4920 body: _body, | 4697 body: _body, |
4921 queryParams: _queryParams, | 4698 queryParams: _queryParams, |
4922 uploadOptions: _uploadOptions, | 4699 uploadOptions: _uploadOptions, |
4923 uploadMedia: _uploadMedia, | 4700 uploadMedia: _uploadMedia, |
4924 downloadOptions: _downloadOptions); | 4701 downloadOptions: _downloadOptions); |
4925 return _response.then((data) => new InstanceTemplate.fromJson(data)); | 4702 return _response.then((data) => new InstanceGroupAggregatedList.fromJson(dat
a)); |
4926 } | 4703 } |
4927 | 4704 |
4928 /** | 4705 /** |
4929 * Creates an instance template in the specified project using the data that | 4706 * Deletes the specified instance group. |
4930 * is included in the request. | |
4931 * | |
4932 * [request] - The metadata request object. | |
4933 * | 4707 * |
4934 * Request parameters: | 4708 * Request parameters: |
4935 * | 4709 * |
4936 * [project] - The project ID for this request. | 4710 * [project] - The project ID for this request. |
4937 * Value must have pattern | 4711 * Value must have pattern |
4938 * "(?:(?:[-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])?))". | 4712 * "(?:(?:[-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])?))". |
4939 * | 4713 * |
| 4714 * [zone] - The URL of the zone where the instance group is located. |
| 4715 * |
| 4716 * [instanceGroup] - The name of the instance group to delete. |
| 4717 * |
4940 * Completes with a [Operation]. | 4718 * Completes with a [Operation]. |
4941 * | 4719 * |
4942 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4720 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
4943 * error. | 4721 * error. |
4944 * | 4722 * |
4945 * If the used [http.Client] completes with an error when making a REST call, | 4723 * If the used [http.Client] completes with an error when making a REST call, |
4946 * this method will complete with the same error. | 4724 * this method will complete with the same error. |
4947 */ | 4725 */ |
4948 async.Future<Operation> insert(InstanceTemplate request, core.String project)
{ | 4726 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing instanceGroup) { |
4949 var _url = null; | 4727 var _url = null; |
4950 var _queryParams = new core.Map(); | 4728 var _queryParams = new core.Map(); |
4951 var _uploadMedia = null; | 4729 var _uploadMedia = null; |
4952 var _uploadOptions = null; | 4730 var _uploadOptions = null; |
4953 var _downloadOptions = commons.DownloadOptions.Metadata; | 4731 var _downloadOptions = commons.DownloadOptions.Metadata; |
4954 var _body = null; | 4732 var _body = null; |
4955 | 4733 |
4956 if (request != null) { | |
4957 _body = convert.JSON.encode((request).toJson()); | |
4958 } | |
4959 if (project == null) { | 4734 if (project == null) { |
4960 throw new core.ArgumentError("Parameter project is required."); | 4735 throw new core.ArgumentError("Parameter project is required."); |
4961 } | 4736 } |
| 4737 if (zone == null) { |
| 4738 throw new core.ArgumentError("Parameter zone is required."); |
| 4739 } |
| 4740 if (instanceGroup == null) { |
| 4741 throw new core.ArgumentError("Parameter instanceGroup is required."); |
| 4742 } |
4962 | 4743 |
4963 _url = commons.Escaper.ecapeVariable('$project') + '/global/instanceTemplate
s'; | 4744 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup'); |
4964 | 4745 |
4965 var _response = _requester.request(_url, | 4746 var _response = _requester.request(_url, |
4966 "POST", | 4747 "DELETE", |
4967 body: _body, | 4748 body: _body, |
4968 queryParams: _queryParams, | 4749 queryParams: _queryParams, |
4969 uploadOptions: _uploadOptions, | 4750 uploadOptions: _uploadOptions, |
4970 uploadMedia: _uploadMedia, | 4751 uploadMedia: _uploadMedia, |
4971 downloadOptions: _downloadOptions); | 4752 downloadOptions: _downloadOptions); |
4972 return _response.then((data) => new Operation.fromJson(data)); | 4753 return _response.then((data) => new Operation.fromJson(data)); |
4973 } | 4754 } |
4974 | 4755 |
4975 /** | 4756 /** |
4976 * Retrieves a list of instance templates that are contained within the | 4757 * Returns the specified instance group resource. |
4977 * specified project and zone. | |
4978 * | 4758 * |
4979 * Request parameters: | 4759 * Request parameters: |
4980 * | 4760 * |
4981 * [project] - The project ID for this request. | 4761 * [project] - The project ID for this request. |
4982 * Value must have pattern | 4762 * Value must have pattern |
4983 * "(?:(?:[-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])?))". | 4763 * "(?:(?:[-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])?))". |
4984 * | 4764 * |
4985 * [filter] - Sets a filter expression for filtering listed resources, in the | 4765 * [zone] - The URL of the zone where the instance group is located. |
4986 * form filter={expression}. Your {expression} must contain the following: | |
4987 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
4988 * | 4766 * |
4989 * - FIELD_NAME: The name of the field you want to compare. The field name | 4767 * [instanceGroup] - The name of the instance group. |
4990 * must be valid for the type of resource being filtered. Only atomic field | |
4991 * types are supported (string, number, boolean). Array and object fields are | |
4992 * not currently supported. | |
4993 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
4994 * equals). | |
4995 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
4996 * must be valid for the type of field (string, number, boolean). For string | |
4997 * fields, the literal value is interpreted as a regular expression using RE2 | |
4998 * syntax. The literal value must match the entire field. For example, you | |
4999 * can filter by the name of a resource: | |
5000 * filter=name ne example-instance | |
5001 * The above filter returns only results whose name field does not equal | |
5002 * example-instance. You can also enclose your literal string in single, | |
5003 * double, or no quotes. | |
5004 * | 4768 * |
5005 * [maxResults] - Maximum count of results to be returned. | 4769 * Completes with a [InstanceGroup]. |
5006 * Value must be between "0" and "500". | |
5007 * | |
5008 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
5009 * to list the next page of results. Set pageToken to the nextPageToken | |
5010 * returned by a previous list request. | |
5011 * | |
5012 * Completes with a [InstanceTemplateList]. | |
5013 * | 4770 * |
5014 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4771 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5015 * error. | 4772 * error. |
5016 * | 4773 * |
5017 * If the used [http.Client] completes with an error when making a REST call, | 4774 * If the used [http.Client] completes with an error when making a REST call, |
5018 * this method will complete with the same error. | 4775 * this method will complete with the same error. |
5019 */ | 4776 */ |
5020 async.Future<InstanceTemplateList> list(core.String project, {core.String filt
er, core.int maxResults, core.String pageToken}) { | 4777 async.Future<InstanceGroup> get(core.String project, core.String zone, core.St
ring instanceGroup) { |
5021 var _url = null; | 4778 var _url = null; |
5022 var _queryParams = new core.Map(); | 4779 var _queryParams = new core.Map(); |
5023 var _uploadMedia = null; | 4780 var _uploadMedia = null; |
5024 var _uploadOptions = null; | 4781 var _uploadOptions = null; |
5025 var _downloadOptions = commons.DownloadOptions.Metadata; | 4782 var _downloadOptions = commons.DownloadOptions.Metadata; |
5026 var _body = null; | 4783 var _body = null; |
5027 | 4784 |
5028 if (project == null) { | 4785 if (project == null) { |
5029 throw new core.ArgumentError("Parameter project is required."); | 4786 throw new core.ArgumentError("Parameter project is required."); |
5030 } | 4787 } |
5031 if (filter != null) { | 4788 if (zone == null) { |
5032 _queryParams["filter"] = [filter]; | 4789 throw new core.ArgumentError("Parameter zone is required."); |
5033 } | 4790 } |
5034 if (maxResults != null) { | 4791 if (instanceGroup == null) { |
5035 _queryParams["maxResults"] = ["${maxResults}"]; | 4792 throw new core.ArgumentError("Parameter instanceGroup is required."); |
5036 } | |
5037 if (pageToken != null) { | |
5038 _queryParams["pageToken"] = [pageToken]; | |
5039 } | 4793 } |
5040 | 4794 |
5041 _url = commons.Escaper.ecapeVariable('$project') + '/global/instanceTemplate
s'; | 4795 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup'); |
5042 | 4796 |
5043 var _response = _requester.request(_url, | 4797 var _response = _requester.request(_url, |
5044 "GET", | 4798 "GET", |
5045 body: _body, | 4799 body: _body, |
5046 queryParams: _queryParams, | 4800 queryParams: _queryParams, |
5047 uploadOptions: _uploadOptions, | 4801 uploadOptions: _uploadOptions, |
5048 uploadMedia: _uploadMedia, | 4802 uploadMedia: _uploadMedia, |
5049 downloadOptions: _downloadOptions); | 4803 downloadOptions: _downloadOptions); |
5050 return _response.then((data) => new InstanceTemplateList.fromJson(data)); | 4804 return _response.then((data) => new InstanceGroup.fromJson(data)); |
5051 } | 4805 } |
5052 | 4806 |
5053 } | |
5054 | |
5055 | |
5056 class InstancesResourceApi { | |
5057 final commons.ApiRequester _requester; | |
5058 | |
5059 InstancesResourceApi(commons.ApiRequester client) : | |
5060 _requester = client; | |
5061 | |
5062 /** | 4807 /** |
5063 * Adds an access config to an instance's network interface. | 4808 * Creates an instance group in the specified project using the parameters |
| 4809 * that are included in the request. |
5064 * | 4810 * |
5065 * [request] - The metadata request object. | 4811 * [request] - The metadata request object. |
5066 * | 4812 * |
5067 * Request parameters: | 4813 * Request parameters: |
5068 * | 4814 * |
5069 * [project] - Project ID for this request. | 4815 * [project] - The project ID for this request. |
5070 * Value must have pattern | 4816 * Value must have pattern |
5071 * "(?:(?:[-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])?))". | 4817 * "(?:(?:[-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])?))". |
5072 * | 4818 * |
5073 * [zone] - The name of the zone for this request. | 4819 * [zone] - The URL of the zone where the instance group is located. |
5074 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
5075 * | |
5076 * [instance] - The instance name for this request. | |
5077 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
5078 * | |
5079 * [networkInterface] - The name of the network interface to add to this | |
5080 * instance. | |
5081 * | 4820 * |
5082 * Completes with a [Operation]. | 4821 * Completes with a [Operation]. |
5083 * | 4822 * |
5084 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4823 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5085 * error. | 4824 * error. |
5086 * | 4825 * |
5087 * If the used [http.Client] completes with an error when making a REST call, | 4826 * If the used [http.Client] completes with an error when making a REST call, |
5088 * this method will complete with the same error. | 4827 * this method will complete with the same error. |
5089 */ | 4828 */ |
5090 async.Future<Operation> addAccessConfig(AccessConfig request, core.String proj
ect, core.String zone, core.String instance, core.String networkInterface) { | 4829 async.Future<Operation> insert(InstanceGroup request, core.String project, cor
e.String zone) { |
5091 var _url = null; | 4830 var _url = null; |
5092 var _queryParams = new core.Map(); | 4831 var _queryParams = new core.Map(); |
5093 var _uploadMedia = null; | 4832 var _uploadMedia = null; |
5094 var _uploadOptions = null; | 4833 var _uploadOptions = null; |
5095 var _downloadOptions = commons.DownloadOptions.Metadata; | 4834 var _downloadOptions = commons.DownloadOptions.Metadata; |
5096 var _body = null; | 4835 var _body = null; |
5097 | 4836 |
5098 if (request != null) { | 4837 if (request != null) { |
5099 _body = convert.JSON.encode((request).toJson()); | 4838 _body = convert.JSON.encode((request).toJson()); |
5100 } | 4839 } |
5101 if (project == null) { | 4840 if (project == null) { |
5102 throw new core.ArgumentError("Parameter project is required."); | 4841 throw new core.ArgumentError("Parameter project is required."); |
5103 } | 4842 } |
5104 if (zone == null) { | 4843 if (zone == null) { |
5105 throw new core.ArgumentError("Parameter zone is required."); | 4844 throw new core.ArgumentError("Parameter zone is required."); |
5106 } | 4845 } |
5107 if (instance == null) { | |
5108 throw new core.ArgumentError("Parameter instance is required."); | |
5109 } | |
5110 if (networkInterface == null) { | |
5111 throw new core.ArgumentError("Parameter networkInterface is required."); | |
5112 } | |
5113 _queryParams["networkInterface"] = [networkInterface]; | |
5114 | 4846 |
5115 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/addAccessConfig'; | 4847 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups'; |
5116 | 4848 |
5117 var _response = _requester.request(_url, | 4849 var _response = _requester.request(_url, |
5118 "POST", | 4850 "POST", |
5119 body: _body, | 4851 body: _body, |
5120 queryParams: _queryParams, | 4852 queryParams: _queryParams, |
5121 uploadOptions: _uploadOptions, | 4853 uploadOptions: _uploadOptions, |
5122 uploadMedia: _uploadMedia, | 4854 uploadMedia: _uploadMedia, |
5123 downloadOptions: _downloadOptions); | 4855 downloadOptions: _downloadOptions); |
5124 return _response.then((data) => new Operation.fromJson(data)); | 4856 return _response.then((data) => new Operation.fromJson(data)); |
5125 } | 4857 } |
5126 | 4858 |
5127 /** | 4859 /** |
| 4860 * Retrieves the list of instance groups that are located in the specified |
| 4861 * project and zone. |
| 4862 * |
5128 * Request parameters: | 4863 * Request parameters: |
5129 * | 4864 * |
5130 * [project] - Project ID for this request. | 4865 * [project] - The project ID for this request. |
5131 * Value must have pattern | 4866 * Value must have pattern |
5132 * "(?:(?:[-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])?))". | 4867 * "(?:(?:[-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])?))". |
5133 * | 4868 * |
| 4869 * [zone] - The URL of the zone where the instance group is located. |
| 4870 * |
5134 * [filter] - Sets a filter expression for filtering listed resources, in the | 4871 * [filter] - Sets a filter expression for filtering listed resources, in the |
5135 * form filter={expression}. Your {expression} must contain the following: | 4872 * form filter={expression}. Your {expression} must be in the format: |
5136 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 4873 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
5137 * | 4874 * |
5138 * - FIELD_NAME: The name of the field you want to compare. The field name | 4875 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
5139 * must be valid for the type of resource being filtered. Only atomic field | 4876 * field types are supported (string, number, boolean). The COMPARISON_STRING |
5140 * types are supported (string, number, boolean). Array and object fields are | 4877 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
5141 * not currently supported. | 4878 * string value to filter to. The literal value must be valid for the type of |
5142 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 4879 * field (string, number, boolean). For string fields, the literal value is |
5143 * equals). | 4880 * interpreted as a regular expression using RE2 syntax. The literal value |
5144 * - LITERAL_STRING: The literal string value to filter to. The literal value | 4881 * must match the entire field. |
5145 * must be valid for the type of field (string, number, boolean). For string | 4882 * |
5146 * fields, the literal value is interpreted as a regular expression using RE2 | 4883 * For example, filter=name ne example-instance. |
5147 * syntax. The literal value must match the entire field. For example, you | |
5148 * can filter by the name of a resource: | |
5149 * filter=name ne example-instance | |
5150 * The above filter returns only results whose name field does not equal | |
5151 * example-instance. You can also enclose your literal string in single, | |
5152 * double, or no quotes. | |
5153 * | 4884 * |
5154 * [maxResults] - Maximum count of results to be returned. | 4885 * [maxResults] - Maximum count of results to be returned. |
5155 * Value must be between "0" and "500". | 4886 * Value must be between "0" and "500". |
5156 * | 4887 * |
5157 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 4888 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
5158 * to list the next page of results. Set pageToken to the nextPageToken | 4889 * to list the next page of results. Set pageToken to the nextPageToken |
5159 * returned by a previous list request. | 4890 * returned by a previous list request. |
5160 * | 4891 * |
5161 * Completes with a [InstanceAggregatedList]. | 4892 * Completes with a [InstanceGroupList]. |
5162 * | 4893 * |
5163 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4894 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5164 * error. | 4895 * error. |
5165 * | 4896 * |
5166 * If the used [http.Client] completes with an error when making a REST call, | 4897 * If the used [http.Client] completes with an error when making a REST call, |
5167 * this method will complete with the same error. | 4898 * this method will complete with the same error. |
5168 */ | 4899 */ |
5169 async.Future<InstanceAggregatedList> aggregatedList(core.String project, {core
.String filter, core.int maxResults, core.String pageToken}) { | 4900 async.Future<InstanceGroupList> list(core.String project, core.String zone, {c
ore.String filter, core.int maxResults, core.String pageToken}) { |
5170 var _url = null; | 4901 var _url = null; |
5171 var _queryParams = new core.Map(); | 4902 var _queryParams = new core.Map(); |
5172 var _uploadMedia = null; | 4903 var _uploadMedia = null; |
5173 var _uploadOptions = null; | 4904 var _uploadOptions = null; |
5174 var _downloadOptions = commons.DownloadOptions.Metadata; | 4905 var _downloadOptions = commons.DownloadOptions.Metadata; |
5175 var _body = null; | 4906 var _body = null; |
5176 | 4907 |
5177 if (project == null) { | 4908 if (project == null) { |
5178 throw new core.ArgumentError("Parameter project is required."); | 4909 throw new core.ArgumentError("Parameter project is required."); |
5179 } | 4910 } |
| 4911 if (zone == null) { |
| 4912 throw new core.ArgumentError("Parameter zone is required."); |
| 4913 } |
5180 if (filter != null) { | 4914 if (filter != null) { |
5181 _queryParams["filter"] = [filter]; | 4915 _queryParams["filter"] = [filter]; |
5182 } | 4916 } |
5183 if (maxResults != null) { | 4917 if (maxResults != null) { |
5184 _queryParams["maxResults"] = ["${maxResults}"]; | 4918 _queryParams["maxResults"] = ["${maxResults}"]; |
5185 } | 4919 } |
5186 if (pageToken != null) { | 4920 if (pageToken != null) { |
5187 _queryParams["pageToken"] = [pageToken]; | 4921 _queryParams["pageToken"] = [pageToken]; |
5188 } | 4922 } |
5189 | 4923 |
5190 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/instances'; | 4924 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups'; |
5191 | 4925 |
5192 var _response = _requester.request(_url, | 4926 var _response = _requester.request(_url, |
5193 "GET", | 4927 "GET", |
5194 body: _body, | 4928 body: _body, |
5195 queryParams: _queryParams, | 4929 queryParams: _queryParams, |
5196 uploadOptions: _uploadOptions, | 4930 uploadOptions: _uploadOptions, |
5197 uploadMedia: _uploadMedia, | 4931 uploadMedia: _uploadMedia, |
5198 downloadOptions: _downloadOptions); | 4932 downloadOptions: _downloadOptions); |
5199 return _response.then((data) => new InstanceAggregatedList.fromJson(data)); | 4933 return _response.then((data) => new InstanceGroupList.fromJson(data)); |
5200 } | 4934 } |
5201 | 4935 |
5202 /** | 4936 /** |
5203 * Attaches a Disk resource to an instance. | 4937 * Lists instances in an instance group. The parameters for this method |
| 4938 * specify whether the list filters instances by state and named ports |
| 4939 * information. |
5204 * | 4940 * |
5205 * [request] - The metadata request object. | 4941 * [request] - The metadata request object. |
5206 * | 4942 * |
5207 * Request parameters: | 4943 * Request parameters: |
5208 * | 4944 * |
5209 * [project] - Project ID for this request. | 4945 * [project] - The project ID for this request. |
5210 * Value must have pattern | 4946 * Value must have pattern |
5211 * "(?:(?:[-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])?))". | 4947 * "(?:(?:[-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])?))". |
5212 * | 4948 * |
5213 * [zone] - The name of the zone for this request. | 4949 * [zone] - The URL of the zone where the instance group is located. |
5214 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
5215 * | 4950 * |
5216 * [instance] - Instance name. | 4951 * [instanceGroup] - The name of the instance group from which you want to |
5217 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 4952 * generate a list of included instances. |
5218 * | 4953 * |
5219 * Completes with a [Operation]. | 4954 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 4955 * form filter={expression}. Your {expression} must be in the format: |
| 4956 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
| 4957 * |
| 4958 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 4959 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 4960 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 4961 * string value to filter to. The literal value must be valid for the type of |
| 4962 * field (string, number, boolean). For string fields, the literal value is |
| 4963 * interpreted as a regular expression using RE2 syntax. The literal value |
| 4964 * must match the entire field. |
| 4965 * |
| 4966 * For example, filter=name ne example-instance. |
| 4967 * |
| 4968 * [maxResults] - Maximum count of results to be returned. |
| 4969 * Value must be between "0" and "500". |
| 4970 * |
| 4971 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 4972 * to list the next page of results. Set pageToken to the nextPageToken |
| 4973 * returned by a previous list request. |
| 4974 * |
| 4975 * Completes with a [InstanceGroupsListInstances]. |
5220 * | 4976 * |
5221 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 4977 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5222 * error. | 4978 * error. |
5223 * | 4979 * |
5224 * If the used [http.Client] completes with an error when making a REST call, | 4980 * If the used [http.Client] completes with an error when making a REST call, |
5225 * this method will complete with the same error. | 4981 * this method will complete with the same error. |
5226 */ | 4982 */ |
5227 async.Future<Operation> attachDisk(AttachedDisk request, core.String project,
core.String zone, core.String instance) { | 4983 async.Future<InstanceGroupsListInstances> listInstances(InstanceGroupsListInst
ancesRequest request, core.String project, core.String zone, core.String instanc
eGroup, {core.String filter, core.int maxResults, core.String pageToken}) { |
5228 var _url = null; | 4984 var _url = null; |
5229 var _queryParams = new core.Map(); | 4985 var _queryParams = new core.Map(); |
5230 var _uploadMedia = null; | 4986 var _uploadMedia = null; |
5231 var _uploadOptions = null; | 4987 var _uploadOptions = null; |
5232 var _downloadOptions = commons.DownloadOptions.Metadata; | 4988 var _downloadOptions = commons.DownloadOptions.Metadata; |
5233 var _body = null; | 4989 var _body = null; |
5234 | 4990 |
5235 if (request != null) { | 4991 if (request != null) { |
5236 _body = convert.JSON.encode((request).toJson()); | 4992 _body = convert.JSON.encode((request).toJson()); |
5237 } | 4993 } |
5238 if (project == null) { | 4994 if (project == null) { |
5239 throw new core.ArgumentError("Parameter project is required."); | 4995 throw new core.ArgumentError("Parameter project is required."); |
5240 } | 4996 } |
5241 if (zone == null) { | 4997 if (zone == null) { |
5242 throw new core.ArgumentError("Parameter zone is required."); | 4998 throw new core.ArgumentError("Parameter zone is required."); |
5243 } | 4999 } |
5244 if (instance == null) { | 5000 if (instanceGroup == null) { |
5245 throw new core.ArgumentError("Parameter instance is required."); | 5001 throw new core.ArgumentError("Parameter instanceGroup is required."); |
| 5002 } |
| 5003 if (filter != null) { |
| 5004 _queryParams["filter"] = [filter]; |
| 5005 } |
| 5006 if (maxResults != null) { |
| 5007 _queryParams["maxResults"] = ["${maxResults}"]; |
| 5008 } |
| 5009 if (pageToken != null) { |
| 5010 _queryParams["pageToken"] = [pageToken]; |
5246 } | 5011 } |
5247 | 5012 |
5248 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/attachDisk'; | 5013 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup') + '/listInstances'; |
5249 | 5014 |
5250 var _response = _requester.request(_url, | 5015 var _response = _requester.request(_url, |
5251 "POST", | 5016 "POST", |
5252 body: _body, | 5017 body: _body, |
5253 queryParams: _queryParams, | 5018 queryParams: _queryParams, |
5254 uploadOptions: _uploadOptions, | 5019 uploadOptions: _uploadOptions, |
5255 uploadMedia: _uploadMedia, | 5020 uploadMedia: _uploadMedia, |
5256 downloadOptions: _downloadOptions); | 5021 downloadOptions: _downloadOptions); |
5257 return _response.then((data) => new Operation.fromJson(data)); | 5022 return _response.then((data) => new InstanceGroupsListInstances.fromJson(dat
a)); |
5258 } | 5023 } |
5259 | 5024 |
5260 /** | 5025 /** |
5261 * Deletes the specified Instance resource. For more information, see Shutting | 5026 * Removes a list of instances from an instance group. |
5262 * down an instance. | 5027 * |
| 5028 * [request] - The metadata request object. |
5263 * | 5029 * |
5264 * Request parameters: | 5030 * Request parameters: |
5265 * | 5031 * |
5266 * [project] - Project ID for this request. | 5032 * [project] - The project ID for this request. |
5267 * Value must have pattern | 5033 * Value must have pattern |
5268 * "(?:(?:[-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])?))". | 5034 * "(?:(?:[-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])?))". |
5269 * | 5035 * |
5270 * [zone] - The name of the zone for this request. | 5036 * [zone] - The URL of the zone where the instance group is located. |
5271 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
5272 * | 5037 * |
5273 * [instance] - Name of the instance resource to delete. | 5038 * [instanceGroup] - The name of the instance group where the specified |
5274 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5039 * instances will be removed. |
5275 * | 5040 * |
5276 * Completes with a [Operation]. | 5041 * Completes with a [Operation]. |
5277 * | 5042 * |
5278 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5043 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5279 * error. | 5044 * error. |
5280 * | 5045 * |
5281 * If the used [http.Client] completes with an error when making a REST call, | 5046 * If the used [http.Client] completes with an error when making a REST call, |
5282 * this method will complete with the same error. | 5047 * this method will complete with the same error. |
5283 */ | 5048 */ |
5284 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing instance) { | 5049 async.Future<Operation> removeInstances(InstanceGroupsRemoveInstancesRequest r
equest, core.String project, core.String zone, core.String instanceGroup) { |
5285 var _url = null; | 5050 var _url = null; |
5286 var _queryParams = new core.Map(); | 5051 var _queryParams = new core.Map(); |
5287 var _uploadMedia = null; | 5052 var _uploadMedia = null; |
5288 var _uploadOptions = null; | 5053 var _uploadOptions = null; |
5289 var _downloadOptions = commons.DownloadOptions.Metadata; | 5054 var _downloadOptions = commons.DownloadOptions.Metadata; |
5290 var _body = null; | 5055 var _body = null; |
5291 | 5056 |
| 5057 if (request != null) { |
| 5058 _body = convert.JSON.encode((request).toJson()); |
| 5059 } |
5292 if (project == null) { | 5060 if (project == null) { |
5293 throw new core.ArgumentError("Parameter project is required."); | 5061 throw new core.ArgumentError("Parameter project is required."); |
5294 } | 5062 } |
5295 if (zone == null) { | 5063 if (zone == null) { |
5296 throw new core.ArgumentError("Parameter zone is required."); | 5064 throw new core.ArgumentError("Parameter zone is required."); |
5297 } | 5065 } |
5298 if (instance == null) { | 5066 if (instanceGroup == null) { |
5299 throw new core.ArgumentError("Parameter instance is required."); | 5067 throw new core.ArgumentError("Parameter instanceGroup is required."); |
5300 } | 5068 } |
5301 | 5069 |
5302 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance'); | 5070 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup') + '/removeInstances'; |
5303 | 5071 |
5304 var _response = _requester.request(_url, | 5072 var _response = _requester.request(_url, |
5305 "DELETE", | 5073 "POST", |
5306 body: _body, | 5074 body: _body, |
5307 queryParams: _queryParams, | 5075 queryParams: _queryParams, |
5308 uploadOptions: _uploadOptions, | 5076 uploadOptions: _uploadOptions, |
5309 uploadMedia: _uploadMedia, | 5077 uploadMedia: _uploadMedia, |
5310 downloadOptions: _downloadOptions); | 5078 downloadOptions: _downloadOptions); |
5311 return _response.then((data) => new Operation.fromJson(data)); | 5079 return _response.then((data) => new Operation.fromJson(data)); |
5312 } | 5080 } |
5313 | 5081 |
5314 /** | 5082 /** |
5315 * Deletes an access config from an instance's network interface. | 5083 * Sets the named ports in an instance group. |
| 5084 * |
| 5085 * [request] - The metadata request object. |
5316 * | 5086 * |
5317 * Request parameters: | 5087 * Request parameters: |
5318 * | 5088 * |
5319 * [project] - Project ID for this request. | 5089 * [project] - The project ID for this request. |
5320 * Value must have pattern | 5090 * Value must have pattern |
5321 * "(?:(?:[-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])?))". | 5091 * "(?:(?:[-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])?))". |
5322 * | 5092 * |
5323 * [zone] - The name of the zone for this request. | 5093 * [zone] - The URL of the zone where the instance group is located. |
5324 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
5325 * | 5094 * |
5326 * [instance] - The instance name for this request. | 5095 * [instanceGroup] - The name of the instance group where the named ports are |
5327 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5096 * updated. |
5328 * | |
5329 * [accessConfig] - The name of the access config to delete. | |
5330 * | |
5331 * [networkInterface] - The name of the network interface. | |
5332 * | 5097 * |
5333 * Completes with a [Operation]. | 5098 * Completes with a [Operation]. |
5334 * | 5099 * |
5335 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5100 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5336 * error. | 5101 * error. |
5337 * | 5102 * |
5338 * If the used [http.Client] completes with an error when making a REST call, | 5103 * If the used [http.Client] completes with an error when making a REST call, |
5339 * this method will complete with the same error. | 5104 * this method will complete with the same error. |
5340 */ | 5105 */ |
5341 async.Future<Operation> deleteAccessConfig(core.String project, core.String zo
ne, core.String instance, core.String accessConfig, core.String networkInterface
) { | 5106 async.Future<Operation> setNamedPorts(InstanceGroupsSetNamedPortsRequest reque
st, core.String project, core.String zone, core.String instanceGroup) { |
5342 var _url = null; | 5107 var _url = null; |
5343 var _queryParams = new core.Map(); | 5108 var _queryParams = new core.Map(); |
5344 var _uploadMedia = null; | 5109 var _uploadMedia = null; |
5345 var _uploadOptions = null; | 5110 var _uploadOptions = null; |
5346 var _downloadOptions = commons.DownloadOptions.Metadata; | 5111 var _downloadOptions = commons.DownloadOptions.Metadata; |
5347 var _body = null; | 5112 var _body = null; |
5348 | 5113 |
| 5114 if (request != null) { |
| 5115 _body = convert.JSON.encode((request).toJson()); |
| 5116 } |
5349 if (project == null) { | 5117 if (project == null) { |
5350 throw new core.ArgumentError("Parameter project is required."); | 5118 throw new core.ArgumentError("Parameter project is required."); |
5351 } | 5119 } |
5352 if (zone == null) { | 5120 if (zone == null) { |
5353 throw new core.ArgumentError("Parameter zone is required."); | 5121 throw new core.ArgumentError("Parameter zone is required."); |
5354 } | 5122 } |
5355 if (instance == null) { | 5123 if (instanceGroup == null) { |
5356 throw new core.ArgumentError("Parameter instance is required."); | 5124 throw new core.ArgumentError("Parameter instanceGroup is required."); |
5357 } | 5125 } |
5358 if (accessConfig == null) { | |
5359 throw new core.ArgumentError("Parameter accessConfig is required."); | |
5360 } | |
5361 _queryParams["accessConfig"] = [accessConfig]; | |
5362 if (networkInterface == null) { | |
5363 throw new core.ArgumentError("Parameter networkInterface is required."); | |
5364 } | |
5365 _queryParams["networkInterface"] = [networkInterface]; | |
5366 | 5126 |
5367 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/deleteAccessConfig'; | 5127 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instanceGroups/' + commons.Escaper.ecapeVariable('
$instanceGroup') + '/setNamedPorts'; |
5368 | 5128 |
5369 var _response = _requester.request(_url, | 5129 var _response = _requester.request(_url, |
5370 "POST", | 5130 "POST", |
5371 body: _body, | 5131 body: _body, |
5372 queryParams: _queryParams, | 5132 queryParams: _queryParams, |
5373 uploadOptions: _uploadOptions, | 5133 uploadOptions: _uploadOptions, |
5374 uploadMedia: _uploadMedia, | 5134 uploadMedia: _uploadMedia, |
5375 downloadOptions: _downloadOptions); | 5135 downloadOptions: _downloadOptions); |
5376 return _response.then((data) => new Operation.fromJson(data)); | 5136 return _response.then((data) => new Operation.fromJson(data)); |
5377 } | 5137 } |
5378 | 5138 |
| 5139 } |
| 5140 |
| 5141 |
| 5142 class InstanceTemplatesResourceApi { |
| 5143 final commons.ApiRequester _requester; |
| 5144 |
| 5145 InstanceTemplatesResourceApi(commons.ApiRequester client) : |
| 5146 _requester = client; |
| 5147 |
5379 /** | 5148 /** |
5380 * Detaches a disk from an instance. | 5149 * Deletes the specified instance template. |
5381 * | 5150 * |
5382 * Request parameters: | 5151 * Request parameters: |
5383 * | 5152 * |
5384 * [project] - Project ID for this request. | 5153 * [project] - The project ID for this request. |
5385 * Value must have pattern | 5154 * Value must have pattern |
5386 * "(?:(?:[-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])?))". | 5155 * "(?:(?:[-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])?))". |
5387 * | 5156 * |
5388 * [zone] - The name of the zone for this request. | 5157 * [instanceTemplate] - The name of the instance template to delete. |
5389 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5158 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5390 * | 5159 * |
5391 * [instance] - Instance name. | |
5392 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
5393 * | |
5394 * [deviceName] - Disk device name to detach. | |
5395 * Value must have pattern "\w[\w.-]{0,254}". | |
5396 * | |
5397 * Completes with a [Operation]. | 5160 * Completes with a [Operation]. |
5398 * | 5161 * |
5399 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5162 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5400 * error. | 5163 * error. |
5401 * | 5164 * |
5402 * If the used [http.Client] completes with an error when making a REST call, | 5165 * If the used [http.Client] completes with an error when making a REST call, |
5403 * this method will complete with the same error. | 5166 * this method will complete with the same error. |
5404 */ | 5167 */ |
5405 async.Future<Operation> detachDisk(core.String project, core.String zone, core
.String instance, core.String deviceName) { | 5168 async.Future<Operation> delete(core.String project, core.String instanceTempla
te) { |
5406 var _url = null; | 5169 var _url = null; |
5407 var _queryParams = new core.Map(); | 5170 var _queryParams = new core.Map(); |
5408 var _uploadMedia = null; | 5171 var _uploadMedia = null; |
5409 var _uploadOptions = null; | 5172 var _uploadOptions = null; |
5410 var _downloadOptions = commons.DownloadOptions.Metadata; | 5173 var _downloadOptions = commons.DownloadOptions.Metadata; |
5411 var _body = null; | 5174 var _body = null; |
5412 | 5175 |
5413 if (project == null) { | 5176 if (project == null) { |
5414 throw new core.ArgumentError("Parameter project is required."); | 5177 throw new core.ArgumentError("Parameter project is required."); |
5415 } | 5178 } |
5416 if (zone == null) { | 5179 if (instanceTemplate == null) { |
5417 throw new core.ArgumentError("Parameter zone is required."); | 5180 throw new core.ArgumentError("Parameter instanceTemplate is required."); |
5418 } | 5181 } |
5419 if (instance == null) { | |
5420 throw new core.ArgumentError("Parameter instance is required."); | |
5421 } | |
5422 if (deviceName == null) { | |
5423 throw new core.ArgumentError("Parameter deviceName is required."); | |
5424 } | |
5425 _queryParams["deviceName"] = [deviceName]; | |
5426 | 5182 |
5427 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/detachDisk'; | 5183 _url = commons.Escaper.ecapeVariable('$project') + '/global/instanceTemplate
s/' + commons.Escaper.ecapeVariable('$instanceTemplate'); |
5428 | 5184 |
5429 var _response = _requester.request(_url, | 5185 var _response = _requester.request(_url, |
5430 "POST", | 5186 "DELETE", |
5431 body: _body, | 5187 body: _body, |
5432 queryParams: _queryParams, | 5188 queryParams: _queryParams, |
5433 uploadOptions: _uploadOptions, | 5189 uploadOptions: _uploadOptions, |
5434 uploadMedia: _uploadMedia, | 5190 uploadMedia: _uploadMedia, |
5435 downloadOptions: _downloadOptions); | 5191 downloadOptions: _downloadOptions); |
5436 return _response.then((data) => new Operation.fromJson(data)); | 5192 return _response.then((data) => new Operation.fromJson(data)); |
5437 } | 5193 } |
5438 | 5194 |
5439 /** | 5195 /** |
5440 * Returns the specified instance resource. | 5196 * Returns the specified instance template resource. |
5441 * | 5197 * |
5442 * Request parameters: | 5198 * Request parameters: |
5443 * | 5199 * |
5444 * [project] - Project ID for this request. | 5200 * [project] - The project ID for this request. |
5445 * Value must have pattern | 5201 * Value must have pattern |
5446 * "(?:(?:[-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])?))". | 5202 * "(?:(?:[-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])?))". |
5447 * | 5203 * |
5448 * [zone] - The name of the The name of the zone for this request.. | 5204 * [instanceTemplate] - The name of the instance template. |
5449 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5205 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5450 * | 5206 * |
5451 * [instance] - Name of the instance resource to return. | 5207 * Completes with a [InstanceTemplate]. |
5452 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
5453 * | |
5454 * Completes with a [Instance]. | |
5455 * | 5208 * |
5456 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5209 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5457 * error. | 5210 * error. |
5458 * | 5211 * |
5459 * If the used [http.Client] completes with an error when making a REST call, | 5212 * If the used [http.Client] completes with an error when making a REST call, |
5460 * this method will complete with the same error. | 5213 * this method will complete with the same error. |
5461 */ | 5214 */ |
5462 async.Future<Instance> get(core.String project, core.String zone, core.String
instance) { | 5215 async.Future<InstanceTemplate> get(core.String project, core.String instanceTe
mplate) { |
5463 var _url = null; | 5216 var _url = null; |
5464 var _queryParams = new core.Map(); | 5217 var _queryParams = new core.Map(); |
5465 var _uploadMedia = null; | 5218 var _uploadMedia = null; |
5466 var _uploadOptions = null; | 5219 var _uploadOptions = null; |
5467 var _downloadOptions = commons.DownloadOptions.Metadata; | 5220 var _downloadOptions = commons.DownloadOptions.Metadata; |
5468 var _body = null; | 5221 var _body = null; |
5469 | 5222 |
5470 if (project == null) { | 5223 if (project == null) { |
5471 throw new core.ArgumentError("Parameter project is required."); | 5224 throw new core.ArgumentError("Parameter project is required."); |
5472 } | 5225 } |
5473 if (zone == null) { | 5226 if (instanceTemplate == null) { |
5474 throw new core.ArgumentError("Parameter zone is required."); | 5227 throw new core.ArgumentError("Parameter instanceTemplate is required."); |
5475 } | |
5476 if (instance == null) { | |
5477 throw new core.ArgumentError("Parameter instance is required."); | |
5478 } | 5228 } |
5479 | 5229 |
5480 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance'); | 5230 _url = commons.Escaper.ecapeVariable('$project') + '/global/instanceTemplate
s/' + commons.Escaper.ecapeVariable('$instanceTemplate'); |
5481 | 5231 |
5482 var _response = _requester.request(_url, | 5232 var _response = _requester.request(_url, |
5483 "GET", | 5233 "GET", |
5484 body: _body, | 5234 body: _body, |
5485 queryParams: _queryParams, | 5235 queryParams: _queryParams, |
5486 uploadOptions: _uploadOptions, | 5236 uploadOptions: _uploadOptions, |
5487 uploadMedia: _uploadMedia, | 5237 uploadMedia: _uploadMedia, |
5488 downloadOptions: _downloadOptions); | 5238 downloadOptions: _downloadOptions); |
5489 return _response.then((data) => new Instance.fromJson(data)); | 5239 return _response.then((data) => new InstanceTemplate.fromJson(data)); |
5490 } | 5240 } |
5491 | 5241 |
5492 /** | 5242 /** |
5493 * Returns the specified instance's serial port output. | 5243 * Creates an instance template in the specified project using the data that |
| 5244 * is included in the request. |
| 5245 * |
| 5246 * [request] - The metadata request object. |
5494 * | 5247 * |
5495 * Request parameters: | 5248 * Request parameters: |
5496 * | 5249 * |
5497 * [project] - Project ID for this request. | 5250 * [project] - The project ID for this request. |
5498 * Value must have pattern | 5251 * Value must have pattern |
5499 * "(?:(?:[-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])?))". | 5252 * "(?:(?:[-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])?))". |
5500 * | 5253 * |
5501 * [zone] - The name of the zone for this request. | 5254 * Completes with a [Operation]. |
5502 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
5503 * | |
5504 * [instance] - Name of the instance scoping this request. | |
5505 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
5506 * | |
5507 * [port] - Specifies which COM or serial port to retrieve data from. | |
5508 * Value must be between "1" and "4". | |
5509 * | |
5510 * Completes with a [SerialPortOutput]. | |
5511 * | 5255 * |
5512 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5256 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5513 * error. | 5257 * error. |
| 5258 * |
| 5259 * If the used [http.Client] completes with an error when making a REST call, |
| 5260 * this method will complete with the same error. |
| 5261 */ |
| 5262 async.Future<Operation> insert(InstanceTemplate request, core.String project)
{ |
| 5263 var _url = null; |
| 5264 var _queryParams = new core.Map(); |
| 5265 var _uploadMedia = null; |
| 5266 var _uploadOptions = null; |
| 5267 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 5268 var _body = null; |
| 5269 |
| 5270 if (request != null) { |
| 5271 _body = convert.JSON.encode((request).toJson()); |
| 5272 } |
| 5273 if (project == null) { |
| 5274 throw new core.ArgumentError("Parameter project is required."); |
| 5275 } |
| 5276 |
| 5277 _url = commons.Escaper.ecapeVariable('$project') + '/global/instanceTemplate
s'; |
| 5278 |
| 5279 var _response = _requester.request(_url, |
| 5280 "POST", |
| 5281 body: _body, |
| 5282 queryParams: _queryParams, |
| 5283 uploadOptions: _uploadOptions, |
| 5284 uploadMedia: _uploadMedia, |
| 5285 downloadOptions: _downloadOptions); |
| 5286 return _response.then((data) => new Operation.fromJson(data)); |
| 5287 } |
| 5288 |
| 5289 /** |
| 5290 * Retrieves a list of instance templates that are contained within the |
| 5291 * specified project and zone. |
| 5292 * |
| 5293 * Request parameters: |
| 5294 * |
| 5295 * [project] - The project ID for this request. |
| 5296 * Value must have pattern |
| 5297 * "(?:(?:[-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])?))". |
| 5298 * |
| 5299 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 5300 * form filter={expression}. Your {expression} must be in the format: |
| 5301 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
| 5302 * |
| 5303 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 5304 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 5305 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 5306 * string value to filter to. The literal value must be valid for the type of |
| 5307 * field (string, number, boolean). For string fields, the literal value is |
| 5308 * interpreted as a regular expression using RE2 syntax. The literal value |
| 5309 * must match the entire field. |
| 5310 * |
| 5311 * For example, filter=name ne example-instance. |
| 5312 * |
| 5313 * [maxResults] - Maximum count of results to be returned. |
| 5314 * Value must be between "0" and "500". |
| 5315 * |
| 5316 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 5317 * to list the next page of results. Set pageToken to the nextPageToken |
| 5318 * returned by a previous list request. |
| 5319 * |
| 5320 * Completes with a [InstanceTemplateList]. |
| 5321 * |
| 5322 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 5323 * error. |
5514 * | 5324 * |
5515 * If the used [http.Client] completes with an error when making a REST call, | 5325 * If the used [http.Client] completes with an error when making a REST call, |
5516 * this method will complete with the same error. | 5326 * this method will complete with the same error. |
5517 */ | 5327 */ |
5518 async.Future<SerialPortOutput> getSerialPortOutput(core.String project, core.S
tring zone, core.String instance, {core.int port}) { | 5328 async.Future<InstanceTemplateList> list(core.String project, {core.String filt
er, core.int maxResults, core.String pageToken}) { |
5519 var _url = null; | 5329 var _url = null; |
5520 var _queryParams = new core.Map(); | 5330 var _queryParams = new core.Map(); |
5521 var _uploadMedia = null; | 5331 var _uploadMedia = null; |
5522 var _uploadOptions = null; | 5332 var _uploadOptions = null; |
5523 var _downloadOptions = commons.DownloadOptions.Metadata; | 5333 var _downloadOptions = commons.DownloadOptions.Metadata; |
5524 var _body = null; | 5334 var _body = null; |
5525 | 5335 |
5526 if (project == null) { | 5336 if (project == null) { |
5527 throw new core.ArgumentError("Parameter project is required."); | 5337 throw new core.ArgumentError("Parameter project is required."); |
5528 } | 5338 } |
5529 if (zone == null) { | 5339 if (filter != null) { |
5530 throw new core.ArgumentError("Parameter zone is required."); | 5340 _queryParams["filter"] = [filter]; |
5531 } | 5341 } |
5532 if (instance == null) { | 5342 if (maxResults != null) { |
5533 throw new core.ArgumentError("Parameter instance is required."); | 5343 _queryParams["maxResults"] = ["${maxResults}"]; |
5534 } | 5344 } |
5535 if (port != null) { | 5345 if (pageToken != null) { |
5536 _queryParams["port"] = ["${port}"]; | 5346 _queryParams["pageToken"] = [pageToken]; |
5537 } | 5347 } |
5538 | 5348 |
5539 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/serialPort'; | 5349 _url = commons.Escaper.ecapeVariable('$project') + '/global/instanceTemplate
s'; |
5540 | 5350 |
5541 var _response = _requester.request(_url, | 5351 var _response = _requester.request(_url, |
5542 "GET", | 5352 "GET", |
5543 body: _body, | 5353 body: _body, |
5544 queryParams: _queryParams, | 5354 queryParams: _queryParams, |
5545 uploadOptions: _uploadOptions, | 5355 uploadOptions: _uploadOptions, |
5546 uploadMedia: _uploadMedia, | 5356 uploadMedia: _uploadMedia, |
5547 downloadOptions: _downloadOptions); | 5357 downloadOptions: _downloadOptions); |
5548 return _response.then((data) => new SerialPortOutput.fromJson(data)); | 5358 return _response.then((data) => new InstanceTemplateList.fromJson(data)); |
5549 } | 5359 } |
5550 | 5360 |
| 5361 } |
| 5362 |
| 5363 |
| 5364 class InstancesResourceApi { |
| 5365 final commons.ApiRequester _requester; |
| 5366 |
| 5367 InstancesResourceApi(commons.ApiRequester client) : |
| 5368 _requester = client; |
| 5369 |
5551 /** | 5370 /** |
5552 * Creates an instance resource in the specified project using the data | 5371 * Adds an access config to an instance's network interface. |
5553 * included in the request. | |
5554 * | 5372 * |
5555 * [request] - The metadata request object. | 5373 * [request] - The metadata request object. |
5556 * | 5374 * |
5557 * Request parameters: | 5375 * Request parameters: |
5558 * | 5376 * |
5559 * [project] - Project ID for this request. | 5377 * [project] - Project ID for this request. |
5560 * Value must have pattern | 5378 * Value must have pattern |
5561 * "(?:(?:[-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])?))". | 5379 * "(?:(?:[-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])?))". |
5562 * | 5380 * |
5563 * [zone] - The name of the zone for this request. | 5381 * [zone] - The name of the zone for this request. |
5564 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5382 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5565 * | 5383 * |
| 5384 * [instance] - The instance name for this request. |
| 5385 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 5386 * |
| 5387 * [networkInterface] - The name of the network interface to add to this |
| 5388 * instance. |
| 5389 * |
5566 * Completes with a [Operation]. | 5390 * Completes with a [Operation]. |
5567 * | 5391 * |
5568 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5392 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5569 * error. | 5393 * error. |
5570 * | 5394 * |
5571 * If the used [http.Client] completes with an error when making a REST call, | 5395 * If the used [http.Client] completes with an error when making a REST call, |
5572 * this method will complete with the same error. | 5396 * this method will complete with the same error. |
5573 */ | 5397 */ |
5574 async.Future<Operation> insert(Instance request, core.String project, core.Str
ing zone) { | 5398 async.Future<Operation> addAccessConfig(AccessConfig request, core.String proj
ect, core.String zone, core.String instance, core.String networkInterface) { |
5575 var _url = null; | 5399 var _url = null; |
5576 var _queryParams = new core.Map(); | 5400 var _queryParams = new core.Map(); |
5577 var _uploadMedia = null; | 5401 var _uploadMedia = null; |
5578 var _uploadOptions = null; | 5402 var _uploadOptions = null; |
5579 var _downloadOptions = commons.DownloadOptions.Metadata; | 5403 var _downloadOptions = commons.DownloadOptions.Metadata; |
5580 var _body = null; | 5404 var _body = null; |
5581 | 5405 |
5582 if (request != null) { | 5406 if (request != null) { |
5583 _body = convert.JSON.encode((request).toJson()); | 5407 _body = convert.JSON.encode((request).toJson()); |
5584 } | 5408 } |
5585 if (project == null) { | 5409 if (project == null) { |
5586 throw new core.ArgumentError("Parameter project is required."); | 5410 throw new core.ArgumentError("Parameter project is required."); |
5587 } | 5411 } |
5588 if (zone == null) { | 5412 if (zone == null) { |
5589 throw new core.ArgumentError("Parameter zone is required."); | 5413 throw new core.ArgumentError("Parameter zone is required."); |
5590 } | 5414 } |
| 5415 if (instance == null) { |
| 5416 throw new core.ArgumentError("Parameter instance is required."); |
| 5417 } |
| 5418 if (networkInterface == null) { |
| 5419 throw new core.ArgumentError("Parameter networkInterface is required."); |
| 5420 } |
| 5421 _queryParams["networkInterface"] = [networkInterface]; |
5591 | 5422 |
5592 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances'; | 5423 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/addAccessConfig'; |
5593 | 5424 |
5594 var _response = _requester.request(_url, | 5425 var _response = _requester.request(_url, |
5595 "POST", | 5426 "POST", |
5596 body: _body, | 5427 body: _body, |
5597 queryParams: _queryParams, | 5428 queryParams: _queryParams, |
5598 uploadOptions: _uploadOptions, | 5429 uploadOptions: _uploadOptions, |
5599 uploadMedia: _uploadMedia, | 5430 uploadMedia: _uploadMedia, |
5600 downloadOptions: _downloadOptions); | 5431 downloadOptions: _downloadOptions); |
5601 return _response.then((data) => new Operation.fromJson(data)); | 5432 return _response.then((data) => new Operation.fromJson(data)); |
5602 } | 5433 } |
5603 | 5434 |
5604 /** | 5435 /** |
5605 * Retrieves the list of instance resources contained within the specified | |
5606 * zone. | |
5607 * | |
5608 * Request parameters: | 5436 * Request parameters: |
5609 * | 5437 * |
5610 * [project] - Project ID for this request. | 5438 * [project] - Project ID for this request. |
5611 * Value must have pattern | 5439 * Value must have pattern |
5612 * "(?:(?:[-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])?))". | 5440 * "(?:(?:[-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])?))". |
5613 * | 5441 * |
5614 * [zone] - The name of the zone for this request. | 5442 * [filter] - Sets a filter expression for filtering listed resources, in the |
5615 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5443 * form filter={expression}. Your {expression} must be in the format: |
| 5444 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
5616 * | 5445 * |
5617 * [filter] - Sets a filter expression for filtering listed resources, in the | 5446 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
5618 * form filter={expression}. Your {expression} must contain the following: | 5447 * field types are supported (string, number, boolean). The COMPARISON_STRING |
5619 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 5448 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 5449 * string value to filter to. The literal value must be valid for the type of |
| 5450 * field (string, number, boolean). For string fields, the literal value is |
| 5451 * interpreted as a regular expression using RE2 syntax. The literal value |
| 5452 * must match the entire field. |
5620 * | 5453 * |
5621 * - FIELD_NAME: The name of the field you want to compare. The field name | 5454 * For example, filter=name ne example-instance. |
5622 * must be valid for the type of resource being filtered. Only atomic field | |
5623 * types are supported (string, number, boolean). Array and object fields are | |
5624 * not currently supported. | |
5625 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
5626 * equals). | |
5627 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
5628 * must be valid for the type of field (string, number, boolean). For string | |
5629 * fields, the literal value is interpreted as a regular expression using RE2 | |
5630 * syntax. The literal value must match the entire field. For example, you | |
5631 * can filter by the name of a resource: | |
5632 * filter=name ne example-instance | |
5633 * The above filter returns only results whose name field does not equal | |
5634 * example-instance. You can also enclose your literal string in single, | |
5635 * double, or no quotes. | |
5636 * | 5455 * |
5637 * [maxResults] - Maximum count of results to be returned. | 5456 * [maxResults] - Maximum count of results to be returned. |
5638 * Value must be between "0" and "500". | 5457 * Value must be between "0" and "500". |
5639 * | 5458 * |
5640 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 5459 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
5641 * to list the next page of results. Set pageToken to the nextPageToken | 5460 * to list the next page of results. Set pageToken to the nextPageToken |
5642 * returned by a previous list request. | 5461 * returned by a previous list request. |
5643 * | 5462 * |
5644 * Completes with a [InstanceList]. | 5463 * Completes with a [InstanceAggregatedList]. |
5645 * | 5464 * |
5646 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5465 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5647 * error. | 5466 * error. |
5648 * | 5467 * |
5649 * If the used [http.Client] completes with an error when making a REST call, | 5468 * If the used [http.Client] completes with an error when making a REST call, |
5650 * this method will complete with the same error. | 5469 * this method will complete with the same error. |
5651 */ | 5470 */ |
5652 async.Future<InstanceList> list(core.String project, core.String zone, {core.S
tring filter, core.int maxResults, core.String pageToken}) { | 5471 async.Future<InstanceAggregatedList> aggregatedList(core.String project, {core
.String filter, core.int maxResults, core.String pageToken}) { |
5653 var _url = null; | 5472 var _url = null; |
5654 var _queryParams = new core.Map(); | 5473 var _queryParams = new core.Map(); |
5655 var _uploadMedia = null; | 5474 var _uploadMedia = null; |
5656 var _uploadOptions = null; | 5475 var _uploadOptions = null; |
5657 var _downloadOptions = commons.DownloadOptions.Metadata; | 5476 var _downloadOptions = commons.DownloadOptions.Metadata; |
5658 var _body = null; | 5477 var _body = null; |
5659 | 5478 |
5660 if (project == null) { | 5479 if (project == null) { |
5661 throw new core.ArgumentError("Parameter project is required."); | 5480 throw new core.ArgumentError("Parameter project is required."); |
5662 } | 5481 } |
5663 if (zone == null) { | |
5664 throw new core.ArgumentError("Parameter zone is required."); | |
5665 } | |
5666 if (filter != null) { | 5482 if (filter != null) { |
5667 _queryParams["filter"] = [filter]; | 5483 _queryParams["filter"] = [filter]; |
5668 } | 5484 } |
5669 if (maxResults != null) { | 5485 if (maxResults != null) { |
5670 _queryParams["maxResults"] = ["${maxResults}"]; | 5486 _queryParams["maxResults"] = ["${maxResults}"]; |
5671 } | 5487 } |
5672 if (pageToken != null) { | 5488 if (pageToken != null) { |
5673 _queryParams["pageToken"] = [pageToken]; | 5489 _queryParams["pageToken"] = [pageToken]; |
5674 } | 5490 } |
5675 | 5491 |
5676 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances'; | 5492 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/instances'; |
5677 | 5493 |
5678 var _response = _requester.request(_url, | 5494 var _response = _requester.request(_url, |
5679 "GET", | 5495 "GET", |
5680 body: _body, | 5496 body: _body, |
5681 queryParams: _queryParams, | 5497 queryParams: _queryParams, |
5682 uploadOptions: _uploadOptions, | 5498 uploadOptions: _uploadOptions, |
5683 uploadMedia: _uploadMedia, | 5499 uploadMedia: _uploadMedia, |
5684 downloadOptions: _downloadOptions); | 5500 downloadOptions: _downloadOptions); |
5685 return _response.then((data) => new InstanceList.fromJson(data)); | 5501 return _response.then((data) => new InstanceAggregatedList.fromJson(data)); |
5686 } | 5502 } |
5687 | 5503 |
5688 /** | 5504 /** |
5689 * Performs a hard reset on the instance. | 5505 * Attaches a Disk resource to an instance. |
| 5506 * |
| 5507 * [request] - The metadata request object. |
5690 * | 5508 * |
5691 * Request parameters: | 5509 * Request parameters: |
5692 * | 5510 * |
5693 * [project] - Project ID for this request. | 5511 * [project] - Project ID for this request. |
5694 * Value must have pattern | 5512 * Value must have pattern |
5695 * "(?:(?:[-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])?))". | 5513 * "(?:(?:[-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])?))". |
5696 * | 5514 * |
5697 * [zone] - The name of the zone for this request. | 5515 * [zone] - The name of the zone for this request. |
5698 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5516 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5699 * | 5517 * |
5700 * [instance] - Name of the instance scoping this request. | 5518 * [instance] - Instance name. |
5701 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5519 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5702 * | 5520 * |
5703 * Completes with a [Operation]. | 5521 * Completes with a [Operation]. |
5704 * | 5522 * |
5705 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5523 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5706 * error. | 5524 * error. |
5707 * | 5525 * |
5708 * If the used [http.Client] completes with an error when making a REST call, | 5526 * If the used [http.Client] completes with an error when making a REST call, |
5709 * this method will complete with the same error. | 5527 * this method will complete with the same error. |
5710 */ | 5528 */ |
5711 async.Future<Operation> reset(core.String project, core.String zone, core.Stri
ng instance) { | 5529 async.Future<Operation> attachDisk(AttachedDisk request, core.String project,
core.String zone, core.String instance) { |
5712 var _url = null; | 5530 var _url = null; |
5713 var _queryParams = new core.Map(); | 5531 var _queryParams = new core.Map(); |
5714 var _uploadMedia = null; | 5532 var _uploadMedia = null; |
5715 var _uploadOptions = null; | 5533 var _uploadOptions = null; |
5716 var _downloadOptions = commons.DownloadOptions.Metadata; | 5534 var _downloadOptions = commons.DownloadOptions.Metadata; |
5717 var _body = null; | 5535 var _body = null; |
5718 | 5536 |
| 5537 if (request != null) { |
| 5538 _body = convert.JSON.encode((request).toJson()); |
| 5539 } |
5719 if (project == null) { | 5540 if (project == null) { |
5720 throw new core.ArgumentError("Parameter project is required."); | 5541 throw new core.ArgumentError("Parameter project is required."); |
5721 } | 5542 } |
5722 if (zone == null) { | 5543 if (zone == null) { |
5723 throw new core.ArgumentError("Parameter zone is required."); | 5544 throw new core.ArgumentError("Parameter zone is required."); |
5724 } | 5545 } |
5725 if (instance == null) { | 5546 if (instance == null) { |
5726 throw new core.ArgumentError("Parameter instance is required."); | 5547 throw new core.ArgumentError("Parameter instance is required."); |
5727 } | 5548 } |
5728 | 5549 |
5729 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/reset'; | 5550 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/attachDisk'; |
5730 | 5551 |
5731 var _response = _requester.request(_url, | 5552 var _response = _requester.request(_url, |
5732 "POST", | 5553 "POST", |
5733 body: _body, | 5554 body: _body, |
5734 queryParams: _queryParams, | 5555 queryParams: _queryParams, |
5735 uploadOptions: _uploadOptions, | 5556 uploadOptions: _uploadOptions, |
5736 uploadMedia: _uploadMedia, | 5557 uploadMedia: _uploadMedia, |
5737 downloadOptions: _downloadOptions); | 5558 downloadOptions: _downloadOptions); |
5738 return _response.then((data) => new Operation.fromJson(data)); | 5559 return _response.then((data) => new Operation.fromJson(data)); |
5739 } | 5560 } |
5740 | 5561 |
5741 /** | 5562 /** |
5742 * Sets the auto-delete flag for a disk attached to an instance. | 5563 * Deletes the specified Instance resource. For more information, see Shutting |
| 5564 * down an instance. |
5743 * | 5565 * |
5744 * Request parameters: | 5566 * Request parameters: |
5745 * | 5567 * |
5746 * [project] - Project ID for this request. | 5568 * [project] - Project ID for this request. |
5747 * Value must have pattern | 5569 * Value must have pattern |
5748 * "(?:(?:[-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])?))". | 5570 * "(?:(?:[-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])?))". |
5749 * | 5571 * |
5750 * [zone] - The name of the zone for this request. | 5572 * [zone] - The name of the zone for this request. |
5751 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5573 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5752 * | 5574 * |
5753 * [instance] - The instance name. | 5575 * [instance] - Name of the instance resource to delete. |
5754 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5576 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5755 * | 5577 * |
5756 * [autoDelete] - Whether to auto-delete the disk when the instance is | |
5757 * deleted. | |
5758 * | |
5759 * [deviceName] - The device name of the disk to modify. | |
5760 * Value must have pattern "\w[\w.-]{0,254}". | |
5761 * | |
5762 * Completes with a [Operation]. | 5578 * Completes with a [Operation]. |
5763 * | 5579 * |
5764 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5580 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5765 * error. | 5581 * error. |
5766 * | 5582 * |
5767 * If the used [http.Client] completes with an error when making a REST call, | 5583 * If the used [http.Client] completes with an error when making a REST call, |
5768 * this method will complete with the same error. | 5584 * this method will complete with the same error. |
5769 */ | 5585 */ |
5770 async.Future<Operation> setDiskAutoDelete(core.String project, core.String zon
e, core.String instance, core.bool autoDelete, core.String deviceName) { | 5586 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing instance) { |
5771 var _url = null; | 5587 var _url = null; |
5772 var _queryParams = new core.Map(); | 5588 var _queryParams = new core.Map(); |
5773 var _uploadMedia = null; | 5589 var _uploadMedia = null; |
5774 var _uploadOptions = null; | 5590 var _uploadOptions = null; |
5775 var _downloadOptions = commons.DownloadOptions.Metadata; | 5591 var _downloadOptions = commons.DownloadOptions.Metadata; |
5776 var _body = null; | 5592 var _body = null; |
5777 | 5593 |
5778 if (project == null) { | 5594 if (project == null) { |
5779 throw new core.ArgumentError("Parameter project is required."); | 5595 throw new core.ArgumentError("Parameter project is required."); |
5780 } | 5596 } |
5781 if (zone == null) { | 5597 if (zone == null) { |
5782 throw new core.ArgumentError("Parameter zone is required."); | 5598 throw new core.ArgumentError("Parameter zone is required."); |
5783 } | 5599 } |
5784 if (instance == null) { | 5600 if (instance == null) { |
5785 throw new core.ArgumentError("Parameter instance is required."); | 5601 throw new core.ArgumentError("Parameter instance is required."); |
5786 } | 5602 } |
5787 if (autoDelete == null) { | |
5788 throw new core.ArgumentError("Parameter autoDelete is required."); | |
5789 } | |
5790 _queryParams["autoDelete"] = ["${autoDelete}"]; | |
5791 if (deviceName == null) { | |
5792 throw new core.ArgumentError("Parameter deviceName is required."); | |
5793 } | |
5794 _queryParams["deviceName"] = [deviceName]; | |
5795 | 5603 |
5796 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/setDiskAutoDelete'; | 5604 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance'); |
5797 | 5605 |
5798 var _response = _requester.request(_url, | 5606 var _response = _requester.request(_url, |
5799 "POST", | 5607 "DELETE", |
5800 body: _body, | 5608 body: _body, |
5801 queryParams: _queryParams, | 5609 queryParams: _queryParams, |
5802 uploadOptions: _uploadOptions, | 5610 uploadOptions: _uploadOptions, |
5803 uploadMedia: _uploadMedia, | 5611 uploadMedia: _uploadMedia, |
5804 downloadOptions: _downloadOptions); | 5612 downloadOptions: _downloadOptions); |
5805 return _response.then((data) => new Operation.fromJson(data)); | 5613 return _response.then((data) => new Operation.fromJson(data)); |
5806 } | 5614 } |
5807 | 5615 |
5808 /** | 5616 /** |
5809 * Sets metadata for the specified instance to the data included in the | 5617 * Deletes an access config from an instance's network interface. |
5810 * request. | |
5811 * | |
5812 * [request] - The metadata request object. | |
5813 * | 5618 * |
5814 * Request parameters: | 5619 * Request parameters: |
5815 * | 5620 * |
5816 * [project] - Project ID for this request. | 5621 * [project] - Project ID for this request. |
5817 * Value must have pattern | 5622 * Value must have pattern |
5818 * "(?:(?:[-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])?))". | 5623 * "(?:(?:[-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])?))". |
5819 * | 5624 * |
5820 * [zone] - The name of the zone for this request. | 5625 * [zone] - The name of the zone for this request. |
5821 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5626 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5822 * | 5627 * |
5823 * [instance] - Name of the instance scoping this request. | 5628 * [instance] - The instance name for this request. |
5824 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5629 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5825 * | 5630 * |
| 5631 * [accessConfig] - The name of the access config to delete. |
| 5632 * |
| 5633 * [networkInterface] - The name of the network interface. |
| 5634 * |
5826 * Completes with a [Operation]. | 5635 * Completes with a [Operation]. |
5827 * | 5636 * |
5828 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5637 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5829 * error. | 5638 * error. |
5830 * | 5639 * |
5831 * If the used [http.Client] completes with an error when making a REST call, | 5640 * If the used [http.Client] completes with an error when making a REST call, |
5832 * this method will complete with the same error. | 5641 * this method will complete with the same error. |
5833 */ | 5642 */ |
5834 async.Future<Operation> setMetadata(Metadata request, core.String project, cor
e.String zone, core.String instance) { | 5643 async.Future<Operation> deleteAccessConfig(core.String project, core.String zo
ne, core.String instance, core.String accessConfig, core.String networkInterface
) { |
5835 var _url = null; | 5644 var _url = null; |
5836 var _queryParams = new core.Map(); | 5645 var _queryParams = new core.Map(); |
5837 var _uploadMedia = null; | 5646 var _uploadMedia = null; |
5838 var _uploadOptions = null; | 5647 var _uploadOptions = null; |
5839 var _downloadOptions = commons.DownloadOptions.Metadata; | 5648 var _downloadOptions = commons.DownloadOptions.Metadata; |
5840 var _body = null; | 5649 var _body = null; |
5841 | 5650 |
5842 if (request != null) { | |
5843 _body = convert.JSON.encode((request).toJson()); | |
5844 } | |
5845 if (project == null) { | 5651 if (project == null) { |
5846 throw new core.ArgumentError("Parameter project is required."); | 5652 throw new core.ArgumentError("Parameter project is required."); |
5847 } | 5653 } |
5848 if (zone == null) { | 5654 if (zone == null) { |
5849 throw new core.ArgumentError("Parameter zone is required."); | 5655 throw new core.ArgumentError("Parameter zone is required."); |
5850 } | 5656 } |
5851 if (instance == null) { | 5657 if (instance == null) { |
5852 throw new core.ArgumentError("Parameter instance is required."); | 5658 throw new core.ArgumentError("Parameter instance is required."); |
5853 } | 5659 } |
| 5660 if (accessConfig == null) { |
| 5661 throw new core.ArgumentError("Parameter accessConfig is required."); |
| 5662 } |
| 5663 _queryParams["accessConfig"] = [accessConfig]; |
| 5664 if (networkInterface == null) { |
| 5665 throw new core.ArgumentError("Parameter networkInterface is required."); |
| 5666 } |
| 5667 _queryParams["networkInterface"] = [networkInterface]; |
5854 | 5668 |
5855 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/setMetadata'; | 5669 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/deleteAccessConfig'; |
5856 | 5670 |
5857 var _response = _requester.request(_url, | 5671 var _response = _requester.request(_url, |
5858 "POST", | 5672 "POST", |
5859 body: _body, | 5673 body: _body, |
5860 queryParams: _queryParams, | 5674 queryParams: _queryParams, |
5861 uploadOptions: _uploadOptions, | 5675 uploadOptions: _uploadOptions, |
5862 uploadMedia: _uploadMedia, | 5676 uploadMedia: _uploadMedia, |
5863 downloadOptions: _downloadOptions); | 5677 downloadOptions: _downloadOptions); |
5864 return _response.then((data) => new Operation.fromJson(data)); | 5678 return _response.then((data) => new Operation.fromJson(data)); |
5865 } | 5679 } |
5866 | 5680 |
5867 /** | 5681 /** |
5868 * Sets an instance's scheduling options. | 5682 * Detaches a disk from an instance. |
5869 * | |
5870 * [request] - The metadata request object. | |
5871 * | 5683 * |
5872 * Request parameters: | 5684 * Request parameters: |
5873 * | 5685 * |
5874 * [project] - Project ID for this request. | 5686 * [project] - Project ID for this request. |
5875 * Value must have pattern | 5687 * Value must have pattern |
5876 * "(?:(?:[-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])?))". | 5688 * "(?:(?:[-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])?))". |
5877 * | 5689 * |
5878 * [zone] - The name of the zone for this request. | 5690 * [zone] - The name of the zone for this request. |
5879 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5691 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5880 * | 5692 * |
5881 * [instance] - Instance name. | 5693 * [instance] - Instance name. |
5882 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5694 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5883 * | 5695 * |
| 5696 * [deviceName] - Disk device name to detach. |
| 5697 * Value must have pattern "\w[\w.-]{0,254}". |
| 5698 * |
5884 * Completes with a [Operation]. | 5699 * Completes with a [Operation]. |
5885 * | 5700 * |
5886 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5701 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5887 * error. | 5702 * error. |
5888 * | 5703 * |
5889 * If the used [http.Client] completes with an error when making a REST call, | 5704 * If the used [http.Client] completes with an error when making a REST call, |
5890 * this method will complete with the same error. | 5705 * this method will complete with the same error. |
5891 */ | 5706 */ |
5892 async.Future<Operation> setScheduling(Scheduling request, core.String project,
core.String zone, core.String instance) { | 5707 async.Future<Operation> detachDisk(core.String project, core.String zone, core
.String instance, core.String deviceName) { |
5893 var _url = null; | 5708 var _url = null; |
5894 var _queryParams = new core.Map(); | 5709 var _queryParams = new core.Map(); |
5895 var _uploadMedia = null; | 5710 var _uploadMedia = null; |
5896 var _uploadOptions = null; | 5711 var _uploadOptions = null; |
5897 var _downloadOptions = commons.DownloadOptions.Metadata; | 5712 var _downloadOptions = commons.DownloadOptions.Metadata; |
5898 var _body = null; | 5713 var _body = null; |
5899 | 5714 |
5900 if (request != null) { | |
5901 _body = convert.JSON.encode((request).toJson()); | |
5902 } | |
5903 if (project == null) { | 5715 if (project == null) { |
5904 throw new core.ArgumentError("Parameter project is required."); | 5716 throw new core.ArgumentError("Parameter project is required."); |
5905 } | 5717 } |
5906 if (zone == null) { | 5718 if (zone == null) { |
5907 throw new core.ArgumentError("Parameter zone is required."); | 5719 throw new core.ArgumentError("Parameter zone is required."); |
5908 } | 5720 } |
5909 if (instance == null) { | 5721 if (instance == null) { |
5910 throw new core.ArgumentError("Parameter instance is required."); | 5722 throw new core.ArgumentError("Parameter instance is required."); |
5911 } | 5723 } |
| 5724 if (deviceName == null) { |
| 5725 throw new core.ArgumentError("Parameter deviceName is required."); |
| 5726 } |
| 5727 _queryParams["deviceName"] = [deviceName]; |
5912 | 5728 |
5913 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/setScheduling'; | 5729 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/detachDisk'; |
5914 | 5730 |
5915 var _response = _requester.request(_url, | 5731 var _response = _requester.request(_url, |
5916 "POST", | 5732 "POST", |
5917 body: _body, | 5733 body: _body, |
5918 queryParams: _queryParams, | 5734 queryParams: _queryParams, |
5919 uploadOptions: _uploadOptions, | 5735 uploadOptions: _uploadOptions, |
5920 uploadMedia: _uploadMedia, | 5736 uploadMedia: _uploadMedia, |
5921 downloadOptions: _downloadOptions); | 5737 downloadOptions: _downloadOptions); |
5922 return _response.then((data) => new Operation.fromJson(data)); | 5738 return _response.then((data) => new Operation.fromJson(data)); |
5923 } | 5739 } |
5924 | 5740 |
5925 /** | 5741 /** |
5926 * Sets tags for the specified instance to the data included in the request. | 5742 * Returns the specified instance resource. |
5927 * | |
5928 * [request] - The metadata request object. | |
5929 * | 5743 * |
5930 * Request parameters: | 5744 * Request parameters: |
5931 * | 5745 * |
5932 * [project] - Project ID for this request. | 5746 * [project] - Project ID for this request. |
5933 * Value must have pattern | 5747 * Value must have pattern |
5934 * "(?:(?:[-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])?))". | 5748 * "(?:(?:[-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])?))". |
5935 * | 5749 * |
5936 * [zone] - The name of the zone for this request. | 5750 * [zone] - The name of the zone for this request. |
5937 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5751 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5938 * | 5752 * |
5939 * [instance] - Name of the instance scoping this request. | 5753 * [instance] - Name of the instance resource to return. |
5940 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5754 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5941 * | 5755 * |
5942 * Completes with a [Operation]. | 5756 * Completes with a [Instance]. |
5943 * | 5757 * |
5944 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5758 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
5945 * error. | 5759 * error. |
5946 * | 5760 * |
5947 * If the used [http.Client] completes with an error when making a REST call, | 5761 * If the used [http.Client] completes with an error when making a REST call, |
5948 * this method will complete with the same error. | 5762 * this method will complete with the same error. |
5949 */ | 5763 */ |
5950 async.Future<Operation> setTags(Tags request, core.String project, core.String
zone, core.String instance) { | 5764 async.Future<Instance> get(core.String project, core.String zone, core.String
instance) { |
5951 var _url = null; | 5765 var _url = null; |
5952 var _queryParams = new core.Map(); | 5766 var _queryParams = new core.Map(); |
5953 var _uploadMedia = null; | 5767 var _uploadMedia = null; |
5954 var _uploadOptions = null; | 5768 var _uploadOptions = null; |
5955 var _downloadOptions = commons.DownloadOptions.Metadata; | 5769 var _downloadOptions = commons.DownloadOptions.Metadata; |
5956 var _body = null; | 5770 var _body = null; |
5957 | 5771 |
5958 if (request != null) { | |
5959 _body = convert.JSON.encode((request).toJson()); | |
5960 } | |
5961 if (project == null) { | 5772 if (project == null) { |
5962 throw new core.ArgumentError("Parameter project is required."); | 5773 throw new core.ArgumentError("Parameter project is required."); |
5963 } | 5774 } |
5964 if (zone == null) { | 5775 if (zone == null) { |
5965 throw new core.ArgumentError("Parameter zone is required."); | 5776 throw new core.ArgumentError("Parameter zone is required."); |
5966 } | 5777 } |
5967 if (instance == null) { | 5778 if (instance == null) { |
5968 throw new core.ArgumentError("Parameter instance is required."); | 5779 throw new core.ArgumentError("Parameter instance is required."); |
5969 } | 5780 } |
5970 | 5781 |
5971 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/setTags'; | 5782 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance'); |
5972 | 5783 |
5973 var _response = _requester.request(_url, | 5784 var _response = _requester.request(_url, |
5974 "POST", | 5785 "GET", |
5975 body: _body, | 5786 body: _body, |
5976 queryParams: _queryParams, | 5787 queryParams: _queryParams, |
5977 uploadOptions: _uploadOptions, | 5788 uploadOptions: _uploadOptions, |
5978 uploadMedia: _uploadMedia, | 5789 uploadMedia: _uploadMedia, |
5979 downloadOptions: _downloadOptions); | 5790 downloadOptions: _downloadOptions); |
5980 return _response.then((data) => new Operation.fromJson(data)); | 5791 return _response.then((data) => new Instance.fromJson(data)); |
5981 } | 5792 } |
5982 | 5793 |
5983 /** | 5794 /** |
5984 * This method starts an instance that was stopped using the using the | 5795 * Returns the specified instance's serial port output. |
5985 * instances().stop method. For more information, see Restart an instance. | |
5986 * | 5796 * |
5987 * Request parameters: | 5797 * Request parameters: |
5988 * | 5798 * |
5989 * [project] - Project ID for this request. | 5799 * [project] - Project ID for this request. |
5990 * Value must have pattern | 5800 * Value must have pattern |
5991 * "(?:(?:[-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])?))". | 5801 * "(?:(?:[-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])?))". |
5992 * | 5802 * |
5993 * [zone] - The name of the zone for this request. | 5803 * [zone] - The name of the zone for this request. |
5994 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5804 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5995 * | 5805 * |
5996 * [instance] - Name of the instance resource to start. | 5806 * [instance] - Name of the instance scoping this request. |
5997 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5807 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
5998 * | 5808 * |
5999 * Completes with a [Operation]. | 5809 * [port] - Specifies which COM or serial port to retrieve data from. |
| 5810 * Value must be between "1" and "4". |
| 5811 * |
| 5812 * Completes with a [SerialPortOutput]. |
6000 * | 5813 * |
6001 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5814 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6002 * error. | 5815 * error. |
6003 * | 5816 * |
6004 * If the used [http.Client] completes with an error when making a REST call, | 5817 * If the used [http.Client] completes with an error when making a REST call, |
6005 * this method will complete with the same error. | 5818 * this method will complete with the same error. |
6006 */ | 5819 */ |
6007 async.Future<Operation> start(core.String project, core.String zone, core.Stri
ng instance) { | 5820 async.Future<SerialPortOutput> getSerialPortOutput(core.String project, core.S
tring zone, core.String instance, {core.int port}) { |
6008 var _url = null; | 5821 var _url = null; |
6009 var _queryParams = new core.Map(); | 5822 var _queryParams = new core.Map(); |
6010 var _uploadMedia = null; | 5823 var _uploadMedia = null; |
6011 var _uploadOptions = null; | 5824 var _uploadOptions = null; |
6012 var _downloadOptions = commons.DownloadOptions.Metadata; | 5825 var _downloadOptions = commons.DownloadOptions.Metadata; |
6013 var _body = null; | 5826 var _body = null; |
6014 | 5827 |
6015 if (project == null) { | 5828 if (project == null) { |
6016 throw new core.ArgumentError("Parameter project is required."); | 5829 throw new core.ArgumentError("Parameter project is required."); |
6017 } | 5830 } |
6018 if (zone == null) { | 5831 if (zone == null) { |
6019 throw new core.ArgumentError("Parameter zone is required."); | 5832 throw new core.ArgumentError("Parameter zone is required."); |
6020 } | 5833 } |
6021 if (instance == null) { | 5834 if (instance == null) { |
6022 throw new core.ArgumentError("Parameter instance is required."); | 5835 throw new core.ArgumentError("Parameter instance is required."); |
6023 } | 5836 } |
| 5837 if (port != null) { |
| 5838 _queryParams["port"] = ["${port}"]; |
| 5839 } |
6024 | 5840 |
6025 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/start'; | 5841 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/serialPort'; |
6026 | 5842 |
6027 var _response = _requester.request(_url, | 5843 var _response = _requester.request(_url, |
6028 "POST", | 5844 "GET", |
6029 body: _body, | 5845 body: _body, |
6030 queryParams: _queryParams, | 5846 queryParams: _queryParams, |
6031 uploadOptions: _uploadOptions, | 5847 uploadOptions: _uploadOptions, |
6032 uploadMedia: _uploadMedia, | 5848 uploadMedia: _uploadMedia, |
6033 downloadOptions: _downloadOptions); | 5849 downloadOptions: _downloadOptions); |
6034 return _response.then((data) => new Operation.fromJson(data)); | 5850 return _response.then((data) => new SerialPortOutput.fromJson(data)); |
6035 } | 5851 } |
6036 | 5852 |
6037 /** | 5853 /** |
6038 * This method stops a running instance, shutting it down cleanly, and allows | 5854 * Creates an instance resource in the specified project using the data |
6039 * you to restart the instance at a later time. Stopped instances do not incur | 5855 * included in the request. |
6040 * per-minute, virtual machine usage charges while they are stopped, but any | 5856 * |
6041 * resources that the virtual machine is using, such as persistent disks and | 5857 * [request] - The metadata request object. |
6042 * static IP addresses,will continue to be charged until they are deleted. For | |
6043 * more information, see Stopping an instance. | |
6044 * | 5858 * |
6045 * Request parameters: | 5859 * Request parameters: |
6046 * | 5860 * |
6047 * [project] - Project ID for this request. | 5861 * [project] - Project ID for this request. |
6048 * Value must have pattern | 5862 * Value must have pattern |
6049 * "(?:(?:[-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])?))". | 5863 * "(?:(?:[-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])?))". |
6050 * | 5864 * |
6051 * [zone] - The name of the zone for this request. | 5865 * [zone] - The name of the zone for this request. |
6052 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5866 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6053 * | 5867 * |
6054 * [instance] - Name of the instance resource to stop. | |
6055 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
6056 * | |
6057 * Completes with a [Operation]. | 5868 * Completes with a [Operation]. |
6058 * | 5869 * |
6059 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5870 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6060 * error. | 5871 * error. |
6061 * | 5872 * |
6062 * If the used [http.Client] completes with an error when making a REST call, | 5873 * If the used [http.Client] completes with an error when making a REST call, |
6063 * this method will complete with the same error. | 5874 * this method will complete with the same error. |
6064 */ | 5875 */ |
6065 async.Future<Operation> stop(core.String project, core.String zone, core.Strin
g instance) { | 5876 async.Future<Operation> insert(Instance request, core.String project, core.Str
ing zone) { |
6066 var _url = null; | 5877 var _url = null; |
6067 var _queryParams = new core.Map(); | 5878 var _queryParams = new core.Map(); |
6068 var _uploadMedia = null; | 5879 var _uploadMedia = null; |
6069 var _uploadOptions = null; | 5880 var _uploadOptions = null; |
6070 var _downloadOptions = commons.DownloadOptions.Metadata; | 5881 var _downloadOptions = commons.DownloadOptions.Metadata; |
6071 var _body = null; | 5882 var _body = null; |
6072 | 5883 |
| 5884 if (request != null) { |
| 5885 _body = convert.JSON.encode((request).toJson()); |
| 5886 } |
6073 if (project == null) { | 5887 if (project == null) { |
6074 throw new core.ArgumentError("Parameter project is required."); | 5888 throw new core.ArgumentError("Parameter project is required."); |
6075 } | 5889 } |
6076 if (zone == null) { | 5890 if (zone == null) { |
6077 throw new core.ArgumentError("Parameter zone is required."); | 5891 throw new core.ArgumentError("Parameter zone is required."); |
6078 } | 5892 } |
6079 if (instance == null) { | |
6080 throw new core.ArgumentError("Parameter instance is required."); | |
6081 } | |
6082 | 5893 |
6083 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/stop'; | 5894 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances'; |
6084 | 5895 |
6085 var _response = _requester.request(_url, | 5896 var _response = _requester.request(_url, |
6086 "POST", | 5897 "POST", |
6087 body: _body, | 5898 body: _body, |
6088 queryParams: _queryParams, | 5899 queryParams: _queryParams, |
6089 uploadOptions: _uploadOptions, | 5900 uploadOptions: _uploadOptions, |
6090 uploadMedia: _uploadMedia, | 5901 uploadMedia: _uploadMedia, |
6091 downloadOptions: _downloadOptions); | 5902 downloadOptions: _downloadOptions); |
6092 return _response.then((data) => new Operation.fromJson(data)); | 5903 return _response.then((data) => new Operation.fromJson(data)); |
6093 } | 5904 } |
6094 | 5905 |
6095 } | |
6096 | |
6097 | |
6098 class LicensesResourceApi { | |
6099 final commons.ApiRequester _requester; | |
6100 | |
6101 LicensesResourceApi(commons.ApiRequester client) : | |
6102 _requester = client; | |
6103 | |
6104 /** | 5906 /** |
6105 * Returns the specified license resource. | 5907 * Retrieves the list of instance resources contained within the specified |
| 5908 * zone. |
6106 * | 5909 * |
6107 * Request parameters: | 5910 * Request parameters: |
6108 * | 5911 * |
6109 * [project] - Project ID for this request. | 5912 * [project] - Project ID for this request. |
6110 * Value must have pattern | 5913 * Value must have pattern |
6111 * "(?:(?:[-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])?))". | 5914 * "(?:(?:[-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])?))". |
6112 * | 5915 * |
6113 * [license] - Name of the license resource to return. | 5916 * [zone] - The name of the zone for this request. |
6114 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5917 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6115 * | 5918 * |
6116 * Completes with a [License]. | 5919 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 5920 * form filter={expression}. Your {expression} must be in the format: |
| 5921 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
6117 * | 5922 * |
6118 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5923 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
6119 * error. | 5924 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 5925 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 5926 * string value to filter to. The literal value must be valid for the type of |
| 5927 * field (string, number, boolean). For string fields, the literal value is |
| 5928 * interpreted as a regular expression using RE2 syntax. The literal value |
| 5929 * must match the entire field. |
6120 * | 5930 * |
6121 * If the used [http.Client] completes with an error when making a REST call, | 5931 * For example, filter=name ne example-instance. |
6122 * this method will complete with the same error. | |
6123 */ | |
6124 async.Future<License> get(core.String project, core.String license) { | |
6125 var _url = null; | |
6126 var _queryParams = new core.Map(); | |
6127 var _uploadMedia = null; | |
6128 var _uploadOptions = null; | |
6129 var _downloadOptions = commons.DownloadOptions.Metadata; | |
6130 var _body = null; | |
6131 | |
6132 if (project == null) { | |
6133 throw new core.ArgumentError("Parameter project is required."); | |
6134 } | |
6135 if (license == null) { | |
6136 throw new core.ArgumentError("Parameter license is required."); | |
6137 } | |
6138 | |
6139 _url = commons.Escaper.ecapeVariable('$project') + '/global/licenses/' + com
mons.Escaper.ecapeVariable('$license'); | |
6140 | |
6141 var _response = _requester.request(_url, | |
6142 "GET", | |
6143 body: _body, | |
6144 queryParams: _queryParams, | |
6145 uploadOptions: _uploadOptions, | |
6146 uploadMedia: _uploadMedia, | |
6147 downloadOptions: _downloadOptions); | |
6148 return _response.then((data) => new License.fromJson(data)); | |
6149 } | |
6150 | |
6151 } | |
6152 | |
6153 | |
6154 class MachineTypesResourceApi { | |
6155 final commons.ApiRequester _requester; | |
6156 | |
6157 MachineTypesResourceApi(commons.ApiRequester client) : | |
6158 _requester = client; | |
6159 | |
6160 /** | |
6161 * Retrieves the list of machine type resources grouped by scope. | |
6162 * | |
6163 * Request parameters: | |
6164 * | |
6165 * [project] - Project ID for this request. | |
6166 * Value must have pattern | |
6167 * "(?:(?:[-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])?))". | |
6168 * | |
6169 * [filter] - Sets a filter expression for filtering listed resources, in the | |
6170 * form filter={expression}. Your {expression} must contain the following: | |
6171 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
6172 * | |
6173 * - FIELD_NAME: The name of the field you want to compare. The field name | |
6174 * must be valid for the type of resource being filtered. Only atomic field | |
6175 * types are supported (string, number, boolean). Array and object fields are | |
6176 * not currently supported. | |
6177 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
6178 * equals). | |
6179 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
6180 * must be valid for the type of field (string, number, boolean). For string | |
6181 * fields, the literal value is interpreted as a regular expression using RE2 | |
6182 * syntax. The literal value must match the entire field. For example, you | |
6183 * can filter by the name of a resource: | |
6184 * filter=name ne example-instance | |
6185 * The above filter returns only results whose name field does not equal | |
6186 * example-instance. You can also enclose your literal string in single, | |
6187 * double, or no quotes. | |
6188 * | 5932 * |
6189 * [maxResults] - Maximum count of results to be returned. | 5933 * [maxResults] - Maximum count of results to be returned. |
6190 * Value must be between "0" and "500". | 5934 * Value must be between "0" and "500". |
6191 * | 5935 * |
6192 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 5936 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
6193 * to list the next page of results. Set pageToken to the nextPageToken | 5937 * to list the next page of results. Set pageToken to the nextPageToken |
6194 * returned by a previous list request. | 5938 * returned by a previous list request. |
6195 * | 5939 * |
6196 * Completes with a [MachineTypeAggregatedList]. | 5940 * Completes with a [InstanceList]. |
6197 * | 5941 * |
6198 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 5942 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6199 * error. | 5943 * error. |
6200 * | 5944 * |
6201 * If the used [http.Client] completes with an error when making a REST call, | 5945 * If the used [http.Client] completes with an error when making a REST call, |
6202 * this method will complete with the same error. | 5946 * this method will complete with the same error. |
6203 */ | 5947 */ |
6204 async.Future<MachineTypeAggregatedList> aggregatedList(core.String project, {c
ore.String filter, core.int maxResults, core.String pageToken}) { | 5948 async.Future<InstanceList> list(core.String project, core.String zone, {core.S
tring filter, core.int maxResults, core.String pageToken}) { |
6205 var _url = null; | 5949 var _url = null; |
6206 var _queryParams = new core.Map(); | 5950 var _queryParams = new core.Map(); |
6207 var _uploadMedia = null; | 5951 var _uploadMedia = null; |
6208 var _uploadOptions = null; | 5952 var _uploadOptions = null; |
6209 var _downloadOptions = commons.DownloadOptions.Metadata; | 5953 var _downloadOptions = commons.DownloadOptions.Metadata; |
6210 var _body = null; | 5954 var _body = null; |
6211 | 5955 |
6212 if (project == null) { | 5956 if (project == null) { |
6213 throw new core.ArgumentError("Parameter project is required."); | 5957 throw new core.ArgumentError("Parameter project is required."); |
6214 } | 5958 } |
| 5959 if (zone == null) { |
| 5960 throw new core.ArgumentError("Parameter zone is required."); |
| 5961 } |
6215 if (filter != null) { | 5962 if (filter != null) { |
6216 _queryParams["filter"] = [filter]; | 5963 _queryParams["filter"] = [filter]; |
6217 } | 5964 } |
6218 if (maxResults != null) { | 5965 if (maxResults != null) { |
6219 _queryParams["maxResults"] = ["${maxResults}"]; | 5966 _queryParams["maxResults"] = ["${maxResults}"]; |
6220 } | 5967 } |
6221 if (pageToken != null) { | 5968 if (pageToken != null) { |
6222 _queryParams["pageToken"] = [pageToken]; | 5969 _queryParams["pageToken"] = [pageToken]; |
6223 } | 5970 } |
6224 | 5971 |
6225 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/machineTypes
'; | 5972 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances'; |
6226 | 5973 |
6227 var _response = _requester.request(_url, | 5974 var _response = _requester.request(_url, |
6228 "GET", | 5975 "GET", |
6229 body: _body, | 5976 body: _body, |
6230 queryParams: _queryParams, | 5977 queryParams: _queryParams, |
6231 uploadOptions: _uploadOptions, | 5978 uploadOptions: _uploadOptions, |
6232 uploadMedia: _uploadMedia, | 5979 uploadMedia: _uploadMedia, |
6233 downloadOptions: _downloadOptions); | 5980 downloadOptions: _downloadOptions); |
6234 return _response.then((data) => new MachineTypeAggregatedList.fromJson(data)
); | 5981 return _response.then((data) => new InstanceList.fromJson(data)); |
6235 } | 5982 } |
6236 | 5983 |
6237 /** | 5984 /** |
6238 * Returns the specified machine type resource. | 5985 * Performs a hard reset on the instance. |
6239 * | 5986 * |
6240 * Request parameters: | 5987 * Request parameters: |
6241 * | 5988 * |
6242 * [project] - Project ID for this request. | 5989 * [project] - Project ID for this request. |
6243 * Value must have pattern | 5990 * Value must have pattern |
6244 * "(?:(?:[-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])?))". | 5991 * "(?:(?:[-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])?))". |
6245 * | 5992 * |
6246 * [zone] - The name of the zone for this request. | 5993 * [zone] - The name of the zone for this request. |
6247 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5994 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6248 * | 5995 * |
6249 * [machineType] - Name of the machine type resource to return. | 5996 * [instance] - Name of the instance scoping this request. |
6250 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 5997 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6251 * | 5998 * |
6252 * Completes with a [MachineType]. | 5999 * Completes with a [Operation]. |
6253 * | 6000 * |
6254 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6001 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6255 * error. | 6002 * error. |
6256 * | 6003 * |
6257 * If the used [http.Client] completes with an error when making a REST call, | 6004 * If the used [http.Client] completes with an error when making a REST call, |
6258 * this method will complete with the same error. | 6005 * this method will complete with the same error. |
6259 */ | 6006 */ |
6260 async.Future<MachineType> get(core.String project, core.String zone, core.Stri
ng machineType) { | 6007 async.Future<Operation> reset(core.String project, core.String zone, core.Stri
ng instance) { |
6261 var _url = null; | 6008 var _url = null; |
6262 var _queryParams = new core.Map(); | 6009 var _queryParams = new core.Map(); |
6263 var _uploadMedia = null; | 6010 var _uploadMedia = null; |
6264 var _uploadOptions = null; | 6011 var _uploadOptions = null; |
6265 var _downloadOptions = commons.DownloadOptions.Metadata; | 6012 var _downloadOptions = commons.DownloadOptions.Metadata; |
6266 var _body = null; | 6013 var _body = null; |
6267 | 6014 |
6268 if (project == null) { | 6015 if (project == null) { |
6269 throw new core.ArgumentError("Parameter project is required."); | 6016 throw new core.ArgumentError("Parameter project is required."); |
6270 } | 6017 } |
6271 if (zone == null) { | 6018 if (zone == null) { |
6272 throw new core.ArgumentError("Parameter zone is required."); | 6019 throw new core.ArgumentError("Parameter zone is required."); |
6273 } | 6020 } |
6274 if (machineType == null) { | 6021 if (instance == null) { |
6275 throw new core.ArgumentError("Parameter machineType is required."); | 6022 throw new core.ArgumentError("Parameter instance is required."); |
6276 } | 6023 } |
6277 | 6024 |
6278 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/machineTypes/' + commons.Escaper.ecapeVariable('$m
achineType'); | 6025 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/reset'; |
6279 | 6026 |
6280 var _response = _requester.request(_url, | 6027 var _response = _requester.request(_url, |
6281 "GET", | 6028 "POST", |
6282 body: _body, | 6029 body: _body, |
6283 queryParams: _queryParams, | 6030 queryParams: _queryParams, |
6284 uploadOptions: _uploadOptions, | 6031 uploadOptions: _uploadOptions, |
6285 uploadMedia: _uploadMedia, | 6032 uploadMedia: _uploadMedia, |
6286 downloadOptions: _downloadOptions); | 6033 downloadOptions: _downloadOptions); |
6287 return _response.then((data) => new MachineType.fromJson(data)); | 6034 return _response.then((data) => new Operation.fromJson(data)); |
6288 } | 6035 } |
6289 | 6036 |
6290 /** | 6037 /** |
6291 * Retrieves the list of machine type resources available to the specified | 6038 * Sets the auto-delete flag for a disk attached to an instance. |
6292 * project. | |
6293 * | 6039 * |
6294 * Request parameters: | 6040 * Request parameters: |
6295 * | 6041 * |
6296 * [project] - Project ID for this request. | 6042 * [project] - Project ID for this request. |
6297 * Value must have pattern | 6043 * Value must have pattern |
6298 * "(?:(?:[-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])?))". | 6044 * "(?:(?:[-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])?))". |
6299 * | 6045 * |
6300 * [zone] - The name of the zone for this request. | 6046 * [zone] - The name of the zone for this request. |
6301 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 6047 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6302 * | 6048 * |
6303 * [filter] - Sets a filter expression for filtering listed resources, in the | 6049 * [instance] - The instance name. |
6304 * form filter={expression}. Your {expression} must contain the following: | 6050 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6305 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
6306 * | 6051 * |
6307 * - FIELD_NAME: The name of the field you want to compare. The field name | 6052 * [autoDelete] - Whether to auto-delete the disk when the instance is |
6308 * must be valid for the type of resource being filtered. Only atomic field | 6053 * deleted. |
6309 * types are supported (string, number, boolean). Array and object fields are | |
6310 * not currently supported. | |
6311 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
6312 * equals). | |
6313 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
6314 * must be valid for the type of field (string, number, boolean). For string | |
6315 * fields, the literal value is interpreted as a regular expression using RE2 | |
6316 * syntax. The literal value must match the entire field. For example, you | |
6317 * can filter by the name of a resource: | |
6318 * filter=name ne example-instance | |
6319 * The above filter returns only results whose name field does not equal | |
6320 * example-instance. You can also enclose your literal string in single, | |
6321 * double, or no quotes. | |
6322 * | 6054 * |
6323 * [maxResults] - Maximum count of results to be returned. | 6055 * [deviceName] - The device name of the disk to modify. |
6324 * Value must be between "0" and "500". | 6056 * Value must have pattern "\w[\w.-]{0,254}". |
6325 * | 6057 * |
6326 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 6058 * Completes with a [Operation]. |
6327 * to list the next page of results. Set pageToken to the nextPageToken | |
6328 * returned by a previous list request. | |
6329 * | |
6330 * Completes with a [MachineTypeList]. | |
6331 * | 6059 * |
6332 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6060 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6333 * error. | 6061 * error. |
6334 * | 6062 * |
6335 * If the used [http.Client] completes with an error when making a REST call, | 6063 * If the used [http.Client] completes with an error when making a REST call, |
6336 * this method will complete with the same error. | 6064 * this method will complete with the same error. |
6337 */ | 6065 */ |
6338 async.Future<MachineTypeList> list(core.String project, core.String zone, {cor
e.String filter, core.int maxResults, core.String pageToken}) { | 6066 async.Future<Operation> setDiskAutoDelete(core.String project, core.String zon
e, core.String instance, core.bool autoDelete, core.String deviceName) { |
6339 var _url = null; | 6067 var _url = null; |
6340 var _queryParams = new core.Map(); | 6068 var _queryParams = new core.Map(); |
6341 var _uploadMedia = null; | 6069 var _uploadMedia = null; |
6342 var _uploadOptions = null; | 6070 var _uploadOptions = null; |
6343 var _downloadOptions = commons.DownloadOptions.Metadata; | 6071 var _downloadOptions = commons.DownloadOptions.Metadata; |
6344 var _body = null; | 6072 var _body = null; |
6345 | 6073 |
6346 if (project == null) { | 6074 if (project == null) { |
6347 throw new core.ArgumentError("Parameter project is required."); | 6075 throw new core.ArgumentError("Parameter project is required."); |
6348 } | 6076 } |
6349 if (zone == null) { | 6077 if (zone == null) { |
6350 throw new core.ArgumentError("Parameter zone is required."); | 6078 throw new core.ArgumentError("Parameter zone is required."); |
6351 } | 6079 } |
6352 if (filter != null) { | 6080 if (instance == null) { |
6353 _queryParams["filter"] = [filter]; | 6081 throw new core.ArgumentError("Parameter instance is required."); |
6354 } | 6082 } |
6355 if (maxResults != null) { | 6083 if (autoDelete == null) { |
6356 _queryParams["maxResults"] = ["${maxResults}"]; | 6084 throw new core.ArgumentError("Parameter autoDelete is required."); |
6357 } | 6085 } |
6358 if (pageToken != null) { | 6086 _queryParams["autoDelete"] = ["${autoDelete}"]; |
6359 _queryParams["pageToken"] = [pageToken]; | 6087 if (deviceName == null) { |
| 6088 throw new core.ArgumentError("Parameter deviceName is required."); |
6360 } | 6089 } |
| 6090 _queryParams["deviceName"] = [deviceName]; |
6361 | 6091 |
6362 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/machineTypes'; | 6092 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/setDiskAutoDelete'; |
6363 | 6093 |
6364 var _response = _requester.request(_url, | 6094 var _response = _requester.request(_url, |
6365 "GET", | 6095 "POST", |
6366 body: _body, | 6096 body: _body, |
6367 queryParams: _queryParams, | 6097 queryParams: _queryParams, |
6368 uploadOptions: _uploadOptions, | 6098 uploadOptions: _uploadOptions, |
6369 uploadMedia: _uploadMedia, | 6099 uploadMedia: _uploadMedia, |
6370 downloadOptions: _downloadOptions); | 6100 downloadOptions: _downloadOptions); |
6371 return _response.then((data) => new MachineTypeList.fromJson(data)); | 6101 return _response.then((data) => new Operation.fromJson(data)); |
6372 } | 6102 } |
6373 | 6103 |
6374 } | |
6375 | |
6376 | |
6377 class NetworksResourceApi { | |
6378 final commons.ApiRequester _requester; | |
6379 | |
6380 NetworksResourceApi(commons.ApiRequester client) : | |
6381 _requester = client; | |
6382 | |
6383 /** | 6104 /** |
6384 * Deletes the specified network resource. | 6105 * Sets metadata for the specified instance to the data included in the |
| 6106 * request. |
| 6107 * |
| 6108 * [request] - The metadata request object. |
6385 * | 6109 * |
6386 * Request parameters: | 6110 * Request parameters: |
6387 * | 6111 * |
6388 * [project] - Project ID for this request. | 6112 * [project] - Project ID for this request. |
6389 * Value must have pattern | 6113 * Value must have pattern |
6390 * "(?:(?:[-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])?))". | 6114 * "(?:(?:[-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])?))". |
6391 * | 6115 * |
6392 * [network] - Name of the network resource to delete. | 6116 * [zone] - The name of the zone for this request. |
| 6117 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6118 * |
| 6119 * [instance] - Name of the instance scoping this request. |
6393 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 6120 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6394 * | 6121 * |
6395 * Completes with a [Operation]. | 6122 * Completes with a [Operation]. |
6396 * | 6123 * |
6397 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6124 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6398 * error. | 6125 * error. |
6399 * | 6126 * |
6400 * If the used [http.Client] completes with an error when making a REST call, | 6127 * If the used [http.Client] completes with an error when making a REST call, |
6401 * this method will complete with the same error. | 6128 * this method will complete with the same error. |
6402 */ | 6129 */ |
6403 async.Future<Operation> delete(core.String project, core.String network) { | 6130 async.Future<Operation> setMetadata(Metadata request, core.String project, cor
e.String zone, core.String instance) { |
6404 var _url = null; | 6131 var _url = null; |
6405 var _queryParams = new core.Map(); | 6132 var _queryParams = new core.Map(); |
6406 var _uploadMedia = null; | 6133 var _uploadMedia = null; |
6407 var _uploadOptions = null; | 6134 var _uploadOptions = null; |
6408 var _downloadOptions = commons.DownloadOptions.Metadata; | 6135 var _downloadOptions = commons.DownloadOptions.Metadata; |
6409 var _body = null; | 6136 var _body = null; |
6410 | 6137 |
| 6138 if (request != null) { |
| 6139 _body = convert.JSON.encode((request).toJson()); |
| 6140 } |
6411 if (project == null) { | 6141 if (project == null) { |
6412 throw new core.ArgumentError("Parameter project is required."); | 6142 throw new core.ArgumentError("Parameter project is required."); |
6413 } | 6143 } |
6414 if (network == null) { | 6144 if (zone == null) { |
6415 throw new core.ArgumentError("Parameter network is required."); | 6145 throw new core.ArgumentError("Parameter zone is required."); |
| 6146 } |
| 6147 if (instance == null) { |
| 6148 throw new core.ArgumentError("Parameter instance is required."); |
6416 } | 6149 } |
6417 | 6150 |
6418 _url = commons.Escaper.ecapeVariable('$project') + '/global/networks/' + com
mons.Escaper.ecapeVariable('$network'); | 6151 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/setMetadata'; |
6419 | 6152 |
6420 var _response = _requester.request(_url, | 6153 var _response = _requester.request(_url, |
6421 "DELETE", | 6154 "POST", |
6422 body: _body, | 6155 body: _body, |
6423 queryParams: _queryParams, | 6156 queryParams: _queryParams, |
6424 uploadOptions: _uploadOptions, | 6157 uploadOptions: _uploadOptions, |
6425 uploadMedia: _uploadMedia, | 6158 uploadMedia: _uploadMedia, |
6426 downloadOptions: _downloadOptions); | 6159 downloadOptions: _downloadOptions); |
6427 return _response.then((data) => new Operation.fromJson(data)); | 6160 return _response.then((data) => new Operation.fromJson(data)); |
6428 } | 6161 } |
6429 | 6162 |
6430 /** | 6163 /** |
6431 * Returns the specified network resource. | 6164 * Sets an instance's scheduling options. |
| 6165 * |
| 6166 * [request] - The metadata request object. |
6432 * | 6167 * |
6433 * Request parameters: | 6168 * Request parameters: |
6434 * | 6169 * |
6435 * [project] - Project ID for this request. | 6170 * [project] - Project ID for this request. |
6436 * Value must have pattern | 6171 * Value must have pattern |
6437 * "(?:(?:[-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])?))". | 6172 * "(?:(?:[-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])?))". |
6438 * | 6173 * |
6439 * [network] - Name of the network resource to return. | 6174 * [zone] - The name of the zone for this request. |
6440 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 6175 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6441 * | 6176 * |
6442 * Completes with a [Network]. | 6177 * [instance] - Instance name. |
| 6178 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6179 * |
| 6180 * Completes with a [Operation]. |
6443 * | 6181 * |
6444 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6182 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6445 * error. | 6183 * error. |
6446 * | 6184 * |
6447 * If the used [http.Client] completes with an error when making a REST call, | 6185 * If the used [http.Client] completes with an error when making a REST call, |
6448 * this method will complete with the same error. | 6186 * this method will complete with the same error. |
6449 */ | 6187 */ |
6450 async.Future<Network> get(core.String project, core.String network) { | 6188 async.Future<Operation> setScheduling(Scheduling request, core.String project,
core.String zone, core.String instance) { |
6451 var _url = null; | 6189 var _url = null; |
6452 var _queryParams = new core.Map(); | 6190 var _queryParams = new core.Map(); |
6453 var _uploadMedia = null; | 6191 var _uploadMedia = null; |
6454 var _uploadOptions = null; | 6192 var _uploadOptions = null; |
6455 var _downloadOptions = commons.DownloadOptions.Metadata; | 6193 var _downloadOptions = commons.DownloadOptions.Metadata; |
6456 var _body = null; | 6194 var _body = null; |
6457 | 6195 |
| 6196 if (request != null) { |
| 6197 _body = convert.JSON.encode((request).toJson()); |
| 6198 } |
6458 if (project == null) { | 6199 if (project == null) { |
6459 throw new core.ArgumentError("Parameter project is required."); | 6200 throw new core.ArgumentError("Parameter project is required."); |
6460 } | 6201 } |
6461 if (network == null) { | 6202 if (zone == null) { |
6462 throw new core.ArgumentError("Parameter network is required."); | 6203 throw new core.ArgumentError("Parameter zone is required."); |
| 6204 } |
| 6205 if (instance == null) { |
| 6206 throw new core.ArgumentError("Parameter instance is required."); |
6463 } | 6207 } |
6464 | 6208 |
6465 _url = commons.Escaper.ecapeVariable('$project') + '/global/networks/' + com
mons.Escaper.ecapeVariable('$network'); | 6209 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/setScheduling'; |
6466 | 6210 |
6467 var _response = _requester.request(_url, | 6211 var _response = _requester.request(_url, |
6468 "GET", | 6212 "POST", |
6469 body: _body, | 6213 body: _body, |
6470 queryParams: _queryParams, | 6214 queryParams: _queryParams, |
6471 uploadOptions: _uploadOptions, | 6215 uploadOptions: _uploadOptions, |
6472 uploadMedia: _uploadMedia, | 6216 uploadMedia: _uploadMedia, |
6473 downloadOptions: _downloadOptions); | 6217 downloadOptions: _downloadOptions); |
6474 return _response.then((data) => new Network.fromJson(data)); | 6218 return _response.then((data) => new Operation.fromJson(data)); |
6475 } | 6219 } |
6476 | 6220 |
6477 /** | 6221 /** |
6478 * Creates a network resource in the specified project using the data included | 6222 * Sets tags for the specified instance to the data included in the request. |
6479 * in the request. | |
6480 * | 6223 * |
6481 * [request] - The metadata request object. | 6224 * [request] - The metadata request object. |
6482 * | 6225 * |
6483 * Request parameters: | 6226 * Request parameters: |
6484 * | 6227 * |
6485 * [project] - Project ID for this request. | 6228 * [project] - Project ID for this request. |
6486 * Value must have pattern | 6229 * Value must have pattern |
6487 * "(?:(?:[-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])?))". | 6230 * "(?:(?:[-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])?))". |
6488 * | 6231 * |
| 6232 * [zone] - The name of the zone for this request. |
| 6233 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6234 * |
| 6235 * [instance] - Name of the instance scoping this request. |
| 6236 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6237 * |
6489 * Completes with a [Operation]. | 6238 * Completes with a [Operation]. |
6490 * | 6239 * |
6491 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6240 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6492 * error. | 6241 * error. |
6493 * | 6242 * |
6494 * If the used [http.Client] completes with an error when making a REST call, | 6243 * If the used [http.Client] completes with an error when making a REST call, |
6495 * this method will complete with the same error. | 6244 * this method will complete with the same error. |
6496 */ | 6245 */ |
6497 async.Future<Operation> insert(Network request, core.String project) { | 6246 async.Future<Operation> setTags(Tags request, core.String project, core.String
zone, core.String instance) { |
6498 var _url = null; | 6247 var _url = null; |
6499 var _queryParams = new core.Map(); | 6248 var _queryParams = new core.Map(); |
6500 var _uploadMedia = null; | 6249 var _uploadMedia = null; |
6501 var _uploadOptions = null; | 6250 var _uploadOptions = null; |
6502 var _downloadOptions = commons.DownloadOptions.Metadata; | 6251 var _downloadOptions = commons.DownloadOptions.Metadata; |
6503 var _body = null; | 6252 var _body = null; |
6504 | 6253 |
6505 if (request != null) { | 6254 if (request != null) { |
6506 _body = convert.JSON.encode((request).toJson()); | 6255 _body = convert.JSON.encode((request).toJson()); |
6507 } | 6256 } |
6508 if (project == null) { | 6257 if (project == null) { |
6509 throw new core.ArgumentError("Parameter project is required."); | 6258 throw new core.ArgumentError("Parameter project is required."); |
6510 } | 6259 } |
| 6260 if (zone == null) { |
| 6261 throw new core.ArgumentError("Parameter zone is required."); |
| 6262 } |
| 6263 if (instance == null) { |
| 6264 throw new core.ArgumentError("Parameter instance is required."); |
| 6265 } |
6511 | 6266 |
6512 _url = commons.Escaper.ecapeVariable('$project') + '/global/networks'; | 6267 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/setTags'; |
6513 | 6268 |
6514 var _response = _requester.request(_url, | 6269 var _response = _requester.request(_url, |
6515 "POST", | 6270 "POST", |
6516 body: _body, | 6271 body: _body, |
6517 queryParams: _queryParams, | 6272 queryParams: _queryParams, |
6518 uploadOptions: _uploadOptions, | 6273 uploadOptions: _uploadOptions, |
6519 uploadMedia: _uploadMedia, | 6274 uploadMedia: _uploadMedia, |
6520 downloadOptions: _downloadOptions); | 6275 downloadOptions: _downloadOptions); |
6521 return _response.then((data) => new Operation.fromJson(data)); | 6276 return _response.then((data) => new Operation.fromJson(data)); |
6522 } | 6277 } |
6523 | 6278 |
6524 /** | 6279 /** |
6525 * Retrieves the list of network resources available to the specified project. | 6280 * This method starts an instance that was stopped using the using the |
| 6281 * instances().stop method. For more information, see Restart an instance. |
6526 * | 6282 * |
6527 * Request parameters: | 6283 * Request parameters: |
6528 * | 6284 * |
6529 * [project] - Project ID for this request. | 6285 * [project] - Project ID for this request. |
6530 * Value must have pattern | 6286 * Value must have pattern |
6531 * "(?:(?:[-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])?))". | 6287 * "(?:(?:[-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])?))". |
6532 * | 6288 * |
6533 * [filter] - Sets a filter expression for filtering listed resources, in the | 6289 * [zone] - The name of the zone for this request. |
6534 * form filter={expression}. Your {expression} must contain the following: | 6290 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6535 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
6536 * | 6291 * |
6537 * - FIELD_NAME: The name of the field you want to compare. The field name | 6292 * [instance] - Name of the instance resource to start. |
6538 * must be valid for the type of resource being filtered. Only atomic field | 6293 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6539 * types are supported (string, number, boolean). Array and object fields are | |
6540 * not currently supported. | |
6541 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
6542 * equals). | |
6543 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
6544 * must be valid for the type of field (string, number, boolean). For string | |
6545 * fields, the literal value is interpreted as a regular expression using RE2 | |
6546 * syntax. The literal value must match the entire field. For example, you | |
6547 * can filter by the name of a resource: | |
6548 * filter=name ne example-instance | |
6549 * The above filter returns only results whose name field does not equal | |
6550 * example-instance. You can also enclose your literal string in single, | |
6551 * double, or no quotes. | |
6552 * | 6294 * |
6553 * [maxResults] - Maximum count of results to be returned. | 6295 * Completes with a [Operation]. |
6554 * Value must be between "0" and "500". | |
6555 * | |
6556 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
6557 * to list the next page of results. Set pageToken to the nextPageToken | |
6558 * returned by a previous list request. | |
6559 * | |
6560 * Completes with a [NetworkList]. | |
6561 * | 6296 * |
6562 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6297 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6563 * error. | 6298 * error. |
6564 * | 6299 * |
6565 * If the used [http.Client] completes with an error when making a REST call, | 6300 * If the used [http.Client] completes with an error when making a REST call, |
6566 * this method will complete with the same error. | 6301 * this method will complete with the same error. |
6567 */ | 6302 */ |
6568 async.Future<NetworkList> list(core.String project, {core.String filter, core.
int maxResults, core.String pageToken}) { | 6303 async.Future<Operation> start(core.String project, core.String zone, core.Stri
ng instance) { |
6569 var _url = null; | 6304 var _url = null; |
6570 var _queryParams = new core.Map(); | 6305 var _queryParams = new core.Map(); |
6571 var _uploadMedia = null; | 6306 var _uploadMedia = null; |
6572 var _uploadOptions = null; | 6307 var _uploadOptions = null; |
6573 var _downloadOptions = commons.DownloadOptions.Metadata; | 6308 var _downloadOptions = commons.DownloadOptions.Metadata; |
6574 var _body = null; | 6309 var _body = null; |
6575 | 6310 |
6576 if (project == null) { | 6311 if (project == null) { |
6577 throw new core.ArgumentError("Parameter project is required."); | 6312 throw new core.ArgumentError("Parameter project is required."); |
6578 } | 6313 } |
6579 if (filter != null) { | 6314 if (zone == null) { |
6580 _queryParams["filter"] = [filter]; | 6315 throw new core.ArgumentError("Parameter zone is required."); |
6581 } | 6316 } |
6582 if (maxResults != null) { | 6317 if (instance == null) { |
6583 _queryParams["maxResults"] = ["${maxResults}"]; | 6318 throw new core.ArgumentError("Parameter instance is required."); |
6584 } | |
6585 if (pageToken != null) { | |
6586 _queryParams["pageToken"] = [pageToken]; | |
6587 } | 6319 } |
6588 | 6320 |
6589 _url = commons.Escaper.ecapeVariable('$project') + '/global/networks'; | 6321 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/start'; |
6590 | 6322 |
6591 var _response = _requester.request(_url, | 6323 var _response = _requester.request(_url, |
6592 "GET", | 6324 "POST", |
6593 body: _body, | 6325 body: _body, |
6594 queryParams: _queryParams, | 6326 queryParams: _queryParams, |
6595 uploadOptions: _uploadOptions, | 6327 uploadOptions: _uploadOptions, |
6596 uploadMedia: _uploadMedia, | 6328 uploadMedia: _uploadMedia, |
6597 downloadOptions: _downloadOptions); | 6329 downloadOptions: _downloadOptions); |
6598 return _response.then((data) => new NetworkList.fromJson(data)); | 6330 return _response.then((data) => new Operation.fromJson(data)); |
6599 } | 6331 } |
6600 | 6332 |
6601 } | |
6602 | |
6603 | |
6604 class ProjectsResourceApi { | |
6605 final commons.ApiRequester _requester; | |
6606 | |
6607 ProjectsResourceApi(commons.ApiRequester client) : | |
6608 _requester = client; | |
6609 | |
6610 /** | 6333 /** |
6611 * Returns the specified project resource. | 6334 * This method stops a running instance, shutting it down cleanly, and allows |
| 6335 * you to restart the instance at a later time. Stopped instances do not incur |
| 6336 * per-minute, virtual machine usage charges while they are stopped, but any |
| 6337 * resources that the virtual machine is using, such as persistent disks and |
| 6338 * static IP addresses,will continue to be charged until they are deleted. For |
| 6339 * more information, see Stopping an instance. |
6612 * | 6340 * |
6613 * Request parameters: | 6341 * Request parameters: |
6614 * | 6342 * |
6615 * [project] - Project ID for this request. | 6343 * [project] - Project ID for this request. |
6616 * Value must have pattern | 6344 * Value must have pattern |
6617 * "(?:(?:[-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])?))". | 6345 * "(?:(?:[-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])?))". |
6618 * | 6346 * |
6619 * Completes with a [Project]. | 6347 * [zone] - The name of the zone for this request. |
| 6348 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6349 * |
| 6350 * [instance] - Name of the instance resource to stop. |
| 6351 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6352 * |
| 6353 * Completes with a [Operation]. |
6620 * | 6354 * |
6621 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6355 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6622 * error. | 6356 * error. |
6623 * | 6357 * |
6624 * If the used [http.Client] completes with an error when making a REST call, | 6358 * If the used [http.Client] completes with an error when making a REST call, |
6625 * this method will complete with the same error. | 6359 * this method will complete with the same error. |
6626 */ | 6360 */ |
6627 async.Future<Project> get(core.String project) { | 6361 async.Future<Operation> stop(core.String project, core.String zone, core.Strin
g instance) { |
6628 var _url = null; | 6362 var _url = null; |
6629 var _queryParams = new core.Map(); | 6363 var _queryParams = new core.Map(); |
6630 var _uploadMedia = null; | 6364 var _uploadMedia = null; |
6631 var _uploadOptions = null; | 6365 var _uploadOptions = null; |
6632 var _downloadOptions = commons.DownloadOptions.Metadata; | 6366 var _downloadOptions = commons.DownloadOptions.Metadata; |
6633 var _body = null; | 6367 var _body = null; |
6634 | 6368 |
6635 if (project == null) { | 6369 if (project == null) { |
6636 throw new core.ArgumentError("Parameter project is required."); | 6370 throw new core.ArgumentError("Parameter project is required."); |
6637 } | 6371 } |
| 6372 if (zone == null) { |
| 6373 throw new core.ArgumentError("Parameter zone is required."); |
| 6374 } |
| 6375 if (instance == null) { |
| 6376 throw new core.ArgumentError("Parameter instance is required."); |
| 6377 } |
6638 | 6378 |
6639 _url = commons.Escaper.ecapeVariable('$project'); | 6379 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/instances/' + commons.Escaper.ecapeVariable('$inst
ance') + '/stop'; |
6640 | 6380 |
6641 var _response = _requester.request(_url, | 6381 var _response = _requester.request(_url, |
6642 "GET", | 6382 "POST", |
6643 body: _body, | 6383 body: _body, |
6644 queryParams: _queryParams, | 6384 queryParams: _queryParams, |
6645 uploadOptions: _uploadOptions, | 6385 uploadOptions: _uploadOptions, |
6646 uploadMedia: _uploadMedia, | 6386 uploadMedia: _uploadMedia, |
6647 downloadOptions: _downloadOptions); | 6387 downloadOptions: _downloadOptions); |
6648 return _response.then((data) => new Project.fromJson(data)); | 6388 return _response.then((data) => new Operation.fromJson(data)); |
6649 } | 6389 } |
6650 | 6390 |
| 6391 } |
| 6392 |
| 6393 |
| 6394 class LicensesResourceApi { |
| 6395 final commons.ApiRequester _requester; |
| 6396 |
| 6397 LicensesResourceApi(commons.ApiRequester client) : |
| 6398 _requester = client; |
| 6399 |
6651 /** | 6400 /** |
6652 * Moves a persistent disk from one zone to another. | 6401 * Returns the specified license resource. |
6653 * | |
6654 * [request] - The metadata request object. | |
6655 * | 6402 * |
6656 * Request parameters: | 6403 * Request parameters: |
6657 * | 6404 * |
6658 * [project] - Project ID for this request. | 6405 * [project] - Project ID for this request. |
6659 * Value must have pattern | 6406 * Value must have pattern |
6660 * "(?:(?:[-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])?))". | 6407 * "(?:(?:[-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])?))". |
6661 * | 6408 * |
6662 * Completes with a [Operation]. | 6409 * [license] - Name of the license resource to return. |
| 6410 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6411 * |
| 6412 * Completes with a [License]. |
6663 * | 6413 * |
6664 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6414 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6665 * error. | 6415 * error. |
6666 * | 6416 * |
6667 * If the used [http.Client] completes with an error when making a REST call, | 6417 * If the used [http.Client] completes with an error when making a REST call, |
6668 * this method will complete with the same error. | 6418 * this method will complete with the same error. |
6669 */ | 6419 */ |
6670 async.Future<Operation> moveDisk(DiskMoveRequest request, core.String project)
{ | 6420 async.Future<License> get(core.String project, core.String license) { |
6671 var _url = null; | 6421 var _url = null; |
6672 var _queryParams = new core.Map(); | 6422 var _queryParams = new core.Map(); |
6673 var _uploadMedia = null; | 6423 var _uploadMedia = null; |
6674 var _uploadOptions = null; | 6424 var _uploadOptions = null; |
6675 var _downloadOptions = commons.DownloadOptions.Metadata; | 6425 var _downloadOptions = commons.DownloadOptions.Metadata; |
6676 var _body = null; | 6426 var _body = null; |
6677 | 6427 |
6678 if (request != null) { | |
6679 _body = convert.JSON.encode((request).toJson()); | |
6680 } | |
6681 if (project == null) { | 6428 if (project == null) { |
6682 throw new core.ArgumentError("Parameter project is required."); | 6429 throw new core.ArgumentError("Parameter project is required."); |
6683 } | 6430 } |
| 6431 if (license == null) { |
| 6432 throw new core.ArgumentError("Parameter license is required."); |
| 6433 } |
6684 | 6434 |
6685 _url = commons.Escaper.ecapeVariable('$project') + '/moveDisk'; | 6435 _url = commons.Escaper.ecapeVariable('$project') + '/global/licenses/' + com
mons.Escaper.ecapeVariable('$license'); |
6686 | 6436 |
6687 var _response = _requester.request(_url, | 6437 var _response = _requester.request(_url, |
6688 "POST", | 6438 "GET", |
6689 body: _body, | 6439 body: _body, |
6690 queryParams: _queryParams, | 6440 queryParams: _queryParams, |
6691 uploadOptions: _uploadOptions, | 6441 uploadOptions: _uploadOptions, |
6692 uploadMedia: _uploadMedia, | 6442 uploadMedia: _uploadMedia, |
6693 downloadOptions: _downloadOptions); | 6443 downloadOptions: _downloadOptions); |
6694 return _response.then((data) => new Operation.fromJson(data)); | 6444 return _response.then((data) => new License.fromJson(data)); |
6695 } | 6445 } |
6696 | 6446 |
| 6447 } |
| 6448 |
| 6449 |
| 6450 class MachineTypesResourceApi { |
| 6451 final commons.ApiRequester _requester; |
| 6452 |
| 6453 MachineTypesResourceApi(commons.ApiRequester client) : |
| 6454 _requester = client; |
| 6455 |
6697 /** | 6456 /** |
6698 * Moves an instance and its attached persistent disks from one zone to | 6457 * Retrieves the list of machine type resources grouped by scope. |
6699 * another. | |
6700 * | |
6701 * [request] - The metadata request object. | |
6702 * | 6458 * |
6703 * Request parameters: | 6459 * Request parameters: |
6704 * | 6460 * |
6705 * [project] - Project ID for this request. | 6461 * [project] - Project ID for this request. |
6706 * Value must have pattern | 6462 * Value must have pattern |
6707 * "(?:(?:[-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 * "(?:(?:[-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])?))". |
6708 * | 6464 * |
6709 * Completes with a [Operation]. | 6465 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 6466 * form filter={expression}. Your {expression} must be in the format: |
| 6467 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
| 6468 * |
| 6469 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 6470 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 6471 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 6472 * string value to filter to. The literal value must be valid for the type of |
| 6473 * field (string, number, boolean). For string fields, the literal value is |
| 6474 * interpreted as a regular expression using RE2 syntax. The literal value |
| 6475 * must match the entire field. |
| 6476 * |
| 6477 * For example, filter=name ne example-instance. |
| 6478 * |
| 6479 * [maxResults] - Maximum count of results to be returned. |
| 6480 * Value must be between "0" and "500". |
| 6481 * |
| 6482 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 6483 * to list the next page of results. Set pageToken to the nextPageToken |
| 6484 * returned by a previous list request. |
| 6485 * |
| 6486 * Completes with a [MachineTypeAggregatedList]. |
6710 * | 6487 * |
6711 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6488 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6712 * error. | 6489 * error. |
6713 * | 6490 * |
6714 * If the used [http.Client] completes with an error when making a REST call, | 6491 * If the used [http.Client] completes with an error when making a REST call, |
6715 * this method will complete with the same error. | 6492 * this method will complete with the same error. |
6716 */ | 6493 */ |
6717 async.Future<Operation> moveInstance(InstanceMoveRequest request, core.String
project) { | 6494 async.Future<MachineTypeAggregatedList> aggregatedList(core.String project, {c
ore.String filter, core.int maxResults, core.String pageToken}) { |
6718 var _url = null; | 6495 var _url = null; |
6719 var _queryParams = new core.Map(); | 6496 var _queryParams = new core.Map(); |
6720 var _uploadMedia = null; | 6497 var _uploadMedia = null; |
6721 var _uploadOptions = null; | 6498 var _uploadOptions = null; |
6722 var _downloadOptions = commons.DownloadOptions.Metadata; | 6499 var _downloadOptions = commons.DownloadOptions.Metadata; |
6723 var _body = null; | 6500 var _body = null; |
6724 | 6501 |
6725 if (request != null) { | |
6726 _body = convert.JSON.encode((request).toJson()); | |
6727 } | |
6728 if (project == null) { | 6502 if (project == null) { |
6729 throw new core.ArgumentError("Parameter project is required."); | 6503 throw new core.ArgumentError("Parameter project is required."); |
6730 } | 6504 } |
| 6505 if (filter != null) { |
| 6506 _queryParams["filter"] = [filter]; |
| 6507 } |
| 6508 if (maxResults != null) { |
| 6509 _queryParams["maxResults"] = ["${maxResults}"]; |
| 6510 } |
| 6511 if (pageToken != null) { |
| 6512 _queryParams["pageToken"] = [pageToken]; |
| 6513 } |
6731 | 6514 |
6732 _url = commons.Escaper.ecapeVariable('$project') + '/moveInstance'; | 6515 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/machineTypes
'; |
6733 | 6516 |
6734 var _response = _requester.request(_url, | 6517 var _response = _requester.request(_url, |
6735 "POST", | 6518 "GET", |
6736 body: _body, | 6519 body: _body, |
6737 queryParams: _queryParams, | 6520 queryParams: _queryParams, |
6738 uploadOptions: _uploadOptions, | 6521 uploadOptions: _uploadOptions, |
6739 uploadMedia: _uploadMedia, | 6522 uploadMedia: _uploadMedia, |
6740 downloadOptions: _downloadOptions); | 6523 downloadOptions: _downloadOptions); |
6741 return _response.then((data) => new Operation.fromJson(data)); | 6524 return _response.then((data) => new MachineTypeAggregatedList.fromJson(data)
); |
6742 } | 6525 } |
6743 | 6526 |
6744 /** | 6527 /** |
6745 * Sets metadata common to all instances within the specified project using | 6528 * Returns the specified machine type resource. |
6746 * the data included in the request. | |
6747 * | |
6748 * [request] - The metadata request object. | |
6749 * | 6529 * |
6750 * Request parameters: | 6530 * Request parameters: |
6751 * | 6531 * |
6752 * [project] - Project ID for this request. | 6532 * [project] - Project ID for this request. |
6753 * Value must have pattern | 6533 * Value must have pattern |
6754 * "(?:(?:[-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])?))". | 6534 * "(?:(?:[-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])?))". |
6755 * | 6535 * |
6756 * Completes with a [Operation]. | 6536 * [zone] - The name of the zone for this request. |
| 6537 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6538 * |
| 6539 * [machineType] - Name of the machine type resource to return. |
| 6540 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6541 * |
| 6542 * Completes with a [MachineType]. |
6757 * | 6543 * |
6758 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6544 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6759 * error. | 6545 * error. |
6760 * | 6546 * |
6761 * If the used [http.Client] completes with an error when making a REST call, | 6547 * If the used [http.Client] completes with an error when making a REST call, |
6762 * this method will complete with the same error. | 6548 * this method will complete with the same error. |
6763 */ | 6549 */ |
6764 async.Future<Operation> setCommonInstanceMetadata(Metadata request, core.Strin
g project) { | 6550 async.Future<MachineType> get(core.String project, core.String zone, core.Stri
ng machineType) { |
6765 var _url = null; | 6551 var _url = null; |
6766 var _queryParams = new core.Map(); | 6552 var _queryParams = new core.Map(); |
6767 var _uploadMedia = null; | 6553 var _uploadMedia = null; |
6768 var _uploadOptions = null; | 6554 var _uploadOptions = null; |
6769 var _downloadOptions = commons.DownloadOptions.Metadata; | 6555 var _downloadOptions = commons.DownloadOptions.Metadata; |
6770 var _body = null; | 6556 var _body = null; |
6771 | 6557 |
6772 if (request != null) { | |
6773 _body = convert.JSON.encode((request).toJson()); | |
6774 } | |
6775 if (project == null) { | 6558 if (project == null) { |
6776 throw new core.ArgumentError("Parameter project is required."); | 6559 throw new core.ArgumentError("Parameter project is required."); |
6777 } | 6560 } |
| 6561 if (zone == null) { |
| 6562 throw new core.ArgumentError("Parameter zone is required."); |
| 6563 } |
| 6564 if (machineType == null) { |
| 6565 throw new core.ArgumentError("Parameter machineType is required."); |
| 6566 } |
6778 | 6567 |
6779 _url = commons.Escaper.ecapeVariable('$project') + '/setCommonInstanceMetada
ta'; | 6568 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/machineTypes/' + commons.Escaper.ecapeVariable('$m
achineType'); |
6780 | 6569 |
6781 var _response = _requester.request(_url, | 6570 var _response = _requester.request(_url, |
6782 "POST", | 6571 "GET", |
6783 body: _body, | 6572 body: _body, |
6784 queryParams: _queryParams, | 6573 queryParams: _queryParams, |
6785 uploadOptions: _uploadOptions, | 6574 uploadOptions: _uploadOptions, |
6786 uploadMedia: _uploadMedia, | 6575 uploadMedia: _uploadMedia, |
6787 downloadOptions: _downloadOptions); | 6576 downloadOptions: _downloadOptions); |
6788 return _response.then((data) => new Operation.fromJson(data)); | 6577 return _response.then((data) => new MachineType.fromJson(data)); |
6789 } | 6578 } |
6790 | 6579 |
6791 /** | 6580 /** |
6792 * Enables the usage export feature and sets the usage export bucket where | 6581 * Retrieves the list of machine type resources available to the specified |
6793 * reports are stored. If you provide an empty request body using this method, | 6582 * project. |
6794 * the usage export feature will be disabled. | |
6795 * | |
6796 * [request] - The metadata request object. | |
6797 * | 6583 * |
6798 * Request parameters: | 6584 * Request parameters: |
6799 * | 6585 * |
6800 * [project] - Project ID for this request. | 6586 * [project] - Project ID for this request. |
6801 * Value must have pattern | 6587 * Value must have pattern |
6802 * "(?:(?:[-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])?))". | 6588 * "(?:(?:[-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])?))". |
6803 * | 6589 * |
6804 * Completes with a [Operation]. | 6590 * [zone] - The name of the zone for this request. |
| 6591 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 6592 * |
| 6593 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 6594 * form filter={expression}. Your {expression} must be in the format: |
| 6595 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
| 6596 * |
| 6597 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 6598 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 6599 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 6600 * string value to filter to. The literal value must be valid for the type of |
| 6601 * field (string, number, boolean). For string fields, the literal value is |
| 6602 * interpreted as a regular expression using RE2 syntax. The literal value |
| 6603 * must match the entire field. |
| 6604 * |
| 6605 * For example, filter=name ne example-instance. |
| 6606 * |
| 6607 * [maxResults] - Maximum count of results to be returned. |
| 6608 * Value must be between "0" and "500". |
| 6609 * |
| 6610 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 6611 * to list the next page of results. Set pageToken to the nextPageToken |
| 6612 * returned by a previous list request. |
| 6613 * |
| 6614 * Completes with a [MachineTypeList]. |
6805 * | 6615 * |
6806 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6616 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6807 * error. | 6617 * error. |
6808 * | 6618 * |
6809 * If the used [http.Client] completes with an error when making a REST call, | 6619 * If the used [http.Client] completes with an error when making a REST call, |
6810 * this method will complete with the same error. | 6620 * this method will complete with the same error. |
6811 */ | 6621 */ |
6812 async.Future<Operation> setUsageExportBucket(UsageExportLocation request, core
.String project) { | 6622 async.Future<MachineTypeList> list(core.String project, core.String zone, {cor
e.String filter, core.int maxResults, core.String pageToken}) { |
6813 var _url = null; | 6623 var _url = null; |
6814 var _queryParams = new core.Map(); | 6624 var _queryParams = new core.Map(); |
6815 var _uploadMedia = null; | 6625 var _uploadMedia = null; |
6816 var _uploadOptions = null; | 6626 var _uploadOptions = null; |
6817 var _downloadOptions = commons.DownloadOptions.Metadata; | 6627 var _downloadOptions = commons.DownloadOptions.Metadata; |
6818 var _body = null; | 6628 var _body = null; |
6819 | 6629 |
6820 if (request != null) { | |
6821 _body = convert.JSON.encode((request).toJson()); | |
6822 } | |
6823 if (project == null) { | 6630 if (project == null) { |
6824 throw new core.ArgumentError("Parameter project is required."); | 6631 throw new core.ArgumentError("Parameter project is required."); |
6825 } | 6632 } |
| 6633 if (zone == null) { |
| 6634 throw new core.ArgumentError("Parameter zone is required."); |
| 6635 } |
| 6636 if (filter != null) { |
| 6637 _queryParams["filter"] = [filter]; |
| 6638 } |
| 6639 if (maxResults != null) { |
| 6640 _queryParams["maxResults"] = ["${maxResults}"]; |
| 6641 } |
| 6642 if (pageToken != null) { |
| 6643 _queryParams["pageToken"] = [pageToken]; |
| 6644 } |
6826 | 6645 |
6827 _url = commons.Escaper.ecapeVariable('$project') + '/setUsageExportBucket'; | 6646 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/machineTypes'; |
6828 | 6647 |
6829 var _response = _requester.request(_url, | 6648 var _response = _requester.request(_url, |
6830 "POST", | 6649 "GET", |
6831 body: _body, | 6650 body: _body, |
6832 queryParams: _queryParams, | 6651 queryParams: _queryParams, |
6833 uploadOptions: _uploadOptions, | 6652 uploadOptions: _uploadOptions, |
6834 uploadMedia: _uploadMedia, | 6653 uploadMedia: _uploadMedia, |
6835 downloadOptions: _downloadOptions); | 6654 downloadOptions: _downloadOptions); |
6836 return _response.then((data) => new Operation.fromJson(data)); | 6655 return _response.then((data) => new MachineTypeList.fromJson(data)); |
6837 } | 6656 } |
6838 | 6657 |
6839 } | 6658 } |
6840 | 6659 |
6841 | 6660 |
6842 class RegionOperationsResourceApi { | 6661 class NetworksResourceApi { |
6843 final commons.ApiRequester _requester; | 6662 final commons.ApiRequester _requester; |
6844 | 6663 |
6845 RegionOperationsResourceApi(commons.ApiRequester client) : | 6664 NetworksResourceApi(commons.ApiRequester client) : |
6846 _requester = client; | 6665 _requester = client; |
6847 | 6666 |
6848 /** | 6667 /** |
6849 * Deletes the specified region-specific Operations resource. | 6668 * Deletes the specified network resource. |
6850 * | 6669 * |
6851 * Request parameters: | 6670 * Request parameters: |
6852 * | 6671 * |
6853 * [project] - Project ID for this request. | 6672 * [project] - Project ID for this request. |
6854 * Value must have pattern | 6673 * Value must have pattern |
6855 * "(?:(?:[-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])?))". | 6674 * "(?:(?:[-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])?))". |
6856 * | 6675 * |
6857 * [region] - Name of the region scoping this request. | 6676 * [network] - Name of the network resource to delete. |
6858 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 6677 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6859 * | 6678 * |
6860 * [operation] - Name of the Operations resource to delete. | 6679 * Completes with a [Operation]. |
6861 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
6862 * | 6680 * |
6863 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6681 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6864 * error. | 6682 * error. |
6865 * | 6683 * |
6866 * If the used [http.Client] completes with an error when making a REST call, | 6684 * If the used [http.Client] completes with an error when making a REST call, |
6867 * this method will complete with the same error. | 6685 * this method will complete with the same error. |
6868 */ | 6686 */ |
6869 async.Future delete(core.String project, core.String region, core.String opera
tion) { | 6687 async.Future<Operation> delete(core.String project, core.String network) { |
6870 var _url = null; | 6688 var _url = null; |
6871 var _queryParams = new core.Map(); | 6689 var _queryParams = new core.Map(); |
6872 var _uploadMedia = null; | 6690 var _uploadMedia = null; |
6873 var _uploadOptions = null; | 6691 var _uploadOptions = null; |
6874 var _downloadOptions = commons.DownloadOptions.Metadata; | 6692 var _downloadOptions = commons.DownloadOptions.Metadata; |
6875 var _body = null; | 6693 var _body = null; |
6876 | 6694 |
6877 if (project == null) { | 6695 if (project == null) { |
6878 throw new core.ArgumentError("Parameter project is required."); | 6696 throw new core.ArgumentError("Parameter project is required."); |
6879 } | 6697 } |
6880 if (region == null) { | 6698 if (network == null) { |
6881 throw new core.ArgumentError("Parameter region is required."); | 6699 throw new core.ArgumentError("Parameter network is required."); |
6882 } | |
6883 if (operation == null) { | |
6884 throw new core.ArgumentError("Parameter operation is required."); | |
6885 } | 6700 } |
6886 | 6701 |
6887 _downloadOptions = null; | 6702 _url = commons.Escaper.ecapeVariable('$project') + '/global/networks/' + com
mons.Escaper.ecapeVariable('$network'); |
6888 | |
6889 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/operations/' + commons.Escaper.ecapeVariable('
$operation'); | |
6890 | 6703 |
6891 var _response = _requester.request(_url, | 6704 var _response = _requester.request(_url, |
6892 "DELETE", | 6705 "DELETE", |
6893 body: _body, | 6706 body: _body, |
6894 queryParams: _queryParams, | 6707 queryParams: _queryParams, |
6895 uploadOptions: _uploadOptions, | 6708 uploadOptions: _uploadOptions, |
6896 uploadMedia: _uploadMedia, | 6709 uploadMedia: _uploadMedia, |
6897 downloadOptions: _downloadOptions); | 6710 downloadOptions: _downloadOptions); |
6898 return _response.then((data) => null); | 6711 return _response.then((data) => new Operation.fromJson(data)); |
6899 } | 6712 } |
6900 | 6713 |
6901 /** | 6714 /** |
6902 * Retrieves the specified region-specific Operations resource. | 6715 * Returns the specified network resource. |
6903 * | 6716 * |
6904 * Request parameters: | 6717 * Request parameters: |
6905 * | 6718 * |
6906 * [project] - Project ID for this request. | 6719 * [project] - Project ID for this request. |
6907 * Value must have pattern | 6720 * Value must have pattern |
6908 * "(?:(?:[-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])?))". | 6721 * "(?:(?:[-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])?))". |
6909 * | 6722 * |
6910 * [region] - Name of the zone scoping this request. | 6723 * [network] - Name of the network resource to return. |
6911 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 6724 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
6912 * | 6725 * |
6913 * [operation] - Name of the Operations resource to return. | 6726 * Completes with a [Network]. |
6914 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
6915 * | |
6916 * Completes with a [Operation]. | |
6917 * | 6727 * |
6918 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6728 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6919 * error. | 6729 * error. |
6920 * | 6730 * |
6921 * If the used [http.Client] completes with an error when making a REST call, | 6731 * If the used [http.Client] completes with an error when making a REST call, |
6922 * this method will complete with the same error. | 6732 * this method will complete with the same error. |
6923 */ | 6733 */ |
6924 async.Future<Operation> get(core.String project, core.String region, core.Stri
ng operation) { | 6734 async.Future<Network> get(core.String project, core.String network) { |
6925 var _url = null; | 6735 var _url = null; |
6926 var _queryParams = new core.Map(); | 6736 var _queryParams = new core.Map(); |
6927 var _uploadMedia = null; | 6737 var _uploadMedia = null; |
6928 var _uploadOptions = null; | 6738 var _uploadOptions = null; |
6929 var _downloadOptions = commons.DownloadOptions.Metadata; | 6739 var _downloadOptions = commons.DownloadOptions.Metadata; |
6930 var _body = null; | 6740 var _body = null; |
6931 | 6741 |
6932 if (project == null) { | 6742 if (project == null) { |
6933 throw new core.ArgumentError("Parameter project is required."); | 6743 throw new core.ArgumentError("Parameter project is required."); |
6934 } | 6744 } |
6935 if (region == null) { | 6745 if (network == null) { |
6936 throw new core.ArgumentError("Parameter region is required."); | 6746 throw new core.ArgumentError("Parameter network is required."); |
6937 } | |
6938 if (operation == null) { | |
6939 throw new core.ArgumentError("Parameter operation is required."); | |
6940 } | 6747 } |
6941 | 6748 |
6942 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/operations/' + commons.Escaper.ecapeVariable('
$operation'); | 6749 _url = commons.Escaper.ecapeVariable('$project') + '/global/networks/' + com
mons.Escaper.ecapeVariable('$network'); |
6943 | 6750 |
6944 var _response = _requester.request(_url, | 6751 var _response = _requester.request(_url, |
6945 "GET", | 6752 "GET", |
6946 body: _body, | 6753 body: _body, |
6947 queryParams: _queryParams, | 6754 queryParams: _queryParams, |
6948 uploadOptions: _uploadOptions, | 6755 uploadOptions: _uploadOptions, |
6949 uploadMedia: _uploadMedia, | 6756 uploadMedia: _uploadMedia, |
6950 downloadOptions: _downloadOptions); | 6757 downloadOptions: _downloadOptions); |
6951 return _response.then((data) => new Operation.fromJson(data)); | 6758 return _response.then((data) => new Network.fromJson(data)); |
6952 } | 6759 } |
6953 | 6760 |
6954 /** | 6761 /** |
6955 * Retrieves the list of Operation resources contained within the specified | 6762 * Creates a network resource in the specified project using the data included |
6956 * region. | 6763 * in the request. |
| 6764 * |
| 6765 * [request] - The metadata request object. |
6957 * | 6766 * |
6958 * Request parameters: | 6767 * Request parameters: |
6959 * | 6768 * |
6960 * [project] - Project ID for this request. | 6769 * [project] - Project ID for this request. |
6961 * Value must have pattern | 6770 * Value must have pattern |
6962 * "(?:(?:[-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])?))". | 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])?))". |
6963 * | 6772 * |
6964 * [region] - Name of the region scoping this request. | 6773 * Completes with a [Operation]. |
6965 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
6966 * | |
6967 * [filter] - Sets a filter expression for filtering listed resources, in the | |
6968 * form filter={expression}. Your {expression} must contain the following: | |
6969 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
6970 * | |
6971 * - FIELD_NAME: The name of the field you want to compare. The field name | |
6972 * must be valid for the type of resource being filtered. Only atomic field | |
6973 * types are supported (string, number, boolean). Array and object fields are | |
6974 * not currently supported. | |
6975 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
6976 * equals). | |
6977 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
6978 * must be valid for the type of field (string, number, boolean). For string | |
6979 * fields, the literal value is interpreted as a regular expression using RE2 | |
6980 * syntax. The literal value must match the entire field. For example, you | |
6981 * can filter by the name of a resource: | |
6982 * filter=name ne example-instance | |
6983 * The above filter returns only results whose name field does not equal | |
6984 * example-instance. You can also enclose your literal string in single, | |
6985 * double, or no quotes. | |
6986 * | |
6987 * [maxResults] - Maximum count of results to be returned. | |
6988 * Value must be between "0" and "500". | |
6989 * | |
6990 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
6991 * to list the next page of results. Set pageToken to the nextPageToken | |
6992 * returned by a previous list request. | |
6993 * | |
6994 * Completes with a [OperationList]. | |
6995 * | 6774 * |
6996 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6775 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
6997 * error. | 6776 * error. |
6998 * | 6777 * |
6999 * If the used [http.Client] completes with an error when making a REST call, | 6778 * If the used [http.Client] completes with an error when making a REST call, |
7000 * this method will complete with the same error. | 6779 * this method will complete with the same error. |
7001 */ | 6780 */ |
7002 async.Future<OperationList> list(core.String project, core.String region, {cor
e.String filter, core.int maxResults, core.String pageToken}) { | 6781 async.Future<Operation> insert(Network request, core.String project) { |
7003 var _url = null; | 6782 var _url = null; |
7004 var _queryParams = new core.Map(); | 6783 var _queryParams = new core.Map(); |
7005 var _uploadMedia = null; | 6784 var _uploadMedia = null; |
7006 var _uploadOptions = null; | 6785 var _uploadOptions = null; |
7007 var _downloadOptions = commons.DownloadOptions.Metadata; | 6786 var _downloadOptions = commons.DownloadOptions.Metadata; |
7008 var _body = null; | 6787 var _body = null; |
7009 | 6788 |
| 6789 if (request != null) { |
| 6790 _body = convert.JSON.encode((request).toJson()); |
| 6791 } |
7010 if (project == null) { | 6792 if (project == null) { |
7011 throw new core.ArgumentError("Parameter project is required."); | 6793 throw new core.ArgumentError("Parameter project is required."); |
7012 } | 6794 } |
7013 if (region == null) { | |
7014 throw new core.ArgumentError("Parameter region is required."); | |
7015 } | |
7016 if (filter != null) { | |
7017 _queryParams["filter"] = [filter]; | |
7018 } | |
7019 if (maxResults != null) { | |
7020 _queryParams["maxResults"] = ["${maxResults}"]; | |
7021 } | |
7022 if (pageToken != null) { | |
7023 _queryParams["pageToken"] = [pageToken]; | |
7024 } | |
7025 | 6795 |
7026 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/operations'; | 6796 _url = commons.Escaper.ecapeVariable('$project') + '/global/networks'; |
7027 | 6797 |
7028 var _response = _requester.request(_url, | 6798 var _response = _requester.request(_url, |
7029 "GET", | 6799 "POST", |
7030 body: _body, | 6800 body: _body, |
7031 queryParams: _queryParams, | 6801 queryParams: _queryParams, |
7032 uploadOptions: _uploadOptions, | 6802 uploadOptions: _uploadOptions, |
7033 uploadMedia: _uploadMedia, | 6803 uploadMedia: _uploadMedia, |
7034 downloadOptions: _downloadOptions); | 6804 downloadOptions: _downloadOptions); |
7035 return _response.then((data) => new OperationList.fromJson(data)); | 6805 return _response.then((data) => new Operation.fromJson(data)); |
7036 } | 6806 } |
7037 | 6807 |
7038 } | |
7039 | |
7040 | |
7041 class RegionsResourceApi { | |
7042 final commons.ApiRequester _requester; | |
7043 | |
7044 RegionsResourceApi(commons.ApiRequester client) : | |
7045 _requester = client; | |
7046 | |
7047 /** | 6808 /** |
7048 * Returns the specified region resource. | 6809 * Retrieves the list of network resources available to the specified project. |
7049 * | 6810 * |
7050 * Request parameters: | 6811 * Request parameters: |
7051 * | 6812 * |
7052 * [project] - Project ID for this request. | 6813 * [project] - Project ID for this request. |
7053 * Value must have pattern | 6814 * Value must have pattern |
7054 * "(?:(?:[-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])?))". | 6815 * "(?:(?:[-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])?))". |
7055 * | 6816 * |
7056 * [region] - Name of the region resource to return. | 6817 * [filter] - Sets a filter expression for filtering listed resources, in the |
7057 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 6818 * form filter={expression}. Your {expression} must be in the format: |
| 6819 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
7058 * | 6820 * |
7059 * Completes with a [Region]. | 6821 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 6822 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 6823 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 6824 * string value to filter to. The literal value must be valid for the type of |
| 6825 * field (string, number, boolean). For string fields, the literal value is |
| 6826 * interpreted as a regular expression using RE2 syntax. The literal value |
| 6827 * must match the entire field. |
| 6828 * |
| 6829 * For example, filter=name ne example-instance. |
| 6830 * |
| 6831 * [maxResults] - Maximum count of results to be returned. |
| 6832 * Value must be between "0" and "500". |
| 6833 * |
| 6834 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 6835 * to list the next page of results. Set pageToken to the nextPageToken |
| 6836 * returned by a previous list request. |
| 6837 * |
| 6838 * Completes with a [NetworkList]. |
7060 * | 6839 * |
7061 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6840 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7062 * error. | 6841 * error. |
7063 * | 6842 * |
7064 * If the used [http.Client] completes with an error when making a REST call, | 6843 * If the used [http.Client] completes with an error when making a REST call, |
7065 * this method will complete with the same error. | 6844 * this method will complete with the same error. |
7066 */ | 6845 */ |
7067 async.Future<Region> get(core.String project, core.String region) { | 6846 async.Future<NetworkList> list(core.String project, {core.String filter, core.
int maxResults, core.String pageToken}) { |
7068 var _url = null; | 6847 var _url = null; |
7069 var _queryParams = new core.Map(); | 6848 var _queryParams = new core.Map(); |
7070 var _uploadMedia = null; | 6849 var _uploadMedia = null; |
7071 var _uploadOptions = null; | 6850 var _uploadOptions = null; |
7072 var _downloadOptions = commons.DownloadOptions.Metadata; | 6851 var _downloadOptions = commons.DownloadOptions.Metadata; |
7073 var _body = null; | 6852 var _body = null; |
7074 | 6853 |
7075 if (project == null) { | 6854 if (project == null) { |
7076 throw new core.ArgumentError("Parameter project is required."); | 6855 throw new core.ArgumentError("Parameter project is required."); |
7077 } | 6856 } |
7078 if (region == null) { | 6857 if (filter != null) { |
7079 throw new core.ArgumentError("Parameter region is required."); | 6858 _queryParams["filter"] = [filter]; |
| 6859 } |
| 6860 if (maxResults != null) { |
| 6861 _queryParams["maxResults"] = ["${maxResults}"]; |
| 6862 } |
| 6863 if (pageToken != null) { |
| 6864 _queryParams["pageToken"] = [pageToken]; |
7080 } | 6865 } |
7081 | 6866 |
7082 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region'); | 6867 _url = commons.Escaper.ecapeVariable('$project') + '/global/networks'; |
7083 | 6868 |
7084 var _response = _requester.request(_url, | 6869 var _response = _requester.request(_url, |
7085 "GET", | 6870 "GET", |
7086 body: _body, | 6871 body: _body, |
7087 queryParams: _queryParams, | 6872 queryParams: _queryParams, |
7088 uploadOptions: _uploadOptions, | 6873 uploadOptions: _uploadOptions, |
7089 uploadMedia: _uploadMedia, | 6874 uploadMedia: _uploadMedia, |
7090 downloadOptions: _downloadOptions); | 6875 downloadOptions: _downloadOptions); |
7091 return _response.then((data) => new Region.fromJson(data)); | 6876 return _response.then((data) => new NetworkList.fromJson(data)); |
7092 } | 6877 } |
7093 | 6878 |
| 6879 } |
| 6880 |
| 6881 |
| 6882 class ProjectsResourceApi { |
| 6883 final commons.ApiRequester _requester; |
| 6884 |
| 6885 ProjectsResourceApi(commons.ApiRequester client) : |
| 6886 _requester = client; |
| 6887 |
7094 /** | 6888 /** |
7095 * Retrieves the list of region resources available to the specified project. | 6889 * Returns the specified project resource. |
7096 * | 6890 * |
7097 * Request parameters: | 6891 * Request parameters: |
7098 * | 6892 * |
7099 * [project] - Project ID for this request. | 6893 * [project] - Project ID for this request. |
7100 * Value must have pattern | 6894 * Value must have pattern |
7101 * "(?:(?:[-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])?))". | 6895 * "(?:(?:[-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])?))". |
7102 * | 6896 * |
7103 * [filter] - Sets a filter expression for filtering listed resources, in the | 6897 * Completes with a [Project]. |
7104 * form filter={expression}. Your {expression} must contain the following: | |
7105 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
7106 * | |
7107 * - FIELD_NAME: The name of the field you want to compare. The field name | |
7108 * must be valid for the type of resource being filtered. Only atomic field | |
7109 * types are supported (string, number, boolean). Array and object fields are | |
7110 * not currently supported. | |
7111 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
7112 * equals). | |
7113 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
7114 * must be valid for the type of field (string, number, boolean). For string | |
7115 * fields, the literal value is interpreted as a regular expression using RE2 | |
7116 * syntax. The literal value must match the entire field. For example, you | |
7117 * can filter by the name of a resource: | |
7118 * filter=name ne example-instance | |
7119 * The above filter returns only results whose name field does not equal | |
7120 * example-instance. You can also enclose your literal string in single, | |
7121 * double, or no quotes. | |
7122 * | |
7123 * [maxResults] - Maximum count of results to be returned. | |
7124 * Value must be between "0" and "500". | |
7125 * | |
7126 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
7127 * to list the next page of results. Set pageToken to the nextPageToken | |
7128 * returned by a previous list request. | |
7129 * | |
7130 * Completes with a [RegionList]. | |
7131 * | 6898 * |
7132 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6899 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7133 * error. | 6900 * error. |
7134 * | 6901 * |
7135 * If the used [http.Client] completes with an error when making a REST call, | 6902 * If the used [http.Client] completes with an error when making a REST call, |
7136 * this method will complete with the same error. | 6903 * this method will complete with the same error. |
7137 */ | 6904 */ |
7138 async.Future<RegionList> list(core.String project, {core.String filter, core.i
nt maxResults, core.String pageToken}) { | 6905 async.Future<Project> get(core.String project) { |
7139 var _url = null; | 6906 var _url = null; |
7140 var _queryParams = new core.Map(); | 6907 var _queryParams = new core.Map(); |
7141 var _uploadMedia = null; | 6908 var _uploadMedia = null; |
7142 var _uploadOptions = null; | 6909 var _uploadOptions = null; |
7143 var _downloadOptions = commons.DownloadOptions.Metadata; | 6910 var _downloadOptions = commons.DownloadOptions.Metadata; |
7144 var _body = null; | 6911 var _body = null; |
7145 | 6912 |
7146 if (project == null) { | 6913 if (project == null) { |
7147 throw new core.ArgumentError("Parameter project is required."); | 6914 throw new core.ArgumentError("Parameter project is required."); |
7148 } | 6915 } |
7149 if (filter != null) { | |
7150 _queryParams["filter"] = [filter]; | |
7151 } | |
7152 if (maxResults != null) { | |
7153 _queryParams["maxResults"] = ["${maxResults}"]; | |
7154 } | |
7155 if (pageToken != null) { | |
7156 _queryParams["pageToken"] = [pageToken]; | |
7157 } | |
7158 | 6916 |
7159 _url = commons.Escaper.ecapeVariable('$project') + '/regions'; | 6917 _url = commons.Escaper.ecapeVariable('$project'); |
7160 | 6918 |
7161 var _response = _requester.request(_url, | 6919 var _response = _requester.request(_url, |
7162 "GET", | 6920 "GET", |
7163 body: _body, | 6921 body: _body, |
7164 queryParams: _queryParams, | 6922 queryParams: _queryParams, |
7165 uploadOptions: _uploadOptions, | 6923 uploadOptions: _uploadOptions, |
7166 uploadMedia: _uploadMedia, | 6924 uploadMedia: _uploadMedia, |
7167 downloadOptions: _downloadOptions); | 6925 downloadOptions: _downloadOptions); |
7168 return _response.then((data) => new RegionList.fromJson(data)); | 6926 return _response.then((data) => new Project.fromJson(data)); |
7169 } | 6927 } |
7170 | 6928 |
7171 } | |
7172 | |
7173 | |
7174 class RoutesResourceApi { | |
7175 final commons.ApiRequester _requester; | |
7176 | |
7177 RoutesResourceApi(commons.ApiRequester client) : | |
7178 _requester = client; | |
7179 | |
7180 /** | 6929 /** |
7181 * Deletes the specified route resource. | 6930 * Moves a persistent disk from one zone to another. |
| 6931 * |
| 6932 * [request] - The metadata request object. |
7182 * | 6933 * |
7183 * Request parameters: | 6934 * Request parameters: |
7184 * | 6935 * |
7185 * [project] - Name of the project scoping this request. | 6936 * [project] - Project ID for this request. |
7186 * Value must have pattern | 6937 * Value must have pattern |
7187 * "(?:(?:[-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])?))". | 6938 * "(?:(?:[-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])?))". |
7188 * | 6939 * |
7189 * [route] - Name of the route resource to delete. | |
7190 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
7191 * | |
7192 * Completes with a [Operation]. | 6940 * Completes with a [Operation]. |
7193 * | 6941 * |
7194 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6942 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7195 * error. | 6943 * error. |
7196 * | 6944 * |
7197 * If the used [http.Client] completes with an error when making a REST call, | 6945 * If the used [http.Client] completes with an error when making a REST call, |
7198 * this method will complete with the same error. | 6946 * this method will complete with the same error. |
7199 */ | 6947 */ |
7200 async.Future<Operation> delete(core.String project, core.String route) { | 6948 async.Future<Operation> moveDisk(DiskMoveRequest request, core.String project)
{ |
7201 var _url = null; | 6949 var _url = null; |
7202 var _queryParams = new core.Map(); | 6950 var _queryParams = new core.Map(); |
7203 var _uploadMedia = null; | 6951 var _uploadMedia = null; |
7204 var _uploadOptions = null; | 6952 var _uploadOptions = null; |
7205 var _downloadOptions = commons.DownloadOptions.Metadata; | 6953 var _downloadOptions = commons.DownloadOptions.Metadata; |
7206 var _body = null; | 6954 var _body = null; |
7207 | 6955 |
| 6956 if (request != null) { |
| 6957 _body = convert.JSON.encode((request).toJson()); |
| 6958 } |
7208 if (project == null) { | 6959 if (project == null) { |
7209 throw new core.ArgumentError("Parameter project is required."); | 6960 throw new core.ArgumentError("Parameter project is required."); |
7210 } | 6961 } |
7211 if (route == null) { | |
7212 throw new core.ArgumentError("Parameter route is required."); | |
7213 } | |
7214 | 6962 |
7215 _url = commons.Escaper.ecapeVariable('$project') + '/global/routes/' + commo
ns.Escaper.ecapeVariable('$route'); | 6963 _url = commons.Escaper.ecapeVariable('$project') + '/moveDisk'; |
7216 | 6964 |
7217 var _response = _requester.request(_url, | 6965 var _response = _requester.request(_url, |
7218 "DELETE", | 6966 "POST", |
7219 body: _body, | 6967 body: _body, |
7220 queryParams: _queryParams, | 6968 queryParams: _queryParams, |
7221 uploadOptions: _uploadOptions, | 6969 uploadOptions: _uploadOptions, |
7222 uploadMedia: _uploadMedia, | 6970 uploadMedia: _uploadMedia, |
7223 downloadOptions: _downloadOptions); | 6971 downloadOptions: _downloadOptions); |
7224 return _response.then((data) => new Operation.fromJson(data)); | 6972 return _response.then((data) => new Operation.fromJson(data)); |
7225 } | 6973 } |
7226 | 6974 |
7227 /** | 6975 /** |
7228 * Returns the specified route resource. | 6976 * Moves an instance and its attached persistent disks from one zone to |
| 6977 * another. |
| 6978 * |
| 6979 * [request] - The metadata request object. |
7229 * | 6980 * |
7230 * Request parameters: | 6981 * Request parameters: |
7231 * | 6982 * |
7232 * [project] - Name of the project scoping this request. | 6983 * [project] - Project ID for this request. |
7233 * Value must have pattern | 6984 * Value must have pattern |
7234 * "(?:(?:[-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])?))". | 6985 * "(?:(?:[-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])?))". |
7235 * | 6986 * |
7236 * [route] - Name of the route resource to return. | 6987 * Completes with a [Operation]. |
7237 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
7238 * | |
7239 * Completes with a [Route]. | |
7240 * | 6988 * |
7241 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 6989 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7242 * error. | 6990 * error. |
7243 * | 6991 * |
7244 * If the used [http.Client] completes with an error when making a REST call, | 6992 * If the used [http.Client] completes with an error when making a REST call, |
7245 * this method will complete with the same error. | 6993 * this method will complete with the same error. |
7246 */ | 6994 */ |
7247 async.Future<Route> get(core.String project, core.String route) { | 6995 async.Future<Operation> moveInstance(InstanceMoveRequest request, core.String
project) { |
7248 var _url = null; | 6996 var _url = null; |
7249 var _queryParams = new core.Map(); | 6997 var _queryParams = new core.Map(); |
7250 var _uploadMedia = null; | 6998 var _uploadMedia = null; |
7251 var _uploadOptions = null; | 6999 var _uploadOptions = null; |
7252 var _downloadOptions = commons.DownloadOptions.Metadata; | 7000 var _downloadOptions = commons.DownloadOptions.Metadata; |
7253 var _body = null; | 7001 var _body = null; |
7254 | 7002 |
| 7003 if (request != null) { |
| 7004 _body = convert.JSON.encode((request).toJson()); |
| 7005 } |
7255 if (project == null) { | 7006 if (project == null) { |
7256 throw new core.ArgumentError("Parameter project is required."); | 7007 throw new core.ArgumentError("Parameter project is required."); |
7257 } | 7008 } |
7258 if (route == null) { | |
7259 throw new core.ArgumentError("Parameter route is required."); | |
7260 } | |
7261 | 7009 |
7262 _url = commons.Escaper.ecapeVariable('$project') + '/global/routes/' + commo
ns.Escaper.ecapeVariable('$route'); | 7010 _url = commons.Escaper.ecapeVariable('$project') + '/moveInstance'; |
7263 | 7011 |
7264 var _response = _requester.request(_url, | 7012 var _response = _requester.request(_url, |
7265 "GET", | 7013 "POST", |
7266 body: _body, | 7014 body: _body, |
7267 queryParams: _queryParams, | 7015 queryParams: _queryParams, |
7268 uploadOptions: _uploadOptions, | 7016 uploadOptions: _uploadOptions, |
7269 uploadMedia: _uploadMedia, | 7017 uploadMedia: _uploadMedia, |
7270 downloadOptions: _downloadOptions); | 7018 downloadOptions: _downloadOptions); |
7271 return _response.then((data) => new Route.fromJson(data)); | 7019 return _response.then((data) => new Operation.fromJson(data)); |
7272 } | 7020 } |
7273 | 7021 |
7274 /** | 7022 /** |
7275 * Creates a route resource in the specified project using the data included | 7023 * Sets metadata common to all instances within the specified project using |
7276 * in the request. | 7024 * the data included in the request. |
7277 * | 7025 * |
7278 * [request] - The metadata request object. | 7026 * [request] - The metadata request object. |
7279 * | 7027 * |
7280 * Request parameters: | 7028 * Request parameters: |
7281 * | 7029 * |
7282 * [project] - Name of the project scoping this request. | 7030 * [project] - Project ID for this request. |
7283 * Value must have pattern | 7031 * Value must have pattern |
7284 * "(?:(?:[-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])?))". | 7032 * "(?:(?:[-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])?))". |
7285 * | 7033 * |
7286 * Completes with a [Operation]. | 7034 * Completes with a [Operation]. |
7287 * | 7035 * |
7288 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7036 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7289 * error. | 7037 * error. |
7290 * | 7038 * |
7291 * If the used [http.Client] completes with an error when making a REST call, | 7039 * If the used [http.Client] completes with an error when making a REST call, |
7292 * this method will complete with the same error. | 7040 * this method will complete with the same error. |
7293 */ | 7041 */ |
7294 async.Future<Operation> insert(Route request, core.String project) { | 7042 async.Future<Operation> setCommonInstanceMetadata(Metadata request, core.Strin
g project) { |
7295 var _url = null; | 7043 var _url = null; |
7296 var _queryParams = new core.Map(); | 7044 var _queryParams = new core.Map(); |
7297 var _uploadMedia = null; | 7045 var _uploadMedia = null; |
7298 var _uploadOptions = null; | 7046 var _uploadOptions = null; |
7299 var _downloadOptions = commons.DownloadOptions.Metadata; | 7047 var _downloadOptions = commons.DownloadOptions.Metadata; |
7300 var _body = null; | 7048 var _body = null; |
7301 | 7049 |
7302 if (request != null) { | 7050 if (request != null) { |
7303 _body = convert.JSON.encode((request).toJson()); | 7051 _body = convert.JSON.encode((request).toJson()); |
7304 } | 7052 } |
7305 if (project == null) { | 7053 if (project == null) { |
7306 throw new core.ArgumentError("Parameter project is required."); | 7054 throw new core.ArgumentError("Parameter project is required."); |
7307 } | 7055 } |
7308 | 7056 |
7309 _url = commons.Escaper.ecapeVariable('$project') + '/global/routes'; | 7057 _url = commons.Escaper.ecapeVariable('$project') + '/setCommonInstanceMetada
ta'; |
7310 | 7058 |
7311 var _response = _requester.request(_url, | 7059 var _response = _requester.request(_url, |
7312 "POST", | 7060 "POST", |
7313 body: _body, | 7061 body: _body, |
7314 queryParams: _queryParams, | 7062 queryParams: _queryParams, |
7315 uploadOptions: _uploadOptions, | 7063 uploadOptions: _uploadOptions, |
7316 uploadMedia: _uploadMedia, | 7064 uploadMedia: _uploadMedia, |
7317 downloadOptions: _downloadOptions); | 7065 downloadOptions: _downloadOptions); |
7318 return _response.then((data) => new Operation.fromJson(data)); | 7066 return _response.then((data) => new Operation.fromJson(data)); |
7319 } | 7067 } |
7320 | 7068 |
7321 /** | 7069 /** |
7322 * Retrieves the list of route resources available to the specified project. | 7070 * Enables the usage export feature and sets the usage export bucket where |
| 7071 * reports are stored. If you provide an empty request body using this method, |
| 7072 * the usage export feature will be disabled. |
| 7073 * |
| 7074 * [request] - The metadata request object. |
7323 * | 7075 * |
7324 * Request parameters: | 7076 * Request parameters: |
7325 * | 7077 * |
7326 * [project] - Name of the project scoping this request. | 7078 * [project] - Project ID for this request. |
7327 * Value must have pattern | 7079 * Value must have pattern |
7328 * "(?:(?:[-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])?))". | 7080 * "(?:(?:[-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])?))". |
7329 * | 7081 * |
7330 * [filter] - Sets a filter expression for filtering listed resources, in the | 7082 * Completes with a [Operation]. |
7331 * form filter={expression}. Your {expression} must contain the following: | |
7332 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
7333 * | |
7334 * - FIELD_NAME: The name of the field you want to compare. The field name | |
7335 * must be valid for the type of resource being filtered. Only atomic field | |
7336 * types are supported (string, number, boolean). Array and object fields are | |
7337 * not currently supported. | |
7338 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
7339 * equals). | |
7340 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
7341 * must be valid for the type of field (string, number, boolean). For string | |
7342 * fields, the literal value is interpreted as a regular expression using RE2 | |
7343 * syntax. The literal value must match the entire field. For example, you | |
7344 * can filter by the name of a resource: | |
7345 * filter=name ne example-instance | |
7346 * The above filter returns only results whose name field does not equal | |
7347 * example-instance. You can also enclose your literal string in single, | |
7348 * double, or no quotes. | |
7349 * | |
7350 * [maxResults] - Maximum count of results to be returned. | |
7351 * Value must be between "0" and "500". | |
7352 * | |
7353 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
7354 * to list the next page of results. Set pageToken to the nextPageToken | |
7355 * returned by a previous list request. | |
7356 * | |
7357 * Completes with a [RouteList]. | |
7358 * | 7083 * |
7359 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7084 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7360 * error. | 7085 * error. |
7361 * | 7086 * |
7362 * If the used [http.Client] completes with an error when making a REST call, | 7087 * If the used [http.Client] completes with an error when making a REST call, |
7363 * this method will complete with the same error. | 7088 * this method will complete with the same error. |
7364 */ | 7089 */ |
7365 async.Future<RouteList> list(core.String project, {core.String filter, core.in
t maxResults, core.String pageToken}) { | 7090 async.Future<Operation> setUsageExportBucket(UsageExportLocation request, core
.String project) { |
7366 var _url = null; | 7091 var _url = null; |
7367 var _queryParams = new core.Map(); | 7092 var _queryParams = new core.Map(); |
7368 var _uploadMedia = null; | 7093 var _uploadMedia = null; |
7369 var _uploadOptions = null; | 7094 var _uploadOptions = null; |
7370 var _downloadOptions = commons.DownloadOptions.Metadata; | 7095 var _downloadOptions = commons.DownloadOptions.Metadata; |
7371 var _body = null; | 7096 var _body = null; |
7372 | 7097 |
| 7098 if (request != null) { |
| 7099 _body = convert.JSON.encode((request).toJson()); |
| 7100 } |
7373 if (project == null) { | 7101 if (project == null) { |
7374 throw new core.ArgumentError("Parameter project is required."); | 7102 throw new core.ArgumentError("Parameter project is required."); |
7375 } | 7103 } |
7376 if (filter != null) { | |
7377 _queryParams["filter"] = [filter]; | |
7378 } | |
7379 if (maxResults != null) { | |
7380 _queryParams["maxResults"] = ["${maxResults}"]; | |
7381 } | |
7382 if (pageToken != null) { | |
7383 _queryParams["pageToken"] = [pageToken]; | |
7384 } | |
7385 | 7104 |
7386 _url = commons.Escaper.ecapeVariable('$project') + '/global/routes'; | 7105 _url = commons.Escaper.ecapeVariable('$project') + '/setUsageExportBucket'; |
7387 | 7106 |
7388 var _response = _requester.request(_url, | 7107 var _response = _requester.request(_url, |
7389 "GET", | 7108 "POST", |
7390 body: _body, | 7109 body: _body, |
7391 queryParams: _queryParams, | 7110 queryParams: _queryParams, |
7392 uploadOptions: _uploadOptions, | 7111 uploadOptions: _uploadOptions, |
7393 uploadMedia: _uploadMedia, | 7112 uploadMedia: _uploadMedia, |
7394 downloadOptions: _downloadOptions); | 7113 downloadOptions: _downloadOptions); |
7395 return _response.then((data) => new RouteList.fromJson(data)); | 7114 return _response.then((data) => new Operation.fromJson(data)); |
7396 } | 7115 } |
7397 | 7116 |
7398 } | 7117 } |
7399 | 7118 |
7400 | 7119 |
7401 class SnapshotsResourceApi { | 7120 class RegionOperationsResourceApi { |
7402 final commons.ApiRequester _requester; | 7121 final commons.ApiRequester _requester; |
7403 | 7122 |
7404 SnapshotsResourceApi(commons.ApiRequester client) : | 7123 RegionOperationsResourceApi(commons.ApiRequester client) : |
7405 _requester = client; | 7124 _requester = client; |
7406 | 7125 |
7407 /** | 7126 /** |
7408 * Deletes the specified persistent disk snapshot resource. | 7127 * Deletes the specified region-specific Operations resource. |
7409 * | 7128 * |
7410 * Request parameters: | 7129 * Request parameters: |
7411 * | 7130 * |
7412 * [project] - Name of the project scoping this request. | 7131 * [project] - Project ID for this request. |
7413 * Value must have pattern | 7132 * Value must have pattern |
7414 * "(?:(?:[-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])?))". | 7133 * "(?:(?:[-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])?))". |
7415 * | 7134 * |
7416 * [snapshot] - Name of the persistent disk snapshot resource to delete. | 7135 * [region] - Name of the region scoping this request. |
7417 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 7136 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
7418 * | 7137 * |
7419 * Completes with a [Operation]. | 7138 * [operation] - Name of the Operations resource to delete. |
| 7139 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
7420 * | 7140 * |
7421 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7141 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7422 * error. | 7142 * error. |
7423 * | 7143 * |
7424 * If the used [http.Client] completes with an error when making a REST call, | 7144 * If the used [http.Client] completes with an error when making a REST call, |
7425 * this method will complete with the same error. | 7145 * this method will complete with the same error. |
7426 */ | 7146 */ |
7427 async.Future<Operation> delete(core.String project, core.String snapshot) { | 7147 async.Future delete(core.String project, core.String region, core.String opera
tion) { |
7428 var _url = null; | 7148 var _url = null; |
7429 var _queryParams = new core.Map(); | 7149 var _queryParams = new core.Map(); |
7430 var _uploadMedia = null; | 7150 var _uploadMedia = null; |
7431 var _uploadOptions = null; | 7151 var _uploadOptions = null; |
7432 var _downloadOptions = commons.DownloadOptions.Metadata; | 7152 var _downloadOptions = commons.DownloadOptions.Metadata; |
7433 var _body = null; | 7153 var _body = null; |
7434 | 7154 |
7435 if (project == null) { | 7155 if (project == null) { |
7436 throw new core.ArgumentError("Parameter project is required."); | 7156 throw new core.ArgumentError("Parameter project is required."); |
7437 } | 7157 } |
7438 if (snapshot == null) { | 7158 if (region == null) { |
7439 throw new core.ArgumentError("Parameter snapshot is required."); | 7159 throw new core.ArgumentError("Parameter region is required."); |
| 7160 } |
| 7161 if (operation == null) { |
| 7162 throw new core.ArgumentError("Parameter operation is required."); |
7440 } | 7163 } |
7441 | 7164 |
7442 _url = commons.Escaper.ecapeVariable('$project') + '/global/snapshots/' + co
mmons.Escaper.ecapeVariable('$snapshot'); | 7165 _downloadOptions = null; |
| 7166 |
| 7167 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/operations/' + commons.Escaper.ecapeVariable('
$operation'); |
7443 | 7168 |
7444 var _response = _requester.request(_url, | 7169 var _response = _requester.request(_url, |
7445 "DELETE", | 7170 "DELETE", |
7446 body: _body, | 7171 body: _body, |
7447 queryParams: _queryParams, | 7172 queryParams: _queryParams, |
7448 uploadOptions: _uploadOptions, | 7173 uploadOptions: _uploadOptions, |
7449 uploadMedia: _uploadMedia, | 7174 uploadMedia: _uploadMedia, |
7450 downloadOptions: _downloadOptions); | 7175 downloadOptions: _downloadOptions); |
7451 return _response.then((data) => new Operation.fromJson(data)); | 7176 return _response.then((data) => null); |
7452 } | 7177 } |
7453 | 7178 |
7454 /** | 7179 /** |
7455 * Returns the specified persistent disk snapshot resource. | 7180 * Retrieves the specified region-specific Operations resource. |
7456 * | 7181 * |
7457 * Request parameters: | 7182 * Request parameters: |
7458 * | 7183 * |
7459 * [project] - Name of the project scoping this request. | 7184 * [project] - Project ID for this request. |
7460 * Value must have pattern | 7185 * Value must have pattern |
7461 * "(?:(?:[-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])?))". | 7186 * "(?:(?:[-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])?))". |
7462 * | 7187 * |
7463 * [snapshot] - Name of the persistent disk snapshot resource to return. | 7188 * [region] - Name of the zone scoping this request. |
7464 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 7189 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
7465 * | 7190 * |
7466 * Completes with a [Snapshot]. | 7191 * [operation] - Name of the Operations resource to return. |
| 7192 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 7193 * |
| 7194 * Completes with a [Operation]. |
7467 * | 7195 * |
7468 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7196 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7469 * error. | 7197 * error. |
7470 * | 7198 * |
7471 * If the used [http.Client] completes with an error when making a REST call, | 7199 * If the used [http.Client] completes with an error when making a REST call, |
7472 * this method will complete with the same error. | 7200 * this method will complete with the same error. |
7473 */ | 7201 */ |
7474 async.Future<Snapshot> get(core.String project, core.String snapshot) { | 7202 async.Future<Operation> get(core.String project, core.String region, core.Stri
ng operation) { |
7475 var _url = null; | 7203 var _url = null; |
7476 var _queryParams = new core.Map(); | 7204 var _queryParams = new core.Map(); |
7477 var _uploadMedia = null; | 7205 var _uploadMedia = null; |
7478 var _uploadOptions = null; | 7206 var _uploadOptions = null; |
7479 var _downloadOptions = commons.DownloadOptions.Metadata; | 7207 var _downloadOptions = commons.DownloadOptions.Metadata; |
7480 var _body = null; | 7208 var _body = null; |
7481 | 7209 |
7482 if (project == null) { | 7210 if (project == null) { |
7483 throw new core.ArgumentError("Parameter project is required."); | 7211 throw new core.ArgumentError("Parameter project is required."); |
7484 } | 7212 } |
7485 if (snapshot == null) { | 7213 if (region == null) { |
7486 throw new core.ArgumentError("Parameter snapshot is required."); | 7214 throw new core.ArgumentError("Parameter region is required."); |
| 7215 } |
| 7216 if (operation == null) { |
| 7217 throw new core.ArgumentError("Parameter operation is required."); |
7487 } | 7218 } |
7488 | 7219 |
7489 _url = commons.Escaper.ecapeVariable('$project') + '/global/snapshots/' + co
mmons.Escaper.ecapeVariable('$snapshot'); | 7220 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/operations/' + commons.Escaper.ecapeVariable('
$operation'); |
7490 | 7221 |
7491 var _response = _requester.request(_url, | 7222 var _response = _requester.request(_url, |
7492 "GET", | 7223 "GET", |
7493 body: _body, | 7224 body: _body, |
7494 queryParams: _queryParams, | 7225 queryParams: _queryParams, |
7495 uploadOptions: _uploadOptions, | 7226 uploadOptions: _uploadOptions, |
7496 uploadMedia: _uploadMedia, | 7227 uploadMedia: _uploadMedia, |
7497 downloadOptions: _downloadOptions); | 7228 downloadOptions: _downloadOptions); |
7498 return _response.then((data) => new Snapshot.fromJson(data)); | 7229 return _response.then((data) => new Operation.fromJson(data)); |
7499 } | 7230 } |
7500 | 7231 |
7501 /** | 7232 /** |
7502 * Retrieves the list of persistent disk snapshot resources contained within | 7233 * Retrieves the list of Operation resources contained within the specified |
7503 * the specified project. | 7234 * region. |
7504 * | 7235 * |
7505 * Request parameters: | 7236 * Request parameters: |
7506 * | 7237 * |
7507 * [project] - Name of the project scoping this request. | 7238 * [project] - Project ID for this request. |
7508 * Value must have pattern | 7239 * Value must have pattern |
7509 * "(?:(?:[-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])?))". | 7240 * "(?:(?:[-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])?))". |
7510 * | 7241 * |
| 7242 * [region] - Name of the region scoping this request. |
| 7243 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 7244 * |
7511 * [filter] - Sets a filter expression for filtering listed resources, in the | 7245 * [filter] - Sets a filter expression for filtering listed resources, in the |
7512 * form filter={expression}. Your {expression} must contain the following: | 7246 * form filter={expression}. Your {expression} must be in the format: |
7513 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 7247 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
7514 * | 7248 * |
7515 * - FIELD_NAME: The name of the field you want to compare. The field name | 7249 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
7516 * must be valid for the type of resource being filtered. Only atomic field | 7250 * field types are supported (string, number, boolean). The COMPARISON_STRING |
7517 * types are supported (string, number, boolean). Array and object fields are | 7251 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
7518 * not currently supported. | 7252 * string value to filter to. The literal value must be valid for the type of |
7519 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 7253 * field (string, number, boolean). For string fields, the literal value is |
7520 * equals). | 7254 * interpreted as a regular expression using RE2 syntax. The literal value |
7521 * - LITERAL_STRING: The literal string value to filter to. The literal value | 7255 * must match the entire field. |
7522 * must be valid for the type of field (string, number, boolean). For string | 7256 * |
7523 * fields, the literal value is interpreted as a regular expression using RE2 | 7257 * For example, filter=name ne example-instance. |
7524 * syntax. The literal value must match the entire field. For example, you | |
7525 * can filter by the name of a resource: | |
7526 * filter=name ne example-instance | |
7527 * The above filter returns only results whose name field does not equal | |
7528 * example-instance. You can also enclose your literal string in single, | |
7529 * double, or no quotes. | |
7530 * | 7258 * |
7531 * [maxResults] - Maximum count of results to be returned. | 7259 * [maxResults] - Maximum count of results to be returned. |
7532 * Value must be between "0" and "500". | 7260 * Value must be between "0" and "500". |
7533 * | 7261 * |
7534 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 7262 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
7535 * to list the next page of results. Set pageToken to the nextPageToken | 7263 * to list the next page of results. Set pageToken to the nextPageToken |
7536 * returned by a previous list request. | 7264 * returned by a previous list request. |
7537 * | 7265 * |
7538 * Completes with a [SnapshotList]. | 7266 * Completes with a [OperationList]. |
7539 * | 7267 * |
7540 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7268 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7541 * error. | 7269 * error. |
7542 * | 7270 * |
7543 * If the used [http.Client] completes with an error when making a REST call, | 7271 * If the used [http.Client] completes with an error when making a REST call, |
7544 * this method will complete with the same error. | 7272 * this method will complete with the same error. |
7545 */ | 7273 */ |
7546 async.Future<SnapshotList> list(core.String project, {core.String filter, core
.int maxResults, core.String pageToken}) { | 7274 async.Future<OperationList> list(core.String project, core.String region, {cor
e.String filter, core.int maxResults, core.String pageToken}) { |
7547 var _url = null; | 7275 var _url = null; |
7548 var _queryParams = new core.Map(); | 7276 var _queryParams = new core.Map(); |
7549 var _uploadMedia = null; | 7277 var _uploadMedia = null; |
7550 var _uploadOptions = null; | 7278 var _uploadOptions = null; |
7551 var _downloadOptions = commons.DownloadOptions.Metadata; | 7279 var _downloadOptions = commons.DownloadOptions.Metadata; |
7552 var _body = null; | 7280 var _body = null; |
7553 | 7281 |
7554 if (project == null) { | 7282 if (project == null) { |
7555 throw new core.ArgumentError("Parameter project is required."); | 7283 throw new core.ArgumentError("Parameter project is required."); |
7556 } | 7284 } |
| 7285 if (region == null) { |
| 7286 throw new core.ArgumentError("Parameter region is required."); |
| 7287 } |
7557 if (filter != null) { | 7288 if (filter != null) { |
7558 _queryParams["filter"] = [filter]; | 7289 _queryParams["filter"] = [filter]; |
7559 } | 7290 } |
7560 if (maxResults != null) { | 7291 if (maxResults != null) { |
7561 _queryParams["maxResults"] = ["${maxResults}"]; | 7292 _queryParams["maxResults"] = ["${maxResults}"]; |
7562 } | 7293 } |
7563 if (pageToken != null) { | 7294 if (pageToken != null) { |
7564 _queryParams["pageToken"] = [pageToken]; | 7295 _queryParams["pageToken"] = [pageToken]; |
7565 } | 7296 } |
7566 | 7297 |
7567 _url = commons.Escaper.ecapeVariable('$project') + '/global/snapshots'; | 7298 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/operations'; |
7568 | 7299 |
7569 var _response = _requester.request(_url, | 7300 var _response = _requester.request(_url, |
7570 "GET", | 7301 "GET", |
7571 body: _body, | 7302 body: _body, |
7572 queryParams: _queryParams, | 7303 queryParams: _queryParams, |
7573 uploadOptions: _uploadOptions, | 7304 uploadOptions: _uploadOptions, |
7574 uploadMedia: _uploadMedia, | 7305 uploadMedia: _uploadMedia, |
7575 downloadOptions: _downloadOptions); | 7306 downloadOptions: _downloadOptions); |
7576 return _response.then((data) => new SnapshotList.fromJson(data)); | 7307 return _response.then((data) => new OperationList.fromJson(data)); |
7577 } | 7308 } |
7578 | 7309 |
7579 } | 7310 } |
7580 | 7311 |
7581 | 7312 |
7582 class TargetHttpProxiesResourceApi { | 7313 class RegionsResourceApi { |
7583 final commons.ApiRequester _requester; | 7314 final commons.ApiRequester _requester; |
7584 | 7315 |
7585 TargetHttpProxiesResourceApi(commons.ApiRequester client) : | 7316 RegionsResourceApi(commons.ApiRequester client) : |
7586 _requester = client; | 7317 _requester = client; |
7587 | 7318 |
7588 /** | 7319 /** |
7589 * Deletes the specified TargetHttpProxy resource. | 7320 * Returns the specified region resource. |
7590 * | 7321 * |
7591 * Request parameters: | 7322 * Request parameters: |
7592 * | 7323 * |
7593 * [project] - Name of the project scoping this request. | 7324 * [project] - Project ID for this request. |
7594 * Value must have pattern | 7325 * Value must have pattern |
7595 * "(?:(?:[-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])?))". | 7326 * "(?:(?:[-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])?))". |
7596 * | 7327 * |
7597 * [targetHttpProxy] - Name of the TargetHttpProxy resource to delete. | 7328 * [region] - Name of the region resource to return. |
7598 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 7329 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
7599 * | 7330 * |
7600 * Completes with a [Operation]. | 7331 * Completes with a [Region]. |
7601 * | 7332 * |
7602 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7333 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7603 * error. | 7334 * error. |
7604 * | 7335 * |
7605 * If the used [http.Client] completes with an error when making a REST call, | 7336 * If the used [http.Client] completes with an error when making a REST call, |
7606 * this method will complete with the same error. | 7337 * this method will complete with the same error. |
7607 */ | 7338 */ |
7608 async.Future<Operation> delete(core.String project, core.String targetHttpProx
y) { | 7339 async.Future<Region> get(core.String project, core.String region) { |
7609 var _url = null; | 7340 var _url = null; |
7610 var _queryParams = new core.Map(); | 7341 var _queryParams = new core.Map(); |
7611 var _uploadMedia = null; | 7342 var _uploadMedia = null; |
7612 var _uploadOptions = null; | 7343 var _uploadOptions = null; |
7613 var _downloadOptions = commons.DownloadOptions.Metadata; | 7344 var _downloadOptions = commons.DownloadOptions.Metadata; |
7614 var _body = null; | 7345 var _body = null; |
7615 | 7346 |
7616 if (project == null) { | 7347 if (project == null) { |
7617 throw new core.ArgumentError("Parameter project is required."); | 7348 throw new core.ArgumentError("Parameter project is required."); |
7618 } | 7349 } |
7619 if (targetHttpProxy == null) { | 7350 if (region == null) { |
7620 throw new core.ArgumentError("Parameter targetHttpProxy is required."); | 7351 throw new core.ArgumentError("Parameter region is required."); |
7621 } | 7352 } |
7622 | 7353 |
7623 _url = commons.Escaper.ecapeVariable('$project') + '/global/targetHttpProxie
s/' + commons.Escaper.ecapeVariable('$targetHttpProxy'); | 7354 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region'); |
7624 | 7355 |
7625 var _response = _requester.request(_url, | 7356 var _response = _requester.request(_url, |
7626 "DELETE", | 7357 "GET", |
7627 body: _body, | 7358 body: _body, |
7628 queryParams: _queryParams, | 7359 queryParams: _queryParams, |
7629 uploadOptions: _uploadOptions, | 7360 uploadOptions: _uploadOptions, |
7630 uploadMedia: _uploadMedia, | 7361 uploadMedia: _uploadMedia, |
7631 downloadOptions: _downloadOptions); | 7362 downloadOptions: _downloadOptions); |
7632 return _response.then((data) => new Operation.fromJson(data)); | 7363 return _response.then((data) => new Region.fromJson(data)); |
7633 } | 7364 } |
7634 | 7365 |
7635 /** | 7366 /** |
7636 * Returns the specified TargetHttpProxy resource. | 7367 * Retrieves the list of region resources available to the specified project. |
7637 * | 7368 * |
7638 * Request parameters: | 7369 * Request parameters: |
7639 * | 7370 * |
7640 * [project] - Name of the project scoping this request. | 7371 * [project] - Project ID for this request. |
7641 * Value must have pattern | 7372 * Value must have pattern |
7642 * "(?:(?:[-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])?))". | 7373 * "(?:(?:[-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])?))". |
7643 * | 7374 * |
7644 * [targetHttpProxy] - Name of the TargetHttpProxy resource to return. | 7375 * [filter] - Sets a filter expression for filtering listed resources, in the |
7645 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 7376 * form filter={expression}. Your {expression} must be in the format: |
| 7377 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
7646 * | 7378 * |
7647 * Completes with a [TargetHttpProxy]. | 7379 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 7380 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 7381 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 7382 * string value to filter to. The literal value must be valid for the type of |
| 7383 * field (string, number, boolean). For string fields, the literal value is |
| 7384 * interpreted as a regular expression using RE2 syntax. The literal value |
| 7385 * must match the entire field. |
| 7386 * |
| 7387 * For example, filter=name ne example-instance. |
| 7388 * |
| 7389 * [maxResults] - Maximum count of results to be returned. |
| 7390 * Value must be between "0" and "500". |
| 7391 * |
| 7392 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 7393 * to list the next page of results. Set pageToken to the nextPageToken |
| 7394 * returned by a previous list request. |
| 7395 * |
| 7396 * Completes with a [RegionList]. |
7648 * | 7397 * |
7649 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7398 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7650 * error. | 7399 * error. |
7651 * | 7400 * |
7652 * If the used [http.Client] completes with an error when making a REST call, | 7401 * If the used [http.Client] completes with an error when making a REST call, |
7653 * this method will complete with the same error. | 7402 * this method will complete with the same error. |
7654 */ | 7403 */ |
7655 async.Future<TargetHttpProxy> get(core.String project, core.String targetHttpP
roxy) { | 7404 async.Future<RegionList> list(core.String project, {core.String filter, core.i
nt maxResults, core.String pageToken}) { |
7656 var _url = null; | 7405 var _url = null; |
7657 var _queryParams = new core.Map(); | 7406 var _queryParams = new core.Map(); |
7658 var _uploadMedia = null; | 7407 var _uploadMedia = null; |
7659 var _uploadOptions = null; | 7408 var _uploadOptions = null; |
7660 var _downloadOptions = commons.DownloadOptions.Metadata; | 7409 var _downloadOptions = commons.DownloadOptions.Metadata; |
7661 var _body = null; | 7410 var _body = null; |
7662 | 7411 |
7663 if (project == null) { | 7412 if (project == null) { |
7664 throw new core.ArgumentError("Parameter project is required."); | 7413 throw new core.ArgumentError("Parameter project is required."); |
7665 } | 7414 } |
7666 if (targetHttpProxy == null) { | 7415 if (filter != null) { |
7667 throw new core.ArgumentError("Parameter targetHttpProxy is required."); | 7416 _queryParams["filter"] = [filter]; |
| 7417 } |
| 7418 if (maxResults != null) { |
| 7419 _queryParams["maxResults"] = ["${maxResults}"]; |
| 7420 } |
| 7421 if (pageToken != null) { |
| 7422 _queryParams["pageToken"] = [pageToken]; |
7668 } | 7423 } |
7669 | 7424 |
7670 _url = commons.Escaper.ecapeVariable('$project') + '/global/targetHttpProxie
s/' + commons.Escaper.ecapeVariable('$targetHttpProxy'); | 7425 _url = commons.Escaper.ecapeVariable('$project') + '/regions'; |
7671 | 7426 |
7672 var _response = _requester.request(_url, | 7427 var _response = _requester.request(_url, |
7673 "GET", | 7428 "GET", |
7674 body: _body, | 7429 body: _body, |
7675 queryParams: _queryParams, | 7430 queryParams: _queryParams, |
7676 uploadOptions: _uploadOptions, | 7431 uploadOptions: _uploadOptions, |
7677 uploadMedia: _uploadMedia, | 7432 uploadMedia: _uploadMedia, |
7678 downloadOptions: _downloadOptions); | 7433 downloadOptions: _downloadOptions); |
7679 return _response.then((data) => new TargetHttpProxy.fromJson(data)); | 7434 return _response.then((data) => new RegionList.fromJson(data)); |
7680 } | 7435 } |
7681 | 7436 |
| 7437 } |
| 7438 |
| 7439 |
| 7440 class RoutesResourceApi { |
| 7441 final commons.ApiRequester _requester; |
| 7442 |
| 7443 RoutesResourceApi(commons.ApiRequester client) : |
| 7444 _requester = client; |
| 7445 |
7682 /** | 7446 /** |
7683 * Creates a TargetHttpProxy resource in the specified project using the data | 7447 * Deletes the specified route resource. |
7684 * included in the request. | |
7685 * | |
7686 * [request] - The metadata request object. | |
7687 * | 7448 * |
7688 * Request parameters: | 7449 * Request parameters: |
7689 * | 7450 * |
7690 * [project] - Name of the project scoping this request. | 7451 * [project] - Name of the project scoping this request. |
7691 * Value must have pattern | 7452 * Value must have pattern |
7692 * "(?:(?:[-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])?))". | 7453 * "(?:(?:[-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])?))". |
7693 * | 7454 * |
| 7455 * [route] - Name of the route resource to delete. |
| 7456 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 7457 * |
7694 * Completes with a [Operation]. | 7458 * Completes with a [Operation]. |
7695 * | 7459 * |
7696 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7460 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7697 * error. | 7461 * error. |
7698 * | 7462 * |
7699 * If the used [http.Client] completes with an error when making a REST call, | 7463 * If the used [http.Client] completes with an error when making a REST call, |
7700 * this method will complete with the same error. | 7464 * this method will complete with the same error. |
7701 */ | 7465 */ |
7702 async.Future<Operation> insert(TargetHttpProxy request, core.String project) { | 7466 async.Future<Operation> delete(core.String project, core.String route) { |
7703 var _url = null; | 7467 var _url = null; |
7704 var _queryParams = new core.Map(); | 7468 var _queryParams = new core.Map(); |
7705 var _uploadMedia = null; | 7469 var _uploadMedia = null; |
7706 var _uploadOptions = null; | 7470 var _uploadOptions = null; |
7707 var _downloadOptions = commons.DownloadOptions.Metadata; | 7471 var _downloadOptions = commons.DownloadOptions.Metadata; |
7708 var _body = null; | 7472 var _body = null; |
7709 | 7473 |
7710 if (request != null) { | |
7711 _body = convert.JSON.encode((request).toJson()); | |
7712 } | |
7713 if (project == null) { | 7474 if (project == null) { |
7714 throw new core.ArgumentError("Parameter project is required."); | 7475 throw new core.ArgumentError("Parameter project is required."); |
7715 } | 7476 } |
| 7477 if (route == null) { |
| 7478 throw new core.ArgumentError("Parameter route is required."); |
| 7479 } |
7716 | 7480 |
7717 _url = commons.Escaper.ecapeVariable('$project') + '/global/targetHttpProxie
s'; | 7481 _url = commons.Escaper.ecapeVariable('$project') + '/global/routes/' + commo
ns.Escaper.ecapeVariable('$route'); |
7718 | 7482 |
7719 var _response = _requester.request(_url, | 7483 var _response = _requester.request(_url, |
7720 "POST", | 7484 "DELETE", |
7721 body: _body, | 7485 body: _body, |
7722 queryParams: _queryParams, | 7486 queryParams: _queryParams, |
7723 uploadOptions: _uploadOptions, | 7487 uploadOptions: _uploadOptions, |
7724 uploadMedia: _uploadMedia, | 7488 uploadMedia: _uploadMedia, |
7725 downloadOptions: _downloadOptions); | 7489 downloadOptions: _downloadOptions); |
7726 return _response.then((data) => new Operation.fromJson(data)); | 7490 return _response.then((data) => new Operation.fromJson(data)); |
7727 } | 7491 } |
7728 | 7492 |
7729 /** | 7493 /** |
7730 * Retrieves the list of TargetHttpProxy resources available to the specified | 7494 * Returns the specified route resource. |
7731 * project. | |
7732 * | 7495 * |
7733 * Request parameters: | 7496 * Request parameters: |
7734 * | 7497 * |
7735 * [project] - Name of the project scoping this request. | 7498 * [project] - Name of the project scoping this request. |
7736 * Value must have pattern | 7499 * Value must have pattern |
7737 * "(?:(?:[-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])?))". | 7500 * "(?:(?:[-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])?))". |
7738 * | 7501 * |
7739 * [filter] - Sets a filter expression for filtering listed resources, in the | 7502 * [route] - Name of the route resource to return. |
7740 * form filter={expression}. Your {expression} must contain the following: | 7503 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
7741 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
7742 * | 7504 * |
7743 * - FIELD_NAME: The name of the field you want to compare. The field name | 7505 * Completes with a [Route]. |
7744 * must be valid for the type of resource being filtered. Only atomic field | |
7745 * types are supported (string, number, boolean). Array and object fields are | |
7746 * not currently supported. | |
7747 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
7748 * equals). | |
7749 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
7750 * must be valid for the type of field (string, number, boolean). For string | |
7751 * fields, the literal value is interpreted as a regular expression using RE2 | |
7752 * syntax. The literal value must match the entire field. For example, you | |
7753 * can filter by the name of a resource: | |
7754 * filter=name ne example-instance | |
7755 * The above filter returns only results whose name field does not equal | |
7756 * example-instance. You can also enclose your literal string in single, | |
7757 * double, or no quotes. | |
7758 * | |
7759 * [maxResults] - Maximum count of results to be returned. | |
7760 * Value must be between "0" and "500". | |
7761 * | |
7762 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
7763 * to list the next page of results. Set pageToken to the nextPageToken | |
7764 * returned by a previous list request. | |
7765 * | |
7766 * Completes with a [TargetHttpProxyList]. | |
7767 * | 7506 * |
7768 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7507 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7769 * error. | 7508 * error. |
7770 * | 7509 * |
7771 * If the used [http.Client] completes with an error when making a REST call, | 7510 * If the used [http.Client] completes with an error when making a REST call, |
7772 * this method will complete with the same error. | 7511 * this method will complete with the same error. |
7773 */ | 7512 */ |
7774 async.Future<TargetHttpProxyList> list(core.String project, {core.String filte
r, core.int maxResults, core.String pageToken}) { | 7513 async.Future<Route> get(core.String project, core.String route) { |
7775 var _url = null; | 7514 var _url = null; |
7776 var _queryParams = new core.Map(); | 7515 var _queryParams = new core.Map(); |
7777 var _uploadMedia = null; | 7516 var _uploadMedia = null; |
7778 var _uploadOptions = null; | 7517 var _uploadOptions = null; |
7779 var _downloadOptions = commons.DownloadOptions.Metadata; | 7518 var _downloadOptions = commons.DownloadOptions.Metadata; |
7780 var _body = null; | 7519 var _body = null; |
7781 | 7520 |
7782 if (project == null) { | 7521 if (project == null) { |
7783 throw new core.ArgumentError("Parameter project is required."); | 7522 throw new core.ArgumentError("Parameter project is required."); |
7784 } | 7523 } |
7785 if (filter != null) { | 7524 if (route == null) { |
7786 _queryParams["filter"] = [filter]; | 7525 throw new core.ArgumentError("Parameter route is required."); |
7787 } | |
7788 if (maxResults != null) { | |
7789 _queryParams["maxResults"] = ["${maxResults}"]; | |
7790 } | |
7791 if (pageToken != null) { | |
7792 _queryParams["pageToken"] = [pageToken]; | |
7793 } | 7526 } |
7794 | 7527 |
7795 _url = commons.Escaper.ecapeVariable('$project') + '/global/targetHttpProxie
s'; | 7528 _url = commons.Escaper.ecapeVariable('$project') + '/global/routes/' + commo
ns.Escaper.ecapeVariable('$route'); |
7796 | 7529 |
7797 var _response = _requester.request(_url, | 7530 var _response = _requester.request(_url, |
7798 "GET", | 7531 "GET", |
7799 body: _body, | 7532 body: _body, |
7800 queryParams: _queryParams, | 7533 queryParams: _queryParams, |
7801 uploadOptions: _uploadOptions, | 7534 uploadOptions: _uploadOptions, |
7802 uploadMedia: _uploadMedia, | 7535 uploadMedia: _uploadMedia, |
7803 downloadOptions: _downloadOptions); | 7536 downloadOptions: _downloadOptions); |
7804 return _response.then((data) => new TargetHttpProxyList.fromJson(data)); | 7537 return _response.then((data) => new Route.fromJson(data)); |
7805 } | 7538 } |
7806 | 7539 |
7807 /** | 7540 /** |
7808 * Changes the URL map for TargetHttpProxy. | 7541 * Creates a route resource in the specified project using the data included |
| 7542 * in the request. |
7809 * | 7543 * |
7810 * [request] - The metadata request object. | 7544 * [request] - The metadata request object. |
7811 * | 7545 * |
7812 * Request parameters: | 7546 * Request parameters: |
7813 * | 7547 * |
7814 * [project] - Name of the project scoping this request. | 7548 * [project] - Name of the project scoping this request. |
7815 * Value must have pattern | 7549 * Value must have pattern |
7816 * "(?:(?:[-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])?))". | 7550 * "(?:(?:[-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])?))". |
7817 * | 7551 * |
7818 * [targetHttpProxy] - Name of the TargetHttpProxy resource whose URL map is | |
7819 * to be set. | |
7820 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
7821 * | |
7822 * Completes with a [Operation]. | 7552 * Completes with a [Operation]. |
7823 * | 7553 * |
7824 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7554 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7825 * error. | 7555 * error. |
7826 * | 7556 * |
7827 * If the used [http.Client] completes with an error when making a REST call, | 7557 * If the used [http.Client] completes with an error when making a REST call, |
7828 * this method will complete with the same error. | 7558 * this method will complete with the same error. |
7829 */ | 7559 */ |
7830 async.Future<Operation> setUrlMap(UrlMapReference request, core.String project
, core.String targetHttpProxy) { | 7560 async.Future<Operation> insert(Route request, core.String project) { |
7831 var _url = null; | 7561 var _url = null; |
7832 var _queryParams = new core.Map(); | 7562 var _queryParams = new core.Map(); |
7833 var _uploadMedia = null; | 7563 var _uploadMedia = null; |
7834 var _uploadOptions = null; | 7564 var _uploadOptions = null; |
7835 var _downloadOptions = commons.DownloadOptions.Metadata; | 7565 var _downloadOptions = commons.DownloadOptions.Metadata; |
7836 var _body = null; | 7566 var _body = null; |
7837 | 7567 |
7838 if (request != null) { | 7568 if (request != null) { |
7839 _body = convert.JSON.encode((request).toJson()); | 7569 _body = convert.JSON.encode((request).toJson()); |
7840 } | 7570 } |
7841 if (project == null) { | 7571 if (project == null) { |
7842 throw new core.ArgumentError("Parameter project is required."); | 7572 throw new core.ArgumentError("Parameter project is required."); |
7843 } | 7573 } |
7844 if (targetHttpProxy == null) { | |
7845 throw new core.ArgumentError("Parameter targetHttpProxy is required."); | |
7846 } | |
7847 | 7574 |
7848 _url = commons.Escaper.ecapeVariable('$project') + '/targetHttpProxies/' + c
ommons.Escaper.ecapeVariable('$targetHttpProxy') + '/setUrlMap'; | 7575 _url = commons.Escaper.ecapeVariable('$project') + '/global/routes'; |
7849 | 7576 |
7850 var _response = _requester.request(_url, | 7577 var _response = _requester.request(_url, |
7851 "POST", | 7578 "POST", |
7852 body: _body, | 7579 body: _body, |
7853 queryParams: _queryParams, | 7580 queryParams: _queryParams, |
7854 uploadOptions: _uploadOptions, | 7581 uploadOptions: _uploadOptions, |
7855 uploadMedia: _uploadMedia, | 7582 uploadMedia: _uploadMedia, |
7856 downloadOptions: _downloadOptions); | 7583 downloadOptions: _downloadOptions); |
7857 return _response.then((data) => new Operation.fromJson(data)); | 7584 return _response.then((data) => new Operation.fromJson(data)); |
7858 } | 7585 } |
7859 | 7586 |
7860 } | |
7861 | |
7862 | |
7863 class TargetInstancesResourceApi { | |
7864 final commons.ApiRequester _requester; | |
7865 | |
7866 TargetInstancesResourceApi(commons.ApiRequester client) : | |
7867 _requester = client; | |
7868 | |
7869 /** | 7587 /** |
7870 * Retrieves the list of target instances grouped by scope. | 7588 * Retrieves the list of route resources available to the specified project. |
7871 * | 7589 * |
7872 * Request parameters: | 7590 * Request parameters: |
7873 * | 7591 * |
7874 * [project] - Name of the project scoping this request. | 7592 * [project] - Name of the project scoping this request. |
7875 * Value must have pattern | 7593 * Value must have pattern |
7876 * "(?:(?:[-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])?))". | 7594 * "(?:(?:[-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])?))". |
7877 * | 7595 * |
7878 * [filter] - Sets a filter expression for filtering listed resources, in the | 7596 * [filter] - Sets a filter expression for filtering listed resources, in the |
7879 * form filter={expression}. Your {expression} must contain the following: | 7597 * form filter={expression}. Your {expression} must be in the format: |
7880 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 7598 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
7881 * | 7599 * |
7882 * - FIELD_NAME: The name of the field you want to compare. The field name | 7600 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
7883 * must be valid for the type of resource being filtered. Only atomic field | 7601 * field types are supported (string, number, boolean). The COMPARISON_STRING |
7884 * types are supported (string, number, boolean). Array and object fields are | 7602 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
7885 * not currently supported. | 7603 * string value to filter to. The literal value must be valid for the type of |
7886 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 7604 * field (string, number, boolean). For string fields, the literal value is |
7887 * equals). | 7605 * interpreted as a regular expression using RE2 syntax. The literal value |
7888 * - LITERAL_STRING: The literal string value to filter to. The literal value | 7606 * must match the entire field. |
7889 * must be valid for the type of field (string, number, boolean). For string | 7607 * |
7890 * fields, the literal value is interpreted as a regular expression using RE2 | 7608 * For example, filter=name ne example-instance. |
7891 * syntax. The literal value must match the entire field. For example, you | |
7892 * can filter by the name of a resource: | |
7893 * filter=name ne example-instance | |
7894 * The above filter returns only results whose name field does not equal | |
7895 * example-instance. You can also enclose your literal string in single, | |
7896 * double, or no quotes. | |
7897 * | 7609 * |
7898 * [maxResults] - Maximum count of results to be returned. | 7610 * [maxResults] - Maximum count of results to be returned. |
7899 * Value must be between "0" and "500". | 7611 * Value must be between "0" and "500". |
7900 * | 7612 * |
7901 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 7613 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
7902 * to list the next page of results. Set pageToken to the nextPageToken | 7614 * to list the next page of results. Set pageToken to the nextPageToken |
7903 * returned by a previous list request. | 7615 * returned by a previous list request. |
7904 * | 7616 * |
7905 * Completes with a [TargetInstanceAggregatedList]. | 7617 * Completes with a [RouteList]. |
7906 * | 7618 * |
7907 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7619 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7908 * error. | 7620 * error. |
7909 * | 7621 * |
7910 * If the used [http.Client] completes with an error when making a REST call, | 7622 * If the used [http.Client] completes with an error when making a REST call, |
7911 * this method will complete with the same error. | 7623 * this method will complete with the same error. |
7912 */ | 7624 */ |
7913 async.Future<TargetInstanceAggregatedList> aggregatedList(core.String project,
{core.String filter, core.int maxResults, core.String pageToken}) { | 7625 async.Future<RouteList> list(core.String project, {core.String filter, core.in
t maxResults, core.String pageToken}) { |
7914 var _url = null; | 7626 var _url = null; |
7915 var _queryParams = new core.Map(); | 7627 var _queryParams = new core.Map(); |
7916 var _uploadMedia = null; | 7628 var _uploadMedia = null; |
7917 var _uploadOptions = null; | 7629 var _uploadOptions = null; |
7918 var _downloadOptions = commons.DownloadOptions.Metadata; | 7630 var _downloadOptions = commons.DownloadOptions.Metadata; |
7919 var _body = null; | 7631 var _body = null; |
7920 | 7632 |
7921 if (project == null) { | 7633 if (project == null) { |
7922 throw new core.ArgumentError("Parameter project is required."); | 7634 throw new core.ArgumentError("Parameter project is required."); |
7923 } | 7635 } |
7924 if (filter != null) { | 7636 if (filter != null) { |
7925 _queryParams["filter"] = [filter]; | 7637 _queryParams["filter"] = [filter]; |
7926 } | 7638 } |
7927 if (maxResults != null) { | 7639 if (maxResults != null) { |
7928 _queryParams["maxResults"] = ["${maxResults}"]; | 7640 _queryParams["maxResults"] = ["${maxResults}"]; |
7929 } | 7641 } |
7930 if (pageToken != null) { | 7642 if (pageToken != null) { |
7931 _queryParams["pageToken"] = [pageToken]; | 7643 _queryParams["pageToken"] = [pageToken]; |
7932 } | 7644 } |
7933 | 7645 |
7934 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/targetInstan
ces'; | 7646 _url = commons.Escaper.ecapeVariable('$project') + '/global/routes'; |
7935 | 7647 |
7936 var _response = _requester.request(_url, | 7648 var _response = _requester.request(_url, |
7937 "GET", | 7649 "GET", |
7938 body: _body, | 7650 body: _body, |
7939 queryParams: _queryParams, | 7651 queryParams: _queryParams, |
7940 uploadOptions: _uploadOptions, | 7652 uploadOptions: _uploadOptions, |
7941 uploadMedia: _uploadMedia, | 7653 uploadMedia: _uploadMedia, |
7942 downloadOptions: _downloadOptions); | 7654 downloadOptions: _downloadOptions); |
7943 return _response.then((data) => new TargetInstanceAggregatedList.fromJson(da
ta)); | 7655 return _response.then((data) => new RouteList.fromJson(data)); |
7944 } | 7656 } |
7945 | 7657 |
| 7658 } |
| 7659 |
| 7660 |
| 7661 class SnapshotsResourceApi { |
| 7662 final commons.ApiRequester _requester; |
| 7663 |
| 7664 SnapshotsResourceApi(commons.ApiRequester client) : |
| 7665 _requester = client; |
| 7666 |
7946 /** | 7667 /** |
7947 * Deletes the specified TargetInstance resource. | 7668 * Deletes the specified Snapshot resource. Keep in mind that deleting a |
| 7669 * single snapshot might not necessarily delete all the data on that snapshot. |
| 7670 * If any data on the snapshot that is marked for deletion is needed for |
| 7671 * subsequent snapshots, the data will be moved to the next corresponding |
| 7672 * snapshot. |
| 7673 * |
| 7674 * For more information, see Deleting snaphots. |
7948 * | 7675 * |
7949 * Request parameters: | 7676 * Request parameters: |
7950 * | 7677 * |
7951 * [project] - Name of the project scoping this request. | 7678 * [project] - Name of the project scoping this request. |
7952 * Value must have pattern | 7679 * Value must have pattern |
7953 * "(?:(?:[-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])?))". | 7680 * "(?:(?:[-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])?))". |
7954 * | 7681 * |
7955 * [zone] - Name of the zone scoping this request. | 7682 * [snapshot] - Name of the Snapshot resource to delete. |
7956 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
7957 * | |
7958 * [targetInstance] - Name of the TargetInstance resource to delete. | |
7959 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 7683 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
7960 * | 7684 * |
7961 * Completes with a [Operation]. | 7685 * Completes with a [Operation]. |
7962 * | 7686 * |
7963 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7687 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
7964 * error. | 7688 * error. |
7965 * | 7689 * |
7966 * If the used [http.Client] completes with an error when making a REST call, | 7690 * If the used [http.Client] completes with an error when making a REST call, |
7967 * this method will complete with the same error. | 7691 * this method will complete with the same error. |
7968 */ | 7692 */ |
7969 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing targetInstance) { | 7693 async.Future<Operation> delete(core.String project, core.String snapshot) { |
7970 var _url = null; | 7694 var _url = null; |
7971 var _queryParams = new core.Map(); | 7695 var _queryParams = new core.Map(); |
7972 var _uploadMedia = null; | 7696 var _uploadMedia = null; |
7973 var _uploadOptions = null; | 7697 var _uploadOptions = null; |
7974 var _downloadOptions = commons.DownloadOptions.Metadata; | 7698 var _downloadOptions = commons.DownloadOptions.Metadata; |
7975 var _body = null; | 7699 var _body = null; |
7976 | 7700 |
7977 if (project == null) { | 7701 if (project == null) { |
7978 throw new core.ArgumentError("Parameter project is required."); | 7702 throw new core.ArgumentError("Parameter project is required."); |
7979 } | 7703 } |
7980 if (zone == null) { | 7704 if (snapshot == null) { |
7981 throw new core.ArgumentError("Parameter zone is required."); | 7705 throw new core.ArgumentError("Parameter snapshot is required."); |
7982 } | |
7983 if (targetInstance == null) { | |
7984 throw new core.ArgumentError("Parameter targetInstance is required."); | |
7985 } | 7706 } |
7986 | 7707 |
7987 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/targetInstances/' + commons.Escaper.ecapeVariable(
'$targetInstance'); | 7708 _url = commons.Escaper.ecapeVariable('$project') + '/global/snapshots/' + co
mmons.Escaper.ecapeVariable('$snapshot'); |
7988 | 7709 |
7989 var _response = _requester.request(_url, | 7710 var _response = _requester.request(_url, |
7990 "DELETE", | 7711 "DELETE", |
7991 body: _body, | 7712 body: _body, |
7992 queryParams: _queryParams, | 7713 queryParams: _queryParams, |
7993 uploadOptions: _uploadOptions, | 7714 uploadOptions: _uploadOptions, |
7994 uploadMedia: _uploadMedia, | 7715 uploadMedia: _uploadMedia, |
7995 downloadOptions: _downloadOptions); | 7716 downloadOptions: _downloadOptions); |
7996 return _response.then((data) => new Operation.fromJson(data)); | 7717 return _response.then((data) => new Operation.fromJson(data)); |
7997 } | 7718 } |
7998 | 7719 |
7999 /** | 7720 /** |
8000 * Returns the specified TargetInstance resource. | 7721 * Returns the specified Snapshot resource. |
8001 * | 7722 * |
8002 * Request parameters: | 7723 * Request parameters: |
8003 * | 7724 * |
8004 * [project] - Name of the project scoping this request. | 7725 * [project] - Name of the project scoping this request. |
8005 * Value must have pattern | 7726 * Value must have pattern |
8006 * "(?:(?:[-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])?))". | 7727 * "(?:(?:[-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])?))". |
8007 * | 7728 * |
8008 * [zone] - Name of the zone scoping this request. | 7729 * [snapshot] - Name of the Snapshot resource to return. |
8009 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 7730 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8010 * | 7731 * |
8011 * [targetInstance] - Name of the TargetInstance resource to return. | 7732 * Completes with a [Snapshot]. |
8012 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
8013 * | |
8014 * Completes with a [TargetInstance]. | |
8015 * | 7733 * |
8016 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7734 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8017 * error. | 7735 * error. |
8018 * | 7736 * |
8019 * If the used [http.Client] completes with an error when making a REST call, | 7737 * If the used [http.Client] completes with an error when making a REST call, |
8020 * this method will complete with the same error. | 7738 * this method will complete with the same error. |
8021 */ | 7739 */ |
8022 async.Future<TargetInstance> get(core.String project, core.String zone, core.S
tring targetInstance) { | 7740 async.Future<Snapshot> get(core.String project, core.String snapshot) { |
8023 var _url = null; | 7741 var _url = null; |
8024 var _queryParams = new core.Map(); | 7742 var _queryParams = new core.Map(); |
8025 var _uploadMedia = null; | 7743 var _uploadMedia = null; |
8026 var _uploadOptions = null; | 7744 var _uploadOptions = null; |
8027 var _downloadOptions = commons.DownloadOptions.Metadata; | 7745 var _downloadOptions = commons.DownloadOptions.Metadata; |
8028 var _body = null; | 7746 var _body = null; |
8029 | 7747 |
8030 if (project == null) { | 7748 if (project == null) { |
8031 throw new core.ArgumentError("Parameter project is required."); | 7749 throw new core.ArgumentError("Parameter project is required."); |
8032 } | 7750 } |
8033 if (zone == null) { | 7751 if (snapshot == null) { |
8034 throw new core.ArgumentError("Parameter zone is required."); | 7752 throw new core.ArgumentError("Parameter snapshot is required."); |
8035 } | |
8036 if (targetInstance == null) { | |
8037 throw new core.ArgumentError("Parameter targetInstance is required."); | |
8038 } | 7753 } |
8039 | 7754 |
8040 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/targetInstances/' + commons.Escaper.ecapeVariable(
'$targetInstance'); | 7755 _url = commons.Escaper.ecapeVariable('$project') + '/global/snapshots/' + co
mmons.Escaper.ecapeVariable('$snapshot'); |
8041 | 7756 |
8042 var _response = _requester.request(_url, | 7757 var _response = _requester.request(_url, |
8043 "GET", | 7758 "GET", |
8044 body: _body, | 7759 body: _body, |
8045 queryParams: _queryParams, | 7760 queryParams: _queryParams, |
8046 uploadOptions: _uploadOptions, | 7761 uploadOptions: _uploadOptions, |
8047 uploadMedia: _uploadMedia, | 7762 uploadMedia: _uploadMedia, |
8048 downloadOptions: _downloadOptions); | 7763 downloadOptions: _downloadOptions); |
8049 return _response.then((data) => new TargetInstance.fromJson(data)); | 7764 return _response.then((data) => new Snapshot.fromJson(data)); |
8050 } | 7765 } |
8051 | 7766 |
8052 /** | 7767 /** |
8053 * Creates a TargetInstance resource in the specified project and zone using | 7768 * Retrieves the list of Snapshot resources contained within the specified |
8054 * the data included in the request. | 7769 * project. |
8055 * | |
8056 * [request] - The metadata request object. | |
8057 * | 7770 * |
8058 * Request parameters: | 7771 * Request parameters: |
8059 * | 7772 * |
8060 * [project] - Name of the project scoping this request. | 7773 * [project] - Name of the project scoping this request. |
8061 * Value must have pattern | 7774 * Value must have pattern |
8062 * "(?:(?:[-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])?))". | 7775 * "(?:(?:[-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])?))". |
8063 * | 7776 * |
8064 * [zone] - Name of the zone scoping this request. | 7777 * [filter] - Sets a filter expression for filtering listed resources, in the |
8065 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 7778 * form filter={expression}. Your {expression} must be in the format: |
| 7779 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
8066 * | 7780 * |
8067 * Completes with a [Operation]. | 7781 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 7782 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 7783 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 7784 * string value to filter to. The literal value must be valid for the type of |
| 7785 * field (string, number, boolean). For string fields, the literal value is |
| 7786 * interpreted as a regular expression using RE2 syntax. The literal value |
| 7787 * must match the entire field. |
| 7788 * |
| 7789 * For example, filter=name ne example-instance. |
| 7790 * |
| 7791 * [maxResults] - Maximum count of results to be returned. |
| 7792 * Value must be between "0" and "500". |
| 7793 * |
| 7794 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 7795 * to list the next page of results. Set pageToken to the nextPageToken |
| 7796 * returned by a previous list request. |
| 7797 * |
| 7798 * Completes with a [SnapshotList]. |
8068 * | 7799 * |
8069 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7800 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8070 * error. | 7801 * error. |
8071 * | 7802 * |
8072 * If the used [http.Client] completes with an error when making a REST call, | 7803 * If the used [http.Client] completes with an error when making a REST call, |
8073 * this method will complete with the same error. | 7804 * this method will complete with the same error. |
8074 */ | 7805 */ |
8075 async.Future<Operation> insert(TargetInstance request, core.String project, co
re.String zone) { | 7806 async.Future<SnapshotList> list(core.String project, {core.String filter, core
.int maxResults, core.String pageToken}) { |
8076 var _url = null; | 7807 var _url = null; |
8077 var _queryParams = new core.Map(); | 7808 var _queryParams = new core.Map(); |
8078 var _uploadMedia = null; | 7809 var _uploadMedia = null; |
8079 var _uploadOptions = null; | 7810 var _uploadOptions = null; |
8080 var _downloadOptions = commons.DownloadOptions.Metadata; | 7811 var _downloadOptions = commons.DownloadOptions.Metadata; |
8081 var _body = null; | 7812 var _body = null; |
8082 | 7813 |
8083 if (request != null) { | |
8084 _body = convert.JSON.encode((request).toJson()); | |
8085 } | |
8086 if (project == null) { | 7814 if (project == null) { |
8087 throw new core.ArgumentError("Parameter project is required."); | 7815 throw new core.ArgumentError("Parameter project is required."); |
8088 } | 7816 } |
8089 if (zone == null) { | 7817 if (filter != null) { |
8090 throw new core.ArgumentError("Parameter zone is required."); | 7818 _queryParams["filter"] = [filter]; |
| 7819 } |
| 7820 if (maxResults != null) { |
| 7821 _queryParams["maxResults"] = ["${maxResults}"]; |
| 7822 } |
| 7823 if (pageToken != null) { |
| 7824 _queryParams["pageToken"] = [pageToken]; |
8091 } | 7825 } |
8092 | 7826 |
8093 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/targetInstances'; | 7827 _url = commons.Escaper.ecapeVariable('$project') + '/global/snapshots'; |
8094 | 7828 |
8095 var _response = _requester.request(_url, | 7829 var _response = _requester.request(_url, |
8096 "POST", | 7830 "GET", |
8097 body: _body, | 7831 body: _body, |
8098 queryParams: _queryParams, | 7832 queryParams: _queryParams, |
8099 uploadOptions: _uploadOptions, | 7833 uploadOptions: _uploadOptions, |
8100 uploadMedia: _uploadMedia, | 7834 uploadMedia: _uploadMedia, |
8101 downloadOptions: _downloadOptions); | 7835 downloadOptions: _downloadOptions); |
8102 return _response.then((data) => new Operation.fromJson(data)); | 7836 return _response.then((data) => new SnapshotList.fromJson(data)); |
8103 } | 7837 } |
8104 | 7838 |
| 7839 } |
| 7840 |
| 7841 |
| 7842 class TargetHttpProxiesResourceApi { |
| 7843 final commons.ApiRequester _requester; |
| 7844 |
| 7845 TargetHttpProxiesResourceApi(commons.ApiRequester client) : |
| 7846 _requester = client; |
| 7847 |
8105 /** | 7848 /** |
8106 * Retrieves the list of TargetInstance resources available to the specified | 7849 * Deletes the specified TargetHttpProxy resource. |
8107 * project and zone. | |
8108 * | 7850 * |
8109 * Request parameters: | 7851 * Request parameters: |
8110 * | 7852 * |
8111 * [project] - Name of the project scoping this request. | 7853 * [project] - Name of the project scoping this request. |
8112 * Value must have pattern | 7854 * Value must have pattern |
8113 * "(?:(?:[-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])?))". | 7855 * "(?:(?:[-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])?))". |
8114 * | 7856 * |
8115 * [zone] - Name of the zone scoping this request. | 7857 * [targetHttpProxy] - Name of the TargetHttpProxy resource to delete. |
8116 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 7858 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8117 * | 7859 * |
8118 * [filter] - Sets a filter expression for filtering listed resources, in the | 7860 * Completes with a [Operation]. |
8119 * form filter={expression}. Your {expression} must contain the following: | |
8120 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
8121 * | |
8122 * - FIELD_NAME: The name of the field you want to compare. The field name | |
8123 * must be valid for the type of resource being filtered. Only atomic field | |
8124 * types are supported (string, number, boolean). Array and object fields are | |
8125 * not currently supported. | |
8126 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
8127 * equals). | |
8128 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
8129 * must be valid for the type of field (string, number, boolean). For string | |
8130 * fields, the literal value is interpreted as a regular expression using RE2 | |
8131 * syntax. The literal value must match the entire field. For example, you | |
8132 * can filter by the name of a resource: | |
8133 * filter=name ne example-instance | |
8134 * The above filter returns only results whose name field does not equal | |
8135 * example-instance. You can also enclose your literal string in single, | |
8136 * double, or no quotes. | |
8137 * | |
8138 * [maxResults] - Maximum count of results to be returned. | |
8139 * Value must be between "0" and "500". | |
8140 * | |
8141 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
8142 * to list the next page of results. Set pageToken to the nextPageToken | |
8143 * returned by a previous list request. | |
8144 * | |
8145 * Completes with a [TargetInstanceList]. | |
8146 * | 7861 * |
8147 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7862 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8148 * error. | 7863 * error. |
8149 * | 7864 * |
8150 * If the used [http.Client] completes with an error when making a REST call, | 7865 * If the used [http.Client] completes with an error when making a REST call, |
8151 * this method will complete with the same error. | 7866 * this method will complete with the same error. |
8152 */ | 7867 */ |
8153 async.Future<TargetInstanceList> list(core.String project, core.String zone, {
core.String filter, core.int maxResults, core.String pageToken}) { | 7868 async.Future<Operation> delete(core.String project, core.String targetHttpProx
y) { |
8154 var _url = null; | 7869 var _url = null; |
8155 var _queryParams = new core.Map(); | 7870 var _queryParams = new core.Map(); |
8156 var _uploadMedia = null; | 7871 var _uploadMedia = null; |
8157 var _uploadOptions = null; | 7872 var _uploadOptions = null; |
8158 var _downloadOptions = commons.DownloadOptions.Metadata; | 7873 var _downloadOptions = commons.DownloadOptions.Metadata; |
8159 var _body = null; | 7874 var _body = null; |
8160 | 7875 |
8161 if (project == null) { | 7876 if (project == null) { |
8162 throw new core.ArgumentError("Parameter project is required."); | 7877 throw new core.ArgumentError("Parameter project is required."); |
8163 } | 7878 } |
8164 if (zone == null) { | 7879 if (targetHttpProxy == null) { |
8165 throw new core.ArgumentError("Parameter zone is required."); | 7880 throw new core.ArgumentError("Parameter targetHttpProxy is required."); |
8166 } | |
8167 if (filter != null) { | |
8168 _queryParams["filter"] = [filter]; | |
8169 } | |
8170 if (maxResults != null) { | |
8171 _queryParams["maxResults"] = ["${maxResults}"]; | |
8172 } | |
8173 if (pageToken != null) { | |
8174 _queryParams["pageToken"] = [pageToken]; | |
8175 } | 7881 } |
8176 | 7882 |
8177 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/targetInstances'; | 7883 _url = commons.Escaper.ecapeVariable('$project') + '/global/targetHttpProxie
s/' + commons.Escaper.ecapeVariable('$targetHttpProxy'); |
8178 | 7884 |
8179 var _response = _requester.request(_url, | 7885 var _response = _requester.request(_url, |
8180 "GET", | 7886 "DELETE", |
8181 body: _body, | 7887 body: _body, |
8182 queryParams: _queryParams, | 7888 queryParams: _queryParams, |
8183 uploadOptions: _uploadOptions, | 7889 uploadOptions: _uploadOptions, |
8184 uploadMedia: _uploadMedia, | 7890 uploadMedia: _uploadMedia, |
8185 downloadOptions: _downloadOptions); | 7891 downloadOptions: _downloadOptions); |
8186 return _response.then((data) => new TargetInstanceList.fromJson(data)); | 7892 return _response.then((data) => new Operation.fromJson(data)); |
8187 } | 7893 } |
8188 | 7894 |
8189 } | |
8190 | |
8191 | |
8192 class TargetPoolsResourceApi { | |
8193 final commons.ApiRequester _requester; | |
8194 | |
8195 TargetPoolsResourceApi(commons.ApiRequester client) : | |
8196 _requester = client; | |
8197 | |
8198 /** | 7895 /** |
8199 * Adds health check URL to targetPool. | 7896 * Returns the specified TargetHttpProxy resource. |
8200 * | |
8201 * [request] - The metadata request object. | |
8202 * | 7897 * |
8203 * Request parameters: | 7898 * Request parameters: |
8204 * | 7899 * |
8205 * [project] - null | 7900 * [project] - Name of the project scoping this request. |
8206 * Value must have pattern | 7901 * Value must have pattern |
8207 * "(?:(?:[-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])?))". | 7902 * "(?:(?:[-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])?))". |
8208 * | 7903 * |
8209 * [region] - Name of the region scoping this request. | 7904 * [targetHttpProxy] - Name of the TargetHttpProxy resource to return. |
8210 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 7905 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8211 * | 7906 * |
8212 * [targetPool] - Name of the TargetPool resource to which health_check_url is | 7907 * Completes with a [TargetHttpProxy]. |
8213 * to be added. | |
8214 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
8215 * | |
8216 * Completes with a [Operation]. | |
8217 * | 7908 * |
8218 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7909 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8219 * error. | 7910 * error. |
8220 * | 7911 * |
8221 * If the used [http.Client] completes with an error when making a REST call, | 7912 * If the used [http.Client] completes with an error when making a REST call, |
8222 * this method will complete with the same error. | 7913 * this method will complete with the same error. |
8223 */ | 7914 */ |
8224 async.Future<Operation> addHealthCheck(TargetPoolsAddHealthCheckRequest reques
t, core.String project, core.String region, core.String targetPool) { | 7915 async.Future<TargetHttpProxy> get(core.String project, core.String targetHttpP
roxy) { |
8225 var _url = null; | 7916 var _url = null; |
8226 var _queryParams = new core.Map(); | 7917 var _queryParams = new core.Map(); |
8227 var _uploadMedia = null; | 7918 var _uploadMedia = null; |
8228 var _uploadOptions = null; | 7919 var _uploadOptions = null; |
8229 var _downloadOptions = commons.DownloadOptions.Metadata; | 7920 var _downloadOptions = commons.DownloadOptions.Metadata; |
8230 var _body = null; | 7921 var _body = null; |
8231 | 7922 |
8232 if (request != null) { | |
8233 _body = convert.JSON.encode((request).toJson()); | |
8234 } | |
8235 if (project == null) { | 7923 if (project == null) { |
8236 throw new core.ArgumentError("Parameter project is required."); | 7924 throw new core.ArgumentError("Parameter project is required."); |
8237 } | 7925 } |
8238 if (region == null) { | 7926 if (targetHttpProxy == null) { |
8239 throw new core.ArgumentError("Parameter region is required."); | 7927 throw new core.ArgumentError("Parameter targetHttpProxy is required."); |
8240 } | |
8241 if (targetPool == null) { | |
8242 throw new core.ArgumentError("Parameter targetPool is required."); | |
8243 } | 7928 } |
8244 | 7929 |
8245 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/addHealthCheck'; | 7930 _url = commons.Escaper.ecapeVariable('$project') + '/global/targetHttpProxie
s/' + commons.Escaper.ecapeVariable('$targetHttpProxy'); |
8246 | 7931 |
8247 var _response = _requester.request(_url, | 7932 var _response = _requester.request(_url, |
8248 "POST", | 7933 "GET", |
8249 body: _body, | 7934 body: _body, |
8250 queryParams: _queryParams, | 7935 queryParams: _queryParams, |
8251 uploadOptions: _uploadOptions, | 7936 uploadOptions: _uploadOptions, |
8252 uploadMedia: _uploadMedia, | 7937 uploadMedia: _uploadMedia, |
8253 downloadOptions: _downloadOptions); | 7938 downloadOptions: _downloadOptions); |
8254 return _response.then((data) => new Operation.fromJson(data)); | 7939 return _response.then((data) => new TargetHttpProxy.fromJson(data)); |
8255 } | 7940 } |
8256 | 7941 |
8257 /** | 7942 /** |
8258 * Adds instance url to targetPool. | 7943 * Creates a TargetHttpProxy resource in the specified project using the data |
| 7944 * included in the request. |
8259 * | 7945 * |
8260 * [request] - The metadata request object. | 7946 * [request] - The metadata request object. |
8261 * | 7947 * |
8262 * Request parameters: | 7948 * Request parameters: |
8263 * | 7949 * |
8264 * [project] - null | 7950 * [project] - Name of the project scoping this request. |
8265 * Value must have pattern | 7951 * Value must have pattern |
8266 * "(?:(?:[-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])?))". | 7952 * "(?:(?:[-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])?))". |
8267 * | 7953 * |
8268 * [region] - Name of the region scoping this request. | |
8269 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
8270 * | |
8271 * [targetPool] - Name of the TargetPool resource to which instance_url is to | |
8272 * be added. | |
8273 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
8274 * | |
8275 * Completes with a [Operation]. | 7954 * Completes with a [Operation]. |
8276 * | 7955 * |
8277 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 7956 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8278 * error. | 7957 * error. |
8279 * | 7958 * |
8280 * If the used [http.Client] completes with an error when making a REST call, | 7959 * If the used [http.Client] completes with an error when making a REST call, |
8281 * this method will complete with the same error. | 7960 * this method will complete with the same error. |
8282 */ | 7961 */ |
8283 async.Future<Operation> addInstance(TargetPoolsAddInstanceRequest request, cor
e.String project, core.String region, core.String targetPool) { | 7962 async.Future<Operation> insert(TargetHttpProxy request, core.String project) { |
8284 var _url = null; | 7963 var _url = null; |
8285 var _queryParams = new core.Map(); | 7964 var _queryParams = new core.Map(); |
8286 var _uploadMedia = null; | 7965 var _uploadMedia = null; |
8287 var _uploadOptions = null; | 7966 var _uploadOptions = null; |
8288 var _downloadOptions = commons.DownloadOptions.Metadata; | 7967 var _downloadOptions = commons.DownloadOptions.Metadata; |
8289 var _body = null; | 7968 var _body = null; |
8290 | 7969 |
8291 if (request != null) { | 7970 if (request != null) { |
8292 _body = convert.JSON.encode((request).toJson()); | 7971 _body = convert.JSON.encode((request).toJson()); |
8293 } | 7972 } |
8294 if (project == null) { | 7973 if (project == null) { |
8295 throw new core.ArgumentError("Parameter project is required."); | 7974 throw new core.ArgumentError("Parameter project is required."); |
8296 } | 7975 } |
8297 if (region == null) { | |
8298 throw new core.ArgumentError("Parameter region is required."); | |
8299 } | |
8300 if (targetPool == null) { | |
8301 throw new core.ArgumentError("Parameter targetPool is required."); | |
8302 } | |
8303 | 7976 |
8304 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/addInstance'; | 7977 _url = commons.Escaper.ecapeVariable('$project') + '/global/targetHttpProxie
s'; |
8305 | 7978 |
8306 var _response = _requester.request(_url, | 7979 var _response = _requester.request(_url, |
8307 "POST", | 7980 "POST", |
8308 body: _body, | 7981 body: _body, |
8309 queryParams: _queryParams, | 7982 queryParams: _queryParams, |
8310 uploadOptions: _uploadOptions, | 7983 uploadOptions: _uploadOptions, |
8311 uploadMedia: _uploadMedia, | 7984 uploadMedia: _uploadMedia, |
8312 downloadOptions: _downloadOptions); | 7985 downloadOptions: _downloadOptions); |
8313 return _response.then((data) => new Operation.fromJson(data)); | 7986 return _response.then((data) => new Operation.fromJson(data)); |
8314 } | 7987 } |
8315 | 7988 |
8316 /** | 7989 /** |
8317 * Retrieves the list of target pools grouped by scope. | 7990 * Retrieves the list of TargetHttpProxy resources available to the specified |
| 7991 * project. |
8318 * | 7992 * |
8319 * Request parameters: | 7993 * Request parameters: |
8320 * | 7994 * |
8321 * [project] - Name of the project scoping this request. | 7995 * [project] - Name of the project scoping this request. |
8322 * Value must have pattern | 7996 * Value must have pattern |
8323 * "(?:(?:[-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])?))". | 7997 * "(?:(?:[-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])?))". |
8324 * | 7998 * |
8325 * [filter] - Sets a filter expression for filtering listed resources, in the | 7999 * [filter] - Sets a filter expression for filtering listed resources, in the |
8326 * form filter={expression}. Your {expression} must contain the following: | 8000 * form filter={expression}. Your {expression} must be in the format: |
8327 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 8001 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
8328 * | 8002 * |
8329 * - FIELD_NAME: The name of the field you want to compare. The field name | 8003 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
8330 * must be valid for the type of resource being filtered. Only atomic field | 8004 * field types are supported (string, number, boolean). The COMPARISON_STRING |
8331 * types are supported (string, number, boolean). Array and object fields are | 8005 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
8332 * not currently supported. | 8006 * string value to filter to. The literal value must be valid for the type of |
8333 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 8007 * field (string, number, boolean). For string fields, the literal value is |
8334 * equals). | 8008 * interpreted as a regular expression using RE2 syntax. The literal value |
8335 * - LITERAL_STRING: The literal string value to filter to. The literal value | 8009 * must match the entire field. |
8336 * must be valid for the type of field (string, number, boolean). For string | 8010 * |
8337 * fields, the literal value is interpreted as a regular expression using RE2 | 8011 * For example, filter=name ne example-instance. |
8338 * syntax. The literal value must match the entire field. For example, you | |
8339 * can filter by the name of a resource: | |
8340 * filter=name ne example-instance | |
8341 * The above filter returns only results whose name field does not equal | |
8342 * example-instance. You can also enclose your literal string in single, | |
8343 * double, or no quotes. | |
8344 * | 8012 * |
8345 * [maxResults] - Maximum count of results to be returned. | 8013 * [maxResults] - Maximum count of results to be returned. |
8346 * Value must be between "0" and "500". | 8014 * Value must be between "0" and "500". |
8347 * | 8015 * |
8348 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 8016 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
8349 * to list the next page of results. Set pageToken to the nextPageToken | 8017 * to list the next page of results. Set pageToken to the nextPageToken |
8350 * returned by a previous list request. | 8018 * returned by a previous list request. |
8351 * | 8019 * |
8352 * Completes with a [TargetPoolAggregatedList]. | 8020 * Completes with a [TargetHttpProxyList]. |
8353 * | 8021 * |
8354 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8022 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8355 * error. | 8023 * error. |
8356 * | 8024 * |
8357 * If the used [http.Client] completes with an error when making a REST call, | 8025 * If the used [http.Client] completes with an error when making a REST call, |
8358 * this method will complete with the same error. | 8026 * this method will complete with the same error. |
8359 */ | 8027 */ |
8360 async.Future<TargetPoolAggregatedList> aggregatedList(core.String project, {co
re.String filter, core.int maxResults, core.String pageToken}) { | 8028 async.Future<TargetHttpProxyList> list(core.String project, {core.String filte
r, core.int maxResults, core.String pageToken}) { |
8361 var _url = null; | 8029 var _url = null; |
8362 var _queryParams = new core.Map(); | 8030 var _queryParams = new core.Map(); |
8363 var _uploadMedia = null; | 8031 var _uploadMedia = null; |
8364 var _uploadOptions = null; | 8032 var _uploadOptions = null; |
8365 var _downloadOptions = commons.DownloadOptions.Metadata; | 8033 var _downloadOptions = commons.DownloadOptions.Metadata; |
8366 var _body = null; | 8034 var _body = null; |
8367 | 8035 |
8368 if (project == null) { | 8036 if (project == null) { |
8369 throw new core.ArgumentError("Parameter project is required."); | 8037 throw new core.ArgumentError("Parameter project is required."); |
8370 } | 8038 } |
8371 if (filter != null) { | 8039 if (filter != null) { |
8372 _queryParams["filter"] = [filter]; | 8040 _queryParams["filter"] = [filter]; |
8373 } | 8041 } |
8374 if (maxResults != null) { | 8042 if (maxResults != null) { |
8375 _queryParams["maxResults"] = ["${maxResults}"]; | 8043 _queryParams["maxResults"] = ["${maxResults}"]; |
8376 } | 8044 } |
8377 if (pageToken != null) { | 8045 if (pageToken != null) { |
8378 _queryParams["pageToken"] = [pageToken]; | 8046 _queryParams["pageToken"] = [pageToken]; |
8379 } | 8047 } |
8380 | 8048 |
8381 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/targetPools'
; | 8049 _url = commons.Escaper.ecapeVariable('$project') + '/global/targetHttpProxie
s'; |
8382 | 8050 |
8383 var _response = _requester.request(_url, | 8051 var _response = _requester.request(_url, |
8384 "GET", | 8052 "GET", |
8385 body: _body, | 8053 body: _body, |
8386 queryParams: _queryParams, | 8054 queryParams: _queryParams, |
8387 uploadOptions: _uploadOptions, | 8055 uploadOptions: _uploadOptions, |
8388 uploadMedia: _uploadMedia, | 8056 uploadMedia: _uploadMedia, |
8389 downloadOptions: _downloadOptions); | 8057 downloadOptions: _downloadOptions); |
8390 return _response.then((data) => new TargetPoolAggregatedList.fromJson(data))
; | 8058 return _response.then((data) => new TargetHttpProxyList.fromJson(data)); |
8391 } | 8059 } |
8392 | 8060 |
8393 /** | 8061 /** |
8394 * Deletes the specified TargetPool resource. | 8062 * Changes the URL map for TargetHttpProxy. |
| 8063 * |
| 8064 * [request] - The metadata request object. |
8395 * | 8065 * |
8396 * Request parameters: | 8066 * Request parameters: |
8397 * | 8067 * |
8398 * [project] - Name of the project scoping this request. | 8068 * [project] - Name of the project scoping this request. |
8399 * Value must have pattern | 8069 * Value must have pattern |
8400 * "(?:(?:[-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])?))". | 8070 * "(?:(?:[-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])?))". |
8401 * | 8071 * |
8402 * [region] - Name of the region scoping this request. | 8072 * [targetHttpProxy] - Name of the TargetHttpProxy resource whose URL map is |
8403 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8073 * to be set. |
8404 * | |
8405 * [targetPool] - Name of the TargetPool resource to delete. | |
8406 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8074 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8407 * | 8075 * |
8408 * Completes with a [Operation]. | 8076 * Completes with a [Operation]. |
8409 * | 8077 * |
8410 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8078 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8411 * error. | 8079 * error. |
8412 * | 8080 * |
8413 * If the used [http.Client] completes with an error when making a REST call, | 8081 * If the used [http.Client] completes with an error when making a REST call, |
8414 * this method will complete with the same error. | 8082 * this method will complete with the same error. |
8415 */ | 8083 */ |
8416 async.Future<Operation> delete(core.String project, core.String region, core.S
tring targetPool) { | 8084 async.Future<Operation> setUrlMap(UrlMapReference request, core.String project
, core.String targetHttpProxy) { |
8417 var _url = null; | 8085 var _url = null; |
8418 var _queryParams = new core.Map(); | 8086 var _queryParams = new core.Map(); |
8419 var _uploadMedia = null; | 8087 var _uploadMedia = null; |
8420 var _uploadOptions = null; | 8088 var _uploadOptions = null; |
8421 var _downloadOptions = commons.DownloadOptions.Metadata; | 8089 var _downloadOptions = commons.DownloadOptions.Metadata; |
8422 var _body = null; | 8090 var _body = null; |
8423 | 8091 |
| 8092 if (request != null) { |
| 8093 _body = convert.JSON.encode((request).toJson()); |
| 8094 } |
8424 if (project == null) { | 8095 if (project == null) { |
8425 throw new core.ArgumentError("Parameter project is required."); | 8096 throw new core.ArgumentError("Parameter project is required."); |
8426 } | 8097 } |
8427 if (region == null) { | 8098 if (targetHttpProxy == null) { |
8428 throw new core.ArgumentError("Parameter region is required."); | 8099 throw new core.ArgumentError("Parameter targetHttpProxy is required."); |
8429 } | |
8430 if (targetPool == null) { | |
8431 throw new core.ArgumentError("Parameter targetPool is required."); | |
8432 } | 8100 } |
8433 | 8101 |
8434 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool'); | 8102 _url = commons.Escaper.ecapeVariable('$project') + '/targetHttpProxies/' + c
ommons.Escaper.ecapeVariable('$targetHttpProxy') + '/setUrlMap'; |
8435 | 8103 |
8436 var _response = _requester.request(_url, | 8104 var _response = _requester.request(_url, |
8437 "DELETE", | 8105 "POST", |
8438 body: _body, | 8106 body: _body, |
8439 queryParams: _queryParams, | 8107 queryParams: _queryParams, |
8440 uploadOptions: _uploadOptions, | 8108 uploadOptions: _uploadOptions, |
8441 uploadMedia: _uploadMedia, | 8109 uploadMedia: _uploadMedia, |
8442 downloadOptions: _downloadOptions); | 8110 downloadOptions: _downloadOptions); |
8443 return _response.then((data) => new Operation.fromJson(data)); | 8111 return _response.then((data) => new Operation.fromJson(data)); |
8444 } | 8112 } |
8445 | 8113 |
| 8114 } |
| 8115 |
| 8116 |
| 8117 class TargetInstancesResourceApi { |
| 8118 final commons.ApiRequester _requester; |
| 8119 |
| 8120 TargetInstancesResourceApi(commons.ApiRequester client) : |
| 8121 _requester = client; |
| 8122 |
8446 /** | 8123 /** |
8447 * Returns the specified TargetPool resource. | 8124 * Retrieves the list of target instances grouped by scope. |
8448 * | 8125 * |
8449 * Request parameters: | 8126 * Request parameters: |
8450 * | 8127 * |
8451 * [project] - Name of the project scoping this request. | 8128 * [project] - Name of the project scoping this request. |
8452 * Value must have pattern | 8129 * Value must have pattern |
8453 * "(?:(?:[-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])?))". | 8130 * "(?:(?:[-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])?))". |
8454 * | 8131 * |
8455 * [region] - Name of the region scoping this request. | 8132 * [filter] - Sets a filter expression for filtering listed resources, in the |
8456 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8133 * form filter={expression}. Your {expression} must be in the format: |
| 8134 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
8457 * | 8135 * |
8458 * [targetPool] - Name of the TargetPool resource to return. | 8136 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
8459 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8137 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 8138 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 8139 * string value to filter to. The literal value must be valid for the type of |
| 8140 * field (string, number, boolean). For string fields, the literal value is |
| 8141 * interpreted as a regular expression using RE2 syntax. The literal value |
| 8142 * must match the entire field. |
8460 * | 8143 * |
8461 * Completes with a [TargetPool]. | 8144 * For example, filter=name ne example-instance. |
| 8145 * |
| 8146 * [maxResults] - Maximum count of results to be returned. |
| 8147 * Value must be between "0" and "500". |
| 8148 * |
| 8149 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 8150 * to list the next page of results. Set pageToken to the nextPageToken |
| 8151 * returned by a previous list request. |
| 8152 * |
| 8153 * Completes with a [TargetInstanceAggregatedList]. |
8462 * | 8154 * |
8463 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8155 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8464 * error. | 8156 * error. |
8465 * | 8157 * |
8466 * If the used [http.Client] completes with an error when making a REST call, | 8158 * If the used [http.Client] completes with an error when making a REST call, |
8467 * this method will complete with the same error. | 8159 * this method will complete with the same error. |
8468 */ | 8160 */ |
8469 async.Future<TargetPool> get(core.String project, core.String region, core.Str
ing targetPool) { | 8161 async.Future<TargetInstanceAggregatedList> aggregatedList(core.String project,
{core.String filter, core.int maxResults, core.String pageToken}) { |
8470 var _url = null; | 8162 var _url = null; |
8471 var _queryParams = new core.Map(); | 8163 var _queryParams = new core.Map(); |
8472 var _uploadMedia = null; | 8164 var _uploadMedia = null; |
8473 var _uploadOptions = null; | 8165 var _uploadOptions = null; |
8474 var _downloadOptions = commons.DownloadOptions.Metadata; | 8166 var _downloadOptions = commons.DownloadOptions.Metadata; |
8475 var _body = null; | 8167 var _body = null; |
8476 | 8168 |
8477 if (project == null) { | 8169 if (project == null) { |
8478 throw new core.ArgumentError("Parameter project is required."); | 8170 throw new core.ArgumentError("Parameter project is required."); |
8479 } | 8171 } |
8480 if (region == null) { | 8172 if (filter != null) { |
8481 throw new core.ArgumentError("Parameter region is required."); | 8173 _queryParams["filter"] = [filter]; |
8482 } | 8174 } |
8483 if (targetPool == null) { | 8175 if (maxResults != null) { |
8484 throw new core.ArgumentError("Parameter targetPool is required."); | 8176 _queryParams["maxResults"] = ["${maxResults}"]; |
| 8177 } |
| 8178 if (pageToken != null) { |
| 8179 _queryParams["pageToken"] = [pageToken]; |
8485 } | 8180 } |
8486 | 8181 |
8487 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool'); | 8182 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/targetInstan
ces'; |
8488 | 8183 |
8489 var _response = _requester.request(_url, | 8184 var _response = _requester.request(_url, |
8490 "GET", | 8185 "GET", |
8491 body: _body, | 8186 body: _body, |
8492 queryParams: _queryParams, | 8187 queryParams: _queryParams, |
8493 uploadOptions: _uploadOptions, | 8188 uploadOptions: _uploadOptions, |
8494 uploadMedia: _uploadMedia, | 8189 uploadMedia: _uploadMedia, |
8495 downloadOptions: _downloadOptions); | 8190 downloadOptions: _downloadOptions); |
8496 return _response.then((data) => new TargetPool.fromJson(data)); | 8191 return _response.then((data) => new TargetInstanceAggregatedList.fromJson(da
ta)); |
8497 } | 8192 } |
8498 | 8193 |
8499 /** | 8194 /** |
8500 * Gets the most recent health check results for each IP for the given | 8195 * Deletes the specified TargetInstance resource. |
8501 * instance that is referenced by given TargetPool. | |
8502 * | |
8503 * [request] - The metadata request object. | |
8504 * | 8196 * |
8505 * Request parameters: | 8197 * Request parameters: |
8506 * | 8198 * |
8507 * [project] - null | 8199 * [project] - Name of the project scoping this request. |
8508 * Value must have pattern | 8200 * Value must have pattern |
8509 * "(?:(?:[-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])?))". | 8201 * "(?:(?:[-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])?))". |
8510 * | 8202 * |
8511 * [region] - Name of the region scoping this request. | 8203 * [zone] - Name of the zone scoping this request. |
8512 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8204 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8513 * | 8205 * |
8514 * [targetPool] - Name of the TargetPool resource to which the queried | 8206 * [targetInstance] - Name of the TargetInstance resource to delete. |
8515 * instance belongs. | |
8516 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8207 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8517 * | 8208 * |
8518 * Completes with a [TargetPoolInstanceHealth]. | 8209 * Completes with a [Operation]. |
8519 * | 8210 * |
8520 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8211 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8521 * error. | 8212 * error. |
8522 * | 8213 * |
8523 * If the used [http.Client] completes with an error when making a REST call, | 8214 * If the used [http.Client] completes with an error when making a REST call, |
8524 * this method will complete with the same error. | 8215 * this method will complete with the same error. |
8525 */ | 8216 */ |
8526 async.Future<TargetPoolInstanceHealth> getHealth(InstanceReference request, co
re.String project, core.String region, core.String targetPool) { | 8217 async.Future<Operation> delete(core.String project, core.String zone, core.Str
ing targetInstance) { |
8527 var _url = null; | 8218 var _url = null; |
8528 var _queryParams = new core.Map(); | 8219 var _queryParams = new core.Map(); |
8529 var _uploadMedia = null; | 8220 var _uploadMedia = null; |
8530 var _uploadOptions = null; | 8221 var _uploadOptions = null; |
8531 var _downloadOptions = commons.DownloadOptions.Metadata; | 8222 var _downloadOptions = commons.DownloadOptions.Metadata; |
8532 var _body = null; | 8223 var _body = null; |
8533 | 8224 |
8534 if (request != null) { | |
8535 _body = convert.JSON.encode((request).toJson()); | |
8536 } | |
8537 if (project == null) { | 8225 if (project == null) { |
8538 throw new core.ArgumentError("Parameter project is required."); | 8226 throw new core.ArgumentError("Parameter project is required."); |
8539 } | 8227 } |
8540 if (region == null) { | 8228 if (zone == null) { |
8541 throw new core.ArgumentError("Parameter region is required."); | 8229 throw new core.ArgumentError("Parameter zone is required."); |
8542 } | 8230 } |
8543 if (targetPool == null) { | 8231 if (targetInstance == null) { |
8544 throw new core.ArgumentError("Parameter targetPool is required."); | 8232 throw new core.ArgumentError("Parameter targetInstance is required."); |
8545 } | 8233 } |
8546 | 8234 |
8547 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/getHealth'; | 8235 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/targetInstances/' + commons.Escaper.ecapeVariable(
'$targetInstance'); |
8548 | 8236 |
8549 var _response = _requester.request(_url, | 8237 var _response = _requester.request(_url, |
8550 "POST", | 8238 "DELETE", |
8551 body: _body, | 8239 body: _body, |
8552 queryParams: _queryParams, | 8240 queryParams: _queryParams, |
8553 uploadOptions: _uploadOptions, | 8241 uploadOptions: _uploadOptions, |
8554 uploadMedia: _uploadMedia, | 8242 uploadMedia: _uploadMedia, |
8555 downloadOptions: _downloadOptions); | 8243 downloadOptions: _downloadOptions); |
8556 return _response.then((data) => new TargetPoolInstanceHealth.fromJson(data))
; | 8244 return _response.then((data) => new Operation.fromJson(data)); |
8557 } | 8245 } |
8558 | 8246 |
8559 /** | 8247 /** |
8560 * Creates a TargetPool resource in the specified project and region using the | 8248 * Returns the specified TargetInstance resource. |
8561 * data included in the request. | |
8562 * | |
8563 * [request] - The metadata request object. | |
8564 * | 8249 * |
8565 * Request parameters: | 8250 * Request parameters: |
8566 * | 8251 * |
8567 * [project] - Name of the project scoping this request. | 8252 * [project] - Name of the project scoping this request. |
8568 * Value must have pattern | 8253 * Value must have pattern |
8569 * "(?:(?:[-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])?))". | 8254 * "(?:(?:[-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])?))". |
8570 * | 8255 * |
8571 * [region] - Name of the region scoping this request. | 8256 * [zone] - Name of the zone scoping this request. |
8572 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8257 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8573 * | 8258 * |
8574 * Completes with a [Operation]. | 8259 * [targetInstance] - Name of the TargetInstance resource to return. |
| 8260 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 8261 * |
| 8262 * Completes with a [TargetInstance]. |
8575 * | 8263 * |
8576 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8264 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8577 * error. | 8265 * error. |
8578 * | 8266 * |
8579 * If the used [http.Client] completes with an error when making a REST call, | 8267 * If the used [http.Client] completes with an error when making a REST call, |
8580 * this method will complete with the same error. | 8268 * this method will complete with the same error. |
8581 */ | 8269 */ |
8582 async.Future<Operation> insert(TargetPool request, core.String project, core.S
tring region) { | 8270 async.Future<TargetInstance> get(core.String project, core.String zone, core.S
tring targetInstance) { |
8583 var _url = null; | 8271 var _url = null; |
8584 var _queryParams = new core.Map(); | 8272 var _queryParams = new core.Map(); |
8585 var _uploadMedia = null; | 8273 var _uploadMedia = null; |
8586 var _uploadOptions = null; | 8274 var _uploadOptions = null; |
8587 var _downloadOptions = commons.DownloadOptions.Metadata; | 8275 var _downloadOptions = commons.DownloadOptions.Metadata; |
8588 var _body = null; | 8276 var _body = null; |
8589 | 8277 |
8590 if (request != null) { | |
8591 _body = convert.JSON.encode((request).toJson()); | |
8592 } | |
8593 if (project == null) { | 8278 if (project == null) { |
8594 throw new core.ArgumentError("Parameter project is required."); | 8279 throw new core.ArgumentError("Parameter project is required."); |
8595 } | 8280 } |
8596 if (region == null) { | 8281 if (zone == null) { |
8597 throw new core.ArgumentError("Parameter region is required."); | 8282 throw new core.ArgumentError("Parameter zone is required."); |
| 8283 } |
| 8284 if (targetInstance == null) { |
| 8285 throw new core.ArgumentError("Parameter targetInstance is required."); |
8598 } | 8286 } |
8599 | 8287 |
8600 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools'; | 8288 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/targetInstances/' + commons.Escaper.ecapeVariable(
'$targetInstance'); |
8601 | 8289 |
8602 var _response = _requester.request(_url, | 8290 var _response = _requester.request(_url, |
8603 "POST", | 8291 "GET", |
8604 body: _body, | 8292 body: _body, |
8605 queryParams: _queryParams, | 8293 queryParams: _queryParams, |
8606 uploadOptions: _uploadOptions, | 8294 uploadOptions: _uploadOptions, |
8607 uploadMedia: _uploadMedia, | 8295 uploadMedia: _uploadMedia, |
8608 downloadOptions: _downloadOptions); | 8296 downloadOptions: _downloadOptions); |
8609 return _response.then((data) => new Operation.fromJson(data)); | 8297 return _response.then((data) => new TargetInstance.fromJson(data)); |
8610 } | 8298 } |
8611 | 8299 |
8612 /** | 8300 /** |
8613 * Retrieves the list of TargetPool resources available to the specified | 8301 * Creates a TargetInstance resource in the specified project and zone using |
8614 * project and region. | 8302 * the data included in the request. |
| 8303 * |
| 8304 * [request] - The metadata request object. |
8615 * | 8305 * |
8616 * Request parameters: | 8306 * Request parameters: |
8617 * | 8307 * |
8618 * [project] - Name of the project scoping this request. | 8308 * [project] - Name of the project scoping this request. |
8619 * Value must have pattern | 8309 * Value must have pattern |
8620 * "(?:(?:[-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])?))". | 8310 * "(?:(?:[-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])?))". |
8621 * | 8311 * |
8622 * [region] - Name of the region scoping this request. | 8312 * [zone] - Name of the zone scoping this request. |
8623 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8313 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8624 * | 8314 * |
8625 * [filter] - Sets a filter expression for filtering listed resources, in the | 8315 * Completes with a [Operation]. |
8626 * form filter={expression}. Your {expression} must contain the following: | |
8627 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
8628 * | |
8629 * - FIELD_NAME: The name of the field you want to compare. The field name | |
8630 * must be valid for the type of resource being filtered. Only atomic field | |
8631 * types are supported (string, number, boolean). Array and object fields are | |
8632 * not currently supported. | |
8633 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
8634 * equals). | |
8635 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
8636 * must be valid for the type of field (string, number, boolean). For string | |
8637 * fields, the literal value is interpreted as a regular expression using RE2 | |
8638 * syntax. The literal value must match the entire field. For example, you | |
8639 * can filter by the name of a resource: | |
8640 * filter=name ne example-instance | |
8641 * The above filter returns only results whose name field does not equal | |
8642 * example-instance. You can also enclose your literal string in single, | |
8643 * double, or no quotes. | |
8644 * | |
8645 * [maxResults] - Maximum count of results to be returned. | |
8646 * Value must be between "0" and "500". | |
8647 * | |
8648 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
8649 * to list the next page of results. Set pageToken to the nextPageToken | |
8650 * returned by a previous list request. | |
8651 * | |
8652 * Completes with a [TargetPoolList]. | |
8653 * | 8316 * |
8654 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8317 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8655 * error. | 8318 * error. |
8656 * | 8319 * |
8657 * If the used [http.Client] completes with an error when making a REST call, | 8320 * If the used [http.Client] completes with an error when making a REST call, |
8658 * this method will complete with the same error. | 8321 * this method will complete with the same error. |
8659 */ | 8322 */ |
8660 async.Future<TargetPoolList> list(core.String project, core.String region, {co
re.String filter, core.int maxResults, core.String pageToken}) { | 8323 async.Future<Operation> insert(TargetInstance request, core.String project, co
re.String zone) { |
8661 var _url = null; | 8324 var _url = null; |
8662 var _queryParams = new core.Map(); | 8325 var _queryParams = new core.Map(); |
8663 var _uploadMedia = null; | 8326 var _uploadMedia = null; |
8664 var _uploadOptions = null; | 8327 var _uploadOptions = null; |
8665 var _downloadOptions = commons.DownloadOptions.Metadata; | 8328 var _downloadOptions = commons.DownloadOptions.Metadata; |
8666 var _body = null; | 8329 var _body = null; |
8667 | 8330 |
| 8331 if (request != null) { |
| 8332 _body = convert.JSON.encode((request).toJson()); |
| 8333 } |
8668 if (project == null) { | 8334 if (project == null) { |
8669 throw new core.ArgumentError("Parameter project is required."); | 8335 throw new core.ArgumentError("Parameter project is required."); |
8670 } | 8336 } |
8671 if (region == null) { | 8337 if (zone == null) { |
8672 throw new core.ArgumentError("Parameter region is required."); | 8338 throw new core.ArgumentError("Parameter zone is required."); |
8673 } | |
8674 if (filter != null) { | |
8675 _queryParams["filter"] = [filter]; | |
8676 } | |
8677 if (maxResults != null) { | |
8678 _queryParams["maxResults"] = ["${maxResults}"]; | |
8679 } | |
8680 if (pageToken != null) { | |
8681 _queryParams["pageToken"] = [pageToken]; | |
8682 } | 8339 } |
8683 | 8340 |
8684 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools'; | 8341 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/targetInstances'; |
8685 | 8342 |
8686 var _response = _requester.request(_url, | 8343 var _response = _requester.request(_url, |
8687 "GET", | 8344 "POST", |
8688 body: _body, | 8345 body: _body, |
8689 queryParams: _queryParams, | 8346 queryParams: _queryParams, |
8690 uploadOptions: _uploadOptions, | 8347 uploadOptions: _uploadOptions, |
8691 uploadMedia: _uploadMedia, | 8348 uploadMedia: _uploadMedia, |
8692 downloadOptions: _downloadOptions); | 8349 downloadOptions: _downloadOptions); |
8693 return _response.then((data) => new TargetPoolList.fromJson(data)); | 8350 return _response.then((data) => new Operation.fromJson(data)); |
8694 } | 8351 } |
8695 | 8352 |
8696 /** | 8353 /** |
8697 * Removes health check URL from targetPool. | 8354 * Retrieves the list of TargetInstance resources available to the specified |
8698 * | 8355 * project and zone. |
8699 * [request] - The metadata request object. | |
8700 * | 8356 * |
8701 * Request parameters: | 8357 * Request parameters: |
8702 * | 8358 * |
8703 * [project] - null | 8359 * [project] - Name of the project scoping this request. |
8704 * Value must have pattern | 8360 * Value must have pattern |
8705 * "(?:(?:[-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])?))". | 8361 * "(?:(?:[-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])?))". |
8706 * | 8362 * |
8707 * [region] - Name of the region scoping this request. | 8363 * [zone] - Name of the zone scoping this request. |
8708 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8364 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8709 * | 8365 * |
8710 * [targetPool] - Name of the TargetPool resource to which health_check_url is | 8366 * [filter] - Sets a filter expression for filtering listed resources, in the |
8711 * to be removed. | 8367 * form filter={expression}. Your {expression} must be in the format: |
8712 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8368 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
8713 * | 8369 * |
8714 * Completes with a [Operation]. | 8370 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 8371 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 8372 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 8373 * string value to filter to. The literal value must be valid for the type of |
| 8374 * field (string, number, boolean). For string fields, the literal value is |
| 8375 * interpreted as a regular expression using RE2 syntax. The literal value |
| 8376 * must match the entire field. |
| 8377 * |
| 8378 * For example, filter=name ne example-instance. |
| 8379 * |
| 8380 * [maxResults] - Maximum count of results to be returned. |
| 8381 * Value must be between "0" and "500". |
| 8382 * |
| 8383 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 8384 * to list the next page of results. Set pageToken to the nextPageToken |
| 8385 * returned by a previous list request. |
| 8386 * |
| 8387 * Completes with a [TargetInstanceList]. |
8715 * | 8388 * |
8716 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8389 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8717 * error. | 8390 * error. |
8718 * | 8391 * |
8719 * If the used [http.Client] completes with an error when making a REST call, | 8392 * If the used [http.Client] completes with an error when making a REST call, |
8720 * this method will complete with the same error. | 8393 * this method will complete with the same error. |
8721 */ | 8394 */ |
8722 async.Future<Operation> removeHealthCheck(TargetPoolsRemoveHealthCheckRequest
request, core.String project, core.String region, core.String targetPool) { | 8395 async.Future<TargetInstanceList> list(core.String project, core.String zone, {
core.String filter, core.int maxResults, core.String pageToken}) { |
8723 var _url = null; | 8396 var _url = null; |
8724 var _queryParams = new core.Map(); | 8397 var _queryParams = new core.Map(); |
8725 var _uploadMedia = null; | 8398 var _uploadMedia = null; |
8726 var _uploadOptions = null; | 8399 var _uploadOptions = null; |
8727 var _downloadOptions = commons.DownloadOptions.Metadata; | 8400 var _downloadOptions = commons.DownloadOptions.Metadata; |
8728 var _body = null; | 8401 var _body = null; |
8729 | 8402 |
8730 if (request != null) { | |
8731 _body = convert.JSON.encode((request).toJson()); | |
8732 } | |
8733 if (project == null) { | 8403 if (project == null) { |
8734 throw new core.ArgumentError("Parameter project is required."); | 8404 throw new core.ArgumentError("Parameter project is required."); |
8735 } | 8405 } |
8736 if (region == null) { | 8406 if (zone == null) { |
8737 throw new core.ArgumentError("Parameter region is required."); | 8407 throw new core.ArgumentError("Parameter zone is required."); |
8738 } | 8408 } |
8739 if (targetPool == null) { | 8409 if (filter != null) { |
8740 throw new core.ArgumentError("Parameter targetPool is required."); | 8410 _queryParams["filter"] = [filter]; |
| 8411 } |
| 8412 if (maxResults != null) { |
| 8413 _queryParams["maxResults"] = ["${maxResults}"]; |
| 8414 } |
| 8415 if (pageToken != null) { |
| 8416 _queryParams["pageToken"] = [pageToken]; |
8741 } | 8417 } |
8742 | 8418 |
8743 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/removeHealthCheck'; | 8419 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/targetInstances'; |
8744 | 8420 |
8745 var _response = _requester.request(_url, | 8421 var _response = _requester.request(_url, |
8746 "POST", | 8422 "GET", |
8747 body: _body, | 8423 body: _body, |
8748 queryParams: _queryParams, | 8424 queryParams: _queryParams, |
8749 uploadOptions: _uploadOptions, | 8425 uploadOptions: _uploadOptions, |
8750 uploadMedia: _uploadMedia, | 8426 uploadMedia: _uploadMedia, |
8751 downloadOptions: _downloadOptions); | 8427 downloadOptions: _downloadOptions); |
8752 return _response.then((data) => new Operation.fromJson(data)); | 8428 return _response.then((data) => new TargetInstanceList.fromJson(data)); |
8753 } | 8429 } |
8754 | 8430 |
| 8431 } |
| 8432 |
| 8433 |
| 8434 class TargetPoolsResourceApi { |
| 8435 final commons.ApiRequester _requester; |
| 8436 |
| 8437 TargetPoolsResourceApi(commons.ApiRequester client) : |
| 8438 _requester = client; |
| 8439 |
8755 /** | 8440 /** |
8756 * Removes instance URL from targetPool. | 8441 * Adds health check URL to targetPool. |
8757 * | 8442 * |
8758 * [request] - The metadata request object. | 8443 * [request] - The metadata request object. |
8759 * | 8444 * |
8760 * Request parameters: | 8445 * Request parameters: |
8761 * | 8446 * |
8762 * [project] - null | 8447 * [project] - null |
8763 * Value must have pattern | 8448 * Value must have pattern |
8764 * "(?:(?:[-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])?))". | 8449 * "(?:(?:[-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])?))". |
8765 * | 8450 * |
8766 * [region] - Name of the region scoping this request. | 8451 * [region] - Name of the region scoping this request. |
8767 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8452 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8768 * | 8453 * |
8769 * [targetPool] - Name of the TargetPool resource to which instance_url is to | 8454 * [targetPool] - Name of the TargetPool resource to which health_check_url is |
8770 * be removed. | 8455 * to be added. |
8771 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8456 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8772 * | 8457 * |
8773 * Completes with a [Operation]. | 8458 * Completes with a [Operation]. |
8774 * | 8459 * |
8775 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8460 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8776 * error. | 8461 * error. |
8777 * | 8462 * |
8778 * If the used [http.Client] completes with an error when making a REST call, | 8463 * If the used [http.Client] completes with an error when making a REST call, |
8779 * this method will complete with the same error. | 8464 * this method will complete with the same error. |
8780 */ | 8465 */ |
8781 async.Future<Operation> removeInstance(TargetPoolsRemoveInstanceRequest reques
t, core.String project, core.String region, core.String targetPool) { | 8466 async.Future<Operation> addHealthCheck(TargetPoolsAddHealthCheckRequest reques
t, core.String project, core.String region, core.String targetPool) { |
8782 var _url = null; | 8467 var _url = null; |
8783 var _queryParams = new core.Map(); | 8468 var _queryParams = new core.Map(); |
8784 var _uploadMedia = null; | 8469 var _uploadMedia = null; |
8785 var _uploadOptions = null; | 8470 var _uploadOptions = null; |
8786 var _downloadOptions = commons.DownloadOptions.Metadata; | 8471 var _downloadOptions = commons.DownloadOptions.Metadata; |
8787 var _body = null; | 8472 var _body = null; |
8788 | 8473 |
8789 if (request != null) { | 8474 if (request != null) { |
8790 _body = convert.JSON.encode((request).toJson()); | 8475 _body = convert.JSON.encode((request).toJson()); |
8791 } | 8476 } |
8792 if (project == null) { | 8477 if (project == null) { |
8793 throw new core.ArgumentError("Parameter project is required."); | 8478 throw new core.ArgumentError("Parameter project is required."); |
8794 } | 8479 } |
8795 if (region == null) { | 8480 if (region == null) { |
8796 throw new core.ArgumentError("Parameter region is required."); | 8481 throw new core.ArgumentError("Parameter region is required."); |
8797 } | 8482 } |
8798 if (targetPool == null) { | 8483 if (targetPool == null) { |
8799 throw new core.ArgumentError("Parameter targetPool is required."); | 8484 throw new core.ArgumentError("Parameter targetPool is required."); |
8800 } | 8485 } |
8801 | 8486 |
8802 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/removeInstance'; | 8487 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/addHealthCheck'; |
8803 | 8488 |
8804 var _response = _requester.request(_url, | 8489 var _response = _requester.request(_url, |
8805 "POST", | 8490 "POST", |
8806 body: _body, | 8491 body: _body, |
8807 queryParams: _queryParams, | 8492 queryParams: _queryParams, |
8808 uploadOptions: _uploadOptions, | 8493 uploadOptions: _uploadOptions, |
8809 uploadMedia: _uploadMedia, | 8494 uploadMedia: _uploadMedia, |
8810 downloadOptions: _downloadOptions); | 8495 downloadOptions: _downloadOptions); |
8811 return _response.then((data) => new Operation.fromJson(data)); | 8496 return _response.then((data) => new Operation.fromJson(data)); |
8812 } | 8497 } |
8813 | 8498 |
8814 /** | 8499 /** |
8815 * Changes backup pool configurations. | 8500 * Adds instance url to targetPool. |
8816 * | 8501 * |
8817 * [request] - The metadata request object. | 8502 * [request] - The metadata request object. |
8818 * | 8503 * |
8819 * Request parameters: | 8504 * Request parameters: |
8820 * | 8505 * |
8821 * [project] - Name of the project scoping this request. | 8506 * [project] - null |
8822 * Value must have pattern | 8507 * Value must have pattern |
8823 * "(?:(?:[-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])?))". | 8508 * "(?:(?:[-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])?))". |
8824 * | 8509 * |
8825 * [region] - Name of the region scoping this request. | 8510 * [region] - Name of the region scoping this request. |
8826 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8511 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8827 * | 8512 * |
8828 * [targetPool] - Name of the TargetPool resource for which the backup is to | 8513 * [targetPool] - Name of the TargetPool resource to which instance_url is to |
8829 * be set. | 8514 * be added. |
8830 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8515 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8831 * | 8516 * |
8832 * [failoverRatio] - New failoverRatio value for the containing target pool. | |
8833 * | |
8834 * Completes with a [Operation]. | 8517 * Completes with a [Operation]. |
8835 * | 8518 * |
8836 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8519 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8837 * error. | 8520 * error. |
8838 * | 8521 * |
8839 * If the used [http.Client] completes with an error when making a REST call, | 8522 * If the used [http.Client] completes with an error when making a REST call, |
8840 * this method will complete with the same error. | 8523 * this method will complete with the same error. |
8841 */ | 8524 */ |
8842 async.Future<Operation> setBackup(TargetReference request, core.String project
, core.String region, core.String targetPool, {core.double failoverRatio}) { | 8525 async.Future<Operation> addInstance(TargetPoolsAddInstanceRequest request, cor
e.String project, core.String region, core.String targetPool) { |
8843 var _url = null; | 8526 var _url = null; |
8844 var _queryParams = new core.Map(); | 8527 var _queryParams = new core.Map(); |
8845 var _uploadMedia = null; | 8528 var _uploadMedia = null; |
8846 var _uploadOptions = null; | 8529 var _uploadOptions = null; |
8847 var _downloadOptions = commons.DownloadOptions.Metadata; | 8530 var _downloadOptions = commons.DownloadOptions.Metadata; |
8848 var _body = null; | 8531 var _body = null; |
8849 | 8532 |
8850 if (request != null) { | 8533 if (request != null) { |
8851 _body = convert.JSON.encode((request).toJson()); | 8534 _body = convert.JSON.encode((request).toJson()); |
8852 } | 8535 } |
8853 if (project == null) { | 8536 if (project == null) { |
8854 throw new core.ArgumentError("Parameter project is required."); | 8537 throw new core.ArgumentError("Parameter project is required."); |
8855 } | 8538 } |
8856 if (region == null) { | 8539 if (region == null) { |
8857 throw new core.ArgumentError("Parameter region is required."); | 8540 throw new core.ArgumentError("Parameter region is required."); |
8858 } | 8541 } |
8859 if (targetPool == null) { | 8542 if (targetPool == null) { |
8860 throw new core.ArgumentError("Parameter targetPool is required."); | 8543 throw new core.ArgumentError("Parameter targetPool is required."); |
8861 } | 8544 } |
8862 if (failoverRatio != null) { | |
8863 _queryParams["failoverRatio"] = ["${failoverRatio}"]; | |
8864 } | |
8865 | 8545 |
8866 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/setBackup'; | 8546 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/addInstance'; |
8867 | 8547 |
8868 var _response = _requester.request(_url, | 8548 var _response = _requester.request(_url, |
8869 "POST", | 8549 "POST", |
8870 body: _body, | 8550 body: _body, |
8871 queryParams: _queryParams, | 8551 queryParams: _queryParams, |
8872 uploadOptions: _uploadOptions, | 8552 uploadOptions: _uploadOptions, |
8873 uploadMedia: _uploadMedia, | 8553 uploadMedia: _uploadMedia, |
8874 downloadOptions: _downloadOptions); | 8554 downloadOptions: _downloadOptions); |
8875 return _response.then((data) => new Operation.fromJson(data)); | 8555 return _response.then((data) => new Operation.fromJson(data)); |
8876 } | 8556 } |
8877 | 8557 |
8878 } | |
8879 | |
8880 | |
8881 class TargetVpnGatewaysResourceApi { | |
8882 final commons.ApiRequester _requester; | |
8883 | |
8884 TargetVpnGatewaysResourceApi(commons.ApiRequester client) : | |
8885 _requester = client; | |
8886 | |
8887 /** | 8558 /** |
8888 * Retrieves the list of target VPN gateways grouped by scope. | 8559 * Retrieves the list of target pools grouped by scope. |
8889 * | 8560 * |
8890 * Request parameters: | 8561 * Request parameters: |
8891 * | 8562 * |
8892 * [project] - Project ID for this request. | 8563 * [project] - Name of the project scoping this request. |
8893 * Value must have pattern | 8564 * Value must have pattern |
8894 * "(?:(?:[-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])?))". | 8565 * "(?:(?:[-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])?))". |
8895 * | 8566 * |
8896 * [filter] - Sets a filter expression for filtering listed resources, in the | 8567 * [filter] - Sets a filter expression for filtering listed resources, in the |
8897 * form filter={expression}. Your {expression} must contain the following: | 8568 * form filter={expression}. Your {expression} must be in the format: |
8898 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 8569 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
8899 * | 8570 * |
8900 * - FIELD_NAME: The name of the field you want to compare. The field name | 8571 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
8901 * must be valid for the type of resource being filtered. Only atomic field | 8572 * field types are supported (string, number, boolean). The COMPARISON_STRING |
8902 * types are supported (string, number, boolean). Array and object fields are | 8573 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
8903 * not currently supported. | 8574 * string value to filter to. The literal value must be valid for the type of |
8904 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 8575 * field (string, number, boolean). For string fields, the literal value is |
8905 * equals). | 8576 * interpreted as a regular expression using RE2 syntax. The literal value |
8906 * - LITERAL_STRING: The literal string value to filter to. The literal value | 8577 * must match the entire field. |
8907 * must be valid for the type of field (string, number, boolean). For string | 8578 * |
8908 * fields, the literal value is interpreted as a regular expression using RE2 | 8579 * For example, filter=name ne example-instance. |
8909 * syntax. The literal value must match the entire field. For example, you | |
8910 * can filter by the name of a resource: | |
8911 * filter=name ne example-instance | |
8912 * The above filter returns only results whose name field does not equal | |
8913 * example-instance. You can also enclose your literal string in single, | |
8914 * double, or no quotes. | |
8915 * | 8580 * |
8916 * [maxResults] - Maximum count of results to be returned. | 8581 * [maxResults] - Maximum count of results to be returned. |
8917 * Value must be between "0" and "500". | 8582 * Value must be between "0" and "500". |
8918 * | 8583 * |
8919 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 8584 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
8920 * to list the next page of results. Set pageToken to the nextPageToken | 8585 * to list the next page of results. Set pageToken to the nextPageToken |
8921 * returned by a previous list request. | 8586 * returned by a previous list request. |
8922 * | 8587 * |
8923 * Completes with a [TargetVpnGatewayAggregatedList]. | 8588 * Completes with a [TargetPoolAggregatedList]. |
8924 * | 8589 * |
8925 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8590 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8926 * error. | 8591 * error. |
8927 * | 8592 * |
8928 * If the used [http.Client] completes with an error when making a REST call, | 8593 * If the used [http.Client] completes with an error when making a REST call, |
8929 * this method will complete with the same error. | 8594 * this method will complete with the same error. |
8930 */ | 8595 */ |
8931 async.Future<TargetVpnGatewayAggregatedList> aggregatedList(core.String projec
t, {core.String filter, core.int maxResults, core.String pageToken}) { | 8596 async.Future<TargetPoolAggregatedList> aggregatedList(core.String project, {co
re.String filter, core.int maxResults, core.String pageToken}) { |
8932 var _url = null; | 8597 var _url = null; |
8933 var _queryParams = new core.Map(); | 8598 var _queryParams = new core.Map(); |
8934 var _uploadMedia = null; | 8599 var _uploadMedia = null; |
8935 var _uploadOptions = null; | 8600 var _uploadOptions = null; |
8936 var _downloadOptions = commons.DownloadOptions.Metadata; | 8601 var _downloadOptions = commons.DownloadOptions.Metadata; |
8937 var _body = null; | 8602 var _body = null; |
8938 | 8603 |
8939 if (project == null) { | 8604 if (project == null) { |
8940 throw new core.ArgumentError("Parameter project is required."); | 8605 throw new core.ArgumentError("Parameter project is required."); |
8941 } | 8606 } |
8942 if (filter != null) { | 8607 if (filter != null) { |
8943 _queryParams["filter"] = [filter]; | 8608 _queryParams["filter"] = [filter]; |
8944 } | 8609 } |
8945 if (maxResults != null) { | 8610 if (maxResults != null) { |
8946 _queryParams["maxResults"] = ["${maxResults}"]; | 8611 _queryParams["maxResults"] = ["${maxResults}"]; |
8947 } | 8612 } |
8948 if (pageToken != null) { | 8613 if (pageToken != null) { |
8949 _queryParams["pageToken"] = [pageToken]; | 8614 _queryParams["pageToken"] = [pageToken]; |
8950 } | 8615 } |
8951 | 8616 |
8952 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/targetVpnGat
eways'; | 8617 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/targetPools'
; |
8953 | 8618 |
8954 var _response = _requester.request(_url, | 8619 var _response = _requester.request(_url, |
8955 "GET", | 8620 "GET", |
8956 body: _body, | 8621 body: _body, |
8957 queryParams: _queryParams, | 8622 queryParams: _queryParams, |
8958 uploadOptions: _uploadOptions, | 8623 uploadOptions: _uploadOptions, |
8959 uploadMedia: _uploadMedia, | 8624 uploadMedia: _uploadMedia, |
8960 downloadOptions: _downloadOptions); | 8625 downloadOptions: _downloadOptions); |
8961 return _response.then((data) => new TargetVpnGatewayAggregatedList.fromJson(
data)); | 8626 return _response.then((data) => new TargetPoolAggregatedList.fromJson(data))
; |
8962 } | 8627 } |
8963 | 8628 |
8964 /** | 8629 /** |
8965 * Deletes the specified TargetVpnGateway resource. | 8630 * Deletes the specified TargetPool resource. |
8966 * | 8631 * |
8967 * Request parameters: | 8632 * Request parameters: |
8968 * | 8633 * |
8969 * [project] - Project ID for this request. | 8634 * [project] - Name of the project scoping this request. |
8970 * Value must have pattern | 8635 * Value must have pattern |
8971 * "(?:(?:[-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])?))". | 8636 * "(?:(?:[-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])?))". |
8972 * | 8637 * |
8973 * [region] - The name of the region for this request. | 8638 * [region] - Name of the region scoping this request. |
8974 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8639 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8975 * | 8640 * |
8976 * [targetVpnGateway] - Name of the TargetVpnGateway resource to delete. | 8641 * [targetPool] - Name of the TargetPool resource to delete. |
8977 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8642 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
8978 * | 8643 * |
8979 * Completes with a [Operation]. | 8644 * Completes with a [Operation]. |
8980 * | 8645 * |
8981 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8646 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
8982 * error. | 8647 * error. |
8983 * | 8648 * |
8984 * If the used [http.Client] completes with an error when making a REST call, | 8649 * If the used [http.Client] completes with an error when making a REST call, |
8985 * this method will complete with the same error. | 8650 * this method will complete with the same error. |
8986 */ | 8651 */ |
8987 async.Future<Operation> delete(core.String project, core.String region, core.S
tring targetVpnGateway) { | 8652 async.Future<Operation> delete(core.String project, core.String region, core.S
tring targetPool) { |
8988 var _url = null; | 8653 var _url = null; |
8989 var _queryParams = new core.Map(); | 8654 var _queryParams = new core.Map(); |
8990 var _uploadMedia = null; | 8655 var _uploadMedia = null; |
8991 var _uploadOptions = null; | 8656 var _uploadOptions = null; |
8992 var _downloadOptions = commons.DownloadOptions.Metadata; | 8657 var _downloadOptions = commons.DownloadOptions.Metadata; |
8993 var _body = null; | 8658 var _body = null; |
8994 | 8659 |
8995 if (project == null) { | 8660 if (project == null) { |
8996 throw new core.ArgumentError("Parameter project is required."); | 8661 throw new core.ArgumentError("Parameter project is required."); |
8997 } | 8662 } |
8998 if (region == null) { | 8663 if (region == null) { |
8999 throw new core.ArgumentError("Parameter region is required."); | 8664 throw new core.ArgumentError("Parameter region is required."); |
9000 } | 8665 } |
9001 if (targetVpnGateway == null) { | 8666 if (targetPool == null) { |
9002 throw new core.ArgumentError("Parameter targetVpnGateway is required."); | 8667 throw new core.ArgumentError("Parameter targetPool is required."); |
9003 } | 8668 } |
9004 | 8669 |
9005 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetVpnGateways/' + commons.Escaper.ecapeVar
iable('$targetVpnGateway'); | 8670 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool'); |
9006 | 8671 |
9007 var _response = _requester.request(_url, | 8672 var _response = _requester.request(_url, |
9008 "DELETE", | 8673 "DELETE", |
9009 body: _body, | 8674 body: _body, |
9010 queryParams: _queryParams, | 8675 queryParams: _queryParams, |
9011 uploadOptions: _uploadOptions, | 8676 uploadOptions: _uploadOptions, |
9012 uploadMedia: _uploadMedia, | 8677 uploadMedia: _uploadMedia, |
9013 downloadOptions: _downloadOptions); | 8678 downloadOptions: _downloadOptions); |
9014 return _response.then((data) => new Operation.fromJson(data)); | 8679 return _response.then((data) => new Operation.fromJson(data)); |
9015 } | 8680 } |
9016 | 8681 |
9017 /** | 8682 /** |
9018 * Returns the specified TargetVpnGateway resource. | 8683 * Returns the specified TargetPool resource. |
9019 * | 8684 * |
9020 * Request parameters: | 8685 * Request parameters: |
9021 * | 8686 * |
9022 * [project] - Project ID for this request. | 8687 * [project] - Name of the project scoping this request. |
9023 * Value must have pattern | 8688 * Value must have pattern |
9024 * "(?:(?:[-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])?))". | 8689 * "(?:(?:[-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])?))". |
9025 * | 8690 * |
9026 * [region] - The name of the region for this request. | 8691 * [region] - Name of the region scoping this request. |
9027 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8692 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9028 * | 8693 * |
9029 * [targetVpnGateway] - Name of the TargetVpnGateway resource to return. | 8694 * [targetPool] - Name of the TargetPool resource to return. |
9030 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8695 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9031 * | 8696 * |
9032 * Completes with a [TargetVpnGateway]. | 8697 * Completes with a [TargetPool]. |
9033 * | 8698 * |
9034 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8699 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9035 * error. | 8700 * error. |
9036 * | 8701 * |
9037 * If the used [http.Client] completes with an error when making a REST call, | 8702 * If the used [http.Client] completes with an error when making a REST call, |
9038 * this method will complete with the same error. | 8703 * this method will complete with the same error. |
9039 */ | 8704 */ |
9040 async.Future<TargetVpnGateway> get(core.String project, core.String region, co
re.String targetVpnGateway) { | 8705 async.Future<TargetPool> get(core.String project, core.String region, core.Str
ing targetPool) { |
9041 var _url = null; | 8706 var _url = null; |
9042 var _queryParams = new core.Map(); | 8707 var _queryParams = new core.Map(); |
9043 var _uploadMedia = null; | 8708 var _uploadMedia = null; |
9044 var _uploadOptions = null; | 8709 var _uploadOptions = null; |
9045 var _downloadOptions = commons.DownloadOptions.Metadata; | 8710 var _downloadOptions = commons.DownloadOptions.Metadata; |
9046 var _body = null; | 8711 var _body = null; |
9047 | 8712 |
9048 if (project == null) { | 8713 if (project == null) { |
9049 throw new core.ArgumentError("Parameter project is required."); | 8714 throw new core.ArgumentError("Parameter project is required."); |
9050 } | 8715 } |
9051 if (region == null) { | 8716 if (region == null) { |
9052 throw new core.ArgumentError("Parameter region is required."); | 8717 throw new core.ArgumentError("Parameter region is required."); |
9053 } | 8718 } |
9054 if (targetVpnGateway == null) { | 8719 if (targetPool == null) { |
9055 throw new core.ArgumentError("Parameter targetVpnGateway is required."); | 8720 throw new core.ArgumentError("Parameter targetPool is required."); |
9056 } | 8721 } |
9057 | 8722 |
9058 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetVpnGateways/' + commons.Escaper.ecapeVar
iable('$targetVpnGateway'); | 8723 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool'); |
9059 | 8724 |
9060 var _response = _requester.request(_url, | 8725 var _response = _requester.request(_url, |
9061 "GET", | 8726 "GET", |
9062 body: _body, | 8727 body: _body, |
9063 queryParams: _queryParams, | 8728 queryParams: _queryParams, |
9064 uploadOptions: _uploadOptions, | 8729 uploadOptions: _uploadOptions, |
9065 uploadMedia: _uploadMedia, | 8730 uploadMedia: _uploadMedia, |
9066 downloadOptions: _downloadOptions); | 8731 downloadOptions: _downloadOptions); |
9067 return _response.then((data) => new TargetVpnGateway.fromJson(data)); | 8732 return _response.then((data) => new TargetPool.fromJson(data)); |
9068 } | 8733 } |
9069 | 8734 |
9070 /** | 8735 /** |
9071 * Creates a TargetVpnGateway resource in the specified project and region | 8736 * Gets the most recent health check results for each IP for the given |
9072 * using the data included in the request. | 8737 * instance that is referenced by given TargetPool. |
9073 * | 8738 * |
9074 * [request] - The metadata request object. | 8739 * [request] - The metadata request object. |
9075 * | 8740 * |
9076 * Request parameters: | 8741 * Request parameters: |
9077 * | 8742 * |
9078 * [project] - Project ID for this request. | 8743 * [project] - null |
9079 * Value must have pattern | 8744 * Value must have pattern |
9080 * "(?:(?:[-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])?))". | 8745 * "(?:(?:[-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])?))". |
9081 * | 8746 * |
9082 * [region] - The name of the region for this request. | 8747 * [region] - Name of the region scoping this request. |
9083 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8748 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9084 * | 8749 * |
9085 * Completes with a [Operation]. | 8750 * [targetPool] - Name of the TargetPool resource to which the queried |
| 8751 * instance belongs. |
| 8752 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 8753 * |
| 8754 * Completes with a [TargetPoolInstanceHealth]. |
9086 * | 8755 * |
9087 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8756 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9088 * error. | 8757 * error. |
9089 * | 8758 * |
9090 * If the used [http.Client] completes with an error when making a REST call, | 8759 * If the used [http.Client] completes with an error when making a REST call, |
9091 * this method will complete with the same error. | 8760 * this method will complete with the same error. |
9092 */ | 8761 */ |
9093 async.Future<Operation> insert(TargetVpnGateway request, core.String project,
core.String region) { | 8762 async.Future<TargetPoolInstanceHealth> getHealth(InstanceReference request, co
re.String project, core.String region, core.String targetPool) { |
9094 var _url = null; | 8763 var _url = null; |
9095 var _queryParams = new core.Map(); | 8764 var _queryParams = new core.Map(); |
9096 var _uploadMedia = null; | 8765 var _uploadMedia = null; |
9097 var _uploadOptions = null; | 8766 var _uploadOptions = null; |
9098 var _downloadOptions = commons.DownloadOptions.Metadata; | 8767 var _downloadOptions = commons.DownloadOptions.Metadata; |
9099 var _body = null; | 8768 var _body = null; |
9100 | 8769 |
9101 if (request != null) { | 8770 if (request != null) { |
9102 _body = convert.JSON.encode((request).toJson()); | 8771 _body = convert.JSON.encode((request).toJson()); |
9103 } | 8772 } |
9104 if (project == null) { | 8773 if (project == null) { |
9105 throw new core.ArgumentError("Parameter project is required."); | 8774 throw new core.ArgumentError("Parameter project is required."); |
9106 } | 8775 } |
9107 if (region == null) { | 8776 if (region == null) { |
9108 throw new core.ArgumentError("Parameter region is required."); | 8777 throw new core.ArgumentError("Parameter region is required."); |
9109 } | 8778 } |
| 8779 if (targetPool == null) { |
| 8780 throw new core.ArgumentError("Parameter targetPool is required."); |
| 8781 } |
9110 | 8782 |
9111 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetVpnGateways'; | 8783 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/getHealth'; |
9112 | 8784 |
9113 var _response = _requester.request(_url, | 8785 var _response = _requester.request(_url, |
9114 "POST", | 8786 "POST", |
9115 body: _body, | 8787 body: _body, |
9116 queryParams: _queryParams, | 8788 queryParams: _queryParams, |
9117 uploadOptions: _uploadOptions, | 8789 uploadOptions: _uploadOptions, |
9118 uploadMedia: _uploadMedia, | 8790 uploadMedia: _uploadMedia, |
9119 downloadOptions: _downloadOptions); | 8791 downloadOptions: _downloadOptions); |
9120 return _response.then((data) => new Operation.fromJson(data)); | 8792 return _response.then((data) => new TargetPoolInstanceHealth.fromJson(data))
; |
9121 } | 8793 } |
9122 | 8794 |
9123 /** | 8795 /** |
9124 * Retrieves the list of TargetVpnGateway resources available to the specified | 8796 * Creates a TargetPool resource in the specified project and region using the |
9125 * project and region. | 8797 * data included in the request. |
| 8798 * |
| 8799 * [request] - The metadata request object. |
9126 * | 8800 * |
9127 * Request parameters: | 8801 * Request parameters: |
9128 * | 8802 * |
9129 * [project] - Project ID for this request. | 8803 * [project] - Name of the project scoping this request. |
9130 * Value must have pattern | 8804 * Value must have pattern |
9131 * "(?:(?:[-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])?))". | 8805 * "(?:(?:[-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])?))". |
9132 * | 8806 * |
9133 * [region] - The name of the region for this request. | 8807 * [region] - Name of the region scoping this request. |
9134 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8808 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9135 * | 8809 * |
9136 * [filter] - Sets a filter expression for filtering listed resources, in the | 8810 * Completes with a [Operation]. |
9137 * form filter={expression}. Your {expression} must contain the following: | |
9138 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
9139 * | |
9140 * - FIELD_NAME: The name of the field you want to compare. The field name | |
9141 * must be valid for the type of resource being filtered. Only atomic field | |
9142 * types are supported (string, number, boolean). Array and object fields are | |
9143 * not currently supported. | |
9144 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
9145 * equals). | |
9146 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
9147 * must be valid for the type of field (string, number, boolean). For string | |
9148 * fields, the literal value is interpreted as a regular expression using RE2 | |
9149 * syntax. The literal value must match the entire field. For example, you | |
9150 * can filter by the name of a resource: | |
9151 * filter=name ne example-instance | |
9152 * The above filter returns only results whose name field does not equal | |
9153 * example-instance. You can also enclose your literal string in single, | |
9154 * double, or no quotes. | |
9155 * | |
9156 * [maxResults] - Maximum count of results to be returned. | |
9157 * Value must be between "0" and "500". | |
9158 * | |
9159 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
9160 * to list the next page of results. Set pageToken to the nextPageToken | |
9161 * returned by a previous list request. | |
9162 * | |
9163 * Completes with a [TargetVpnGatewayList]. | |
9164 * | 8811 * |
9165 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8812 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9166 * error. | 8813 * error. |
9167 * | 8814 * |
9168 * If the used [http.Client] completes with an error when making a REST call, | 8815 * If the used [http.Client] completes with an error when making a REST call, |
9169 * this method will complete with the same error. | 8816 * this method will complete with the same error. |
9170 */ | 8817 */ |
9171 async.Future<TargetVpnGatewayList> list(core.String project, core.String regio
n, {core.String filter, core.int maxResults, core.String pageToken}) { | 8818 async.Future<Operation> insert(TargetPool request, core.String project, core.S
tring region) { |
9172 var _url = null; | 8819 var _url = null; |
9173 var _queryParams = new core.Map(); | 8820 var _queryParams = new core.Map(); |
9174 var _uploadMedia = null; | 8821 var _uploadMedia = null; |
9175 var _uploadOptions = null; | 8822 var _uploadOptions = null; |
9176 var _downloadOptions = commons.DownloadOptions.Metadata; | 8823 var _downloadOptions = commons.DownloadOptions.Metadata; |
9177 var _body = null; | 8824 var _body = null; |
9178 | 8825 |
| 8826 if (request != null) { |
| 8827 _body = convert.JSON.encode((request).toJson()); |
| 8828 } |
| 8829 if (project == null) { |
| 8830 throw new core.ArgumentError("Parameter project is required."); |
| 8831 } |
| 8832 if (region == null) { |
| 8833 throw new core.ArgumentError("Parameter region is required."); |
| 8834 } |
| 8835 |
| 8836 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools'; |
| 8837 |
| 8838 var _response = _requester.request(_url, |
| 8839 "POST", |
| 8840 body: _body, |
| 8841 queryParams: _queryParams, |
| 8842 uploadOptions: _uploadOptions, |
| 8843 uploadMedia: _uploadMedia, |
| 8844 downloadOptions: _downloadOptions); |
| 8845 return _response.then((data) => new Operation.fromJson(data)); |
| 8846 } |
| 8847 |
| 8848 /** |
| 8849 * Retrieves the list of TargetPool resources available to the specified |
| 8850 * project and region. |
| 8851 * |
| 8852 * Request parameters: |
| 8853 * |
| 8854 * [project] - Name of the project scoping this request. |
| 8855 * Value must have pattern |
| 8856 * "(?:(?:[-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])?))". |
| 8857 * |
| 8858 * [region] - Name of the region scoping this request. |
| 8859 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 8860 * |
| 8861 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 8862 * form filter={expression}. Your {expression} must be in the format: |
| 8863 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
| 8864 * |
| 8865 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 8866 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 8867 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 8868 * string value to filter to. The literal value must be valid for the type of |
| 8869 * field (string, number, boolean). For string fields, the literal value is |
| 8870 * interpreted as a regular expression using RE2 syntax. The literal value |
| 8871 * must match the entire field. |
| 8872 * |
| 8873 * For example, filter=name ne example-instance. |
| 8874 * |
| 8875 * [maxResults] - Maximum count of results to be returned. |
| 8876 * Value must be between "0" and "500". |
| 8877 * |
| 8878 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 8879 * to list the next page of results. Set pageToken to the nextPageToken |
| 8880 * returned by a previous list request. |
| 8881 * |
| 8882 * Completes with a [TargetPoolList]. |
| 8883 * |
| 8884 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 8885 * error. |
| 8886 * |
| 8887 * If the used [http.Client] completes with an error when making a REST call, |
| 8888 * this method will complete with the same error. |
| 8889 */ |
| 8890 async.Future<TargetPoolList> list(core.String project, core.String region, {co
re.String filter, core.int maxResults, core.String pageToken}) { |
| 8891 var _url = null; |
| 8892 var _queryParams = new core.Map(); |
| 8893 var _uploadMedia = null; |
| 8894 var _uploadOptions = null; |
| 8895 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 8896 var _body = null; |
| 8897 |
9179 if (project == null) { | 8898 if (project == null) { |
9180 throw new core.ArgumentError("Parameter project is required."); | 8899 throw new core.ArgumentError("Parameter project is required."); |
9181 } | 8900 } |
9182 if (region == null) { | 8901 if (region == null) { |
9183 throw new core.ArgumentError("Parameter region is required."); | 8902 throw new core.ArgumentError("Parameter region is required."); |
9184 } | 8903 } |
9185 if (filter != null) { | 8904 if (filter != null) { |
9186 _queryParams["filter"] = [filter]; | 8905 _queryParams["filter"] = [filter]; |
9187 } | 8906 } |
9188 if (maxResults != null) { | 8907 if (maxResults != null) { |
9189 _queryParams["maxResults"] = ["${maxResults}"]; | 8908 _queryParams["maxResults"] = ["${maxResults}"]; |
9190 } | 8909 } |
9191 if (pageToken != null) { | 8910 if (pageToken != null) { |
9192 _queryParams["pageToken"] = [pageToken]; | 8911 _queryParams["pageToken"] = [pageToken]; |
9193 } | 8912 } |
9194 | 8913 |
9195 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetVpnGateways'; | 8914 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools'; |
9196 | 8915 |
9197 var _response = _requester.request(_url, | 8916 var _response = _requester.request(_url, |
9198 "GET", | 8917 "GET", |
9199 body: _body, | 8918 body: _body, |
9200 queryParams: _queryParams, | 8919 queryParams: _queryParams, |
9201 uploadOptions: _uploadOptions, | 8920 uploadOptions: _uploadOptions, |
9202 uploadMedia: _uploadMedia, | 8921 uploadMedia: _uploadMedia, |
9203 downloadOptions: _downloadOptions); | 8922 downloadOptions: _downloadOptions); |
9204 return _response.then((data) => new TargetVpnGatewayList.fromJson(data)); | 8923 return _response.then((data) => new TargetPoolList.fromJson(data)); |
9205 } | 8924 } |
9206 | 8925 |
9207 } | |
9208 | |
9209 | |
9210 class UrlMapsResourceApi { | |
9211 final commons.ApiRequester _requester; | |
9212 | |
9213 UrlMapsResourceApi(commons.ApiRequester client) : | |
9214 _requester = client; | |
9215 | |
9216 /** | 8926 /** |
9217 * Deletes the specified UrlMap resource. | 8927 * Removes health check URL from targetPool. |
| 8928 * |
| 8929 * [request] - The metadata request object. |
9218 * | 8930 * |
9219 * Request parameters: | 8931 * Request parameters: |
9220 * | 8932 * |
9221 * [project] - Name of the project scoping this request. | 8933 * [project] - null |
9222 * Value must have pattern | 8934 * Value must have pattern |
9223 * "(?:(?:[-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])?))". | 8935 * "(?:(?:[-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])?))". |
9224 * | 8936 * |
9225 * [urlMap] - Name of the UrlMap resource to delete. | 8937 * [region] - Name of the region scoping this request. |
| 8938 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 8939 * |
| 8940 * [targetPool] - Name of the TargetPool resource to which health_check_url is |
| 8941 * to be removed. |
9226 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8942 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9227 * | 8943 * |
9228 * Completes with a [Operation]. | 8944 * Completes with a [Operation]. |
9229 * | 8945 * |
9230 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 8946 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9231 * error. | 8947 * error. |
9232 * | 8948 * |
9233 * If the used [http.Client] completes with an error when making a REST call, | 8949 * If the used [http.Client] completes with an error when making a REST call, |
9234 * this method will complete with the same error. | 8950 * this method will complete with the same error. |
9235 */ | 8951 */ |
9236 async.Future<Operation> delete(core.String project, core.String urlMap) { | 8952 async.Future<Operation> removeHealthCheck(TargetPoolsRemoveHealthCheckRequest
request, core.String project, core.String region, core.String targetPool) { |
9237 var _url = null; | 8953 var _url = null; |
9238 var _queryParams = new core.Map(); | 8954 var _queryParams = new core.Map(); |
9239 var _uploadMedia = null; | 8955 var _uploadMedia = null; |
9240 var _uploadOptions = null; | 8956 var _uploadOptions = null; |
9241 var _downloadOptions = commons.DownloadOptions.Metadata; | 8957 var _downloadOptions = commons.DownloadOptions.Metadata; |
9242 var _body = null; | 8958 var _body = null; |
9243 | 8959 |
| 8960 if (request != null) { |
| 8961 _body = convert.JSON.encode((request).toJson()); |
| 8962 } |
9244 if (project == null) { | 8963 if (project == null) { |
9245 throw new core.ArgumentError("Parameter project is required."); | 8964 throw new core.ArgumentError("Parameter project is required."); |
9246 } | 8965 } |
9247 if (urlMap == null) { | 8966 if (region == null) { |
9248 throw new core.ArgumentError("Parameter urlMap is required."); | 8967 throw new core.ArgumentError("Parameter region is required."); |
| 8968 } |
| 8969 if (targetPool == null) { |
| 8970 throw new core.ArgumentError("Parameter targetPool is required."); |
9249 } | 8971 } |
9250 | 8972 |
9251 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps/' + comm
ons.Escaper.ecapeVariable('$urlMap'); | 8973 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/removeHealthCheck'; |
9252 | 8974 |
9253 var _response = _requester.request(_url, | 8975 var _response = _requester.request(_url, |
9254 "DELETE", | 8976 "POST", |
9255 body: _body, | 8977 body: _body, |
9256 queryParams: _queryParams, | 8978 queryParams: _queryParams, |
9257 uploadOptions: _uploadOptions, | 8979 uploadOptions: _uploadOptions, |
9258 uploadMedia: _uploadMedia, | 8980 uploadMedia: _uploadMedia, |
9259 downloadOptions: _downloadOptions); | 8981 downloadOptions: _downloadOptions); |
9260 return _response.then((data) => new Operation.fromJson(data)); | 8982 return _response.then((data) => new Operation.fromJson(data)); |
9261 } | 8983 } |
9262 | 8984 |
9263 /** | 8985 /** |
9264 * Returns the specified UrlMap resource. | 8986 * Removes instance URL from targetPool. |
| 8987 * |
| 8988 * [request] - The metadata request object. |
9265 * | 8989 * |
9266 * Request parameters: | 8990 * Request parameters: |
9267 * | 8991 * |
9268 * [project] - Name of the project scoping this request. | 8992 * [project] - null |
9269 * Value must have pattern | 8993 * Value must have pattern |
9270 * "(?:(?:[-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])?))". | 8994 * "(?:(?:[-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])?))". |
9271 * | 8995 * |
9272 * [urlMap] - Name of the UrlMap resource to return. | 8996 * [region] - Name of the region scoping this request. |
9273 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 8997 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9274 * | 8998 * |
9275 * Completes with a [UrlMap]. | 8999 * [targetPool] - Name of the TargetPool resource to which instance_url is to |
| 9000 * be removed. |
| 9001 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 9002 * |
| 9003 * Completes with a [Operation]. |
9276 * | 9004 * |
9277 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9005 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9278 * error. | 9006 * error. |
9279 * | 9007 * |
9280 * If the used [http.Client] completes with an error when making a REST call, | 9008 * If the used [http.Client] completes with an error when making a REST call, |
9281 * this method will complete with the same error. | 9009 * this method will complete with the same error. |
9282 */ | 9010 */ |
9283 async.Future<UrlMap> get(core.String project, core.String urlMap) { | 9011 async.Future<Operation> removeInstance(TargetPoolsRemoveInstanceRequest reques
t, core.String project, core.String region, core.String targetPool) { |
9284 var _url = null; | 9012 var _url = null; |
9285 var _queryParams = new core.Map(); | 9013 var _queryParams = new core.Map(); |
9286 var _uploadMedia = null; | 9014 var _uploadMedia = null; |
9287 var _uploadOptions = null; | 9015 var _uploadOptions = null; |
9288 var _downloadOptions = commons.DownloadOptions.Metadata; | 9016 var _downloadOptions = commons.DownloadOptions.Metadata; |
9289 var _body = null; | 9017 var _body = null; |
9290 | 9018 |
| 9019 if (request != null) { |
| 9020 _body = convert.JSON.encode((request).toJson()); |
| 9021 } |
9291 if (project == null) { | 9022 if (project == null) { |
9292 throw new core.ArgumentError("Parameter project is required."); | 9023 throw new core.ArgumentError("Parameter project is required."); |
9293 } | 9024 } |
9294 if (urlMap == null) { | 9025 if (region == null) { |
9295 throw new core.ArgumentError("Parameter urlMap is required."); | 9026 throw new core.ArgumentError("Parameter region is required."); |
| 9027 } |
| 9028 if (targetPool == null) { |
| 9029 throw new core.ArgumentError("Parameter targetPool is required."); |
9296 } | 9030 } |
9297 | 9031 |
9298 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps/' + comm
ons.Escaper.ecapeVariable('$urlMap'); | 9032 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/removeInstance'; |
9299 | 9033 |
9300 var _response = _requester.request(_url, | 9034 var _response = _requester.request(_url, |
9301 "GET", | 9035 "POST", |
9302 body: _body, | 9036 body: _body, |
9303 queryParams: _queryParams, | 9037 queryParams: _queryParams, |
9304 uploadOptions: _uploadOptions, | 9038 uploadOptions: _uploadOptions, |
9305 uploadMedia: _uploadMedia, | 9039 uploadMedia: _uploadMedia, |
9306 downloadOptions: _downloadOptions); | 9040 downloadOptions: _downloadOptions); |
9307 return _response.then((data) => new UrlMap.fromJson(data)); | 9041 return _response.then((data) => new Operation.fromJson(data)); |
9308 } | 9042 } |
9309 | 9043 |
9310 /** | 9044 /** |
9311 * Creates a UrlMap resource in the specified project using the data included | 9045 * Changes backup pool configurations. |
9312 * in the request. | |
9313 * | 9046 * |
9314 * [request] - The metadata request object. | 9047 * [request] - The metadata request object. |
9315 * | 9048 * |
9316 * Request parameters: | 9049 * Request parameters: |
9317 * | 9050 * |
9318 * [project] - Name of the project scoping this request. | 9051 * [project] - Name of the project scoping this request. |
9319 * Value must have pattern | 9052 * Value must have pattern |
9320 * "(?:(?:[-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])?))". | 9053 * "(?:(?:[-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])?))". |
9321 * | 9054 * |
| 9055 * [region] - Name of the region scoping this request. |
| 9056 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 9057 * |
| 9058 * [targetPool] - Name of the TargetPool resource for which the backup is to |
| 9059 * be set. |
| 9060 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 9061 * |
| 9062 * [failoverRatio] - New failoverRatio value for the containing target pool. |
| 9063 * |
9322 * Completes with a [Operation]. | 9064 * Completes with a [Operation]. |
9323 * | 9065 * |
9324 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9066 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9325 * error. | 9067 * error. |
9326 * | 9068 * |
9327 * If the used [http.Client] completes with an error when making a REST call, | 9069 * If the used [http.Client] completes with an error when making a REST call, |
9328 * this method will complete with the same error. | 9070 * this method will complete with the same error. |
9329 */ | 9071 */ |
9330 async.Future<Operation> insert(UrlMap request, core.String project) { | 9072 async.Future<Operation> setBackup(TargetReference request, core.String project
, core.String region, core.String targetPool, {core.double failoverRatio}) { |
9331 var _url = null; | 9073 var _url = null; |
9332 var _queryParams = new core.Map(); | 9074 var _queryParams = new core.Map(); |
9333 var _uploadMedia = null; | 9075 var _uploadMedia = null; |
9334 var _uploadOptions = null; | 9076 var _uploadOptions = null; |
9335 var _downloadOptions = commons.DownloadOptions.Metadata; | 9077 var _downloadOptions = commons.DownloadOptions.Metadata; |
9336 var _body = null; | 9078 var _body = null; |
9337 | 9079 |
9338 if (request != null) { | 9080 if (request != null) { |
9339 _body = convert.JSON.encode((request).toJson()); | 9081 _body = convert.JSON.encode((request).toJson()); |
9340 } | 9082 } |
9341 if (project == null) { | 9083 if (project == null) { |
9342 throw new core.ArgumentError("Parameter project is required."); | 9084 throw new core.ArgumentError("Parameter project is required."); |
9343 } | 9085 } |
| 9086 if (region == null) { |
| 9087 throw new core.ArgumentError("Parameter region is required."); |
| 9088 } |
| 9089 if (targetPool == null) { |
| 9090 throw new core.ArgumentError("Parameter targetPool is required."); |
| 9091 } |
| 9092 if (failoverRatio != null) { |
| 9093 _queryParams["failoverRatio"] = ["${failoverRatio}"]; |
| 9094 } |
9344 | 9095 |
9345 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps'; | 9096 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetPools/' + commons.Escaper.ecapeVariable(
'$targetPool') + '/setBackup'; |
9346 | 9097 |
9347 var _response = _requester.request(_url, | 9098 var _response = _requester.request(_url, |
9348 "POST", | 9099 "POST", |
9349 body: _body, | 9100 body: _body, |
9350 queryParams: _queryParams, | 9101 queryParams: _queryParams, |
9351 uploadOptions: _uploadOptions, | 9102 uploadOptions: _uploadOptions, |
9352 uploadMedia: _uploadMedia, | 9103 uploadMedia: _uploadMedia, |
9353 downloadOptions: _downloadOptions); | 9104 downloadOptions: _downloadOptions); |
9354 return _response.then((data) => new Operation.fromJson(data)); | 9105 return _response.then((data) => new Operation.fromJson(data)); |
9355 } | 9106 } |
9356 | 9107 |
| 9108 } |
| 9109 |
| 9110 |
| 9111 class TargetVpnGatewaysResourceApi { |
| 9112 final commons.ApiRequester _requester; |
| 9113 |
| 9114 TargetVpnGatewaysResourceApi(commons.ApiRequester client) : |
| 9115 _requester = client; |
| 9116 |
9357 /** | 9117 /** |
9358 * Retrieves the list of UrlMap resources available to the specified project. | 9118 * Retrieves the list of target VPN gateways grouped by scope. |
9359 * | 9119 * |
9360 * Request parameters: | 9120 * Request parameters: |
9361 * | 9121 * |
9362 * [project] - Name of the project scoping this request. | 9122 * [project] - Project ID for this request. |
9363 * Value must have pattern | 9123 * Value must have pattern |
9364 * "(?:(?:[-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])?))". | 9124 * "(?:(?:[-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])?))". |
9365 * | 9125 * |
9366 * [filter] - Sets a filter expression for filtering listed resources, in the | 9126 * [filter] - Sets a filter expression for filtering listed resources, in the |
9367 * form filter={expression}. Your {expression} must contain the following: | 9127 * form filter={expression}. Your {expression} must be in the format: |
9368 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 9128 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
9369 * | 9129 * |
9370 * - FIELD_NAME: The name of the field you want to compare. The field name | 9130 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
9371 * must be valid for the type of resource being filtered. Only atomic field | 9131 * field types are supported (string, number, boolean). The COMPARISON_STRING |
9372 * types are supported (string, number, boolean). Array and object fields are | 9132 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
9373 * not currently supported. | 9133 * string value to filter to. The literal value must be valid for the type of |
9374 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 9134 * field (string, number, boolean). For string fields, the literal value is |
9375 * equals). | 9135 * interpreted as a regular expression using RE2 syntax. The literal value |
9376 * - LITERAL_STRING: The literal string value to filter to. The literal value | 9136 * must match the entire field. |
9377 * must be valid for the type of field (string, number, boolean). For string | 9137 * |
9378 * fields, the literal value is interpreted as a regular expression using RE2 | 9138 * For example, filter=name ne example-instance. |
9379 * syntax. The literal value must match the entire field. For example, you | |
9380 * can filter by the name of a resource: | |
9381 * filter=name ne example-instance | |
9382 * The above filter returns only results whose name field does not equal | |
9383 * example-instance. You can also enclose your literal string in single, | |
9384 * double, or no quotes. | |
9385 * | 9139 * |
9386 * [maxResults] - Maximum count of results to be returned. | 9140 * [maxResults] - Maximum count of results to be returned. |
9387 * Value must be between "0" and "500". | 9141 * Value must be between "0" and "500". |
9388 * | 9142 * |
9389 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 9143 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
9390 * to list the next page of results. Set pageToken to the nextPageToken | 9144 * to list the next page of results. Set pageToken to the nextPageToken |
9391 * returned by a previous list request. | 9145 * returned by a previous list request. |
9392 * | 9146 * |
9393 * Completes with a [UrlMapList]. | 9147 * Completes with a [TargetVpnGatewayAggregatedList]. |
9394 * | 9148 * |
9395 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9149 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9396 * error. | 9150 * error. |
9397 * | 9151 * |
9398 * If the used [http.Client] completes with an error when making a REST call, | 9152 * If the used [http.Client] completes with an error when making a REST call, |
9399 * this method will complete with the same error. | 9153 * this method will complete with the same error. |
9400 */ | 9154 */ |
9401 async.Future<UrlMapList> list(core.String project, {core.String filter, core.i
nt maxResults, core.String pageToken}) { | 9155 async.Future<TargetVpnGatewayAggregatedList> aggregatedList(core.String projec
t, {core.String filter, core.int maxResults, core.String pageToken}) { |
9402 var _url = null; | 9156 var _url = null; |
9403 var _queryParams = new core.Map(); | 9157 var _queryParams = new core.Map(); |
9404 var _uploadMedia = null; | 9158 var _uploadMedia = null; |
9405 var _uploadOptions = null; | 9159 var _uploadOptions = null; |
9406 var _downloadOptions = commons.DownloadOptions.Metadata; | 9160 var _downloadOptions = commons.DownloadOptions.Metadata; |
9407 var _body = null; | 9161 var _body = null; |
9408 | 9162 |
9409 if (project == null) { | 9163 if (project == null) { |
9410 throw new core.ArgumentError("Parameter project is required."); | 9164 throw new core.ArgumentError("Parameter project is required."); |
9411 } | 9165 } |
9412 if (filter != null) { | 9166 if (filter != null) { |
9413 _queryParams["filter"] = [filter]; | 9167 _queryParams["filter"] = [filter]; |
9414 } | 9168 } |
9415 if (maxResults != null) { | 9169 if (maxResults != null) { |
9416 _queryParams["maxResults"] = ["${maxResults}"]; | 9170 _queryParams["maxResults"] = ["${maxResults}"]; |
9417 } | 9171 } |
9418 if (pageToken != null) { | 9172 if (pageToken != null) { |
9419 _queryParams["pageToken"] = [pageToken]; | 9173 _queryParams["pageToken"] = [pageToken]; |
9420 } | 9174 } |
9421 | 9175 |
9422 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps'; | 9176 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/targetVpnGat
eways'; |
9423 | 9177 |
9424 var _response = _requester.request(_url, | 9178 var _response = _requester.request(_url, |
9425 "GET", | 9179 "GET", |
9426 body: _body, | 9180 body: _body, |
9427 queryParams: _queryParams, | 9181 queryParams: _queryParams, |
9428 uploadOptions: _uploadOptions, | 9182 uploadOptions: _uploadOptions, |
9429 uploadMedia: _uploadMedia, | 9183 uploadMedia: _uploadMedia, |
9430 downloadOptions: _downloadOptions); | 9184 downloadOptions: _downloadOptions); |
9431 return _response.then((data) => new UrlMapList.fromJson(data)); | 9185 return _response.then((data) => new TargetVpnGatewayAggregatedList.fromJson(
data)); |
9432 } | 9186 } |
9433 | 9187 |
9434 /** | 9188 /** |
9435 * Update the entire content of the UrlMap resource. This method supports | 9189 * Deletes the specified TargetVpnGateway resource. |
9436 * patch semantics. | |
9437 * | |
9438 * [request] - The metadata request object. | |
9439 * | 9190 * |
9440 * Request parameters: | 9191 * Request parameters: |
9441 * | 9192 * |
9442 * [project] - Name of the project scoping this request. | 9193 * [project] - Project ID for this request. |
9443 * Value must have pattern | 9194 * Value must have pattern |
9444 * "(?:(?:[-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])?))". | 9195 * "(?:(?:[-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])?))". |
9445 * | 9196 * |
9446 * [urlMap] - Name of the UrlMap resource to update. | 9197 * [region] - The name of the region for this request. |
| 9198 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 9199 * |
| 9200 * [targetVpnGateway] - Name of the TargetVpnGateway resource to delete. |
9447 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 9201 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9448 * | 9202 * |
9449 * Completes with a [Operation]. | 9203 * Completes with a [Operation]. |
9450 * | 9204 * |
9451 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9205 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9452 * error. | 9206 * error. |
9453 * | 9207 * |
9454 * If the used [http.Client] completes with an error when making a REST call, | 9208 * If the used [http.Client] completes with an error when making a REST call, |
9455 * this method will complete with the same error. | 9209 * this method will complete with the same error. |
9456 */ | 9210 */ |
9457 async.Future<Operation> patch(UrlMap request, core.String project, core.String
urlMap) { | 9211 async.Future<Operation> delete(core.String project, core.String region, core.S
tring targetVpnGateway) { |
9458 var _url = null; | 9212 var _url = null; |
9459 var _queryParams = new core.Map(); | 9213 var _queryParams = new core.Map(); |
9460 var _uploadMedia = null; | 9214 var _uploadMedia = null; |
9461 var _uploadOptions = null; | 9215 var _uploadOptions = null; |
9462 var _downloadOptions = commons.DownloadOptions.Metadata; | 9216 var _downloadOptions = commons.DownloadOptions.Metadata; |
9463 var _body = null; | 9217 var _body = null; |
9464 | 9218 |
9465 if (request != null) { | |
9466 _body = convert.JSON.encode((request).toJson()); | |
9467 } | |
9468 if (project == null) { | 9219 if (project == null) { |
9469 throw new core.ArgumentError("Parameter project is required."); | 9220 throw new core.ArgumentError("Parameter project is required."); |
9470 } | 9221 } |
9471 if (urlMap == null) { | 9222 if (region == null) { |
9472 throw new core.ArgumentError("Parameter urlMap is required."); | 9223 throw new core.ArgumentError("Parameter region is required."); |
| 9224 } |
| 9225 if (targetVpnGateway == null) { |
| 9226 throw new core.ArgumentError("Parameter targetVpnGateway is required."); |
9473 } | 9227 } |
9474 | 9228 |
9475 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps/' + comm
ons.Escaper.ecapeVariable('$urlMap'); | 9229 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetVpnGateways/' + commons.Escaper.ecapeVar
iable('$targetVpnGateway'); |
9476 | 9230 |
9477 var _response = _requester.request(_url, | 9231 var _response = _requester.request(_url, |
9478 "PATCH", | 9232 "DELETE", |
9479 body: _body, | 9233 body: _body, |
9480 queryParams: _queryParams, | 9234 queryParams: _queryParams, |
9481 uploadOptions: _uploadOptions, | 9235 uploadOptions: _uploadOptions, |
9482 uploadMedia: _uploadMedia, | 9236 uploadMedia: _uploadMedia, |
9483 downloadOptions: _downloadOptions); | 9237 downloadOptions: _downloadOptions); |
9484 return _response.then((data) => new Operation.fromJson(data)); | 9238 return _response.then((data) => new Operation.fromJson(data)); |
9485 } | 9239 } |
9486 | 9240 |
9487 /** | 9241 /** |
9488 * Update the entire content of the UrlMap resource. | 9242 * Returns the specified TargetVpnGateway resource. |
9489 * | |
9490 * [request] - The metadata request object. | |
9491 * | 9243 * |
9492 * Request parameters: | 9244 * Request parameters: |
9493 * | 9245 * |
9494 * [project] - Name of the project scoping this request. | 9246 * [project] - Project ID for this request. |
9495 * Value must have pattern | 9247 * Value must have pattern |
9496 * "(?:(?:[-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])?))". | 9248 * "(?:(?:[-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])?))". |
9497 * | 9249 * |
9498 * [urlMap] - Name of the UrlMap resource to update. | 9250 * [region] - The name of the region for this request. |
9499 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 9251 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9500 * | 9252 * |
9501 * Completes with a [Operation]. | 9253 * [targetVpnGateway] - Name of the TargetVpnGateway resource to return. |
| 9254 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 9255 * |
| 9256 * Completes with a [TargetVpnGateway]. |
9502 * | 9257 * |
9503 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9258 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9504 * error. | 9259 * error. |
9505 * | 9260 * |
9506 * If the used [http.Client] completes with an error when making a REST call, | 9261 * If the used [http.Client] completes with an error when making a REST call, |
9507 * this method will complete with the same error. | 9262 * this method will complete with the same error. |
9508 */ | 9263 */ |
9509 async.Future<Operation> update(UrlMap request, core.String project, core.Strin
g urlMap) { | 9264 async.Future<TargetVpnGateway> get(core.String project, core.String region, co
re.String targetVpnGateway) { |
9510 var _url = null; | 9265 var _url = null; |
9511 var _queryParams = new core.Map(); | 9266 var _queryParams = new core.Map(); |
9512 var _uploadMedia = null; | 9267 var _uploadMedia = null; |
9513 var _uploadOptions = null; | 9268 var _uploadOptions = null; |
9514 var _downloadOptions = commons.DownloadOptions.Metadata; | 9269 var _downloadOptions = commons.DownloadOptions.Metadata; |
9515 var _body = null; | 9270 var _body = null; |
9516 | 9271 |
9517 if (request != null) { | |
9518 _body = convert.JSON.encode((request).toJson()); | |
9519 } | |
9520 if (project == null) { | 9272 if (project == null) { |
9521 throw new core.ArgumentError("Parameter project is required."); | 9273 throw new core.ArgumentError("Parameter project is required."); |
9522 } | 9274 } |
9523 if (urlMap == null) { | 9275 if (region == null) { |
9524 throw new core.ArgumentError("Parameter urlMap is required."); | 9276 throw new core.ArgumentError("Parameter region is required."); |
| 9277 } |
| 9278 if (targetVpnGateway == null) { |
| 9279 throw new core.ArgumentError("Parameter targetVpnGateway is required."); |
9525 } | 9280 } |
9526 | 9281 |
9527 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps/' + comm
ons.Escaper.ecapeVariable('$urlMap'); | 9282 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetVpnGateways/' + commons.Escaper.ecapeVar
iable('$targetVpnGateway'); |
9528 | 9283 |
9529 var _response = _requester.request(_url, | 9284 var _response = _requester.request(_url, |
9530 "PUT", | 9285 "GET", |
9531 body: _body, | 9286 body: _body, |
9532 queryParams: _queryParams, | 9287 queryParams: _queryParams, |
9533 uploadOptions: _uploadOptions, | 9288 uploadOptions: _uploadOptions, |
9534 uploadMedia: _uploadMedia, | 9289 uploadMedia: _uploadMedia, |
9535 downloadOptions: _downloadOptions); | 9290 downloadOptions: _downloadOptions); |
9536 return _response.then((data) => new Operation.fromJson(data)); | 9291 return _response.then((data) => new TargetVpnGateway.fromJson(data)); |
9537 } | 9292 } |
9538 | 9293 |
9539 /** | 9294 /** |
9540 * Run static validation for the UrlMap. In particular, the tests of the | 9295 * Creates a TargetVpnGateway resource in the specified project and region |
9541 * provided UrlMap will be run. Calling this method does NOT create the | 9296 * using the data included in the request. |
9542 * UrlMap. | |
9543 * | 9297 * |
9544 * [request] - The metadata request object. | 9298 * [request] - The metadata request object. |
9545 * | 9299 * |
9546 * Request parameters: | 9300 * Request parameters: |
9547 * | 9301 * |
9548 * [project] - Name of the project scoping this request. | 9302 * [project] - Project ID for this request. |
9549 * Value must have pattern | 9303 * Value must have pattern |
9550 * "(?:(?:[-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])?))". | 9304 * "(?:(?:[-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])?))". |
9551 * | 9305 * |
9552 * [urlMap] - Name of the UrlMap resource to be validated as. | 9306 * [region] - The name of the region for this request. |
9553 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 9307 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9554 * | 9308 * |
9555 * Completes with a [UrlMapsValidateResponse]. | 9309 * Completes with a [Operation]. |
9556 * | 9310 * |
9557 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9311 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9558 * error. | 9312 * error. |
9559 * | 9313 * |
9560 * If the used [http.Client] completes with an error when making a REST call, | 9314 * If the used [http.Client] completes with an error when making a REST call, |
9561 * this method will complete with the same error. | 9315 * this method will complete with the same error. |
9562 */ | 9316 */ |
9563 async.Future<UrlMapsValidateResponse> validate(UrlMapsValidateRequest request,
core.String project, core.String urlMap) { | 9317 async.Future<Operation> insert(TargetVpnGateway request, core.String project,
core.String region) { |
9564 var _url = null; | 9318 var _url = null; |
9565 var _queryParams = new core.Map(); | 9319 var _queryParams = new core.Map(); |
9566 var _uploadMedia = null; | 9320 var _uploadMedia = null; |
9567 var _uploadOptions = null; | 9321 var _uploadOptions = null; |
9568 var _downloadOptions = commons.DownloadOptions.Metadata; | 9322 var _downloadOptions = commons.DownloadOptions.Metadata; |
9569 var _body = null; | 9323 var _body = null; |
9570 | 9324 |
9571 if (request != null) { | 9325 if (request != null) { |
9572 _body = convert.JSON.encode((request).toJson()); | 9326 _body = convert.JSON.encode((request).toJson()); |
9573 } | 9327 } |
9574 if (project == null) { | 9328 if (project == null) { |
9575 throw new core.ArgumentError("Parameter project is required."); | 9329 throw new core.ArgumentError("Parameter project is required."); |
9576 } | 9330 } |
9577 if (urlMap == null) { | 9331 if (region == null) { |
9578 throw new core.ArgumentError("Parameter urlMap is required."); | 9332 throw new core.ArgumentError("Parameter region is required."); |
9579 } | 9333 } |
9580 | 9334 |
9581 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps/' + comm
ons.Escaper.ecapeVariable('$urlMap') + '/validate'; | 9335 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetVpnGateways'; |
9582 | 9336 |
9583 var _response = _requester.request(_url, | 9337 var _response = _requester.request(_url, |
9584 "POST", | 9338 "POST", |
9585 body: _body, | 9339 body: _body, |
9586 queryParams: _queryParams, | 9340 queryParams: _queryParams, |
9587 uploadOptions: _uploadOptions, | 9341 uploadOptions: _uploadOptions, |
9588 uploadMedia: _uploadMedia, | 9342 uploadMedia: _uploadMedia, |
9589 downloadOptions: _downloadOptions); | 9343 downloadOptions: _downloadOptions); |
9590 return _response.then((data) => new UrlMapsValidateResponse.fromJson(data)); | 9344 return _response.then((data) => new Operation.fromJson(data)); |
9591 } | 9345 } |
9592 | 9346 |
9593 } | |
9594 | |
9595 | |
9596 class VpnTunnelsResourceApi { | |
9597 final commons.ApiRequester _requester; | |
9598 | |
9599 VpnTunnelsResourceApi(commons.ApiRequester client) : | |
9600 _requester = client; | |
9601 | |
9602 /** | 9347 /** |
9603 * Retrieves the list of VPN tunnels grouped by scope. | 9348 * Retrieves the list of TargetVpnGateway resources available to the specified |
| 9349 * project and region. |
9604 * | 9350 * |
9605 * Request parameters: | 9351 * Request parameters: |
9606 * | 9352 * |
9607 * [project] - Project ID for this request. | 9353 * [project] - Project ID for this request. |
9608 * Value must have pattern | 9354 * Value must have pattern |
9609 * "(?:(?:[-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])?))". | 9355 * "(?:(?:[-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])?))". |
9610 * | 9356 * |
| 9357 * [region] - The name of the region for this request. |
| 9358 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 9359 * |
9611 * [filter] - Sets a filter expression for filtering listed resources, in the | 9360 * [filter] - Sets a filter expression for filtering listed resources, in the |
9612 * form filter={expression}. Your {expression} must contain the following: | 9361 * form filter={expression}. Your {expression} must be in the format: |
9613 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 9362 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
9614 * | 9363 * |
9615 * - FIELD_NAME: The name of the field you want to compare. The field name | 9364 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
9616 * must be valid for the type of resource being filtered. Only atomic field | 9365 * field types are supported (string, number, boolean). The COMPARISON_STRING |
9617 * types are supported (string, number, boolean). Array and object fields are | 9366 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
9618 * not currently supported. | 9367 * string value to filter to. The literal value must be valid for the type of |
9619 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 9368 * field (string, number, boolean). For string fields, the literal value is |
9620 * equals). | 9369 * interpreted as a regular expression using RE2 syntax. The literal value |
9621 * - LITERAL_STRING: The literal string value to filter to. The literal value | 9370 * must match the entire field. |
9622 * must be valid for the type of field (string, number, boolean). For string | 9371 * |
9623 * fields, the literal value is interpreted as a regular expression using RE2 | 9372 * For example, filter=name ne example-instance. |
9624 * syntax. The literal value must match the entire field. For example, you | |
9625 * can filter by the name of a resource: | |
9626 * filter=name ne example-instance | |
9627 * The above filter returns only results whose name field does not equal | |
9628 * example-instance. You can also enclose your literal string in single, | |
9629 * double, or no quotes. | |
9630 * | 9373 * |
9631 * [maxResults] - Maximum count of results to be returned. | 9374 * [maxResults] - Maximum count of results to be returned. |
9632 * Value must be between "0" and "500". | 9375 * Value must be between "0" and "500". |
9633 * | 9376 * |
9634 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 9377 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
9635 * to list the next page of results. Set pageToken to the nextPageToken | 9378 * to list the next page of results. Set pageToken to the nextPageToken |
9636 * returned by a previous list request. | 9379 * returned by a previous list request. |
9637 * | 9380 * |
9638 * Completes with a [VpnTunnelAggregatedList]. | 9381 * Completes with a [TargetVpnGatewayList]. |
9639 * | 9382 * |
9640 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9383 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9641 * error. | 9384 * error. |
9642 * | 9385 * |
9643 * If the used [http.Client] completes with an error when making a REST call, | 9386 * If the used [http.Client] completes with an error when making a REST call, |
9644 * this method will complete with the same error. | 9387 * this method will complete with the same error. |
9645 */ | 9388 */ |
9646 async.Future<VpnTunnelAggregatedList> aggregatedList(core.String project, {cor
e.String filter, core.int maxResults, core.String pageToken}) { | 9389 async.Future<TargetVpnGatewayList> list(core.String project, core.String regio
n, {core.String filter, core.int maxResults, core.String pageToken}) { |
9647 var _url = null; | 9390 var _url = null; |
9648 var _queryParams = new core.Map(); | 9391 var _queryParams = new core.Map(); |
9649 var _uploadMedia = null; | 9392 var _uploadMedia = null; |
9650 var _uploadOptions = null; | 9393 var _uploadOptions = null; |
9651 var _downloadOptions = commons.DownloadOptions.Metadata; | 9394 var _downloadOptions = commons.DownloadOptions.Metadata; |
9652 var _body = null; | 9395 var _body = null; |
9653 | 9396 |
9654 if (project == null) { | 9397 if (project == null) { |
9655 throw new core.ArgumentError("Parameter project is required."); | 9398 throw new core.ArgumentError("Parameter project is required."); |
9656 } | 9399 } |
| 9400 if (region == null) { |
| 9401 throw new core.ArgumentError("Parameter region is required."); |
| 9402 } |
9657 if (filter != null) { | 9403 if (filter != null) { |
9658 _queryParams["filter"] = [filter]; | 9404 _queryParams["filter"] = [filter]; |
9659 } | 9405 } |
9660 if (maxResults != null) { | 9406 if (maxResults != null) { |
9661 _queryParams["maxResults"] = ["${maxResults}"]; | 9407 _queryParams["maxResults"] = ["${maxResults}"]; |
9662 } | 9408 } |
9663 if (pageToken != null) { | 9409 if (pageToken != null) { |
9664 _queryParams["pageToken"] = [pageToken]; | 9410 _queryParams["pageToken"] = [pageToken]; |
9665 } | 9411 } |
9666 | 9412 |
9667 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/vpnTunnels'; | 9413 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/targetVpnGateways'; |
9668 | 9414 |
9669 var _response = _requester.request(_url, | 9415 var _response = _requester.request(_url, |
9670 "GET", | 9416 "GET", |
9671 body: _body, | 9417 body: _body, |
9672 queryParams: _queryParams, | 9418 queryParams: _queryParams, |
9673 uploadOptions: _uploadOptions, | 9419 uploadOptions: _uploadOptions, |
9674 uploadMedia: _uploadMedia, | 9420 uploadMedia: _uploadMedia, |
9675 downloadOptions: _downloadOptions); | 9421 downloadOptions: _downloadOptions); |
9676 return _response.then((data) => new VpnTunnelAggregatedList.fromJson(data)); | 9422 return _response.then((data) => new TargetVpnGatewayList.fromJson(data)); |
9677 } | 9423 } |
9678 | 9424 |
| 9425 } |
| 9426 |
| 9427 |
| 9428 class UrlMapsResourceApi { |
| 9429 final commons.ApiRequester _requester; |
| 9430 |
| 9431 UrlMapsResourceApi(commons.ApiRequester client) : |
| 9432 _requester = client; |
| 9433 |
9679 /** | 9434 /** |
9680 * Deletes the specified VpnTunnel resource. | 9435 * Deletes the specified UrlMap resource. |
9681 * | 9436 * |
9682 * Request parameters: | 9437 * Request parameters: |
9683 * | 9438 * |
9684 * [project] - Project ID for this request. | 9439 * [project] - Name of the project scoping this request. |
9685 * Value must have pattern | 9440 * Value must have pattern |
9686 * "(?:(?:[-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])?))". | 9441 * "(?:(?:[-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])?))". |
9687 * | 9442 * |
9688 * [region] - The name of the region for this request. | 9443 * [urlMap] - Name of the UrlMap resource to delete. |
9689 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
9690 * | |
9691 * [vpnTunnel] - Name of the VpnTunnel resource to delete. | |
9692 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 9444 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9693 * | 9445 * |
9694 * Completes with a [Operation]. | 9446 * Completes with a [Operation]. |
9695 * | 9447 * |
9696 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9448 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9697 * error. | 9449 * error. |
9698 * | 9450 * |
9699 * If the used [http.Client] completes with an error when making a REST call, | 9451 * If the used [http.Client] completes with an error when making a REST call, |
9700 * this method will complete with the same error. | 9452 * this method will complete with the same error. |
9701 */ | 9453 */ |
9702 async.Future<Operation> delete(core.String project, core.String region, core.S
tring vpnTunnel) { | 9454 async.Future<Operation> delete(core.String project, core.String urlMap) { |
9703 var _url = null; | 9455 var _url = null; |
9704 var _queryParams = new core.Map(); | 9456 var _queryParams = new core.Map(); |
9705 var _uploadMedia = null; | 9457 var _uploadMedia = null; |
9706 var _uploadOptions = null; | 9458 var _uploadOptions = null; |
9707 var _downloadOptions = commons.DownloadOptions.Metadata; | 9459 var _downloadOptions = commons.DownloadOptions.Metadata; |
9708 var _body = null; | 9460 var _body = null; |
9709 | 9461 |
9710 if (project == null) { | 9462 if (project == null) { |
9711 throw new core.ArgumentError("Parameter project is required."); | 9463 throw new core.ArgumentError("Parameter project is required."); |
9712 } | 9464 } |
9713 if (region == null) { | 9465 if (urlMap == null) { |
9714 throw new core.ArgumentError("Parameter region is required."); | 9466 throw new core.ArgumentError("Parameter urlMap is required."); |
9715 } | |
9716 if (vpnTunnel == null) { | |
9717 throw new core.ArgumentError("Parameter vpnTunnel is required."); | |
9718 } | 9467 } |
9719 | 9468 |
9720 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/vpnTunnels/' + commons.Escaper.ecapeVariable('
$vpnTunnel'); | 9469 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps/' + comm
ons.Escaper.ecapeVariable('$urlMap'); |
9721 | 9470 |
9722 var _response = _requester.request(_url, | 9471 var _response = _requester.request(_url, |
9723 "DELETE", | 9472 "DELETE", |
9724 body: _body, | 9473 body: _body, |
9725 queryParams: _queryParams, | 9474 queryParams: _queryParams, |
9726 uploadOptions: _uploadOptions, | 9475 uploadOptions: _uploadOptions, |
9727 uploadMedia: _uploadMedia, | 9476 uploadMedia: _uploadMedia, |
9728 downloadOptions: _downloadOptions); | 9477 downloadOptions: _downloadOptions); |
9729 return _response.then((data) => new Operation.fromJson(data)); | 9478 return _response.then((data) => new Operation.fromJson(data)); |
9730 } | 9479 } |
9731 | 9480 |
9732 /** | 9481 /** |
9733 * Returns the specified VpnTunnel resource. | 9482 * Returns the specified UrlMap resource. |
9734 * | 9483 * |
9735 * Request parameters: | 9484 * Request parameters: |
9736 * | 9485 * |
9737 * [project] - Project ID for this request. | 9486 * [project] - Name of the project scoping this request. |
9738 * Value must have pattern | 9487 * Value must have pattern |
9739 * "(?:(?:[-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])?))". | 9488 * "(?:(?:[-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])?))". |
9740 * | 9489 * |
9741 * [region] - The name of the region for this request. | 9490 * [urlMap] - Name of the UrlMap resource to return. |
9742 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 9491 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9743 * | 9492 * |
9744 * [vpnTunnel] - Name of the VpnTunnel resource to return. | 9493 * Completes with a [UrlMap]. |
9745 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
9746 * | |
9747 * Completes with a [VpnTunnel]. | |
9748 * | 9494 * |
9749 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9495 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9750 * error. | 9496 * error. |
9751 * | 9497 * |
9752 * If the used [http.Client] completes with an error when making a REST call, | 9498 * If the used [http.Client] completes with an error when making a REST call, |
9753 * this method will complete with the same error. | 9499 * this method will complete with the same error. |
9754 */ | 9500 */ |
9755 async.Future<VpnTunnel> get(core.String project, core.String region, core.Stri
ng vpnTunnel) { | 9501 async.Future<UrlMap> get(core.String project, core.String urlMap) { |
9756 var _url = null; | 9502 var _url = null; |
9757 var _queryParams = new core.Map(); | 9503 var _queryParams = new core.Map(); |
9758 var _uploadMedia = null; | 9504 var _uploadMedia = null; |
9759 var _uploadOptions = null; | 9505 var _uploadOptions = null; |
9760 var _downloadOptions = commons.DownloadOptions.Metadata; | 9506 var _downloadOptions = commons.DownloadOptions.Metadata; |
9761 var _body = null; | 9507 var _body = null; |
9762 | 9508 |
9763 if (project == null) { | 9509 if (project == null) { |
9764 throw new core.ArgumentError("Parameter project is required."); | 9510 throw new core.ArgumentError("Parameter project is required."); |
9765 } | 9511 } |
9766 if (region == null) { | 9512 if (urlMap == null) { |
9767 throw new core.ArgumentError("Parameter region is required."); | 9513 throw new core.ArgumentError("Parameter urlMap is required."); |
9768 } | |
9769 if (vpnTunnel == null) { | |
9770 throw new core.ArgumentError("Parameter vpnTunnel is required."); | |
9771 } | 9514 } |
9772 | 9515 |
9773 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/vpnTunnels/' + commons.Escaper.ecapeVariable('
$vpnTunnel'); | 9516 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps/' + comm
ons.Escaper.ecapeVariable('$urlMap'); |
9774 | 9517 |
9775 var _response = _requester.request(_url, | 9518 var _response = _requester.request(_url, |
9776 "GET", | 9519 "GET", |
9777 body: _body, | 9520 body: _body, |
9778 queryParams: _queryParams, | 9521 queryParams: _queryParams, |
9779 uploadOptions: _uploadOptions, | 9522 uploadOptions: _uploadOptions, |
9780 uploadMedia: _uploadMedia, | 9523 uploadMedia: _uploadMedia, |
9781 downloadOptions: _downloadOptions); | 9524 downloadOptions: _downloadOptions); |
9782 return _response.then((data) => new VpnTunnel.fromJson(data)); | 9525 return _response.then((data) => new UrlMap.fromJson(data)); |
9783 } | 9526 } |
9784 | 9527 |
9785 /** | 9528 /** |
9786 * Creates a VpnTunnel resource in the specified project and region using the | 9529 * Creates a UrlMap resource in the specified project using the data included |
9787 * data included in the request. | 9530 * in the request. |
9788 * | 9531 * |
9789 * [request] - The metadata request object. | 9532 * [request] - The metadata request object. |
9790 * | 9533 * |
9791 * Request parameters: | 9534 * Request parameters: |
9792 * | 9535 * |
9793 * [project] - Project ID for this request. | 9536 * [project] - Name of the project scoping this request. |
9794 * Value must have pattern | 9537 * Value must have pattern |
9795 * "(?:(?:[-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])?))". | 9538 * "(?:(?:[-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])?))". |
9796 * | 9539 * |
9797 * [region] - The name of the region for this request. | |
9798 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
9799 * | |
9800 * Completes with a [Operation]. | 9540 * Completes with a [Operation]. |
9801 * | 9541 * |
9802 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9542 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9803 * error. | 9543 * error. |
9804 * | 9544 * |
9805 * If the used [http.Client] completes with an error when making a REST call, | 9545 * If the used [http.Client] completes with an error when making a REST call, |
9806 * this method will complete with the same error. | 9546 * this method will complete with the same error. |
9807 */ | 9547 */ |
9808 async.Future<Operation> insert(VpnTunnel request, core.String project, core.St
ring region) { | 9548 async.Future<Operation> insert(UrlMap request, core.String project) { |
9809 var _url = null; | 9549 var _url = null; |
9810 var _queryParams = new core.Map(); | 9550 var _queryParams = new core.Map(); |
9811 var _uploadMedia = null; | 9551 var _uploadMedia = null; |
9812 var _uploadOptions = null; | 9552 var _uploadOptions = null; |
9813 var _downloadOptions = commons.DownloadOptions.Metadata; | 9553 var _downloadOptions = commons.DownloadOptions.Metadata; |
9814 var _body = null; | 9554 var _body = null; |
9815 | 9555 |
9816 if (request != null) { | 9556 if (request != null) { |
9817 _body = convert.JSON.encode((request).toJson()); | 9557 _body = convert.JSON.encode((request).toJson()); |
9818 } | 9558 } |
9819 if (project == null) { | 9559 if (project == null) { |
9820 throw new core.ArgumentError("Parameter project is required."); | 9560 throw new core.ArgumentError("Parameter project is required."); |
9821 } | 9561 } |
9822 if (region == null) { | |
9823 throw new core.ArgumentError("Parameter region is required."); | |
9824 } | |
9825 | 9562 |
9826 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/vpnTunnels'; | 9563 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps'; |
9827 | 9564 |
9828 var _response = _requester.request(_url, | 9565 var _response = _requester.request(_url, |
9829 "POST", | 9566 "POST", |
9830 body: _body, | 9567 body: _body, |
9831 queryParams: _queryParams, | 9568 queryParams: _queryParams, |
9832 uploadOptions: _uploadOptions, | 9569 uploadOptions: _uploadOptions, |
9833 uploadMedia: _uploadMedia, | 9570 uploadMedia: _uploadMedia, |
9834 downloadOptions: _downloadOptions); | 9571 downloadOptions: _downloadOptions); |
9835 return _response.then((data) => new Operation.fromJson(data)); | 9572 return _response.then((data) => new Operation.fromJson(data)); |
9836 } | 9573 } |
9837 | 9574 |
9838 /** | 9575 /** |
9839 * Retrieves the list of VpnTunnel resources contained in the specified | 9576 * Retrieves the list of UrlMap resources available to the specified project. |
9840 * project and region. | |
9841 * | 9577 * |
9842 * Request parameters: | 9578 * Request parameters: |
9843 * | 9579 * |
9844 * [project] - Project ID for this request. | 9580 * [project] - Name of the project scoping this request. |
9845 * Value must have pattern | 9581 * Value must have pattern |
9846 * "(?:(?:[-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])?))". | 9582 * "(?:(?:[-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])?))". |
9847 * | 9583 * |
9848 * [region] - The name of the region for this request. | 9584 * [filter] - Sets a filter expression for filtering listed resources, in the |
9849 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 9585 * form filter={expression}. Your {expression} must be in the format: |
| 9586 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
9850 * | 9587 * |
9851 * [filter] - Sets a filter expression for filtering listed resources, in the | 9588 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
9852 * form filter={expression}. Your {expression} must contain the following: | 9589 * field types are supported (string, number, boolean). The COMPARISON_STRING |
9853 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 9590 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 9591 * string value to filter to. The literal value must be valid for the type of |
| 9592 * field (string, number, boolean). For string fields, the literal value is |
| 9593 * interpreted as a regular expression using RE2 syntax. The literal value |
| 9594 * must match the entire field. |
9854 * | 9595 * |
9855 * - FIELD_NAME: The name of the field you want to compare. The field name | 9596 * For example, filter=name ne example-instance. |
9856 * must be valid for the type of resource being filtered. Only atomic field | |
9857 * types are supported (string, number, boolean). Array and object fields are | |
9858 * not currently supported. | |
9859 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
9860 * equals). | |
9861 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
9862 * must be valid for the type of field (string, number, boolean). For string | |
9863 * fields, the literal value is interpreted as a regular expression using RE2 | |
9864 * syntax. The literal value must match the entire field. For example, you | |
9865 * can filter by the name of a resource: | |
9866 * filter=name ne example-instance | |
9867 * The above filter returns only results whose name field does not equal | |
9868 * example-instance. You can also enclose your literal string in single, | |
9869 * double, or no quotes. | |
9870 * | 9597 * |
9871 * [maxResults] - Maximum count of results to be returned. | 9598 * [maxResults] - Maximum count of results to be returned. |
9872 * Value must be between "0" and "500". | 9599 * Value must be between "0" and "500". |
9873 * | 9600 * |
9874 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 9601 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
9875 * to list the next page of results. Set pageToken to the nextPageToken | 9602 * to list the next page of results. Set pageToken to the nextPageToken |
9876 * returned by a previous list request. | 9603 * returned by a previous list request. |
9877 * | 9604 * |
9878 * Completes with a [VpnTunnelList]. | 9605 * Completes with a [UrlMapList]. |
9879 * | 9606 * |
9880 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9607 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9881 * error. | 9608 * error. |
9882 * | 9609 * |
9883 * If the used [http.Client] completes with an error when making a REST call, | 9610 * If the used [http.Client] completes with an error when making a REST call, |
9884 * this method will complete with the same error. | 9611 * this method will complete with the same error. |
9885 */ | 9612 */ |
9886 async.Future<VpnTunnelList> list(core.String project, core.String region, {cor
e.String filter, core.int maxResults, core.String pageToken}) { | 9613 async.Future<UrlMapList> list(core.String project, {core.String filter, core.i
nt maxResults, core.String pageToken}) { |
9887 var _url = null; | 9614 var _url = null; |
9888 var _queryParams = new core.Map(); | 9615 var _queryParams = new core.Map(); |
9889 var _uploadMedia = null; | 9616 var _uploadMedia = null; |
9890 var _uploadOptions = null; | 9617 var _uploadOptions = null; |
9891 var _downloadOptions = commons.DownloadOptions.Metadata; | 9618 var _downloadOptions = commons.DownloadOptions.Metadata; |
9892 var _body = null; | 9619 var _body = null; |
9893 | 9620 |
9894 if (project == null) { | 9621 if (project == null) { |
9895 throw new core.ArgumentError("Parameter project is required."); | 9622 throw new core.ArgumentError("Parameter project is required."); |
9896 } | 9623 } |
9897 if (region == null) { | |
9898 throw new core.ArgumentError("Parameter region is required."); | |
9899 } | |
9900 if (filter != null) { | 9624 if (filter != null) { |
9901 _queryParams["filter"] = [filter]; | 9625 _queryParams["filter"] = [filter]; |
9902 } | 9626 } |
9903 if (maxResults != null) { | 9627 if (maxResults != null) { |
9904 _queryParams["maxResults"] = ["${maxResults}"]; | 9628 _queryParams["maxResults"] = ["${maxResults}"]; |
9905 } | 9629 } |
9906 if (pageToken != null) { | 9630 if (pageToken != null) { |
9907 _queryParams["pageToken"] = [pageToken]; | 9631 _queryParams["pageToken"] = [pageToken]; |
9908 } | 9632 } |
9909 | 9633 |
9910 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/vpnTunnels'; | 9634 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps'; |
9911 | 9635 |
9912 var _response = _requester.request(_url, | 9636 var _response = _requester.request(_url, |
9913 "GET", | 9637 "GET", |
9914 body: _body, | 9638 body: _body, |
9915 queryParams: _queryParams, | 9639 queryParams: _queryParams, |
9916 uploadOptions: _uploadOptions, | 9640 uploadOptions: _uploadOptions, |
9917 uploadMedia: _uploadMedia, | 9641 uploadMedia: _uploadMedia, |
9918 downloadOptions: _downloadOptions); | 9642 downloadOptions: _downloadOptions); |
9919 return _response.then((data) => new VpnTunnelList.fromJson(data)); | 9643 return _response.then((data) => new UrlMapList.fromJson(data)); |
9920 } | 9644 } |
9921 | 9645 |
9922 } | |
9923 | |
9924 | |
9925 class ZoneOperationsResourceApi { | |
9926 final commons.ApiRequester _requester; | |
9927 | |
9928 ZoneOperationsResourceApi(commons.ApiRequester client) : | |
9929 _requester = client; | |
9930 | |
9931 /** | 9646 /** |
9932 * Deletes the specified zone-specific Operations resource. | 9647 * Update the entire content of the UrlMap resource. This method supports |
| 9648 * patch semantics. |
| 9649 * |
| 9650 * [request] - The metadata request object. |
9933 * | 9651 * |
9934 * Request parameters: | 9652 * Request parameters: |
9935 * | 9653 * |
9936 * [project] - Project ID for this request. | 9654 * [project] - Name of the project scoping this request. |
9937 * Value must have pattern | 9655 * Value must have pattern |
9938 * "(?:(?:[-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])?))". | 9656 * "(?:(?:[-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])?))". |
9939 * | 9657 * |
9940 * [zone] - Name of the zone scoping this request. | 9658 * [urlMap] - Name of the UrlMap resource to update. |
9941 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 9659 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9942 * | 9660 * |
9943 * [operation] - Name of the Operations resource to delete. | 9661 * Completes with a [Operation]. |
9944 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
9945 * | 9662 * |
9946 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9663 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
9947 * error. | 9664 * error. |
9948 * | 9665 * |
9949 * If the used [http.Client] completes with an error when making a REST call, | 9666 * If the used [http.Client] completes with an error when making a REST call, |
9950 * this method will complete with the same error. | 9667 * this method will complete with the same error. |
9951 */ | 9668 */ |
9952 async.Future delete(core.String project, core.String zone, core.String operati
on) { | 9669 async.Future<Operation> patch(UrlMap request, core.String project, core.String
urlMap) { |
9953 var _url = null; | 9670 var _url = null; |
9954 var _queryParams = new core.Map(); | 9671 var _queryParams = new core.Map(); |
9955 var _uploadMedia = null; | 9672 var _uploadMedia = null; |
9956 var _uploadOptions = null; | 9673 var _uploadOptions = null; |
9957 var _downloadOptions = commons.DownloadOptions.Metadata; | 9674 var _downloadOptions = commons.DownloadOptions.Metadata; |
9958 var _body = null; | 9675 var _body = null; |
9959 | 9676 |
| 9677 if (request != null) { |
| 9678 _body = convert.JSON.encode((request).toJson()); |
| 9679 } |
9960 if (project == null) { | 9680 if (project == null) { |
9961 throw new core.ArgumentError("Parameter project is required."); | 9681 throw new core.ArgumentError("Parameter project is required."); |
9962 } | 9682 } |
9963 if (zone == null) { | 9683 if (urlMap == null) { |
9964 throw new core.ArgumentError("Parameter zone is required."); | 9684 throw new core.ArgumentError("Parameter urlMap is required."); |
9965 } | |
9966 if (operation == null) { | |
9967 throw new core.ArgumentError("Parameter operation is required."); | |
9968 } | 9685 } |
9969 | 9686 |
9970 _downloadOptions = null; | 9687 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps/' + comm
ons.Escaper.ecapeVariable('$urlMap'); |
9971 | |
9972 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/operations/' + commons.Escaper.ecapeVariable('$ope
ration'); | |
9973 | 9688 |
9974 var _response = _requester.request(_url, | 9689 var _response = _requester.request(_url, |
9975 "DELETE", | 9690 "PATCH", |
9976 body: _body, | 9691 body: _body, |
9977 queryParams: _queryParams, | 9692 queryParams: _queryParams, |
9978 uploadOptions: _uploadOptions, | 9693 uploadOptions: _uploadOptions, |
9979 uploadMedia: _uploadMedia, | 9694 uploadMedia: _uploadMedia, |
9980 downloadOptions: _downloadOptions); | 9695 downloadOptions: _downloadOptions); |
9981 return _response.then((data) => null); | 9696 return _response.then((data) => new Operation.fromJson(data)); |
9982 } | 9697 } |
9983 | 9698 |
9984 /** | 9699 /** |
9985 * Retrieves the specified zone-specific Operations resource. | 9700 * Update the entire content of the UrlMap resource. |
| 9701 * |
| 9702 * [request] - The metadata request object. |
9986 * | 9703 * |
9987 * Request parameters: | 9704 * Request parameters: |
9988 * | 9705 * |
9989 * [project] - Project ID for this request. | 9706 * [project] - Name of the project scoping this request. |
9990 * Value must have pattern | 9707 * Value must have pattern |
9991 * "(?:(?:[-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])?))". | 9708 * "(?:(?:[-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])?))". |
9992 * | 9709 * |
9993 * [zone] - Name of the zone scoping this request. | 9710 * [urlMap] - Name of the UrlMap resource to update. |
9994 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | |
9995 * | |
9996 * [operation] - Name of the Operations resource to return. | |
9997 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 9711 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
9998 * | 9712 * |
9999 * Completes with a [Operation]. | 9713 * Completes with a [Operation]. |
10000 * | 9714 * |
10001 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9715 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
10002 * error. | 9716 * error. |
10003 * | 9717 * |
10004 * If the used [http.Client] completes with an error when making a REST call, | 9718 * If the used [http.Client] completes with an error when making a REST call, |
10005 * this method will complete with the same error. | 9719 * this method will complete with the same error. |
10006 */ | 9720 */ |
10007 async.Future<Operation> get(core.String project, core.String zone, core.String
operation) { | 9721 async.Future<Operation> update(UrlMap request, core.String project, core.Strin
g urlMap) { |
10008 var _url = null; | 9722 var _url = null; |
10009 var _queryParams = new core.Map(); | 9723 var _queryParams = new core.Map(); |
10010 var _uploadMedia = null; | 9724 var _uploadMedia = null; |
10011 var _uploadOptions = null; | 9725 var _uploadOptions = null; |
10012 var _downloadOptions = commons.DownloadOptions.Metadata; | 9726 var _downloadOptions = commons.DownloadOptions.Metadata; |
10013 var _body = null; | 9727 var _body = null; |
10014 | 9728 |
| 9729 if (request != null) { |
| 9730 _body = convert.JSON.encode((request).toJson()); |
| 9731 } |
10015 if (project == null) { | 9732 if (project == null) { |
10016 throw new core.ArgumentError("Parameter project is required."); | 9733 throw new core.ArgumentError("Parameter project is required."); |
10017 } | 9734 } |
10018 if (zone == null) { | 9735 if (urlMap == null) { |
10019 throw new core.ArgumentError("Parameter zone is required."); | 9736 throw new core.ArgumentError("Parameter urlMap is required."); |
10020 } | |
10021 if (operation == null) { | |
10022 throw new core.ArgumentError("Parameter operation is required."); | |
10023 } | 9737 } |
10024 | 9738 |
10025 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/operations/' + commons.Escaper.ecapeVariable('$ope
ration'); | 9739 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps/' + comm
ons.Escaper.ecapeVariable('$urlMap'); |
10026 | 9740 |
10027 var _response = _requester.request(_url, | 9741 var _response = _requester.request(_url, |
10028 "GET", | 9742 "PUT", |
10029 body: _body, | 9743 body: _body, |
10030 queryParams: _queryParams, | 9744 queryParams: _queryParams, |
10031 uploadOptions: _uploadOptions, | 9745 uploadOptions: _uploadOptions, |
10032 uploadMedia: _uploadMedia, | 9746 uploadMedia: _uploadMedia, |
10033 downloadOptions: _downloadOptions); | 9747 downloadOptions: _downloadOptions); |
10034 return _response.then((data) => new Operation.fromJson(data)); | 9748 return _response.then((data) => new Operation.fromJson(data)); |
10035 } | 9749 } |
10036 | 9750 |
10037 /** | 9751 /** |
10038 * Retrieves the list of Operation resources contained within the specified | 9752 * Run static validation for the UrlMap. In particular, the tests of the |
10039 * zone. | 9753 * provided UrlMap will be run. Calling this method does NOT create the |
| 9754 * UrlMap. |
| 9755 * |
| 9756 * [request] - The metadata request object. |
10040 * | 9757 * |
10041 * Request parameters: | 9758 * Request parameters: |
10042 * | 9759 * |
10043 * [project] - Project ID for this request. | 9760 * [project] - Name of the project scoping this request. |
10044 * Value must have pattern | 9761 * Value must have pattern |
10045 * "(?:(?:[-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])?))". | 9762 * "(?:(?:[-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])?))". |
10046 * | 9763 * |
10047 * [zone] - Name of the zone scoping this request. | 9764 * [urlMap] - Name of the UrlMap resource to be validated as. |
10048 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 9765 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
10049 * | 9766 * |
10050 * [filter] - Sets a filter expression for filtering listed resources, in the | 9767 * Completes with a [UrlMapsValidateResponse]. |
10051 * form filter={expression}. Your {expression} must contain the following: | |
10052 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | |
10053 * | |
10054 * - FIELD_NAME: The name of the field you want to compare. The field name | |
10055 * must be valid for the type of resource being filtered. Only atomic field | |
10056 * types are supported (string, number, boolean). Array and object fields are | |
10057 * not currently supported. | |
10058 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | |
10059 * equals). | |
10060 * - LITERAL_STRING: The literal string value to filter to. The literal value | |
10061 * must be valid for the type of field (string, number, boolean). For string | |
10062 * fields, the literal value is interpreted as a regular expression using RE2 | |
10063 * syntax. The literal value must match the entire field. For example, you | |
10064 * can filter by the name of a resource: | |
10065 * filter=name ne example-instance | |
10066 * The above filter returns only results whose name field does not equal | |
10067 * example-instance. You can also enclose your literal string in single, | |
10068 * double, or no quotes. | |
10069 * | |
10070 * [maxResults] - Maximum count of results to be returned. | |
10071 * Value must be between "0" and "500". | |
10072 * | |
10073 * [pageToken] - Specifies a page token to use. Use this parameter if you want | |
10074 * to list the next page of results. Set pageToken to the nextPageToken | |
10075 * returned by a previous list request. | |
10076 * | |
10077 * Completes with a [OperationList]. | |
10078 * | 9768 * |
10079 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9769 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
10080 * error. | 9770 * error. |
10081 * | 9771 * |
10082 * If the used [http.Client] completes with an error when making a REST call, | 9772 * If the used [http.Client] completes with an error when making a REST call, |
10083 * this method will complete with the same error. | 9773 * this method will complete with the same error. |
10084 */ | 9774 */ |
10085 async.Future<OperationList> list(core.String project, core.String zone, {core.
String filter, core.int maxResults, core.String pageToken}) { | 9775 async.Future<UrlMapsValidateResponse> validate(UrlMapsValidateRequest request,
core.String project, core.String urlMap) { |
10086 var _url = null; | 9776 var _url = null; |
10087 var _queryParams = new core.Map(); | 9777 var _queryParams = new core.Map(); |
10088 var _uploadMedia = null; | 9778 var _uploadMedia = null; |
10089 var _uploadOptions = null; | 9779 var _uploadOptions = null; |
10090 var _downloadOptions = commons.DownloadOptions.Metadata; | 9780 var _downloadOptions = commons.DownloadOptions.Metadata; |
10091 var _body = null; | 9781 var _body = null; |
10092 | 9782 |
| 9783 if (request != null) { |
| 9784 _body = convert.JSON.encode((request).toJson()); |
| 9785 } |
10093 if (project == null) { | 9786 if (project == null) { |
10094 throw new core.ArgumentError("Parameter project is required."); | 9787 throw new core.ArgumentError("Parameter project is required."); |
10095 } | 9788 } |
10096 if (zone == null) { | 9789 if (urlMap == null) { |
10097 throw new core.ArgumentError("Parameter zone is required."); | 9790 throw new core.ArgumentError("Parameter urlMap is required."); |
10098 } | |
10099 if (filter != null) { | |
10100 _queryParams["filter"] = [filter]; | |
10101 } | |
10102 if (maxResults != null) { | |
10103 _queryParams["maxResults"] = ["${maxResults}"]; | |
10104 } | |
10105 if (pageToken != null) { | |
10106 _queryParams["pageToken"] = [pageToken]; | |
10107 } | 9791 } |
10108 | 9792 |
10109 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/operations'; | 9793 _url = commons.Escaper.ecapeVariable('$project') + '/global/urlMaps/' + comm
ons.Escaper.ecapeVariable('$urlMap') + '/validate'; |
10110 | 9794 |
10111 var _response = _requester.request(_url, | 9795 var _response = _requester.request(_url, |
10112 "GET", | 9796 "POST", |
10113 body: _body, | 9797 body: _body, |
10114 queryParams: _queryParams, | 9798 queryParams: _queryParams, |
10115 uploadOptions: _uploadOptions, | 9799 uploadOptions: _uploadOptions, |
10116 uploadMedia: _uploadMedia, | 9800 uploadMedia: _uploadMedia, |
10117 downloadOptions: _downloadOptions); | 9801 downloadOptions: _downloadOptions); |
10118 return _response.then((data) => new OperationList.fromJson(data)); | 9802 return _response.then((data) => new UrlMapsValidateResponse.fromJson(data)); |
10119 } | 9803 } |
10120 | 9804 |
10121 } | 9805 } |
10122 | 9806 |
10123 | 9807 |
10124 class ZonesResourceApi { | 9808 class VpnTunnelsResourceApi { |
10125 final commons.ApiRequester _requester; | 9809 final commons.ApiRequester _requester; |
10126 | 9810 |
10127 ZonesResourceApi(commons.ApiRequester client) : | 9811 VpnTunnelsResourceApi(commons.ApiRequester client) : |
10128 _requester = client; | 9812 _requester = client; |
10129 | 9813 |
10130 /** | 9814 /** |
10131 * Returns the specified zone resource. | 9815 * Retrieves the list of VPN tunnels grouped by scope. |
10132 * | 9816 * |
10133 * Request parameters: | 9817 * Request parameters: |
10134 * | 9818 * |
10135 * [project] - Project ID for this request. | 9819 * [project] - Project ID for this request. |
10136 * Value must have pattern | 9820 * Value must have pattern |
10137 * "(?:(?:[-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])?))". | 9821 * "(?:(?:[-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])?))". |
10138 * | 9822 * |
10139 * [zone] - Name of the zone resource to return. | 9823 * [filter] - Sets a filter expression for filtering listed resources, in the |
10140 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". | 9824 * form filter={expression}. Your {expression} must be in the format: |
| 9825 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
10141 * | 9826 * |
10142 * Completes with a [Zone]. | 9827 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 9828 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 9829 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 9830 * string value to filter to. The literal value must be valid for the type of |
| 9831 * field (string, number, boolean). For string fields, the literal value is |
| 9832 * interpreted as a regular expression using RE2 syntax. The literal value |
| 9833 * must match the entire field. |
| 9834 * |
| 9835 * For example, filter=name ne example-instance. |
| 9836 * |
| 9837 * [maxResults] - Maximum count of results to be returned. |
| 9838 * Value must be between "0" and "500". |
| 9839 * |
| 9840 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 9841 * to list the next page of results. Set pageToken to the nextPageToken |
| 9842 * returned by a previous list request. |
| 9843 * |
| 9844 * Completes with a [VpnTunnelAggregatedList]. |
10143 * | 9845 * |
10144 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 9846 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
10145 * error. | 9847 * error. |
10146 * | 9848 * |
10147 * If the used [http.Client] completes with an error when making a REST call, | 9849 * If the used [http.Client] completes with an error when making a REST call, |
10148 * this method will complete with the same error. | 9850 * this method will complete with the same error. |
10149 */ | 9851 */ |
10150 async.Future<Zone> get(core.String project, core.String zone) { | 9852 async.Future<VpnTunnelAggregatedList> aggregatedList(core.String project, {cor
e.String filter, core.int maxResults, core.String pageToken}) { |
10151 var _url = null; | 9853 var _url = null; |
10152 var _queryParams = new core.Map(); | 9854 var _queryParams = new core.Map(); |
10153 var _uploadMedia = null; | 9855 var _uploadMedia = null; |
10154 var _uploadOptions = null; | 9856 var _uploadOptions = null; |
10155 var _downloadOptions = commons.DownloadOptions.Metadata; | 9857 var _downloadOptions = commons.DownloadOptions.Metadata; |
10156 var _body = null; | 9858 var _body = null; |
10157 | 9859 |
10158 if (project == null) { | 9860 if (project == null) { |
10159 throw new core.ArgumentError("Parameter project is required."); | 9861 throw new core.ArgumentError("Parameter project is required."); |
10160 } | 9862 } |
10161 if (zone == null) { | 9863 if (filter != null) { |
10162 throw new core.ArgumentError("Parameter zone is required."); | 9864 _queryParams["filter"] = [filter]; |
| 9865 } |
| 9866 if (maxResults != null) { |
| 9867 _queryParams["maxResults"] = ["${maxResults}"]; |
| 9868 } |
| 9869 if (pageToken != null) { |
| 9870 _queryParams["pageToken"] = [pageToken]; |
10163 } | 9871 } |
10164 | 9872 |
10165 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone'); | 9873 _url = commons.Escaper.ecapeVariable('$project') + '/aggregated/vpnTunnels'; |
10166 | 9874 |
10167 var _response = _requester.request(_url, | 9875 var _response = _requester.request(_url, |
10168 "GET", | 9876 "GET", |
10169 body: _body, | 9877 body: _body, |
10170 queryParams: _queryParams, | 9878 queryParams: _queryParams, |
10171 uploadOptions: _uploadOptions, | 9879 uploadOptions: _uploadOptions, |
10172 uploadMedia: _uploadMedia, | 9880 uploadMedia: _uploadMedia, |
10173 downloadOptions: _downloadOptions); | 9881 downloadOptions: _downloadOptions); |
10174 return _response.then((data) => new Zone.fromJson(data)); | 9882 return _response.then((data) => new VpnTunnelAggregatedList.fromJson(data)); |
10175 } | 9883 } |
10176 | 9884 |
10177 /** | 9885 /** |
10178 * Retrieves the list of zone resources available to the specified project. | 9886 * Deletes the specified VpnTunnel resource. |
10179 * | 9887 * |
10180 * Request parameters: | 9888 * Request parameters: |
10181 * | 9889 * |
| 9890 * [project] - Project ID for this request. |
| 9891 * Value must have pattern |
| 9892 * "(?:(?:[-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])?))". |
| 9893 * |
| 9894 * [region] - The name of the region for this request. |
| 9895 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 9896 * |
| 9897 * [vpnTunnel] - Name of the VpnTunnel resource to delete. |
| 9898 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 9899 * |
| 9900 * Completes with a [Operation]. |
| 9901 * |
| 9902 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 9903 * error. |
| 9904 * |
| 9905 * If the used [http.Client] completes with an error when making a REST call, |
| 9906 * this method will complete with the same error. |
| 9907 */ |
| 9908 async.Future<Operation> delete(core.String project, core.String region, core.S
tring vpnTunnel) { |
| 9909 var _url = null; |
| 9910 var _queryParams = new core.Map(); |
| 9911 var _uploadMedia = null; |
| 9912 var _uploadOptions = null; |
| 9913 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 9914 var _body = null; |
| 9915 |
| 9916 if (project == null) { |
| 9917 throw new core.ArgumentError("Parameter project is required."); |
| 9918 } |
| 9919 if (region == null) { |
| 9920 throw new core.ArgumentError("Parameter region is required."); |
| 9921 } |
| 9922 if (vpnTunnel == null) { |
| 9923 throw new core.ArgumentError("Parameter vpnTunnel is required."); |
| 9924 } |
| 9925 |
| 9926 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/vpnTunnels/' + commons.Escaper.ecapeVariable('
$vpnTunnel'); |
| 9927 |
| 9928 var _response = _requester.request(_url, |
| 9929 "DELETE", |
| 9930 body: _body, |
| 9931 queryParams: _queryParams, |
| 9932 uploadOptions: _uploadOptions, |
| 9933 uploadMedia: _uploadMedia, |
| 9934 downloadOptions: _downloadOptions); |
| 9935 return _response.then((data) => new Operation.fromJson(data)); |
| 9936 } |
| 9937 |
| 9938 /** |
| 9939 * Returns the specified VpnTunnel resource. |
| 9940 * |
| 9941 * Request parameters: |
| 9942 * |
| 9943 * [project] - Project ID for this request. |
| 9944 * Value must have pattern |
| 9945 * "(?:(?:[-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])?))". |
| 9946 * |
| 9947 * [region] - The name of the region for this request. |
| 9948 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 9949 * |
| 9950 * [vpnTunnel] - Name of the VpnTunnel resource to return. |
| 9951 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 9952 * |
| 9953 * Completes with a [VpnTunnel]. |
| 9954 * |
| 9955 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 9956 * error. |
| 9957 * |
| 9958 * If the used [http.Client] completes with an error when making a REST call, |
| 9959 * this method will complete with the same error. |
| 9960 */ |
| 9961 async.Future<VpnTunnel> get(core.String project, core.String region, core.Stri
ng vpnTunnel) { |
| 9962 var _url = null; |
| 9963 var _queryParams = new core.Map(); |
| 9964 var _uploadMedia = null; |
| 9965 var _uploadOptions = null; |
| 9966 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 9967 var _body = null; |
| 9968 |
| 9969 if (project == null) { |
| 9970 throw new core.ArgumentError("Parameter project is required."); |
| 9971 } |
| 9972 if (region == null) { |
| 9973 throw new core.ArgumentError("Parameter region is required."); |
| 9974 } |
| 9975 if (vpnTunnel == null) { |
| 9976 throw new core.ArgumentError("Parameter vpnTunnel is required."); |
| 9977 } |
| 9978 |
| 9979 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/vpnTunnels/' + commons.Escaper.ecapeVariable('
$vpnTunnel'); |
| 9980 |
| 9981 var _response = _requester.request(_url, |
| 9982 "GET", |
| 9983 body: _body, |
| 9984 queryParams: _queryParams, |
| 9985 uploadOptions: _uploadOptions, |
| 9986 uploadMedia: _uploadMedia, |
| 9987 downloadOptions: _downloadOptions); |
| 9988 return _response.then((data) => new VpnTunnel.fromJson(data)); |
| 9989 } |
| 9990 |
| 9991 /** |
| 9992 * Creates a VpnTunnel resource in the specified project and region using the |
| 9993 * data included in the request. |
| 9994 * |
| 9995 * [request] - The metadata request object. |
| 9996 * |
| 9997 * Request parameters: |
| 9998 * |
| 9999 * [project] - Project ID for this request. |
| 10000 * Value must have pattern |
| 10001 * "(?:(?:[-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])?))". |
| 10002 * |
| 10003 * [region] - The name of the region for this request. |
| 10004 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 10005 * |
| 10006 * Completes with a [Operation]. |
| 10007 * |
| 10008 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 10009 * error. |
| 10010 * |
| 10011 * If the used [http.Client] completes with an error when making a REST call, |
| 10012 * this method will complete with the same error. |
| 10013 */ |
| 10014 async.Future<Operation> insert(VpnTunnel request, core.String project, core.St
ring region) { |
| 10015 var _url = null; |
| 10016 var _queryParams = new core.Map(); |
| 10017 var _uploadMedia = null; |
| 10018 var _uploadOptions = null; |
| 10019 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 10020 var _body = null; |
| 10021 |
| 10022 if (request != null) { |
| 10023 _body = convert.JSON.encode((request).toJson()); |
| 10024 } |
| 10025 if (project == null) { |
| 10026 throw new core.ArgumentError("Parameter project is required."); |
| 10027 } |
| 10028 if (region == null) { |
| 10029 throw new core.ArgumentError("Parameter region is required."); |
| 10030 } |
| 10031 |
| 10032 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/vpnTunnels'; |
| 10033 |
| 10034 var _response = _requester.request(_url, |
| 10035 "POST", |
| 10036 body: _body, |
| 10037 queryParams: _queryParams, |
| 10038 uploadOptions: _uploadOptions, |
| 10039 uploadMedia: _uploadMedia, |
| 10040 downloadOptions: _downloadOptions); |
| 10041 return _response.then((data) => new Operation.fromJson(data)); |
| 10042 } |
| 10043 |
| 10044 /** |
| 10045 * Retrieves the list of VpnTunnel resources contained in the specified |
| 10046 * project and region. |
| 10047 * |
| 10048 * Request parameters: |
| 10049 * |
10182 * [project] - Project ID for this request. | 10050 * [project] - Project ID for this request. |
10183 * Value must have pattern | 10051 * Value must have pattern |
10184 * "(?:(?:[-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])?))". | 10052 * "(?:(?:[-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])?))". |
10185 * | 10053 * |
| 10054 * [region] - The name of the region for this request. |
| 10055 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 10056 * |
10186 * [filter] - Sets a filter expression for filtering listed resources, in the | 10057 * [filter] - Sets a filter expression for filtering listed resources, in the |
10187 * form filter={expression}. Your {expression} must contain the following: | 10058 * form filter={expression}. Your {expression} must be in the format: |
10188 * FIELD_NAME COMPARISON_STRING LITERAL_STRING | 10059 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
10189 * | 10060 * |
10190 * - FIELD_NAME: The name of the field you want to compare. The field name | 10061 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
10191 * must be valid for the type of resource being filtered. Only atomic field | 10062 * field types are supported (string, number, boolean). The COMPARISON_STRING |
10192 * types are supported (string, number, boolean). Array and object fields are | 10063 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
10193 * not currently supported. | 10064 * string value to filter to. The literal value must be valid for the type of |
10194 * - COMPARISON_STRING: The comparison string, either eq (equals) or ne (not | 10065 * field (string, number, boolean). For string fields, the literal value is |
10195 * equals). | 10066 * interpreted as a regular expression using RE2 syntax. The literal value |
10196 * - LITERAL_STRING: The literal string value to filter to. The literal value | 10067 * must match the entire field. |
10197 * must be valid for the type of field (string, number, boolean). For string | 10068 * |
10198 * fields, the literal value is interpreted as a regular expression using RE2 | 10069 * For example, filter=name ne example-instance. |
10199 * syntax. The literal value must match the entire field. For example, you | |
10200 * can filter by the name of a resource: | |
10201 * filter=name ne example-instance | |
10202 * The above filter returns only results whose name field does not equal | |
10203 * example-instance. You can also enclose your literal string in single, | |
10204 * double, or no quotes. | |
10205 * | 10070 * |
10206 * [maxResults] - Maximum count of results to be returned. | 10071 * [maxResults] - Maximum count of results to be returned. |
10207 * Value must be between "0" and "500". | 10072 * Value must be between "0" and "500". |
10208 * | 10073 * |
10209 * [pageToken] - Specifies a page token to use. Use this parameter if you want | 10074 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
10210 * to list the next page of results. Set pageToken to the nextPageToken | 10075 * to list the next page of results. Set pageToken to the nextPageToken |
10211 * returned by a previous list request. | 10076 * returned by a previous list request. |
10212 * | 10077 * |
10213 * Completes with a [ZoneList]. | 10078 * Completes with a [VpnTunnelList]. |
10214 * | 10079 * |
10215 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 10080 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
10216 * error. | 10081 * error. |
10217 * | 10082 * |
10218 * If the used [http.Client] completes with an error when making a REST call, | 10083 * If the used [http.Client] completes with an error when making a REST call, |
10219 * this method will complete with the same error. | 10084 * this method will complete with the same error. |
10220 */ | 10085 */ |
10221 async.Future<ZoneList> list(core.String project, {core.String filter, core.int
maxResults, core.String pageToken}) { | 10086 async.Future<VpnTunnelList> list(core.String project, core.String region, {cor
e.String filter, core.int maxResults, core.String pageToken}) { |
10222 var _url = null; | 10087 var _url = null; |
10223 var _queryParams = new core.Map(); | 10088 var _queryParams = new core.Map(); |
10224 var _uploadMedia = null; | 10089 var _uploadMedia = null; |
10225 var _uploadOptions = null; | 10090 var _uploadOptions = null; |
10226 var _downloadOptions = commons.DownloadOptions.Metadata; | 10091 var _downloadOptions = commons.DownloadOptions.Metadata; |
10227 var _body = null; | 10092 var _body = null; |
10228 | 10093 |
10229 if (project == null) { | 10094 if (project == null) { |
10230 throw new core.ArgumentError("Parameter project is required."); | 10095 throw new core.ArgumentError("Parameter project is required."); |
10231 } | 10096 } |
| 10097 if (region == null) { |
| 10098 throw new core.ArgumentError("Parameter region is required."); |
| 10099 } |
10232 if (filter != null) { | 10100 if (filter != null) { |
10233 _queryParams["filter"] = [filter]; | 10101 _queryParams["filter"] = [filter]; |
10234 } | 10102 } |
10235 if (maxResults != null) { | 10103 if (maxResults != null) { |
10236 _queryParams["maxResults"] = ["${maxResults}"]; | 10104 _queryParams["maxResults"] = ["${maxResults}"]; |
10237 } | 10105 } |
10238 if (pageToken != null) { | 10106 if (pageToken != null) { |
10239 _queryParams["pageToken"] = [pageToken]; | 10107 _queryParams["pageToken"] = [pageToken]; |
10240 } | 10108 } |
10241 | 10109 |
10242 _url = commons.Escaper.ecapeVariable('$project') + '/zones'; | 10110 _url = commons.Escaper.ecapeVariable('$project') + '/regions/' + commons.Esc
aper.ecapeVariable('$region') + '/vpnTunnels'; |
10243 | 10111 |
10244 var _response = _requester.request(_url, | 10112 var _response = _requester.request(_url, |
10245 "GET", | 10113 "GET", |
10246 body: _body, | 10114 body: _body, |
10247 queryParams: _queryParams, | 10115 queryParams: _queryParams, |
10248 uploadOptions: _uploadOptions, | 10116 uploadOptions: _uploadOptions, |
10249 uploadMedia: _uploadMedia, | 10117 uploadMedia: _uploadMedia, |
10250 downloadOptions: _downloadOptions); | 10118 downloadOptions: _downloadOptions); |
| 10119 return _response.then((data) => new VpnTunnelList.fromJson(data)); |
| 10120 } |
| 10121 |
| 10122 } |
| 10123 |
| 10124 |
| 10125 class ZoneOperationsResourceApi { |
| 10126 final commons.ApiRequester _requester; |
| 10127 |
| 10128 ZoneOperationsResourceApi(commons.ApiRequester client) : |
| 10129 _requester = client; |
| 10130 |
| 10131 /** |
| 10132 * Deletes the specified zone-specific Operations resource. |
| 10133 * |
| 10134 * Request parameters: |
| 10135 * |
| 10136 * [project] - Project ID for this request. |
| 10137 * Value must have pattern |
| 10138 * "(?:(?:[-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])?))". |
| 10139 * |
| 10140 * [zone] - Name of the zone scoping this request. |
| 10141 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 10142 * |
| 10143 * [operation] - Name of the Operations resource to delete. |
| 10144 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 10145 * |
| 10146 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 10147 * error. |
| 10148 * |
| 10149 * If the used [http.Client] completes with an error when making a REST call, |
| 10150 * this method will complete with the same error. |
| 10151 */ |
| 10152 async.Future delete(core.String project, core.String zone, core.String operati
on) { |
| 10153 var _url = null; |
| 10154 var _queryParams = new core.Map(); |
| 10155 var _uploadMedia = null; |
| 10156 var _uploadOptions = null; |
| 10157 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 10158 var _body = null; |
| 10159 |
| 10160 if (project == null) { |
| 10161 throw new core.ArgumentError("Parameter project is required."); |
| 10162 } |
| 10163 if (zone == null) { |
| 10164 throw new core.ArgumentError("Parameter zone is required."); |
| 10165 } |
| 10166 if (operation == null) { |
| 10167 throw new core.ArgumentError("Parameter operation is required."); |
| 10168 } |
| 10169 |
| 10170 _downloadOptions = null; |
| 10171 |
| 10172 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/operations/' + commons.Escaper.ecapeVariable('$ope
ration'); |
| 10173 |
| 10174 var _response = _requester.request(_url, |
| 10175 "DELETE", |
| 10176 body: _body, |
| 10177 queryParams: _queryParams, |
| 10178 uploadOptions: _uploadOptions, |
| 10179 uploadMedia: _uploadMedia, |
| 10180 downloadOptions: _downloadOptions); |
| 10181 return _response.then((data) => null); |
| 10182 } |
| 10183 |
| 10184 /** |
| 10185 * Retrieves the specified zone-specific Operations resource. |
| 10186 * |
| 10187 * Request parameters: |
| 10188 * |
| 10189 * [project] - Project ID for this request. |
| 10190 * Value must have pattern |
| 10191 * "(?:(?:[-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])?))". |
| 10192 * |
| 10193 * [zone] - Name of the zone scoping this request. |
| 10194 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 10195 * |
| 10196 * [operation] - Name of the Operations resource to return. |
| 10197 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 10198 * |
| 10199 * Completes with a [Operation]. |
| 10200 * |
| 10201 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 10202 * error. |
| 10203 * |
| 10204 * If the used [http.Client] completes with an error when making a REST call, |
| 10205 * this method will complete with the same error. |
| 10206 */ |
| 10207 async.Future<Operation> get(core.String project, core.String zone, core.String
operation) { |
| 10208 var _url = null; |
| 10209 var _queryParams = new core.Map(); |
| 10210 var _uploadMedia = null; |
| 10211 var _uploadOptions = null; |
| 10212 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 10213 var _body = null; |
| 10214 |
| 10215 if (project == null) { |
| 10216 throw new core.ArgumentError("Parameter project is required."); |
| 10217 } |
| 10218 if (zone == null) { |
| 10219 throw new core.ArgumentError("Parameter zone is required."); |
| 10220 } |
| 10221 if (operation == null) { |
| 10222 throw new core.ArgumentError("Parameter operation is required."); |
| 10223 } |
| 10224 |
| 10225 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/operations/' + commons.Escaper.ecapeVariable('$ope
ration'); |
| 10226 |
| 10227 var _response = _requester.request(_url, |
| 10228 "GET", |
| 10229 body: _body, |
| 10230 queryParams: _queryParams, |
| 10231 uploadOptions: _uploadOptions, |
| 10232 uploadMedia: _uploadMedia, |
| 10233 downloadOptions: _downloadOptions); |
| 10234 return _response.then((data) => new Operation.fromJson(data)); |
| 10235 } |
| 10236 |
| 10237 /** |
| 10238 * Retrieves the list of Operation resources contained within the specified |
| 10239 * zone. |
| 10240 * |
| 10241 * Request parameters: |
| 10242 * |
| 10243 * [project] - Project ID for this request. |
| 10244 * Value must have pattern |
| 10245 * "(?:(?:[-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])?))". |
| 10246 * |
| 10247 * [zone] - Name of the zone scoping this request. |
| 10248 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 10249 * |
| 10250 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 10251 * form filter={expression}. Your {expression} must be in the format: |
| 10252 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
| 10253 * |
| 10254 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 10255 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 10256 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 10257 * string value to filter to. The literal value must be valid for the type of |
| 10258 * field (string, number, boolean). For string fields, the literal value is |
| 10259 * interpreted as a regular expression using RE2 syntax. The literal value |
| 10260 * must match the entire field. |
| 10261 * |
| 10262 * For example, filter=name ne example-instance. |
| 10263 * |
| 10264 * [maxResults] - Maximum count of results to be returned. |
| 10265 * Value must be between "0" and "500". |
| 10266 * |
| 10267 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 10268 * to list the next page of results. Set pageToken to the nextPageToken |
| 10269 * returned by a previous list request. |
| 10270 * |
| 10271 * Completes with a [OperationList]. |
| 10272 * |
| 10273 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 10274 * error. |
| 10275 * |
| 10276 * If the used [http.Client] completes with an error when making a REST call, |
| 10277 * this method will complete with the same error. |
| 10278 */ |
| 10279 async.Future<OperationList> list(core.String project, core.String zone, {core.
String filter, core.int maxResults, core.String pageToken}) { |
| 10280 var _url = null; |
| 10281 var _queryParams = new core.Map(); |
| 10282 var _uploadMedia = null; |
| 10283 var _uploadOptions = null; |
| 10284 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 10285 var _body = null; |
| 10286 |
| 10287 if (project == null) { |
| 10288 throw new core.ArgumentError("Parameter project is required."); |
| 10289 } |
| 10290 if (zone == null) { |
| 10291 throw new core.ArgumentError("Parameter zone is required."); |
| 10292 } |
| 10293 if (filter != null) { |
| 10294 _queryParams["filter"] = [filter]; |
| 10295 } |
| 10296 if (maxResults != null) { |
| 10297 _queryParams["maxResults"] = ["${maxResults}"]; |
| 10298 } |
| 10299 if (pageToken != null) { |
| 10300 _queryParams["pageToken"] = [pageToken]; |
| 10301 } |
| 10302 |
| 10303 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone') + '/operations'; |
| 10304 |
| 10305 var _response = _requester.request(_url, |
| 10306 "GET", |
| 10307 body: _body, |
| 10308 queryParams: _queryParams, |
| 10309 uploadOptions: _uploadOptions, |
| 10310 uploadMedia: _uploadMedia, |
| 10311 downloadOptions: _downloadOptions); |
| 10312 return _response.then((data) => new OperationList.fromJson(data)); |
| 10313 } |
| 10314 |
| 10315 } |
| 10316 |
| 10317 |
| 10318 class ZonesResourceApi { |
| 10319 final commons.ApiRequester _requester; |
| 10320 |
| 10321 ZonesResourceApi(commons.ApiRequester client) : |
| 10322 _requester = client; |
| 10323 |
| 10324 /** |
| 10325 * Returns the specified zone resource. |
| 10326 * |
| 10327 * Request parameters: |
| 10328 * |
| 10329 * [project] - Project ID for this request. |
| 10330 * Value must have pattern |
| 10331 * "(?:(?:[-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])?))". |
| 10332 * |
| 10333 * [zone] - Name of the zone resource to return. |
| 10334 * Value must have pattern "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?". |
| 10335 * |
| 10336 * Completes with a [Zone]. |
| 10337 * |
| 10338 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 10339 * error. |
| 10340 * |
| 10341 * If the used [http.Client] completes with an error when making a REST call, |
| 10342 * this method will complete with the same error. |
| 10343 */ |
| 10344 async.Future<Zone> get(core.String project, core.String zone) { |
| 10345 var _url = null; |
| 10346 var _queryParams = new core.Map(); |
| 10347 var _uploadMedia = null; |
| 10348 var _uploadOptions = null; |
| 10349 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 10350 var _body = null; |
| 10351 |
| 10352 if (project == null) { |
| 10353 throw new core.ArgumentError("Parameter project is required."); |
| 10354 } |
| 10355 if (zone == null) { |
| 10356 throw new core.ArgumentError("Parameter zone is required."); |
| 10357 } |
| 10358 |
| 10359 _url = commons.Escaper.ecapeVariable('$project') + '/zones/' + commons.Escap
er.ecapeVariable('$zone'); |
| 10360 |
| 10361 var _response = _requester.request(_url, |
| 10362 "GET", |
| 10363 body: _body, |
| 10364 queryParams: _queryParams, |
| 10365 uploadOptions: _uploadOptions, |
| 10366 uploadMedia: _uploadMedia, |
| 10367 downloadOptions: _downloadOptions); |
| 10368 return _response.then((data) => new Zone.fromJson(data)); |
| 10369 } |
| 10370 |
| 10371 /** |
| 10372 * Retrieves the list of zone resources available to the specified project. |
| 10373 * |
| 10374 * Request parameters: |
| 10375 * |
| 10376 * [project] - Project ID for this request. |
| 10377 * Value must have pattern |
| 10378 * "(?:(?:[-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])?))". |
| 10379 * |
| 10380 * [filter] - Sets a filter expression for filtering listed resources, in the |
| 10381 * form filter={expression}. Your {expression} must be in the format: |
| 10382 * FIELD_NAME COMPARISON_STRING LITERAL_STRING. |
| 10383 * |
| 10384 * The FIELD_NAME is the name of the field you want to compare. Only atomic |
| 10385 * field types are supported (string, number, boolean). The COMPARISON_STRING |
| 10386 * must be either eq (equals) or ne (not equals). The LITERAL_STRING is the |
| 10387 * string value to filter to. The literal value must be valid for the type of |
| 10388 * field (string, number, boolean). For string fields, the literal value is |
| 10389 * interpreted as a regular expression using RE2 syntax. The literal value |
| 10390 * must match the entire field. |
| 10391 * |
| 10392 * For example, filter=name ne example-instance. |
| 10393 * |
| 10394 * [maxResults] - Maximum count of results to be returned. |
| 10395 * Value must be between "0" and "500". |
| 10396 * |
| 10397 * [pageToken] - Specifies a page token to use. Use this parameter if you want |
| 10398 * to list the next page of results. Set pageToken to the nextPageToken |
| 10399 * returned by a previous list request. |
| 10400 * |
| 10401 * Completes with a [ZoneList]. |
| 10402 * |
| 10403 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 10404 * error. |
| 10405 * |
| 10406 * If the used [http.Client] completes with an error when making a REST call, |
| 10407 * this method will complete with the same error. |
| 10408 */ |
| 10409 async.Future<ZoneList> list(core.String project, {core.String filter, core.int
maxResults, core.String pageToken}) { |
| 10410 var _url = null; |
| 10411 var _queryParams = new core.Map(); |
| 10412 var _uploadMedia = null; |
| 10413 var _uploadOptions = null; |
| 10414 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 10415 var _body = null; |
| 10416 |
| 10417 if (project == null) { |
| 10418 throw new core.ArgumentError("Parameter project is required."); |
| 10419 } |
| 10420 if (filter != null) { |
| 10421 _queryParams["filter"] = [filter]; |
| 10422 } |
| 10423 if (maxResults != null) { |
| 10424 _queryParams["maxResults"] = ["${maxResults}"]; |
| 10425 } |
| 10426 if (pageToken != null) { |
| 10427 _queryParams["pageToken"] = [pageToken]; |
| 10428 } |
| 10429 |
| 10430 _url = commons.Escaper.ecapeVariable('$project') + '/zones'; |
| 10431 |
| 10432 var _response = _requester.request(_url, |
| 10433 "GET", |
| 10434 body: _body, |
| 10435 queryParams: _queryParams, |
| 10436 uploadOptions: _uploadOptions, |
| 10437 uploadMedia: _uploadMedia, |
| 10438 downloadOptions: _downloadOptions); |
10251 return _response.then((data) => new ZoneList.fromJson(data)); | 10439 return _response.then((data) => new ZoneList.fromJson(data)); |
10252 } | 10440 } |
10253 | 10441 |
10254 } | 10442 } |
10255 | 10443 |
10256 | 10444 |
10257 | 10445 |
10258 /** An access configuration attached to an instance's network interface. */ | 10446 /** An access configuration attached to an instance's network interface. */ |
10259 class AccessConfig { | 10447 class AccessConfig { |
10260 /** | 10448 /** |
(...skipping 25 matching lines...) Expand all Loading... |
10286 kind = _json["kind"]; | 10474 kind = _json["kind"]; |
10287 } | 10475 } |
10288 if (_json.containsKey("name")) { | 10476 if (_json.containsKey("name")) { |
10289 name = _json["name"]; | 10477 name = _json["name"]; |
10290 } | 10478 } |
10291 if (_json.containsKey("natIP")) { | 10479 if (_json.containsKey("natIP")) { |
10292 natIP = _json["natIP"]; | 10480 natIP = _json["natIP"]; |
10293 } | 10481 } |
10294 if (_json.containsKey("type")) { | 10482 if (_json.containsKey("type")) { |
10295 type = _json["type"]; | 10483 type = _json["type"]; |
| 10484 } |
| 10485 } |
| 10486 |
| 10487 core.Map toJson() { |
| 10488 var _json = new core.Map(); |
| 10489 if (kind != null) { |
| 10490 _json["kind"] = kind; |
| 10491 } |
| 10492 if (name != null) { |
| 10493 _json["name"] = name; |
| 10494 } |
| 10495 if (natIP != null) { |
| 10496 _json["natIP"] = natIP; |
| 10497 } |
| 10498 if (type != null) { |
| 10499 _json["type"] = type; |
| 10500 } |
| 10501 return _json; |
| 10502 } |
| 10503 } |
| 10504 |
| 10505 /** A reserved address resource. */ |
| 10506 class Address { |
| 10507 /** The static external IP address represented by this resource. */ |
| 10508 core.String address; |
| 10509 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
| 10510 core.String creationTimestamp; |
| 10511 /** |
| 10512 * An optional textual description of the resource; provided by the client |
| 10513 * when the resource is created. |
| 10514 */ |
| 10515 core.String description; |
| 10516 /** |
| 10517 * [Output Only] Unique identifier for the resource; defined by the server. |
| 10518 */ |
| 10519 core.String id; |
| 10520 /** |
| 10521 * [Output Only] Type of the resource. Always compute#address for addresses. |
| 10522 */ |
| 10523 core.String kind; |
| 10524 /** |
| 10525 * Name of the resource; provided by the client when the resource is created. |
| 10526 * The name must be 1-63 characters long, and comply with RFC1035. |
| 10527 * Specifically, the name must be 1-63 characters long and match the regular |
| 10528 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must |
| 10529 * be a lowercase letter, and all following characters must be a dash, |
| 10530 * lowercase letter, or digit, except the last character, which cannot be a |
| 10531 * dash. |
| 10532 */ |
| 10533 core.String name; |
| 10534 /** |
| 10535 * [Output Only] URL of the region where the regional address resides. This |
| 10536 * field is not applicable to global addresses. |
| 10537 */ |
| 10538 core.String region; |
| 10539 /** [Output Only] Server defined URL for the resource. */ |
| 10540 core.String selfLink; |
| 10541 /** |
| 10542 * [Output Only] The status of the address, which can be either IN_USE or |
| 10543 * RESERVED. An address that is RESERVED is currently reserved and available |
| 10544 * to use. An IN_USE address is currently being used by another resource and |
| 10545 * is not available. |
| 10546 * Possible string values are: |
| 10547 * - "IN_USE" |
| 10548 * - "RESERVED" |
| 10549 */ |
| 10550 core.String status; |
| 10551 /** [Output Only] The URLs of the resources that are using this address. */ |
| 10552 core.List<core.String> users; |
| 10553 |
| 10554 Address(); |
| 10555 |
| 10556 Address.fromJson(core.Map _json) { |
| 10557 if (_json.containsKey("address")) { |
| 10558 address = _json["address"]; |
| 10559 } |
| 10560 if (_json.containsKey("creationTimestamp")) { |
| 10561 creationTimestamp = _json["creationTimestamp"]; |
| 10562 } |
| 10563 if (_json.containsKey("description")) { |
| 10564 description = _json["description"]; |
| 10565 } |
| 10566 if (_json.containsKey("id")) { |
| 10567 id = _json["id"]; |
| 10568 } |
| 10569 if (_json.containsKey("kind")) { |
| 10570 kind = _json["kind"]; |
| 10571 } |
| 10572 if (_json.containsKey("name")) { |
| 10573 name = _json["name"]; |
| 10574 } |
| 10575 if (_json.containsKey("region")) { |
| 10576 region = _json["region"]; |
| 10577 } |
| 10578 if (_json.containsKey("selfLink")) { |
| 10579 selfLink = _json["selfLink"]; |
| 10580 } |
| 10581 if (_json.containsKey("status")) { |
| 10582 status = _json["status"]; |
| 10583 } |
| 10584 if (_json.containsKey("users")) { |
| 10585 users = _json["users"]; |
| 10586 } |
| 10587 } |
| 10588 |
| 10589 core.Map toJson() { |
| 10590 var _json = new core.Map(); |
| 10591 if (address != null) { |
| 10592 _json["address"] = address; |
| 10593 } |
| 10594 if (creationTimestamp != null) { |
| 10595 _json["creationTimestamp"] = creationTimestamp; |
| 10596 } |
| 10597 if (description != null) { |
| 10598 _json["description"] = description; |
| 10599 } |
| 10600 if (id != null) { |
| 10601 _json["id"] = id; |
| 10602 } |
| 10603 if (kind != null) { |
| 10604 _json["kind"] = kind; |
| 10605 } |
| 10606 if (name != null) { |
| 10607 _json["name"] = name; |
| 10608 } |
| 10609 if (region != null) { |
| 10610 _json["region"] = region; |
| 10611 } |
| 10612 if (selfLink != null) { |
| 10613 _json["selfLink"] = selfLink; |
| 10614 } |
| 10615 if (status != null) { |
| 10616 _json["status"] = status; |
| 10617 } |
| 10618 if (users != null) { |
| 10619 _json["users"] = users; |
| 10620 } |
| 10621 return _json; |
| 10622 } |
| 10623 } |
| 10624 |
| 10625 class AddressAggregatedList { |
| 10626 /** |
| 10627 * [Output Only] Unique identifier for the resource; defined by the server. |
| 10628 */ |
| 10629 core.String id; |
| 10630 /** [Output Only] A map of scoped address lists. */ |
| 10631 core.Map<core.String, AddressesScopedList> items; |
| 10632 /** |
| 10633 * [Output Only] Type of resource. Always compute#addressAggregatedList for |
| 10634 * aggregated lists of addresses. |
| 10635 */ |
| 10636 core.String kind; |
| 10637 /** [Output Only] A token used to continue a truncated list request. */ |
| 10638 core.String nextPageToken; |
| 10639 /** [Output Only] Server defined URL for this resource. */ |
| 10640 core.String selfLink; |
| 10641 |
| 10642 AddressAggregatedList(); |
| 10643 |
| 10644 AddressAggregatedList.fromJson(core.Map _json) { |
| 10645 if (_json.containsKey("id")) { |
| 10646 id = _json["id"]; |
| 10647 } |
| 10648 if (_json.containsKey("items")) { |
| 10649 items = commons.mapMap(_json["items"], (item) => new AddressesScopedList.f
romJson(item)); |
| 10650 } |
| 10651 if (_json.containsKey("kind")) { |
| 10652 kind = _json["kind"]; |
| 10653 } |
| 10654 if (_json.containsKey("nextPageToken")) { |
| 10655 nextPageToken = _json["nextPageToken"]; |
| 10656 } |
| 10657 if (_json.containsKey("selfLink")) { |
| 10658 selfLink = _json["selfLink"]; |
| 10659 } |
| 10660 } |
| 10661 |
| 10662 core.Map toJson() { |
| 10663 var _json = new core.Map(); |
| 10664 if (id != null) { |
| 10665 _json["id"] = id; |
| 10666 } |
| 10667 if (items != null) { |
| 10668 _json["items"] = commons.mapMap(items, (item) => (item).toJson()); |
| 10669 } |
| 10670 if (kind != null) { |
| 10671 _json["kind"] = kind; |
| 10672 } |
| 10673 if (nextPageToken != null) { |
| 10674 _json["nextPageToken"] = nextPageToken; |
| 10675 } |
| 10676 if (selfLink != null) { |
| 10677 _json["selfLink"] = selfLink; |
| 10678 } |
| 10679 return _json; |
| 10680 } |
| 10681 } |
| 10682 |
| 10683 /** Contains a list of address resources. */ |
| 10684 class AddressList { |
| 10685 /** |
| 10686 * [Output Only] Unique identifier for the resource; defined by the server. |
| 10687 */ |
| 10688 core.String id; |
| 10689 /** [Output Only] A list of Address resources. */ |
| 10690 core.List<Address> items; |
| 10691 /** |
| 10692 * [Output Only] Type of resource. Always compute#addressList for lists of |
| 10693 * addresses. |
| 10694 */ |
| 10695 core.String kind; |
| 10696 /** [Output Only] A token used to continue a truncated list request. */ |
| 10697 core.String nextPageToken; |
| 10698 /** [Output Only] Server defined URL for the resource. */ |
| 10699 core.String selfLink; |
| 10700 |
| 10701 AddressList(); |
| 10702 |
| 10703 AddressList.fromJson(core.Map _json) { |
| 10704 if (_json.containsKey("id")) { |
| 10705 id = _json["id"]; |
| 10706 } |
| 10707 if (_json.containsKey("items")) { |
| 10708 items = _json["items"].map((value) => new Address.fromJson(value)).toList(
); |
| 10709 } |
| 10710 if (_json.containsKey("kind")) { |
| 10711 kind = _json["kind"]; |
| 10712 } |
| 10713 if (_json.containsKey("nextPageToken")) { |
| 10714 nextPageToken = _json["nextPageToken"]; |
| 10715 } |
| 10716 if (_json.containsKey("selfLink")) { |
| 10717 selfLink = _json["selfLink"]; |
| 10718 } |
| 10719 } |
| 10720 |
| 10721 core.Map toJson() { |
| 10722 var _json = new core.Map(); |
| 10723 if (id != null) { |
| 10724 _json["id"] = id; |
| 10725 } |
| 10726 if (items != null) { |
| 10727 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 10728 } |
| 10729 if (kind != null) { |
| 10730 _json["kind"] = kind; |
| 10731 } |
| 10732 if (nextPageToken != null) { |
| 10733 _json["nextPageToken"] = nextPageToken; |
| 10734 } |
| 10735 if (selfLink != null) { |
| 10736 _json["selfLink"] = selfLink; |
| 10737 } |
| 10738 return _json; |
| 10739 } |
| 10740 } |
| 10741 |
| 10742 class AddressesScopedListWarningData { |
| 10743 /** [Output Only] A key for the warning data. */ |
| 10744 core.String key; |
| 10745 /** [Output Only] A warning data value corresponding to the key. */ |
| 10746 core.String value; |
| 10747 |
| 10748 AddressesScopedListWarningData(); |
| 10749 |
| 10750 AddressesScopedListWarningData.fromJson(core.Map _json) { |
| 10751 if (_json.containsKey("key")) { |
| 10752 key = _json["key"]; |
| 10753 } |
| 10754 if (_json.containsKey("value")) { |
| 10755 value = _json["value"]; |
| 10756 } |
| 10757 } |
| 10758 |
| 10759 core.Map toJson() { |
| 10760 var _json = new core.Map(); |
| 10761 if (key != null) { |
| 10762 _json["key"] = key; |
| 10763 } |
| 10764 if (value != null) { |
| 10765 _json["value"] = value; |
| 10766 } |
| 10767 return _json; |
| 10768 } |
| 10769 } |
| 10770 |
| 10771 /** |
| 10772 * [Output Only] Informational warning which replaces the list of addresses when |
| 10773 * the list is empty. |
| 10774 */ |
| 10775 class AddressesScopedListWarning { |
| 10776 /** |
| 10777 * [Output Only] The warning type identifier for this warning. |
| 10778 * Possible string values are: |
| 10779 * - "DEPRECATED_RESOURCE_USED" |
| 10780 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
| 10781 * - "INJECTED_KERNELS_DEPRECATED" |
| 10782 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
| 10783 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
| 10784 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
| 10785 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
| 10786 * - "NEXT_HOP_NOT_RUNNING" |
| 10787 * - "NOT_CRITICAL_ERROR" |
| 10788 * - "NO_RESULTS_ON_PAGE" |
| 10789 * - "REQUIRED_TOS_AGREEMENT" |
| 10790 * - "RESOURCE_NOT_DELETED" |
| 10791 * - "SINGLE_INSTANCE_PROPERTY_TEMPLATE" |
| 10792 * - "UNREACHABLE" |
| 10793 */ |
| 10794 core.String code; |
| 10795 /** [Output Only] Metadata for this warning in key: value format. */ |
| 10796 core.List<AddressesScopedListWarningData> data; |
| 10797 /** [Output Only] Optional human-readable details for this warning. */ |
| 10798 core.String message; |
| 10799 |
| 10800 AddressesScopedListWarning(); |
| 10801 |
| 10802 AddressesScopedListWarning.fromJson(core.Map _json) { |
| 10803 if (_json.containsKey("code")) { |
| 10804 code = _json["code"]; |
| 10805 } |
| 10806 if (_json.containsKey("data")) { |
| 10807 data = _json["data"].map((value) => new AddressesScopedListWarningData.fro
mJson(value)).toList(); |
| 10808 } |
| 10809 if (_json.containsKey("message")) { |
| 10810 message = _json["message"]; |
| 10811 } |
| 10812 } |
| 10813 |
| 10814 core.Map toJson() { |
| 10815 var _json = new core.Map(); |
| 10816 if (code != null) { |
| 10817 _json["code"] = code; |
| 10818 } |
| 10819 if (data != null) { |
| 10820 _json["data"] = data.map((value) => (value).toJson()).toList(); |
| 10821 } |
| 10822 if (message != null) { |
| 10823 _json["message"] = message; |
| 10824 } |
| 10825 return _json; |
| 10826 } |
| 10827 } |
| 10828 |
| 10829 class AddressesScopedList { |
| 10830 /** [Output Only] List of addresses contained in this scope. */ |
| 10831 core.List<Address> addresses; |
| 10832 /** |
| 10833 * [Output Only] Informational warning which replaces the list of addresses |
| 10834 * when the list is empty. |
| 10835 */ |
| 10836 AddressesScopedListWarning warning; |
| 10837 |
| 10838 AddressesScopedList(); |
| 10839 |
| 10840 AddressesScopedList.fromJson(core.Map _json) { |
| 10841 if (_json.containsKey("addresses")) { |
| 10842 addresses = _json["addresses"].map((value) => new Address.fromJson(value))
.toList(); |
| 10843 } |
| 10844 if (_json.containsKey("warning")) { |
| 10845 warning = new AddressesScopedListWarning.fromJson(_json["warning"]); |
| 10846 } |
| 10847 } |
| 10848 |
| 10849 core.Map toJson() { |
| 10850 var _json = new core.Map(); |
| 10851 if (addresses != null) { |
| 10852 _json["addresses"] = addresses.map((value) => (value).toJson()).toList(); |
| 10853 } |
| 10854 if (warning != null) { |
| 10855 _json["warning"] = (warning).toJson(); |
| 10856 } |
| 10857 return _json; |
| 10858 } |
| 10859 } |
| 10860 |
| 10861 /** An instance-attached disk resource. */ |
| 10862 class AttachedDisk { |
| 10863 /** |
| 10864 * Specifies whether the disk will be auto-deleted when the instance is |
| 10865 * deleted (but not when the disk is detached from the instance). |
| 10866 */ |
| 10867 core.bool autoDelete; |
| 10868 /** |
| 10869 * Indicates that this is a boot disk. The virtual machine will use the first |
| 10870 * partition of the disk for its root filesystem. |
| 10871 */ |
| 10872 core.bool boot; |
| 10873 /** |
| 10874 * Specifies a unique device name of your choice that is reflected into the |
| 10875 * /dev/ tree of a Linux operating system running within the instance. This |
| 10876 * name can be used to reference the device for mounting, resizing, and so on, |
| 10877 * from within the instance. |
| 10878 * |
| 10879 * If not specified, the server chooses a default device name to apply to this |
| 10880 * disk, in the form persistent-disks-x, where x is a number assigned by |
| 10881 * Google Compute Engine. This field is only applicable for persistent disks. |
| 10882 */ |
| 10883 core.String deviceName; |
| 10884 /** |
| 10885 * Assigns a zero-based index to this disk, where 0 is reserved for the boot |
| 10886 * disk. For example, if you have many disks attached to an instance, each |
| 10887 * disk would have a unique index number. If not specified, the server will |
| 10888 * choose an appropriate value. |
| 10889 */ |
| 10890 core.int index; |
| 10891 /** |
| 10892 * [Input Only] Specifies the parameters for a new disk that will be created |
| 10893 * alongside the new instance. Use initialization parameters to create boot |
| 10894 * disks or local SSDs attached to the new instance. |
| 10895 * |
| 10896 * This property is mutually exclusive with the source property; you can only |
| 10897 * define one or the other, but not both. |
| 10898 */ |
| 10899 AttachedDiskInitializeParams initializeParams; |
| 10900 /** |
| 10901 * |
| 10902 * Possible string values are: |
| 10903 * - "NVME" |
| 10904 * - "SCSI" |
| 10905 */ |
| 10906 core.String interface; |
| 10907 /** |
| 10908 * [Output Only] Type of the resource. Always compute#attachedDisk for |
| 10909 * attached disks. |
| 10910 */ |
| 10911 core.String kind; |
| 10912 /** [Output Only] Any valid publicly visible licenses. */ |
| 10913 core.List<core.String> licenses; |
| 10914 /** |
| 10915 * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If |
| 10916 * not specified, the default is to attach the disk in READ_WRITE mode. |
| 10917 * Possible string values are: |
| 10918 * - "READ_ONLY" |
| 10919 * - "READ_WRITE" |
| 10920 */ |
| 10921 core.String mode; |
| 10922 /** |
| 10923 * Specifies a valid partial or full URL to an existing Persistent Disk |
| 10924 * resource. This field is only applicable for persistent disks. |
| 10925 */ |
| 10926 core.String source; |
| 10927 /** |
| 10928 * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not |
| 10929 * specified, the default is PERSISTENT. |
| 10930 * Possible string values are: |
| 10931 * - "PERSISTENT" |
| 10932 * - "SCRATCH" |
| 10933 */ |
| 10934 core.String type; |
| 10935 |
| 10936 AttachedDisk(); |
| 10937 |
| 10938 AttachedDisk.fromJson(core.Map _json) { |
| 10939 if (_json.containsKey("autoDelete")) { |
| 10940 autoDelete = _json["autoDelete"]; |
| 10941 } |
| 10942 if (_json.containsKey("boot")) { |
| 10943 boot = _json["boot"]; |
| 10944 } |
| 10945 if (_json.containsKey("deviceName")) { |
| 10946 deviceName = _json["deviceName"]; |
| 10947 } |
| 10948 if (_json.containsKey("index")) { |
| 10949 index = _json["index"]; |
| 10950 } |
| 10951 if (_json.containsKey("initializeParams")) { |
| 10952 initializeParams = new AttachedDiskInitializeParams.fromJson(_json["initia
lizeParams"]); |
| 10953 } |
| 10954 if (_json.containsKey("interface")) { |
| 10955 interface = _json["interface"]; |
| 10956 } |
| 10957 if (_json.containsKey("kind")) { |
| 10958 kind = _json["kind"]; |
| 10959 } |
| 10960 if (_json.containsKey("licenses")) { |
| 10961 licenses = _json["licenses"]; |
| 10962 } |
| 10963 if (_json.containsKey("mode")) { |
| 10964 mode = _json["mode"]; |
| 10965 } |
| 10966 if (_json.containsKey("source")) { |
| 10967 source = _json["source"]; |
| 10968 } |
| 10969 if (_json.containsKey("type")) { |
| 10970 type = _json["type"]; |
10296 } | 10971 } |
10297 } | 10972 } |
10298 | 10973 |
10299 core.Map toJson() { | 10974 core.Map toJson() { |
10300 var _json = new core.Map(); | 10975 var _json = new core.Map(); |
| 10976 if (autoDelete != null) { |
| 10977 _json["autoDelete"] = autoDelete; |
| 10978 } |
| 10979 if (boot != null) { |
| 10980 _json["boot"] = boot; |
| 10981 } |
| 10982 if (deviceName != null) { |
| 10983 _json["deviceName"] = deviceName; |
| 10984 } |
| 10985 if (index != null) { |
| 10986 _json["index"] = index; |
| 10987 } |
| 10988 if (initializeParams != null) { |
| 10989 _json["initializeParams"] = (initializeParams).toJson(); |
| 10990 } |
| 10991 if (interface != null) { |
| 10992 _json["interface"] = interface; |
| 10993 } |
10301 if (kind != null) { | 10994 if (kind != null) { |
10302 _json["kind"] = kind; | 10995 _json["kind"] = kind; |
10303 } | 10996 } |
10304 if (name != null) { | 10997 if (licenses != null) { |
10305 _json["name"] = name; | 10998 _json["licenses"] = licenses; |
10306 } | 10999 } |
10307 if (natIP != null) { | 11000 if (mode != null) { |
10308 _json["natIP"] = natIP; | 11001 _json["mode"] = mode; |
| 11002 } |
| 11003 if (source != null) { |
| 11004 _json["source"] = source; |
10309 } | 11005 } |
10310 if (type != null) { | 11006 if (type != null) { |
10311 _json["type"] = type; | 11007 _json["type"] = type; |
10312 } | 11008 } |
10313 return _json; | 11009 return _json; |
10314 } | 11010 } |
10315 } | 11011 } |
10316 | 11012 |
10317 /** A reserved address resource. */ | 11013 /** |
10318 class Address { | 11014 * [Input Only] Specifies the parameters for a new disk that will be created |
10319 /** The static external IP address represented by this resource. */ | 11015 * alongside the new instance. Use initialization parameters to create boot |
10320 core.String address; | 11016 * disks or local SSDs attached to the new instance. |
10321 /** [Output Only] Creation timestamp in RFC3339 text format. */ | 11017 * |
| 11018 * This property is mutually exclusive with the source property; you can only |
| 11019 * define one or the other, but not both. |
| 11020 */ |
| 11021 class AttachedDiskInitializeParams { |
| 11022 /** |
| 11023 * Specifies the disk name. If not specified, the default is to use the name |
| 11024 * of the instance. |
| 11025 */ |
| 11026 core.String diskName; |
| 11027 /** Specifies the size of the disk in base-2 GB. */ |
| 11028 core.String diskSizeGb; |
| 11029 /** |
| 11030 * Specifies the disk type to use to create the instance. If not specified, |
| 11031 * the default is pd-standard, specified using the full URL. For example: |
| 11032 * |
| 11033 * https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes
/pd-standard |
| 11034 * |
| 11035 * Other values include pd-ssd and local-ssd. If you define this field, you |
| 11036 * can provide either the full or partial URL. For example, the following are |
| 11037 * valid values: |
| 11038 * - |
| 11039 * https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes
/diskType |
| 11040 * - projects/project/zones/zone/diskTypes/diskType |
| 11041 * - zones/zone/diskTypes/diskType |
| 11042 */ |
| 11043 core.String diskType; |
| 11044 /** |
| 11045 * A source image used to create the disk. You can provide a private (custom) |
| 11046 * image, and Compute Engine will use the corresponding image from your |
| 11047 * project. For example: |
| 11048 * |
| 11049 * global/images/my-private-image |
| 11050 * |
| 11051 * Or you can provide an image from a publicly-available project. For example, |
| 11052 * to use a Debian image from the debian-cloud project, make sure to include |
| 11053 * the project in the URL: |
| 11054 * |
| 11055 * projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD |
| 11056 * |
| 11057 * where vYYYYMMDD is the image version. The fully-qualified URL will also |
| 11058 * work in both cases. |
| 11059 */ |
| 11060 core.String sourceImage; |
| 11061 |
| 11062 AttachedDiskInitializeParams(); |
| 11063 |
| 11064 AttachedDiskInitializeParams.fromJson(core.Map _json) { |
| 11065 if (_json.containsKey("diskName")) { |
| 11066 diskName = _json["diskName"]; |
| 11067 } |
| 11068 if (_json.containsKey("diskSizeGb")) { |
| 11069 diskSizeGb = _json["diskSizeGb"]; |
| 11070 } |
| 11071 if (_json.containsKey("diskType")) { |
| 11072 diskType = _json["diskType"]; |
| 11073 } |
| 11074 if (_json.containsKey("sourceImage")) { |
| 11075 sourceImage = _json["sourceImage"]; |
| 11076 } |
| 11077 } |
| 11078 |
| 11079 core.Map toJson() { |
| 11080 var _json = new core.Map(); |
| 11081 if (diskName != null) { |
| 11082 _json["diskName"] = diskName; |
| 11083 } |
| 11084 if (diskSizeGb != null) { |
| 11085 _json["diskSizeGb"] = diskSizeGb; |
| 11086 } |
| 11087 if (diskType != null) { |
| 11088 _json["diskType"] = diskType; |
| 11089 } |
| 11090 if (sourceImage != null) { |
| 11091 _json["sourceImage"] = sourceImage; |
| 11092 } |
| 11093 return _json; |
| 11094 } |
| 11095 } |
| 11096 |
| 11097 class Autoscaler { |
| 11098 /** Autoscaling configuration. */ |
| 11099 AutoscalingPolicy autoscalingPolicy; |
| 11100 /** Creation timestamp in RFC3339 text format (output only). */ |
10322 core.String creationTimestamp; | 11101 core.String creationTimestamp; |
10323 /** | 11102 /** |
10324 * An optional textual description of the resource; provided by the client | 11103 * An optional textual description of the resource; provided by the client |
10325 * when the resource is created. | 11104 * when the resource is created. |
10326 */ | 11105 */ |
10327 core.String description; | 11106 core.String description; |
10328 /** | 11107 /** |
10329 * [Output Only] Unique identifier for the resource; defined by the server. | 11108 * Unique identifier for the resource; defined by the server (output only). |
10330 */ | 11109 */ |
10331 core.String id; | 11110 core.String id; |
10332 /** | 11111 /** Type of the resource. */ |
10333 * [Output Only] Type of the resource. Always compute#address for addresses. | |
10334 */ | |
10335 core.String kind; | 11112 core.String kind; |
10336 /** | 11113 /** |
10337 * Name of the resource; provided by the client when the resource is created. | 11114 * Name of the resource; provided by the client when the resource is created. |
10338 * The name must be 1-63 characters long, and comply with RFC1035. | 11115 * The name must be 1-63 characters long, and comply with RFC1035. |
10339 * Specifically, the name must be 1-63 characters long and match the regular | |
10340 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must | |
10341 * be a lowercase letter, and all following characters must be a dash, | |
10342 * lowercase letter, or digit, except the last character, which cannot be a | |
10343 * dash. | |
10344 */ | 11116 */ |
10345 core.String name; | 11117 core.String name; |
10346 /** | 11118 /** Server defined URL for the resource (output only). */ |
10347 * [Output Only] URL of the region where the regional address resides. This | |
10348 * field is not applicable to global addresses. | |
10349 */ | |
10350 core.String region; | |
10351 /** [Output Only] Server defined URL for the resource. */ | |
10352 core.String selfLink; | 11119 core.String selfLink; |
10353 /** | 11120 /** |
10354 * [Output Only] The status of the address, which can be either IN_USE or | 11121 * URL of Instance Group Manager or Replica Pool which will be controlled by |
10355 * RESERVED. An address that is RESERVED is currently reserved and available | 11122 * Autoscaler. |
10356 * to use. An IN_USE address is currently being used by another resource and | |
10357 * is not available. | |
10358 * Possible string values are: | |
10359 * - "IN_USE" | |
10360 * - "RESERVED" | |
10361 */ | 11123 */ |
10362 core.String status; | 11124 core.String target; |
10363 /** [Output Only] The URLs of the resources that are using this address. */ | 11125 /** URL of the zone where the instance group resides (output only). */ |
10364 core.List<core.String> users; | 11126 core.String zone; |
10365 | 11127 |
10366 Address(); | 11128 Autoscaler(); |
10367 | 11129 |
10368 Address.fromJson(core.Map _json) { | 11130 Autoscaler.fromJson(core.Map _json) { |
10369 if (_json.containsKey("address")) { | 11131 if (_json.containsKey("autoscalingPolicy")) { |
10370 address = _json["address"]; | 11132 autoscalingPolicy = new AutoscalingPolicy.fromJson(_json["autoscalingPolic
y"]); |
10371 } | 11133 } |
10372 if (_json.containsKey("creationTimestamp")) { | 11134 if (_json.containsKey("creationTimestamp")) { |
10373 creationTimestamp = _json["creationTimestamp"]; | 11135 creationTimestamp = _json["creationTimestamp"]; |
10374 } | 11136 } |
10375 if (_json.containsKey("description")) { | 11137 if (_json.containsKey("description")) { |
10376 description = _json["description"]; | 11138 description = _json["description"]; |
10377 } | 11139 } |
10378 if (_json.containsKey("id")) { | 11140 if (_json.containsKey("id")) { |
10379 id = _json["id"]; | 11141 id = _json["id"]; |
10380 } | 11142 } |
10381 if (_json.containsKey("kind")) { | 11143 if (_json.containsKey("kind")) { |
10382 kind = _json["kind"]; | 11144 kind = _json["kind"]; |
10383 } | 11145 } |
10384 if (_json.containsKey("name")) { | 11146 if (_json.containsKey("name")) { |
10385 name = _json["name"]; | 11147 name = _json["name"]; |
10386 } | 11148 } |
10387 if (_json.containsKey("region")) { | |
10388 region = _json["region"]; | |
10389 } | |
10390 if (_json.containsKey("selfLink")) { | 11149 if (_json.containsKey("selfLink")) { |
10391 selfLink = _json["selfLink"]; | 11150 selfLink = _json["selfLink"]; |
10392 } | 11151 } |
10393 if (_json.containsKey("status")) { | 11152 if (_json.containsKey("target")) { |
10394 status = _json["status"]; | 11153 target = _json["target"]; |
10395 } | 11154 } |
10396 if (_json.containsKey("users")) { | 11155 if (_json.containsKey("zone")) { |
10397 users = _json["users"]; | 11156 zone = _json["zone"]; |
10398 } | 11157 } |
10399 } | 11158 } |
10400 | 11159 |
10401 core.Map toJson() { | 11160 core.Map toJson() { |
10402 var _json = new core.Map(); | 11161 var _json = new core.Map(); |
10403 if (address != null) { | 11162 if (autoscalingPolicy != null) { |
10404 _json["address"] = address; | 11163 _json["autoscalingPolicy"] = (autoscalingPolicy).toJson(); |
10405 } | 11164 } |
10406 if (creationTimestamp != null) { | 11165 if (creationTimestamp != null) { |
10407 _json["creationTimestamp"] = creationTimestamp; | 11166 _json["creationTimestamp"] = creationTimestamp; |
10408 } | 11167 } |
10409 if (description != null) { | 11168 if (description != null) { |
10410 _json["description"] = description; | 11169 _json["description"] = description; |
10411 } | 11170 } |
10412 if (id != null) { | 11171 if (id != null) { |
10413 _json["id"] = id; | 11172 _json["id"] = id; |
10414 } | 11173 } |
10415 if (kind != null) { | 11174 if (kind != null) { |
10416 _json["kind"] = kind; | 11175 _json["kind"] = kind; |
10417 } | 11176 } |
10418 if (name != null) { | 11177 if (name != null) { |
10419 _json["name"] = name; | 11178 _json["name"] = name; |
10420 } | 11179 } |
10421 if (region != null) { | |
10422 _json["region"] = region; | |
10423 } | |
10424 if (selfLink != null) { | 11180 if (selfLink != null) { |
10425 _json["selfLink"] = selfLink; | 11181 _json["selfLink"] = selfLink; |
10426 } | 11182 } |
10427 if (status != null) { | 11183 if (target != null) { |
10428 _json["status"] = status; | 11184 _json["target"] = target; |
10429 } | 11185 } |
10430 if (users != null) { | 11186 if (zone != null) { |
10431 _json["users"] = users; | 11187 _json["zone"] = zone; |
10432 } | 11188 } |
10433 return _json; | 11189 return _json; |
10434 } | 11190 } |
10435 } | 11191 } |
10436 | 11192 |
10437 class AddressAggregatedList { | 11193 class AutoscalerAggregatedList { |
10438 /** | 11194 /** |
10439 * [Output Only] Unique identifier for the resource; defined by the server. | 11195 * Unique identifier for the resource; defined by the server (output only). |
10440 */ | 11196 */ |
10441 core.String id; | 11197 core.String id; |
10442 /** [Output Only] A map of scoped address lists. */ | 11198 /** A map of scoped autoscaler lists. */ |
10443 core.Map<core.String, AddressesScopedList> items; | 11199 core.Map<core.String, AutoscalersScopedList> items; |
10444 /** | 11200 /** Type of resource. */ |
10445 * [Output Only] Type of resource. Always compute#addressAggregatedList for | |
10446 * aggregated lists of addresses. | |
10447 */ | |
10448 core.String kind; | 11201 core.String kind; |
10449 /** [Output Only] A token used to continue a truncated list request. */ | 11202 /** A token used to continue a truncated list request (output only). */ |
10450 core.String nextPageToken; | 11203 core.String nextPageToken; |
10451 /** [Output Only] Server defined URL for this resource. */ | 11204 /** Server defined URL for this resource (output only). */ |
10452 core.String selfLink; | 11205 core.String selfLink; |
10453 | 11206 |
10454 AddressAggregatedList(); | 11207 AutoscalerAggregatedList(); |
10455 | 11208 |
10456 AddressAggregatedList.fromJson(core.Map _json) { | 11209 AutoscalerAggregatedList.fromJson(core.Map _json) { |
10457 if (_json.containsKey("id")) { | 11210 if (_json.containsKey("id")) { |
10458 id = _json["id"]; | 11211 id = _json["id"]; |
10459 } | 11212 } |
10460 if (_json.containsKey("items")) { | 11213 if (_json.containsKey("items")) { |
10461 items = commons.mapMap(_json["items"], (item) => new AddressesScopedList.f
romJson(item)); | 11214 items = commons.mapMap(_json["items"], (item) => new AutoscalersScopedList
.fromJson(item)); |
10462 } | 11215 } |
10463 if (_json.containsKey("kind")) { | 11216 if (_json.containsKey("kind")) { |
10464 kind = _json["kind"]; | 11217 kind = _json["kind"]; |
10465 } | 11218 } |
10466 if (_json.containsKey("nextPageToken")) { | 11219 if (_json.containsKey("nextPageToken")) { |
10467 nextPageToken = _json["nextPageToken"]; | 11220 nextPageToken = _json["nextPageToken"]; |
10468 } | 11221 } |
10469 if (_json.containsKey("selfLink")) { | 11222 if (_json.containsKey("selfLink")) { |
10470 selfLink = _json["selfLink"]; | 11223 selfLink = _json["selfLink"]; |
10471 } | 11224 } |
(...skipping 13 matching lines...) Expand all Loading... |
10485 if (nextPageToken != null) { | 11238 if (nextPageToken != null) { |
10486 _json["nextPageToken"] = nextPageToken; | 11239 _json["nextPageToken"] = nextPageToken; |
10487 } | 11240 } |
10488 if (selfLink != null) { | 11241 if (selfLink != null) { |
10489 _json["selfLink"] = selfLink; | 11242 _json["selfLink"] = selfLink; |
10490 } | 11243 } |
10491 return _json; | 11244 return _json; |
10492 } | 11245 } |
10493 } | 11246 } |
10494 | 11247 |
10495 /** Contains a list of address resources. */ | 11248 /** Contains a list of persistent autoscaler resources. */ |
10496 class AddressList { | 11249 class AutoscalerList { |
10497 /** | 11250 /** |
10498 * [Output Only] Unique identifier for the resource; defined by the server. | 11251 * Unique identifier for the resource; defined by the server (output only). |
10499 */ | 11252 */ |
10500 core.String id; | 11253 core.String id; |
10501 /** [Output Only] A list of Address resources. */ | 11254 /** A list of Autoscaler resources. */ |
10502 core.List<Address> items; | 11255 core.List<Autoscaler> items; |
10503 /** | 11256 /** Type of resource. */ |
10504 * [Output Only] Type of resource. Always compute#addressList for lists of | |
10505 * addresses. | |
10506 */ | |
10507 core.String kind; | 11257 core.String kind; |
10508 /** [Output Only] A token used to continue a truncated list request. */ | 11258 /** A token used to continue a truncated list request (output only). */ |
10509 core.String nextPageToken; | 11259 core.String nextPageToken; |
10510 /** [Output Only] Server defined URL for the resource. */ | 11260 /** Server defined URL for this resource (output only). */ |
10511 core.String selfLink; | 11261 core.String selfLink; |
10512 | 11262 |
10513 AddressList(); | 11263 AutoscalerList(); |
10514 | 11264 |
10515 AddressList.fromJson(core.Map _json) { | 11265 AutoscalerList.fromJson(core.Map _json) { |
10516 if (_json.containsKey("id")) { | 11266 if (_json.containsKey("id")) { |
10517 id = _json["id"]; | 11267 id = _json["id"]; |
10518 } | 11268 } |
10519 if (_json.containsKey("items")) { | 11269 if (_json.containsKey("items")) { |
10520 items = _json["items"].map((value) => new Address.fromJson(value)).toList(
); | 11270 items = _json["items"].map((value) => new Autoscaler.fromJson(value)).toLi
st(); |
10521 } | 11271 } |
10522 if (_json.containsKey("kind")) { | 11272 if (_json.containsKey("kind")) { |
10523 kind = _json["kind"]; | 11273 kind = _json["kind"]; |
10524 } | 11274 } |
10525 if (_json.containsKey("nextPageToken")) { | 11275 if (_json.containsKey("nextPageToken")) { |
10526 nextPageToken = _json["nextPageToken"]; | 11276 nextPageToken = _json["nextPageToken"]; |
10527 } | 11277 } |
10528 if (_json.containsKey("selfLink")) { | 11278 if (_json.containsKey("selfLink")) { |
10529 selfLink = _json["selfLink"]; | 11279 selfLink = _json["selfLink"]; |
10530 } | 11280 } |
(...skipping 13 matching lines...) Expand all Loading... |
10544 if (nextPageToken != null) { | 11294 if (nextPageToken != null) { |
10545 _json["nextPageToken"] = nextPageToken; | 11295 _json["nextPageToken"] = nextPageToken; |
10546 } | 11296 } |
10547 if (selfLink != null) { | 11297 if (selfLink != null) { |
10548 _json["selfLink"] = selfLink; | 11298 _json["selfLink"] = selfLink; |
10549 } | 11299 } |
10550 return _json; | 11300 return _json; |
10551 } | 11301 } |
10552 } | 11302 } |
10553 | 11303 |
10554 class AddressesScopedListWarningData { | 11304 class AutoscalersScopedListWarningData { |
10555 /** [Output Only] A key for the warning data. */ | 11305 /** [Output Only] A key for the warning data. */ |
10556 core.String key; | 11306 core.String key; |
10557 /** [Output Only] A warning data value corresponding to the key. */ | 11307 /** [Output Only] A warning data value corresponding to the key. */ |
10558 core.String value; | 11308 core.String value; |
10559 | 11309 |
10560 AddressesScopedListWarningData(); | 11310 AutoscalersScopedListWarningData(); |
10561 | 11311 |
10562 AddressesScopedListWarningData.fromJson(core.Map _json) { | 11312 AutoscalersScopedListWarningData.fromJson(core.Map _json) { |
10563 if (_json.containsKey("key")) { | 11313 if (_json.containsKey("key")) { |
10564 key = _json["key"]; | 11314 key = _json["key"]; |
10565 } | 11315 } |
10566 if (_json.containsKey("value")) { | 11316 if (_json.containsKey("value")) { |
10567 value = _json["value"]; | 11317 value = _json["value"]; |
10568 } | 11318 } |
10569 } | 11319 } |
10570 | 11320 |
10571 core.Map toJson() { | 11321 core.Map toJson() { |
10572 var _json = new core.Map(); | 11322 var _json = new core.Map(); |
10573 if (key != null) { | 11323 if (key != null) { |
10574 _json["key"] = key; | 11324 _json["key"] = key; |
10575 } | 11325 } |
10576 if (value != null) { | 11326 if (value != null) { |
10577 _json["value"] = value; | 11327 _json["value"] = value; |
10578 } | 11328 } |
10579 return _json; | 11329 return _json; |
10580 } | 11330 } |
10581 } | 11331 } |
10582 | 11332 |
10583 /** | 11333 /** |
10584 * [Output Only] Informational warning which replaces the list of addresses when | 11334 * Informational warning which replaces the list of autoscalers when the list is |
10585 * the list is empty. | 11335 * empty. |
10586 */ | 11336 */ |
10587 class AddressesScopedListWarning { | 11337 class AutoscalersScopedListWarning { |
10588 /** | 11338 /** |
10589 * [Output Only] The warning type identifier for this warning. | 11339 * [Output Only] The warning type identifier for this warning. |
10590 * Possible string values are: | 11340 * Possible string values are: |
10591 * - "DEPRECATED_RESOURCE_USED" | 11341 * - "DEPRECATED_RESOURCE_USED" |
10592 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" | 11342 * - "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" |
10593 * - "INJECTED_KERNELS_DEPRECATED" | 11343 * - "INJECTED_KERNELS_DEPRECATED" |
10594 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" | 11344 * - "NEXT_HOP_ADDRESS_NOT_ASSIGNED" |
10595 * - "NEXT_HOP_CANNOT_IP_FORWARD" | 11345 * - "NEXT_HOP_CANNOT_IP_FORWARD" |
10596 * - "NEXT_HOP_INSTANCE_NOT_FOUND" | 11346 * - "NEXT_HOP_INSTANCE_NOT_FOUND" |
10597 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" | 11347 * - "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" |
10598 * - "NEXT_HOP_NOT_RUNNING" | 11348 * - "NEXT_HOP_NOT_RUNNING" |
10599 * - "NOT_CRITICAL_ERROR" | 11349 * - "NOT_CRITICAL_ERROR" |
10600 * - "NO_RESULTS_ON_PAGE" | 11350 * - "NO_RESULTS_ON_PAGE" |
10601 * - "REQUIRED_TOS_AGREEMENT" | 11351 * - "REQUIRED_TOS_AGREEMENT" |
10602 * - "RESOURCE_NOT_DELETED" | 11352 * - "RESOURCE_NOT_DELETED" |
10603 * - "SINGLE_INSTANCE_PROPERTY_TEMPLATE" | 11353 * - "SINGLE_INSTANCE_PROPERTY_TEMPLATE" |
10604 * - "UNREACHABLE" | 11354 * - "UNREACHABLE" |
10605 */ | 11355 */ |
10606 core.String code; | 11356 core.String code; |
10607 /** [Output Only] Metadata for this warning in key: value format. */ | 11357 /** [Output Only] Metadata for this warning in key: value format. */ |
10608 core.List<AddressesScopedListWarningData> data; | 11358 core.List<AutoscalersScopedListWarningData> data; |
10609 /** [Output Only] Optional human-readable details for this warning. */ | 11359 /** [Output Only] Optional human-readable details for this warning. */ |
10610 core.String message; | 11360 core.String message; |
10611 | 11361 |
10612 AddressesScopedListWarning(); | 11362 AutoscalersScopedListWarning(); |
10613 | 11363 |
10614 AddressesScopedListWarning.fromJson(core.Map _json) { | 11364 AutoscalersScopedListWarning.fromJson(core.Map _json) { |
10615 if (_json.containsKey("code")) { | 11365 if (_json.containsKey("code")) { |
10616 code = _json["code"]; | 11366 code = _json["code"]; |
10617 } | 11367 } |
10618 if (_json.containsKey("data")) { | 11368 if (_json.containsKey("data")) { |
10619 data = _json["data"].map((value) => new AddressesScopedListWarningData.fro
mJson(value)).toList(); | 11369 data = _json["data"].map((value) => new AutoscalersScopedListWarningData.f
romJson(value)).toList(); |
10620 } | 11370 } |
10621 if (_json.containsKey("message")) { | 11371 if (_json.containsKey("message")) { |
10622 message = _json["message"]; | 11372 message = _json["message"]; |
10623 } | 11373 } |
10624 } | 11374 } |
10625 | 11375 |
10626 core.Map toJson() { | 11376 core.Map toJson() { |
10627 var _json = new core.Map(); | 11377 var _json = new core.Map(); |
10628 if (code != null) { | 11378 if (code != null) { |
10629 _json["code"] = code; | 11379 _json["code"] = code; |
10630 } | 11380 } |
10631 if (data != null) { | 11381 if (data != null) { |
10632 _json["data"] = data.map((value) => (value).toJson()).toList(); | 11382 _json["data"] = data.map((value) => (value).toJson()).toList(); |
10633 } | 11383 } |
10634 if (message != null) { | 11384 if (message != null) { |
10635 _json["message"] = message; | 11385 _json["message"] = message; |
10636 } | 11386 } |
10637 return _json; | 11387 return _json; |
10638 } | 11388 } |
10639 } | 11389 } |
10640 | 11390 |
10641 class AddressesScopedList { | 11391 class AutoscalersScopedList { |
10642 /** [Output Only] List of addresses contained in this scope. */ | 11392 /** List of autoscalers contained in this scope. */ |
10643 core.List<Address> addresses; | 11393 core.List<Autoscaler> autoscalers; |
10644 /** | 11394 /** |
10645 * [Output Only] Informational warning which replaces the list of addresses | 11395 * Informational warning which replaces the list of autoscalers when the list |
10646 * when the list is empty. | 11396 * is empty. |
10647 */ | 11397 */ |
10648 AddressesScopedListWarning warning; | 11398 AutoscalersScopedListWarning warning; |
10649 | 11399 |
10650 AddressesScopedList(); | 11400 AutoscalersScopedList(); |
10651 | 11401 |
10652 AddressesScopedList.fromJson(core.Map _json) { | 11402 AutoscalersScopedList.fromJson(core.Map _json) { |
10653 if (_json.containsKey("addresses")) { | 11403 if (_json.containsKey("autoscalers")) { |
10654 addresses = _json["addresses"].map((value) => new Address.fromJson(value))
.toList(); | 11404 autoscalers = _json["autoscalers"].map((value) => new Autoscaler.fromJson(
value)).toList(); |
10655 } | 11405 } |
10656 if (_json.containsKey("warning")) { | 11406 if (_json.containsKey("warning")) { |
10657 warning = new AddressesScopedListWarning.fromJson(_json["warning"]); | 11407 warning = new AutoscalersScopedListWarning.fromJson(_json["warning"]); |
10658 } | 11408 } |
10659 } | 11409 } |
10660 | 11410 |
10661 core.Map toJson() { | 11411 core.Map toJson() { |
10662 var _json = new core.Map(); | 11412 var _json = new core.Map(); |
10663 if (addresses != null) { | 11413 if (autoscalers != null) { |
10664 _json["addresses"] = addresses.map((value) => (value).toJson()).toList(); | 11414 _json["autoscalers"] = autoscalers.map((value) => (value).toJson()).toList
(); |
10665 } | 11415 } |
10666 if (warning != null) { | 11416 if (warning != null) { |
10667 _json["warning"] = (warning).toJson(); | 11417 _json["warning"] = (warning).toJson(); |
10668 } | 11418 } |
10669 return _json; | 11419 return _json; |
10670 } | 11420 } |
10671 } | 11421 } |
10672 | 11422 |
10673 /** An instance-attached disk resource. */ | 11423 /** Cloud Autoscaler policy. */ |
10674 class AttachedDisk { | 11424 class AutoscalingPolicy { |
10675 /** | 11425 /** |
10676 * Specifies whether the disk will be auto-deleted when the instance is | 11426 * The number of seconds that the Autoscaler should wait between two |
10677 * deleted (but not when the disk is detached from the instance). | 11427 * succeeding changes to the number of virtual machines. You should define an |
| 11428 * interval that is at least as long as the initialization time of a virtual |
| 11429 * machine and the time it may take for replica pool to create the virtual |
| 11430 * machine. The default is 60 seconds. |
10678 */ | 11431 */ |
10679 core.bool autoDelete; | 11432 core.int coolDownPeriodSec; |
10680 /** | 11433 /** |
10681 * Indicates that this is a boot disk. The virtual machine will use the first | 11434 * TODO(jbartosik): Add support for scaling based on muliple utilization |
10682 * partition of the disk for its root filesystem. | 11435 * metrics (take max recommendation). Exactly one utilization policy should be |
| 11436 * provided. Configuration parameters of CPU based autoscaling policy. |
10683 */ | 11437 */ |
10684 core.bool boot; | 11438 AutoscalingPolicyCpuUtilization cpuUtilization; |
| 11439 /** Configuration parameters of autoscaling based on custom metric. */ |
| 11440 core.List<AutoscalingPolicyCustomMetricUtilization> customMetricUtilizations; |
| 11441 /** Configuration parameters of autoscaling based on load balancer. */ |
| 11442 AutoscalingPolicyLoadBalancingUtilization loadBalancingUtilization; |
10685 /** | 11443 /** |
10686 * Specifies a unique device name of your choice that is reflected into the | 11444 * The maximum number of replicas that the Autoscaler can scale up to. This |
10687 * /dev/ tree of a Linux operating system running within the instance. This | 11445 * field is required for config to be effective. Maximum number of replicas |
10688 * name can be used to reference the device for mounting, resizing, and so on, | 11446 * should be not lower than minimal number of replicas. Absolute limit for |
10689 * from within the instance. | 11447 * this value is defined in Autoscaler backend. |
10690 * | |
10691 * If not specified, the server chooses a default device name to apply to this | |
10692 * disk, in the form persistent-disks-x, where x is a number assigned by | |
10693 * Google Compute Engine. This field is only applicable for persistent disks. | |
10694 */ | 11448 */ |
10695 core.String deviceName; | 11449 core.int maxNumReplicas; |
10696 /** | 11450 /** |
10697 * Assigns a zero-based index to this disk, where 0 is reserved for the boot | 11451 * The minimum number of replicas that the Autoscaler can scale down to. Can't |
10698 * disk. For example, if you have many disks attached to an instance, each | 11452 * be less than 0. If not provided Autoscaler will choose default value |
10699 * disk would have a unique index number. If not specified, the server will | 11453 * depending on maximal number of replicas. |
10700 * choose an appropriate value. | |
10701 */ | 11454 */ |
10702 core.int index; | 11455 core.int minNumReplicas; |
10703 /** | |
10704 * [Input Only] Specifies the parameters for a new disk that will be created | |
10705 * alongside the new instance. Use initialization parameters to create boot | |
10706 * disks or local SSDs attached to the new instance. | |
10707 * | |
10708 * This property is mutually exclusive with the source property; you can only | |
10709 * define one or the other, but not both. | |
10710 */ | |
10711 AttachedDiskInitializeParams initializeParams; | |
10712 /** | |
10713 * | |
10714 * Possible string values are: | |
10715 * - "NVME" | |
10716 * - "SCSI" | |
10717 */ | |
10718 core.String interface; | |
10719 /** | |
10720 * [Output Only] Type of the resource. Always compute#attachedDisk for | |
10721 * attached disks. | |
10722 */ | |
10723 core.String kind; | |
10724 /** [Output Only] Any valid publicly visible licenses. */ | |
10725 core.List<core.String> licenses; | |
10726 /** | |
10727 * The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If | |
10728 * not specified, the default is to attach the disk in READ_WRITE mode. | |
10729 * Possible string values are: | |
10730 * - "READ_ONLY" | |
10731 * - "READ_WRITE" | |
10732 */ | |
10733 core.String mode; | |
10734 /** | |
10735 * Specifies a valid partial or full URL to an existing Persistent Disk | |
10736 * resource. This field is only applicable for persistent disks. | |
10737 */ | |
10738 core.String source; | |
10739 /** | |
10740 * Specifies the type of the disk, either SCRATCH or PERSISTENT. If not | |
10741 * specified, the default is PERSISTENT. | |
10742 * Possible string values are: | |
10743 * - "PERSISTENT" | |
10744 * - "SCRATCH" | |
10745 */ | |
10746 core.String type; | |
10747 | 11456 |
10748 AttachedDisk(); | 11457 AutoscalingPolicy(); |
10749 | 11458 |
10750 AttachedDisk.fromJson(core.Map _json) { | 11459 AutoscalingPolicy.fromJson(core.Map _json) { |
10751 if (_json.containsKey("autoDelete")) { | 11460 if (_json.containsKey("coolDownPeriodSec")) { |
10752 autoDelete = _json["autoDelete"]; | 11461 coolDownPeriodSec = _json["coolDownPeriodSec"]; |
10753 } | 11462 } |
10754 if (_json.containsKey("boot")) { | 11463 if (_json.containsKey("cpuUtilization")) { |
10755 boot = _json["boot"]; | 11464 cpuUtilization = new AutoscalingPolicyCpuUtilization.fromJson(_json["cpuUt
ilization"]); |
10756 } | 11465 } |
10757 if (_json.containsKey("deviceName")) { | 11466 if (_json.containsKey("customMetricUtilizations")) { |
10758 deviceName = _json["deviceName"]; | 11467 customMetricUtilizations = _json["customMetricUtilizations"].map((value) =
> new AutoscalingPolicyCustomMetricUtilization.fromJson(value)).toList(); |
10759 } | 11468 } |
10760 if (_json.containsKey("index")) { | 11469 if (_json.containsKey("loadBalancingUtilization")) { |
10761 index = _json["index"]; | 11470 loadBalancingUtilization = new AutoscalingPolicyLoadBalancingUtilization.f
romJson(_json["loadBalancingUtilization"]); |
10762 } | 11471 } |
10763 if (_json.containsKey("initializeParams")) { | 11472 if (_json.containsKey("maxNumReplicas")) { |
10764 initializeParams = new AttachedDiskInitializeParams.fromJson(_json["initia
lizeParams"]); | 11473 maxNumReplicas = _json["maxNumReplicas"]; |
10765 } | 11474 } |
10766 if (_json.containsKey("interface")) { | 11475 if (_json.containsKey("minNumReplicas")) { |
10767 interface = _json["interface"]; | 11476 minNumReplicas = _json["minNumReplicas"]; |
10768 } | |
10769 if (_json.containsKey("kind")) { | |
10770 kind = _json["kind"]; | |
10771 } | |
10772 if (_json.containsKey("licenses")) { | |
10773 licenses = _json["licenses"]; | |
10774 } | |
10775 if (_json.containsKey("mode")) { | |
10776 mode = _json["mode"]; | |
10777 } | |
10778 if (_json.containsKey("source")) { | |
10779 source = _json["source"]; | |
10780 } | |
10781 if (_json.containsKey("type")) { | |
10782 type = _json["type"]; | |
10783 } | 11477 } |
10784 } | 11478 } |
10785 | 11479 |
10786 core.Map toJson() { | 11480 core.Map toJson() { |
10787 var _json = new core.Map(); | 11481 var _json = new core.Map(); |
10788 if (autoDelete != null) { | 11482 if (coolDownPeriodSec != null) { |
10789 _json["autoDelete"] = autoDelete; | 11483 _json["coolDownPeriodSec"] = coolDownPeriodSec; |
10790 } | 11484 } |
10791 if (boot != null) { | 11485 if (cpuUtilization != null) { |
10792 _json["boot"] = boot; | 11486 _json["cpuUtilization"] = (cpuUtilization).toJson(); |
10793 } | 11487 } |
10794 if (deviceName != null) { | 11488 if (customMetricUtilizations != null) { |
10795 _json["deviceName"] = deviceName; | 11489 _json["customMetricUtilizations"] = customMetricUtilizations.map((value) =
> (value).toJson()).toList(); |
10796 } | 11490 } |
10797 if (index != null) { | 11491 if (loadBalancingUtilization != null) { |
10798 _json["index"] = index; | 11492 _json["loadBalancingUtilization"] = (loadBalancingUtilization).toJson(); |
10799 } | 11493 } |
10800 if (initializeParams != null) { | 11494 if (maxNumReplicas != null) { |
10801 _json["initializeParams"] = (initializeParams).toJson(); | 11495 _json["maxNumReplicas"] = maxNumReplicas; |
10802 } | 11496 } |
10803 if (interface != null) { | 11497 if (minNumReplicas != null) { |
10804 _json["interface"] = interface; | 11498 _json["minNumReplicas"] = minNumReplicas; |
10805 } | |
10806 if (kind != null) { | |
10807 _json["kind"] = kind; | |
10808 } | |
10809 if (licenses != null) { | |
10810 _json["licenses"] = licenses; | |
10811 } | |
10812 if (mode != null) { | |
10813 _json["mode"] = mode; | |
10814 } | |
10815 if (source != null) { | |
10816 _json["source"] = source; | |
10817 } | |
10818 if (type != null) { | |
10819 _json["type"] = type; | |
10820 } | 11499 } |
10821 return _json; | 11500 return _json; |
10822 } | 11501 } |
10823 } | 11502 } |
10824 | 11503 |
10825 /** | 11504 /** CPU utilization policy. */ |
10826 * [Input Only] Specifies the parameters for a new disk that will be created | 11505 class AutoscalingPolicyCpuUtilization { |
10827 * alongside the new instance. Use initialization parameters to create boot | |
10828 * disks or local SSDs attached to the new instance. | |
10829 * | |
10830 * This property is mutually exclusive with the source property; you can only | |
10831 * define one or the other, but not both. | |
10832 */ | |
10833 class AttachedDiskInitializeParams { | |
10834 /** | 11506 /** |
10835 * Specifies the disk name. If not specified, the default is to use the name | 11507 * The target utilization that the Autoscaler should maintain. It is |
10836 * of the instance. | 11508 * represented as a fraction of used cores. For example: 6 cores used in |
| 11509 * 8-core VM are represented here as 0.75. Must be a float value between (0, |
| 11510 * 1]. If not defined, the default is 0.8. |
10837 */ | 11511 */ |
10838 core.String diskName; | 11512 core.double utilizationTarget; |
10839 /** Specifies the size of the disk in base-2 GB. */ | |
10840 core.String diskSizeGb; | |
10841 /** | |
10842 * Specifies the disk type to use to create the instance. If not specified, | |
10843 * the default is pd-standard, specified using the full URL. For example: | |
10844 * | |
10845 * https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes
/pd-standard | |
10846 * | |
10847 * Other values include pd-ssd and local-ssd. If you define this field, you | |
10848 * can provide either the full or partial URL. For example, the following are | |
10849 * valid values: | |
10850 * - | |
10851 * https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes
/diskType | |
10852 * - projects/project/zones/zone/diskTypes/diskType | |
10853 * - zones/zone/diskTypes/diskType | |
10854 */ | |
10855 core.String diskType; | |
10856 /** | |
10857 * A source image used to create the disk. You can provide a private (custom) | |
10858 * image, and Compute Engine will use the corresponding image from your | |
10859 * project. For example: | |
10860 * | |
10861 * global/images/my-private-image | |
10862 * | |
10863 * Or you can provide an image from a publicly-available project. For example, | |
10864 * to use a Debian image from the debian-cloud project, make sure to include | |
10865 * the project in the URL: | |
10866 * | |
10867 * projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD | |
10868 * | |
10869 * where vYYYYMMDD is the image version. The fully-qualified URL will also | |
10870 * work in both cases. | |
10871 */ | |
10872 core.String sourceImage; | |
10873 | 11513 |
10874 AttachedDiskInitializeParams(); | 11514 AutoscalingPolicyCpuUtilization(); |
10875 | 11515 |
10876 AttachedDiskInitializeParams.fromJson(core.Map _json) { | 11516 AutoscalingPolicyCpuUtilization.fromJson(core.Map _json) { |
10877 if (_json.containsKey("diskName")) { | 11517 if (_json.containsKey("utilizationTarget")) { |
10878 diskName = _json["diskName"]; | 11518 utilizationTarget = _json["utilizationTarget"]; |
10879 } | |
10880 if (_json.containsKey("diskSizeGb")) { | |
10881 diskSizeGb = _json["diskSizeGb"]; | |
10882 } | |
10883 if (_json.containsKey("diskType")) { | |
10884 diskType = _json["diskType"]; | |
10885 } | |
10886 if (_json.containsKey("sourceImage")) { | |
10887 sourceImage = _json["sourceImage"]; | |
10888 } | 11519 } |
10889 } | 11520 } |
10890 | 11521 |
10891 core.Map toJson() { | 11522 core.Map toJson() { |
10892 var _json = new core.Map(); | 11523 var _json = new core.Map(); |
10893 if (diskName != null) { | 11524 if (utilizationTarget != null) { |
10894 _json["diskName"] = diskName; | 11525 _json["utilizationTarget"] = utilizationTarget; |
10895 } | |
10896 if (diskSizeGb != null) { | |
10897 _json["diskSizeGb"] = diskSizeGb; | |
10898 } | |
10899 if (diskType != null) { | |
10900 _json["diskType"] = diskType; | |
10901 } | |
10902 if (sourceImage != null) { | |
10903 _json["sourceImage"] = sourceImage; | |
10904 } | 11526 } |
10905 return _json; | 11527 return _json; |
10906 } | 11528 } |
| 11529 } |
| 11530 |
| 11531 /** Custom utilization metric policy. */ |
| 11532 class AutoscalingPolicyCustomMetricUtilization { |
| 11533 /** |
| 11534 * Identifier of the metric. It should be a Cloud Monitoring metric. The |
| 11535 * metric can not have negative values. The metric should be an utilization |
| 11536 * metric (increasing number of VMs handling requests x times should reduce |
| 11537 * average value of the metric roughly x times). For example you could use: |
| 11538 * compute.googleapis.com/instance/network/received_bytes_count. |
| 11539 */ |
| 11540 core.String metric; |
| 11541 /** |
| 11542 * Target value of the metric which Autoscaler should maintain. Must be a |
| 11543 * positive value. |
| 11544 */ |
| 11545 core.double utilizationTarget; |
| 11546 /** |
| 11547 * Defines type in which utilization_target is expressed. |
| 11548 * Possible string values are: |
| 11549 * - "DELTA_PER_MINUTE" |
| 11550 * - "DELTA_PER_SECOND" |
| 11551 * - "GAUGE" |
| 11552 */ |
| 11553 core.String utilizationTargetType; |
| 11554 |
| 11555 AutoscalingPolicyCustomMetricUtilization(); |
| 11556 |
| 11557 AutoscalingPolicyCustomMetricUtilization.fromJson(core.Map _json) { |
| 11558 if (_json.containsKey("metric")) { |
| 11559 metric = _json["metric"]; |
| 11560 } |
| 11561 if (_json.containsKey("utilizationTarget")) { |
| 11562 utilizationTarget = _json["utilizationTarget"]; |
| 11563 } |
| 11564 if (_json.containsKey("utilizationTargetType")) { |
| 11565 utilizationTargetType = _json["utilizationTargetType"]; |
| 11566 } |
| 11567 } |
| 11568 |
| 11569 core.Map toJson() { |
| 11570 var _json = new core.Map(); |
| 11571 if (metric != null) { |
| 11572 _json["metric"] = metric; |
| 11573 } |
| 11574 if (utilizationTarget != null) { |
| 11575 _json["utilizationTarget"] = utilizationTarget; |
| 11576 } |
| 11577 if (utilizationTargetType != null) { |
| 11578 _json["utilizationTargetType"] = utilizationTargetType; |
| 11579 } |
| 11580 return _json; |
| 11581 } |
| 11582 } |
| 11583 |
| 11584 /** Load balancing utilization policy. */ |
| 11585 class AutoscalingPolicyLoadBalancingUtilization { |
| 11586 /** |
| 11587 * Fraction of backend capacity utilization (set in HTTP load balancing |
| 11588 * configuration) that Autoscaler should maintain. Must be a positive float |
| 11589 * value. If not defined, the default is 0.8. For example if your |
| 11590 * maxRatePerInstance capacity (in HTTP Load Balancing configuration) is set |
| 11591 * at 10 and you would like to keep number of instances such that each |
| 11592 * instance receives 7 QPS on average, set this to 0.7. |
| 11593 */ |
| 11594 core.double utilizationTarget; |
| 11595 |
| 11596 AutoscalingPolicyLoadBalancingUtilization(); |
| 11597 |
| 11598 AutoscalingPolicyLoadBalancingUtilization.fromJson(core.Map _json) { |
| 11599 if (_json.containsKey("utilizationTarget")) { |
| 11600 utilizationTarget = _json["utilizationTarget"]; |
| 11601 } |
| 11602 } |
| 11603 |
| 11604 core.Map toJson() { |
| 11605 var _json = new core.Map(); |
| 11606 if (utilizationTarget != null) { |
| 11607 _json["utilizationTarget"] = utilizationTarget; |
| 11608 } |
| 11609 return _json; |
| 11610 } |
10907 } | 11611 } |
10908 | 11612 |
10909 /** Message containing information of one individual backend. */ | 11613 /** Message containing information of one individual backend. */ |
10910 class Backend { | 11614 class Backend { |
10911 /** | 11615 /** |
10912 * The balancing mode of this backend, default is UTILIZATION. | 11616 * Specifies the balancing mode for this backend. The default is UTILIZATION |
| 11617 * but available values are UTILIZATION and RATE. |
10913 * Possible string values are: | 11618 * Possible string values are: |
10914 * - "RATE" | 11619 * - "RATE" |
10915 * - "UTILIZATION" | 11620 * - "UTILIZATION" |
10916 */ | 11621 */ |
10917 core.String balancingMode; | 11622 core.String balancingMode; |
10918 /** | 11623 /** |
10919 * The multiplier (a value between 0.0 and 1.0) of the max capacity (CPU or | 11624 * A multiplier applied to the group's maximum servicing capacity (either |
10920 * RPS, depending on 'balancingMode') the group should serve up to. 0 means | 11625 * UTILIZATION or RATE). Default value is 1, which means the group will serve |
10921 * the group is totally drained. Default value is 1. Valid range is [0.0, | 11626 * up to 100% of its configured CPU or RPS (depending on balancingMode). A |
10922 * 1.0]. | 11627 * setting of 0 means the group is completely drained, offering 0% of its |
| 11628 * available CPU or RPS. Valid range is [0.0,1.0]. |
10923 */ | 11629 */ |
10924 core.double capacityScaler; | 11630 core.double capacityScaler; |
10925 /** | 11631 /** |
10926 * An optional textual description of the resource, which is provided by the | 11632 * An optional textual description of the resource. Provided by the client |
10927 * client when the resource is created. | 11633 * when the resource is created. |
10928 */ | 11634 */ |
10929 core.String description; | 11635 core.String description; |
10930 /** | 11636 /** |
10931 * URL of a zonal Cloud Resource View resource. This resource view defines the | 11637 * The fully-qualified URL of a zonal Instance Group resource. This instance |
10932 * list of instances that serve traffic. Member virtual machine instances from | 11638 * group defines the list of instances that serve traffic. Member virtual |
10933 * each resource view must live in the same zone as the resource view itself. | 11639 * machine instances from each instance group must live in the same zone as |
10934 * No two backends in a backend service are allowed to use same Resource View | 11640 * the instance group itself. No two backends in a backend service are allowed |
10935 * resource. | 11641 * to use same Instance Group resource. |
| 11642 * |
| 11643 * Note that you must specify an Instance Group resource using the |
| 11644 * fully-qualified URL, rather than a partial URL. |
10936 */ | 11645 */ |
10937 core.String group; | 11646 core.String group; |
10938 /** | 11647 /** |
10939 * The max RPS of the group. Can be used with either balancing mode, but | 11648 * The max RPS of the group. Can be used with either balancing mode, but |
10940 * required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance | 11649 * required if RATE mode. For RATE mode, either maxRate or maxRatePerInstance |
10941 * must be set. | 11650 * must be set. |
10942 */ | 11651 */ |
10943 core.int maxRate; | 11652 core.int maxRate; |
10944 /** | 11653 /** |
10945 * The max RPS that a single backed instance can handle. This is used to | 11654 * The max RPS that a single backed instance can handle. This is used to |
10946 * calculate the capacity of the group. Can be used in either balancing mode. | 11655 * calculate the capacity of the group. Can be used in either balancing mode. |
10947 * For RATE mode, either maxRate or maxRatePerInstance must be set. | 11656 * For RATE mode, either maxRate or maxRatePerInstance must be set. |
10948 */ | 11657 */ |
10949 core.double maxRatePerInstance; | 11658 core.double maxRatePerInstance; |
10950 /** | 11659 /** |
10951 * Used when 'balancingMode' is UTILIZATION. This ratio defines the CPU | 11660 * Used when balancingMode is UTILIZATION. This ratio defines the CPU |
10952 * utilization target for the group. The default is 0.8. Valid range is [0, | 11661 * utilization target for the group. The default is 0.8. Valid range is [0.0, |
10953 * 1]. | 11662 * 1.0]. |
10954 */ | 11663 */ |
10955 core.double maxUtilization; | 11664 core.double maxUtilization; |
10956 | 11665 |
10957 Backend(); | 11666 Backend(); |
10958 | 11667 |
10959 Backend.fromJson(core.Map _json) { | 11668 Backend.fromJson(core.Map _json) { |
10960 if (_json.containsKey("balancingMode")) { | 11669 if (_json.containsKey("balancingMode")) { |
10961 balancingMode = _json["balancingMode"]; | 11670 balancingMode = _json["balancingMode"]; |
10962 } | 11671 } |
10963 if (_json.containsKey("capacityScaler")) { | 11672 if (_json.containsKey("capacityScaler")) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11003 if (maxUtilization != null) { | 11712 if (maxUtilization != null) { |
11004 _json["maxUtilization"] = maxUtilization; | 11713 _json["maxUtilization"] = maxUtilization; |
11005 } | 11714 } |
11006 return _json; | 11715 return _json; |
11007 } | 11716 } |
11008 } | 11717 } |
11009 | 11718 |
11010 /** | 11719 /** |
11011 * A BackendService resource. This resource defines a group of backend VMs | 11720 * A BackendService resource. This resource defines a group of backend VMs |
11012 * together with their serving capacity. | 11721 * together with their serving capacity. |
11013 * | |
11014 * If you add field foo, you probably need to also add: | |
11015 * com.google.cloud.cluster.manager.api.BackendServiceResource: foo | |
11016 * com.google.cloud.cluster.manager.networking.entities: BackendService, | |
11017 * BackendServiceEntity: getFoo, setFoo: | |
11018 * | |
11019 * Converters/mappers will need to be updated: | |
11020 * com.google.cloud.cluster.manager.networking.services.backendservice.BackendSe
rviceResourceConverter: | |
11021 * toResource, updateEntity: copy foo | |
11022 * com.google.cloud.cluster.mixer.protomappers.BackendServiceMappers.ResourceMap
per: | |
11023 * ResourceMapper: add a new map call | |
11024 * | |
11025 * Tests to update: | |
11026 * com.google.cloud.cluster.manager.networking.services.backendservice.BackendSe
rviceResourceConverterTest | |
11027 * com.google.cloud.cluster.mixer.protomappers.BackendServiceMappersTest.testRes
ourceMapping | |
11028 */ | 11722 */ |
11029 class BackendService { | 11723 class BackendService { |
11030 /** The list of backends that serve this BackendService. */ | 11724 /** The list of backends that serve this BackendService. */ |
11031 core.List<Backend> backends; | 11725 core.List<Backend> backends; |
11032 /** Creation timestamp in RFC3339 text format (output only). */ | 11726 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
11033 core.String creationTimestamp; | 11727 core.String creationTimestamp; |
11034 /** | 11728 /** |
11035 * An optional textual description of the resource; provided by the client | 11729 * An optional textual description of the resource. Provided by the client |
11036 * when the resource is created. | 11730 * when the resource is created. |
11037 */ | 11731 */ |
11038 core.String description; | 11732 core.String description; |
11039 /** | 11733 /** |
11040 * Fingerprint of this resource. A hash of the contents stored in this object. | 11734 * Fingerprint of this resource. A hash of the contents stored in this object. |
11041 * This field is used in optimistic locking. This field will be ignored when | 11735 * This field is used in optimistic locking. This field will be ignored when |
11042 * inserting a BackendService. An up-to-date fingerprint must be provided in | 11736 * inserting a BackendService. An up-to-date fingerprint must be provided in |
11043 * order to update the BackendService. | 11737 * order to update the BackendService. |
11044 */ | 11738 */ |
11045 core.String fingerprint; | 11739 core.String fingerprint; |
11046 core.List<core.int> get fingerprintAsBytes { | 11740 core.List<core.int> get fingerprintAsBytes { |
11047 return crypto.CryptoUtils.base64StringToBytes(fingerprint); | 11741 return crypto.CryptoUtils.base64StringToBytes(fingerprint); |
11048 } | 11742 } |
11049 | 11743 |
11050 void set fingerprintAsBytes(core.List<core.int> _bytes) { | 11744 void set fingerprintAsBytes(core.List<core.int> _bytes) { |
11051 fingerprint = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 11745 fingerprint = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
11052 } | 11746 } |
11053 /** | 11747 /** |
11054 * The list of URLs to the HttpHealthCheck resource for health checking this | 11748 * The list of URLs to the HttpHealthCheck resource for health checking this |
11055 * BackendService. Currently at most one health check can be specified, and a | 11749 * BackendService. Currently at most one health check can be specified, and a |
11056 * health check is required. | 11750 * health check is required. |
11057 */ | 11751 */ |
11058 core.List<core.String> healthChecks; | 11752 core.List<core.String> healthChecks; |
11059 /** | 11753 /** |
11060 * Unique identifier for the resource; defined by the server (output only). | 11754 * [Output Only] Unique identifier for the resource; defined by the server. |
11061 */ | 11755 */ |
11062 core.String id; | 11756 core.String id; |
11063 /** Type of the resource. */ | 11757 /** |
| 11758 * [Output Only] Type of resource. Always compute#backendService for backend |
| 11759 * services. |
| 11760 */ |
11064 core.String kind; | 11761 core.String kind; |
11065 /** | 11762 /** |
11066 * Name of the resource; provided by the client when the resource is created. | 11763 * Name of the resource. Provided by the client when the resource is created. |
11067 * The name must be 1-63 characters long, and comply with RFC1035. | 11764 * The name must be 1-63 characters long, and comply with RFC1035. |
| 11765 * Specifically, the name must be 1-63 characters long and match the regular |
| 11766 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must |
| 11767 * be a lowercase letter, and all following characters must be a dash, |
| 11768 * lowercase letter, or digit, except the last character, which cannot be a |
| 11769 * dash. |
11068 */ | 11770 */ |
11069 core.String name; | 11771 core.String name; |
11070 /** | 11772 /** |
11071 * Deprecated in favor of port_name. The TCP port to connect on the backend. | 11773 * Deprecated in favor of port name. The TCP port to connect on the backend. |
11072 * The default value is 80. | 11774 * The default value is 80. |
11073 */ | 11775 */ |
11074 core.int port; | 11776 core.int port; |
11075 /** | 11777 /** |
11076 * Name of backend port. The same name should appear in the resource views | 11778 * Name of backend port. The same name should appear in the resource views |
11077 * referenced by this service. Required. | 11779 * referenced by this service. Required. |
11078 */ | 11780 */ |
11079 core.String portName; | 11781 core.String portName; |
11080 /** | 11782 /** |
11081 * | 11783 * |
11082 * Possible string values are: | 11784 * Possible string values are: |
11083 * - "HTTP" | 11785 * - "HTTP" |
11084 */ | 11786 */ |
11085 core.String protocol; | 11787 core.String protocol; |
11086 /** Server defined URL for the resource (output only). */ | 11788 /** [Output Only] Server defined URL for the resource. */ |
11087 core.String selfLink; | 11789 core.String selfLink; |
11088 /** | 11790 /** |
11089 * How many seconds to wait for the backend before considering it a failed | 11791 * How many seconds to wait for the backend before considering it a failed |
11090 * request. Default is 30 seconds. | 11792 * request. Default is 30 seconds. |
11091 */ | 11793 */ |
11092 core.int timeoutSec; | 11794 core.int timeoutSec; |
11093 | 11795 |
11094 BackendService(); | 11796 BackendService(); |
11095 | 11797 |
11096 BackendService.fromJson(core.Map _json) { | 11798 BackendService.fromJson(core.Map _json) { |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11175 } | 11877 } |
11176 if (timeoutSec != null) { | 11878 if (timeoutSec != null) { |
11177 _json["timeoutSec"] = timeoutSec; | 11879 _json["timeoutSec"] = timeoutSec; |
11178 } | 11880 } |
11179 return _json; | 11881 return _json; |
11180 } | 11882 } |
11181 } | 11883 } |
11182 | 11884 |
11183 class BackendServiceGroupHealth { | 11885 class BackendServiceGroupHealth { |
11184 core.List<HealthStatus> healthStatus; | 11886 core.List<HealthStatus> healthStatus; |
11185 /** Type of resource. */ | 11887 /** |
| 11888 * [Output Only] Type of resource. Always compute#backendServiceGroupHealth |
| 11889 * for the health of backend services. |
| 11890 */ |
11186 core.String kind; | 11891 core.String kind; |
11187 | 11892 |
11188 BackendServiceGroupHealth(); | 11893 BackendServiceGroupHealth(); |
11189 | 11894 |
11190 BackendServiceGroupHealth.fromJson(core.Map _json) { | 11895 BackendServiceGroupHealth.fromJson(core.Map _json) { |
11191 if (_json.containsKey("healthStatus")) { | 11896 if (_json.containsKey("healthStatus")) { |
11192 healthStatus = _json["healthStatus"].map((value) => new HealthStatus.fromJ
son(value)).toList(); | 11897 healthStatus = _json["healthStatus"].map((value) => new HealthStatus.fromJ
son(value)).toList(); |
11193 } | 11898 } |
11194 if (_json.containsKey("kind")) { | 11899 if (_json.containsKey("kind")) { |
11195 kind = _json["kind"]; | 11900 kind = _json["kind"]; |
11196 } | 11901 } |
11197 } | 11902 } |
11198 | 11903 |
11199 core.Map toJson() { | 11904 core.Map toJson() { |
11200 var _json = new core.Map(); | 11905 var _json = new core.Map(); |
11201 if (healthStatus != null) { | 11906 if (healthStatus != null) { |
11202 _json["healthStatus"] = healthStatus.map((value) => (value).toJson()).toLi
st(); | 11907 _json["healthStatus"] = healthStatus.map((value) => (value).toJson()).toLi
st(); |
11203 } | 11908 } |
11204 if (kind != null) { | 11909 if (kind != null) { |
11205 _json["kind"] = kind; | 11910 _json["kind"] = kind; |
11206 } | 11911 } |
11207 return _json; | 11912 return _json; |
11208 } | 11913 } |
11209 } | 11914 } |
11210 | 11915 |
11211 /** Contains a list of BackendService resources. */ | 11916 /** Contains a list of BackendService resources. */ |
11212 class BackendServiceList { | 11917 class BackendServiceList { |
11213 /** | 11918 /** |
11214 * Unique identifier for the resource; defined by the server (output only). | 11919 * [Output Only] Unique identifier for the resource; defined by the server. |
11215 */ | 11920 */ |
11216 core.String id; | 11921 core.String id; |
11217 /** A list of BackendService resources. */ | 11922 /** A list of BackendService resources. */ |
11218 core.List<BackendService> items; | 11923 core.List<BackendService> items; |
11219 /** Type of resource. */ | 11924 /** |
| 11925 * [Output Only] Type of resource. Always compute#backendServiceList for lists |
| 11926 * of backend services. |
| 11927 */ |
11220 core.String kind; | 11928 core.String kind; |
11221 /** A token used to continue a truncated list request (output only). */ | 11929 /** [Output Only] A token used to continue a truncated list request. */ |
11222 core.String nextPageToken; | 11930 core.String nextPageToken; |
11223 /** Server defined URL for this resource (output only). */ | 11931 /** [Output Only] Server-defined URL for this resource. */ |
11224 core.String selfLink; | 11932 core.String selfLink; |
11225 | 11933 |
11226 BackendServiceList(); | 11934 BackendServiceList(); |
11227 | 11935 |
11228 BackendServiceList.fromJson(core.Map _json) { | 11936 BackendServiceList.fromJson(core.Map _json) { |
11229 if (_json.containsKey("id")) { | 11937 if (_json.containsKey("id")) { |
11230 id = _json["id"]; | 11938 id = _json["id"]; |
11231 } | 11939 } |
11232 if (_json.containsKey("items")) { | 11940 if (_json.containsKey("items")) { |
11233 items = _json["items"].map((value) => new BackendService.fromJson(value)).
toList(); | 11941 items = _json["items"].map((value) => new BackendService.fromJson(value)).
toList(); |
(...skipping 997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12231 } | 12939 } |
12232 } | 12940 } |
12233 | 12941 |
12234 /** A Firewall resource. */ | 12942 /** A Firewall resource. */ |
12235 class Firewall { | 12943 class Firewall { |
12236 /** | 12944 /** |
12237 * The list of rules specified by this firewall. Each rule specifies a | 12945 * The list of rules specified by this firewall. Each rule specifies a |
12238 * protocol and port-range tuple that describes a permitted connection. | 12946 * protocol and port-range tuple that describes a permitted connection. |
12239 */ | 12947 */ |
12240 core.List<FirewallAllowed> allowed; | 12948 core.List<FirewallAllowed> allowed; |
12241 /** [Output Only] Creation timestamp in RFC3339text format. */ | 12949 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
12242 core.String creationTimestamp; | 12950 core.String creationTimestamp; |
12243 /** | 12951 /** |
12244 * An optional textual description of the resource; provided by the client | 12952 * An optional textual description of the resource; provided by the client |
12245 * when the resource is created. | 12953 * when the resource is created. |
12246 */ | 12954 */ |
12247 core.String description; | 12955 core.String description; |
12248 /** | 12956 /** |
12249 * [Output Only] Unique identifier for the resource; defined by the server. | 12957 * [Output Only] Unique identifier for the resource; defined by the server. |
12250 */ | 12958 */ |
12251 core.String id; | 12959 core.String id; |
(...skipping 25 matching lines...) Expand all Loading... |
12277 * - global/networks/default | 12985 * - global/networks/default |
12278 */ | 12986 */ |
12279 core.String network; | 12987 core.String network; |
12280 /** [Output Only] Server defined URL for the resource. */ | 12988 /** [Output Only] Server defined URL for the resource. */ |
12281 core.String selfLink; | 12989 core.String selfLink; |
12282 /** | 12990 /** |
12283 * The IP address blocks that this rule applies to, expressed in CIDR format. | 12991 * The IP address blocks that this rule applies to, expressed in CIDR format. |
12284 * One or both of sourceRanges and sourceTags may be set. | 12992 * One or both of sourceRanges and sourceTags may be set. |
12285 * | 12993 * |
12286 * If both properties are set, an inbound connection is allowed if the range | 12994 * If both properties are set, an inbound connection is allowed if the range |
12287 * or the tag of the source matches the sourceRanges OR matches the sourceTags | 12995 * matches the sourceRanges OR the tag of the source matches the sourceTags |
12288 * property; the connection does not need to match both properties. | 12996 * property. The connection does not need to match both properties. |
12289 */ | 12997 */ |
12290 core.List<core.String> sourceRanges; | 12998 core.List<core.String> sourceRanges; |
12291 /** | 12999 /** |
12292 * A list of instance tags which this rule applies to. One or both of | 13000 * A list of instance tags which this rule applies to. One or both of |
12293 * sourceRanges and sourceTags may be set. | 13001 * sourceRanges and sourceTags may be set. |
12294 * | 13002 * |
12295 * If both properties are set, an inbound connection is allowed if the range | 13003 * If both properties are set, an inbound connection is allowed if the range |
12296 * or the tag of the source matches the sourceRanges OR matches the sourceTags | 13004 * matches the sourceRanges OR the tag of the source matches the sourceTags |
12297 * property; the connection does not need to match both properties. | 13005 * property. The connection does not need to match both properties. |
12298 */ | 13006 */ |
12299 core.List<core.String> sourceTags; | 13007 core.List<core.String> sourceTags; |
12300 /** | 13008 /** |
12301 * A list of instance tags indicating sets of instances located on network | 13009 * A list of instance tags indicating sets of instances located in the network |
12302 * which may make network connections as specified in allowed[]. If no | 13010 * that may make network connections as specified in allowed[]. If no |
12303 * targetTags are specified, the firewall rule applies to all instances on the | 13011 * targetTags are specified, the firewall rule applies to all instances on the |
12304 * specified network. | 13012 * specified network. |
12305 */ | 13013 */ |
12306 core.List<core.String> targetTags; | 13014 core.List<core.String> targetTags; |
12307 | 13015 |
12308 Firewall(); | 13016 Firewall(); |
12309 | 13017 |
12310 Firewall.fromJson(core.Map _json) { | 13018 Firewall.fromJson(core.Map _json) { |
12311 if (_json.containsKey("allowed")) { | 13019 if (_json.containsKey("allowed")) { |
12312 allowed = _json["allowed"].map((value) => new FirewallAllowed.fromJson(val
ue)).toList(); | 13020 allowed = _json["allowed"].map((value) => new FirewallAllowed.fromJson(val
ue)).toList(); |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12449 class ForwardingRule { | 13157 class ForwardingRule { |
12450 /** | 13158 /** |
12451 * Value of the reserved IP address that this forwarding rule is serving on | 13159 * Value of the reserved IP address that this forwarding rule is serving on |
12452 * behalf of. For global forwarding rules, the address must be a global IP; | 13160 * behalf of. For global forwarding rules, the address must be a global IP; |
12453 * for regional forwarding rules, the address must live in the same region as | 13161 * for regional forwarding rules, the address must live in the same region as |
12454 * the forwarding rule. If left empty (default value), an ephemeral IP from | 13162 * the forwarding rule. If left empty (default value), an ephemeral IP from |
12455 * the same scope (global or regional) will be assigned. | 13163 * the same scope (global or regional) will be assigned. |
12456 */ | 13164 */ |
12457 core.String IPAddress; | 13165 core.String IPAddress; |
12458 /** | 13166 /** |
12459 * The IP protocol to which this rule applies, valid options are 'TCP', 'UDP', | 13167 * The IP protocol to which this rule applies, valid options are TCP, UDP, |
12460 * 'ESP', 'AH' or 'SCTP'. | 13168 * ESP, AH or SCTP. |
12461 * Possible string values are: | 13169 * Possible string values are: |
12462 * - "AH" | 13170 * - "AH" |
12463 * - "ESP" | 13171 * - "ESP" |
12464 * - "SCTP" | 13172 * - "SCTP" |
12465 * - "TCP" | 13173 * - "TCP" |
12466 * - "UDP" | 13174 * - "UDP" |
12467 */ | 13175 */ |
12468 core.String IPProtocol; | 13176 core.String IPProtocol; |
12469 /** Creation timestamp in RFC3339 text format (output only). */ | 13177 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
12470 core.String creationTimestamp; | 13178 core.String creationTimestamp; |
12471 /** | 13179 /** |
12472 * An optional textual description of the resource; provided by the client | 13180 * An optional textual description of the resource; provided by the client |
12473 * when the resource is created. | 13181 * when the resource is created. |
12474 */ | 13182 */ |
12475 core.String description; | 13183 core.String description; |
12476 /** | 13184 /** |
12477 * Unique identifier for the resource; defined by the server (output only). | 13185 * [Output Only] Unique identifier for the resource; defined by the server. |
12478 */ | 13186 */ |
12479 core.String id; | 13187 core.String id; |
12480 /** Type of the resource. */ | 13188 /** Type of the resource. */ |
12481 core.String kind; | 13189 core.String kind; |
12482 /** | 13190 /** |
12483 * Name of the resource; provided by the client when the resource is created. | 13191 * Name of the resource; provided by the client when the resource is created. |
12484 * The name must be 1-63 characters long, and comply with RFC1035. | 13192 * The name must be 1-63 characters long, and comply with RFC1035. |
| 13193 * Specifically, the name must be 1-63 characters long and match the regular |
| 13194 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must |
| 13195 * be a lowercase letter, and all following characters must be a dash, |
| 13196 * lowercase letter, or digit, except the last character, which cannot be a |
| 13197 * dash. |
12485 */ | 13198 */ |
12486 core.String name; | 13199 core.String name; |
12487 /** | 13200 /** |
12488 * Applicable only when 'IPProtocol' is 'TCP', 'UDP' or 'SCTP', only packets | 13201 * Applicable only when `IPProtocol` is TCP, UDP, or SCTP, only packets |
12489 * addressed to ports in the specified range will be forwarded to 'target'. If | 13202 * addressed to ports in the specified range will be forwarded to target. If |
12490 * 'portRange' is left empty (default value), all ports are forwarded. | 13203 * portRange is left empty (default value), all ports are forwarded. |
12491 * Forwarding rules with the same [IPAddress, IPProtocol] pair must have | 13204 * Forwarding rules with the same `[IPAddress, IPProtocol]` pair must have |
12492 * disjoint port ranges. | 13205 * disjoint port ranges. |
12493 */ | 13206 */ |
12494 core.String portRange; | 13207 core.String portRange; |
12495 /** | 13208 /** |
12496 * URL of the region where the regional forwarding rule resides (output only). | 13209 * [Output Only] URL of the region where the regional forwarding rule resides. |
12497 * This field is not applicable to global forwarding rules. | 13210 * This field is not applicable to global forwarding rules. |
12498 */ | 13211 */ |
12499 core.String region; | 13212 core.String region; |
12500 /** Server defined URL for the resource (output only). */ | 13213 /** [Output Only] Server-defined URL for the resource. */ |
12501 core.String selfLink; | 13214 core.String selfLink; |
12502 /** | 13215 /** |
12503 * The URL of the target resource to receive the matched traffic. For regional | 13216 * The URL of the target resource to receive the matched traffic. For regional |
12504 * forwarding rules, this target must live in the same region as the | 13217 * forwarding rules, this target must live in the same region as the |
12505 * forwarding rule. For global forwarding rules, this target must be a global | 13218 * forwarding rule. For global forwarding rules, this target must be a global |
12506 * TargetHttpProxy resource. | 13219 * TargetHttpProxy or TargetHttpsProxy resource. |
12507 */ | 13220 */ |
12508 core.String target; | 13221 core.String target; |
12509 | 13222 |
12510 ForwardingRule(); | 13223 ForwardingRule(); |
12511 | 13224 |
12512 ForwardingRule.fromJson(core.Map _json) { | 13225 ForwardingRule.fromJson(core.Map _json) { |
12513 if (_json.containsKey("IPAddress")) { | 13226 if (_json.containsKey("IPAddress")) { |
12514 IPAddress = _json["IPAddress"]; | 13227 IPAddress = _json["IPAddress"]; |
12515 } | 13228 } |
12516 if (_json.containsKey("IPProtocol")) { | 13229 if (_json.containsKey("IPProtocol")) { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12579 } | 13292 } |
12580 if (target != null) { | 13293 if (target != null) { |
12581 _json["target"] = target; | 13294 _json["target"] = target; |
12582 } | 13295 } |
12583 return _json; | 13296 return _json; |
12584 } | 13297 } |
12585 } | 13298 } |
12586 | 13299 |
12587 class ForwardingRuleAggregatedList { | 13300 class ForwardingRuleAggregatedList { |
12588 /** | 13301 /** |
12589 * Unique identifier for the resource; defined by the server (output only). | 13302 * [Output Only] Unique identifier for the resource; defined by the server. |
12590 */ | 13303 */ |
12591 core.String id; | 13304 core.String id; |
12592 /** A map of scoped forwarding rule lists. */ | 13305 /** A map of scoped forwarding rule lists. */ |
12593 core.Map<core.String, ForwardingRulesScopedList> items; | 13306 core.Map<core.String, ForwardingRulesScopedList> items; |
12594 /** Type of resource. */ | 13307 /** Type of resource. */ |
12595 core.String kind; | 13308 core.String kind; |
12596 /** A token used to continue a truncated list request (output only). */ | 13309 /** [Output Only] A token used to continue a truncated list request. */ |
12597 core.String nextPageToken; | 13310 core.String nextPageToken; |
12598 /** Server defined URL for this resource (output only). */ | 13311 /** [Output Only] Server defined URL for this resource. */ |
12599 core.String selfLink; | 13312 core.String selfLink; |
12600 | 13313 |
12601 ForwardingRuleAggregatedList(); | 13314 ForwardingRuleAggregatedList(); |
12602 | 13315 |
12603 ForwardingRuleAggregatedList.fromJson(core.Map _json) { | 13316 ForwardingRuleAggregatedList.fromJson(core.Map _json) { |
12604 if (_json.containsKey("id")) { | 13317 if (_json.containsKey("id")) { |
12605 id = _json["id"]; | 13318 id = _json["id"]; |
12606 } | 13319 } |
12607 if (_json.containsKey("items")) { | 13320 if (_json.containsKey("items")) { |
12608 items = commons.mapMap(_json["items"], (item) => new ForwardingRulesScoped
List.fromJson(item)); | 13321 items = commons.mapMap(_json["items"], (item) => new ForwardingRulesScoped
List.fromJson(item)); |
(...skipping 25 matching lines...) Expand all Loading... |
12634 } | 13347 } |
12635 if (selfLink != null) { | 13348 if (selfLink != null) { |
12636 _json["selfLink"] = selfLink; | 13349 _json["selfLink"] = selfLink; |
12637 } | 13350 } |
12638 return _json; | 13351 return _json; |
12639 } | 13352 } |
12640 } | 13353 } |
12641 | 13354 |
12642 /** Contains a list of ForwardingRule resources. */ | 13355 /** Contains a list of ForwardingRule resources. */ |
12643 class ForwardingRuleList { | 13356 class ForwardingRuleList { |
12644 /** | 13357 /** [Output Only] Unique identifier for the resource. Set by the server. */ |
12645 * Unique identifier for the resource; defined by the server (output only). | |
12646 */ | |
12647 core.String id; | 13358 core.String id; |
12648 /** A list of ForwardingRule resources. */ | 13359 /** A list of ForwardingRule resources. */ |
12649 core.List<ForwardingRule> items; | 13360 core.List<ForwardingRule> items; |
12650 /** Type of resource. */ | 13361 /** Type of resource. */ |
12651 core.String kind; | 13362 core.String kind; |
12652 /** A token used to continue a truncated list request (output only). */ | 13363 /** [Output Only] A token used to continue a truncated list request. */ |
12653 core.String nextPageToken; | 13364 core.String nextPageToken; |
12654 /** Server defined URL for this resource (output only). */ | 13365 /** [Output Only] Server defined URL for this resource. */ |
12655 core.String selfLink; | 13366 core.String selfLink; |
12656 | 13367 |
12657 ForwardingRuleList(); | 13368 ForwardingRuleList(); |
12658 | 13369 |
12659 ForwardingRuleList.fromJson(core.Map _json) { | 13370 ForwardingRuleList.fromJson(core.Map _json) { |
12660 if (_json.containsKey("id")) { | 13371 if (_json.containsKey("id")) { |
12661 id = _json["id"]; | 13372 id = _json["id"]; |
12662 } | 13373 } |
12663 if (_json.containsKey("items")) { | 13374 if (_json.containsKey("items")) { |
12664 items = _json["items"].map((value) => new ForwardingRule.fromJson(value)).
toList(); | 13375 items = _json["items"].map((value) => new ForwardingRule.fromJson(value)).
toList(); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12878 _json["ipAddress"] = ipAddress; | 13589 _json["ipAddress"] = ipAddress; |
12879 } | 13590 } |
12880 if (port != null) { | 13591 if (port != null) { |
12881 _json["port"] = port; | 13592 _json["port"] = port; |
12882 } | 13593 } |
12883 return _json; | 13594 return _json; |
12884 } | 13595 } |
12885 } | 13596 } |
12886 | 13597 |
12887 /** | 13598 /** |
12888 * A host-matching rule for a URL. If matched, will use the named PathMatcher to | 13599 * UrlMaps A host-matching rule for a URL. If matched, will use the named |
12889 * select the BackendService. | 13600 * PathMatcher to select the BackendService. |
12890 */ | 13601 */ |
12891 class HostRule { | 13602 class HostRule { |
| 13603 /** An optional textual description. */ |
12892 core.String description; | 13604 core.String description; |
12893 /** | 13605 /** |
12894 * The list of host patterns to match. They must be valid hostnames except | 13606 * The list of host patterns to match. They must be valid hostnames except |
12895 * that they may start with *. or *-. The * acts like a glob and will match | 13607 * that they may start with *. or *-. The * acts like a glob and will match |
12896 * any string of atoms (separated by .s and -s) to the left. | 13608 * any string of atoms (separated by .s and -s) to the left. |
12897 */ | 13609 */ |
12898 core.List<core.String> hosts; | 13610 core.List<core.String> hosts; |
12899 /** | 13611 /** |
12900 * The name of the PathMatcher to match the path portion of the URL, if the | 13612 * The name of the PathMatcher to match the path portion of the URL, if the |
12901 * this HostRule matches the URL's host portion. | 13613 * this hostRule matches the URL's host portion. |
12902 */ | 13614 */ |
12903 core.String pathMatcher; | 13615 core.String pathMatcher; |
12904 | 13616 |
12905 HostRule(); | 13617 HostRule(); |
12906 | 13618 |
12907 HostRule.fromJson(core.Map _json) { | 13619 HostRule.fromJson(core.Map _json) { |
12908 if (_json.containsKey("description")) { | 13620 if (_json.containsKey("description")) { |
12909 description = _json["description"]; | 13621 description = _json["description"]; |
12910 } | 13622 } |
12911 if (_json.containsKey("hosts")) { | 13623 if (_json.containsKey("hosts")) { |
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13980 /** | 14692 /** |
13981 * [Output Only] The creation timestamp for this managed instance group in | 14693 * [Output Only] The creation timestamp for this managed instance group in |
13982 * RFC3339 text format. | 14694 * RFC3339 text format. |
13983 */ | 14695 */ |
13984 core.String creationTimestamp; | 14696 core.String creationTimestamp; |
13985 /** | 14697 /** |
13986 * [Output Only] The list of instance actions and the number of instances in | 14698 * [Output Only] The list of instance actions and the number of instances in |
13987 * this managed instance group that are scheduled for those actions. | 14699 * this managed instance group that are scheduled for those actions. |
13988 */ | 14700 */ |
13989 InstanceGroupManagerActionsSummary currentActions; | 14701 InstanceGroupManagerActionsSummary currentActions; |
13990 /** | |
13991 * [Output Only] The number of instances that currently exist and are a part | |
13992 * of this group. The number includes instances that are in a RUNNING state, | |
13993 * instances that are starting, and instances that are scheduled to be deleted | |
13994 * or abandoned. | |
13995 */ | |
13996 core.int currentSize; | |
13997 /** An optional text description for the managed instance group. */ | 14702 /** An optional text description for the managed instance group. */ |
13998 core.String description; | 14703 core.String description; |
13999 /** | 14704 /** |
14000 * [Output Only] The fingerprint of the target pools information, which is a | 14705 * [Output Only] The fingerprint of the target pools information, which is a |
14001 * hash of the contents. This field is used for optimistic locking when | 14706 * hash of the contents. This field is used for optimistic locking when |
14002 * updating the target pool entries. | 14707 * updating the target pool entries. |
14003 */ | 14708 */ |
14004 core.String fingerprint; | 14709 core.String fingerprint; |
14005 core.List<core.int> get fingerprintAsBytes { | 14710 core.List<core.int> get fingerprintAsBytes { |
14006 return crypto.CryptoUtils.base64StringToBytes(fingerprint); | 14711 return crypto.CryptoUtils.base64StringToBytes(fingerprint); |
(...skipping 21 matching lines...) Expand all Loading... |
14028 */ | 14733 */ |
14029 core.String kind; | 14734 core.String kind; |
14030 /** | 14735 /** |
14031 * The name of the managed instance group. The name must be 1-63 characters | 14736 * The name of the managed instance group. The name must be 1-63 characters |
14032 * long, and comply with RFC1035. | 14737 * long, and comply with RFC1035. |
14033 */ | 14738 */ |
14034 core.String name; | 14739 core.String name; |
14035 /** [Output Only] Server defined URL for this managed instance group. */ | 14740 /** [Output Only] Server defined URL for this managed instance group. */ |
14036 core.String selfLink; | 14741 core.String selfLink; |
14037 /** | 14742 /** |
14038 * The URL of all TargetPool resources to which new instances in the | 14743 * The URLs of all TargetPool resources to which new instances in the |
14039 * instanceGroup field are added. Updating the target pool values does not | 14744 * instanceGroup field are added. Updating the target pool values does not |
14040 * affect existing instances. | 14745 * affect existing instances. |
14041 */ | 14746 */ |
14042 core.List<core.String> targetPools; | 14747 core.List<core.String> targetPools; |
14043 /** | 14748 /** |
14044 * The target number of running instances for this managed instance group. | 14749 * The target number of running instances for this managed instance group. |
14045 * Deleting or abandoning instances reduces this number. Resizing the group | 14750 * Deleting or abandoning instances reduces this number. Resizing the group |
14046 * changes this number. | 14751 * changes this number. |
14047 */ | 14752 */ |
14048 core.int targetSize; | 14753 core.int targetSize; |
14049 /** The URL of the zone where the managed instance group is located. */ | 14754 /** The URL of the zone where the managed instance group is located. */ |
14050 core.String zone; | 14755 core.String zone; |
14051 | 14756 |
14052 InstanceGroupManager(); | 14757 InstanceGroupManager(); |
14053 | 14758 |
14054 InstanceGroupManager.fromJson(core.Map _json) { | 14759 InstanceGroupManager.fromJson(core.Map _json) { |
14055 if (_json.containsKey("autoHealingPolicies")) { | 14760 if (_json.containsKey("autoHealingPolicies")) { |
14056 autoHealingPolicies = _json["autoHealingPolicies"].map((value) => new Inst
anceGroupManagerAutoHealingPolicy.fromJson(value)).toList(); | 14761 autoHealingPolicies = _json["autoHealingPolicies"].map((value) => new Inst
anceGroupManagerAutoHealingPolicy.fromJson(value)).toList(); |
14057 } | 14762 } |
14058 if (_json.containsKey("baseInstanceName")) { | 14763 if (_json.containsKey("baseInstanceName")) { |
14059 baseInstanceName = _json["baseInstanceName"]; | 14764 baseInstanceName = _json["baseInstanceName"]; |
14060 } | 14765 } |
14061 if (_json.containsKey("creationTimestamp")) { | 14766 if (_json.containsKey("creationTimestamp")) { |
14062 creationTimestamp = _json["creationTimestamp"]; | 14767 creationTimestamp = _json["creationTimestamp"]; |
14063 } | 14768 } |
14064 if (_json.containsKey("currentActions")) { | 14769 if (_json.containsKey("currentActions")) { |
14065 currentActions = new InstanceGroupManagerActionsSummary.fromJson(_json["cu
rrentActions"]); | 14770 currentActions = new InstanceGroupManagerActionsSummary.fromJson(_json["cu
rrentActions"]); |
14066 } | 14771 } |
14067 if (_json.containsKey("currentSize")) { | |
14068 currentSize = _json["currentSize"]; | |
14069 } | |
14070 if (_json.containsKey("description")) { | 14772 if (_json.containsKey("description")) { |
14071 description = _json["description"]; | 14773 description = _json["description"]; |
14072 } | 14774 } |
14073 if (_json.containsKey("fingerprint")) { | 14775 if (_json.containsKey("fingerprint")) { |
14074 fingerprint = _json["fingerprint"]; | 14776 fingerprint = _json["fingerprint"]; |
14075 } | 14777 } |
14076 if (_json.containsKey("id")) { | 14778 if (_json.containsKey("id")) { |
14077 id = _json["id"]; | 14779 id = _json["id"]; |
14078 } | 14780 } |
14079 if (_json.containsKey("instanceGroup")) { | 14781 if (_json.containsKey("instanceGroup")) { |
(...skipping 29 matching lines...) Expand all Loading... |
14109 } | 14811 } |
14110 if (baseInstanceName != null) { | 14812 if (baseInstanceName != null) { |
14111 _json["baseInstanceName"] = baseInstanceName; | 14813 _json["baseInstanceName"] = baseInstanceName; |
14112 } | 14814 } |
14113 if (creationTimestamp != null) { | 14815 if (creationTimestamp != null) { |
14114 _json["creationTimestamp"] = creationTimestamp; | 14816 _json["creationTimestamp"] = creationTimestamp; |
14115 } | 14817 } |
14116 if (currentActions != null) { | 14818 if (currentActions != null) { |
14117 _json["currentActions"] = (currentActions).toJson(); | 14819 _json["currentActions"] = (currentActions).toJson(); |
14118 } | 14820 } |
14119 if (currentSize != null) { | |
14120 _json["currentSize"] = currentSize; | |
14121 } | |
14122 if (description != null) { | 14821 if (description != null) { |
14123 _json["description"] = description; | 14822 _json["description"] = description; |
14124 } | 14823 } |
14125 if (fingerprint != null) { | 14824 if (fingerprint != null) { |
14126 _json["fingerprint"] = fingerprint; | 14825 _json["fingerprint"] = fingerprint; |
14127 } | 14826 } |
14128 if (id != null) { | 14827 if (id != null) { |
14129 _json["id"] = id; | 14828 _json["id"] = id; |
14130 } | 14829 } |
14131 if (instanceGroup != null) { | 14830 if (instanceGroup != null) { |
(...skipping 18 matching lines...) Expand all Loading... |
14150 _json["targetSize"] = targetSize; | 14849 _json["targetSize"] = targetSize; |
14151 } | 14850 } |
14152 if (zone != null) { | 14851 if (zone != null) { |
14153 _json["zone"] = zone; | 14852 _json["zone"] = zone; |
14154 } | 14853 } |
14155 return _json; | 14854 return _json; |
14156 } | 14855 } |
14157 } | 14856 } |
14158 | 14857 |
14159 class InstanceGroupManagerActionsSummary { | 14858 class InstanceGroupManagerActionsSummary { |
| 14859 /** |
| 14860 * [Output Only] Total number of instances in the managed instance group that |
| 14861 * are scheduled to be abandoned. Abandoning an instance removes it from the |
| 14862 * managed instance group without deleting it. |
| 14863 */ |
14160 core.int abandoning; | 14864 core.int abandoning; |
| 14865 /** |
| 14866 * [Output Only] The number of instances in the managed instance group that |
| 14867 * are scheduled to be created or are currently being created. |
| 14868 */ |
14161 core.int creating; | 14869 core.int creating; |
| 14870 /** |
| 14871 * [Output Only] The number of instances in the managed instance group that |
| 14872 * are scheduled to be deleted or are currently being deleted. |
| 14873 */ |
14162 core.int deleting; | 14874 core.int deleting; |
| 14875 /** |
| 14876 * [Output Only] The number of instances in the managed instance group that |
| 14877 * currently have no scheduled actions. |
| 14878 */ |
14163 core.int none; | 14879 core.int none; |
14164 core.int rebooting; | 14880 /** |
| 14881 * [Output Only] The number of instances in the managed instance group that |
| 14882 * are scheduled to be recreated or are currently being being recreated. |
| 14883 * Recreating an instance deletes the existing root persistent disk and |
| 14884 * creates a new disk from the image that is defined in the instance template. |
| 14885 */ |
14165 core.int recreating; | 14886 core.int recreating; |
| 14887 /** |
| 14888 * [Output Only] The number of instances in the managed instance group that |
| 14889 * are being reconfigured with properties that do not require a restart or a |
| 14890 * recreate action. For example, setting or removing target pools for the |
| 14891 * instance. |
| 14892 */ |
14166 core.int refreshing; | 14893 core.int refreshing; |
| 14894 /** |
| 14895 * [Output Only] The number of instances in the managed instance group that |
| 14896 * are scheduled to be restarted or are currently being restarted. |
| 14897 */ |
| 14898 core.int restarting; |
14167 | 14899 |
14168 InstanceGroupManagerActionsSummary(); | 14900 InstanceGroupManagerActionsSummary(); |
14169 | 14901 |
14170 InstanceGroupManagerActionsSummary.fromJson(core.Map _json) { | 14902 InstanceGroupManagerActionsSummary.fromJson(core.Map _json) { |
14171 if (_json.containsKey("abandoning")) { | 14903 if (_json.containsKey("abandoning")) { |
14172 abandoning = _json["abandoning"]; | 14904 abandoning = _json["abandoning"]; |
14173 } | 14905 } |
14174 if (_json.containsKey("creating")) { | 14906 if (_json.containsKey("creating")) { |
14175 creating = _json["creating"]; | 14907 creating = _json["creating"]; |
14176 } | 14908 } |
14177 if (_json.containsKey("deleting")) { | 14909 if (_json.containsKey("deleting")) { |
14178 deleting = _json["deleting"]; | 14910 deleting = _json["deleting"]; |
14179 } | 14911 } |
14180 if (_json.containsKey("none")) { | 14912 if (_json.containsKey("none")) { |
14181 none = _json["none"]; | 14913 none = _json["none"]; |
14182 } | 14914 } |
14183 if (_json.containsKey("rebooting")) { | |
14184 rebooting = _json["rebooting"]; | |
14185 } | |
14186 if (_json.containsKey("recreating")) { | 14915 if (_json.containsKey("recreating")) { |
14187 recreating = _json["recreating"]; | 14916 recreating = _json["recreating"]; |
14188 } | 14917 } |
14189 if (_json.containsKey("refreshing")) { | 14918 if (_json.containsKey("refreshing")) { |
14190 refreshing = _json["refreshing"]; | 14919 refreshing = _json["refreshing"]; |
14191 } | 14920 } |
| 14921 if (_json.containsKey("restarting")) { |
| 14922 restarting = _json["restarting"]; |
| 14923 } |
14192 } | 14924 } |
14193 | 14925 |
14194 core.Map toJson() { | 14926 core.Map toJson() { |
14195 var _json = new core.Map(); | 14927 var _json = new core.Map(); |
14196 if (abandoning != null) { | 14928 if (abandoning != null) { |
14197 _json["abandoning"] = abandoning; | 14929 _json["abandoning"] = abandoning; |
14198 } | 14930 } |
14199 if (creating != null) { | 14931 if (creating != null) { |
14200 _json["creating"] = creating; | 14932 _json["creating"] = creating; |
14201 } | 14933 } |
14202 if (deleting != null) { | 14934 if (deleting != null) { |
14203 _json["deleting"] = deleting; | 14935 _json["deleting"] = deleting; |
14204 } | 14936 } |
14205 if (none != null) { | 14937 if (none != null) { |
14206 _json["none"] = none; | 14938 _json["none"] = none; |
14207 } | 14939 } |
14208 if (rebooting != null) { | |
14209 _json["rebooting"] = rebooting; | |
14210 } | |
14211 if (recreating != null) { | 14940 if (recreating != null) { |
14212 _json["recreating"] = recreating; | 14941 _json["recreating"] = recreating; |
14213 } | 14942 } |
14214 if (refreshing != null) { | 14943 if (refreshing != null) { |
14215 _json["refreshing"] = refreshing; | 14944 _json["refreshing"] = refreshing; |
14216 } | 14945 } |
| 14946 if (restarting != null) { |
| 14947 _json["restarting"] = restarting; |
| 14948 } |
14217 return _json; | 14949 return _json; |
14218 } | 14950 } |
14219 } | 14951 } |
14220 | 14952 |
14221 class InstanceGroupManagerAggregatedList { | 14953 class InstanceGroupManagerAggregatedList { |
14222 /** | 14954 /** |
14223 * [Output Only] A unique identifier for this aggregated list of managed | 14955 * [Output Only] A unique identifier for this aggregated list of managed |
14224 * instance groups. The server defines this identifier. | 14956 * instance groups. The server defines this identifier. |
14225 */ | 14957 */ |
14226 core.String id; | 14958 core.String id; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14279 if (selfLink != null) { | 15011 if (selfLink != null) { |
14280 _json["selfLink"] = selfLink; | 15012 _json["selfLink"] = selfLink; |
14281 } | 15013 } |
14282 return _json; | 15014 return _json; |
14283 } | 15015 } |
14284 } | 15016 } |
14285 | 15017 |
14286 class InstanceGroupManagerAutoHealingPolicy { | 15018 class InstanceGroupManagerAutoHealingPolicy { |
14287 /** | 15019 /** |
14288 * The action to perform when an instance becomes unhealthy. Possible values | 15020 * The action to perform when an instance becomes unhealthy. Possible values |
14289 * are RECREATE or REBOOT. RECREATE replaces an unhealthy instance with a new | 15021 * are RECREATE or RESTART. RECREATE replaces an unhealthy instance with a new |
14290 * instance that is based on the instance template for this managed instance | 15022 * instance that is based on the instance template for this managed instance |
14291 * group. REBOOT performs a soft reboot on an instance. If the instance cannot | 15023 * group. RESTART performs a soft restart on an instance. If the instance |
14292 * reboot, the instance performs a hard restart. | 15024 * cannot restart softly, the instance performs a hard restart. |
14293 * Possible string values are: | 15025 * Possible string values are: |
14294 * - "REBOOT" | |
14295 * - "RECREATE" | 15026 * - "RECREATE" |
| 15027 * - "RESTART" |
14296 */ | 15028 */ |
14297 core.String actionType; | 15029 core.String actionType; |
14298 /** The URL for the HealthCheck that signals autohealing. */ | 15030 /** The URL for the HealthCheck that signals autohealing. */ |
14299 core.String healthCheck; | 15031 core.String healthCheck; |
14300 | 15032 |
14301 InstanceGroupManagerAutoHealingPolicy(); | 15033 InstanceGroupManagerAutoHealingPolicy(); |
14302 | 15034 |
14303 InstanceGroupManagerAutoHealingPolicy.fromJson(core.Map _json) { | 15035 InstanceGroupManagerAutoHealingPolicy.fromJson(core.Map _json) { |
14304 if (_json.containsKey("actionType")) { | 15036 if (_json.containsKey("actionType")) { |
14305 actionType = _json["actionType"]; | 15037 actionType = _json["actionType"]; |
(...skipping 1680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
15986 | 16718 |
15987 class ManagedInstance { | 16719 class ManagedInstance { |
15988 /** | 16720 /** |
15989 * The current action that the managed instance group has scheduled for the | 16721 * The current action that the managed instance group has scheduled for the |
15990 * instance. | 16722 * instance. |
15991 * Possible string values are: | 16723 * Possible string values are: |
15992 * - "ABANDONING" | 16724 * - "ABANDONING" |
15993 * - "CREATING" | 16725 * - "CREATING" |
15994 * - "DELETING" | 16726 * - "DELETING" |
15995 * - "NONE" | 16727 * - "NONE" |
15996 * - "REBOOTING" | |
15997 * - "RECREATING" | 16728 * - "RECREATING" |
15998 * - "REFRESHING" | 16729 * - "REFRESHING" |
| 16730 * - "RESTARTING" |
15999 */ | 16731 */ |
16000 core.String currentAction; | 16732 core.String currentAction; |
16001 /** | 16733 /** |
16002 * The unique identifier for this resource (empty when instance does not | 16734 * The unique identifier for this resource (empty when instance does not |
16003 * exist). | 16735 * exist). |
16004 */ | 16736 */ |
16005 core.String incarnationId; | 16737 core.String id; |
16006 /** The URL of the instance (set even though instance does not exist yet). */ | 16738 /** The URL of the instance (set even though instance does not exist yet). */ |
16007 core.String instance; | 16739 core.String instance; |
16008 /** | 16740 /** |
16009 * The status of the instance (empty when instance does not exist). | 16741 * The status of the instance (empty when instance does not exist). |
16010 * Possible string values are: | 16742 * Possible string values are: |
16011 * - "PROVISIONING" | 16743 * - "PROVISIONING" |
16012 * - "RUNNING" | 16744 * - "RUNNING" |
16013 * - "STAGING" | 16745 * - "STAGING" |
16014 * - "STOPPED" | 16746 * - "STOPPED" |
16015 * - "STOPPING" | 16747 * - "STOPPING" |
16016 * - "SUSPENDED" | 16748 * - "SUSPENDED" |
16017 * - "SUSPENDING" | 16749 * - "SUSPENDING" |
16018 * - "TERMINATED" | 16750 * - "TERMINATED" |
16019 */ | 16751 */ |
16020 core.String instanceStatus; | 16752 core.String instanceStatus; |
16021 /** Information about the last attempt to create or delete the instance. */ | 16753 /** Information about the last attempt to create or delete the instance. */ |
16022 ManagedInstanceLastAttempt lastAttempt; | 16754 ManagedInstanceLastAttempt lastAttempt; |
16023 | 16755 |
16024 ManagedInstance(); | 16756 ManagedInstance(); |
16025 | 16757 |
16026 ManagedInstance.fromJson(core.Map _json) { | 16758 ManagedInstance.fromJson(core.Map _json) { |
16027 if (_json.containsKey("currentAction")) { | 16759 if (_json.containsKey("currentAction")) { |
16028 currentAction = _json["currentAction"]; | 16760 currentAction = _json["currentAction"]; |
16029 } | 16761 } |
16030 if (_json.containsKey("incarnationId")) { | 16762 if (_json.containsKey("id")) { |
16031 incarnationId = _json["incarnationId"]; | 16763 id = _json["id"]; |
16032 } | 16764 } |
16033 if (_json.containsKey("instance")) { | 16765 if (_json.containsKey("instance")) { |
16034 instance = _json["instance"]; | 16766 instance = _json["instance"]; |
16035 } | 16767 } |
16036 if (_json.containsKey("instanceStatus")) { | 16768 if (_json.containsKey("instanceStatus")) { |
16037 instanceStatus = _json["instanceStatus"]; | 16769 instanceStatus = _json["instanceStatus"]; |
16038 } | 16770 } |
16039 if (_json.containsKey("lastAttempt")) { | 16771 if (_json.containsKey("lastAttempt")) { |
16040 lastAttempt = new ManagedInstanceLastAttempt.fromJson(_json["lastAttempt"]
); | 16772 lastAttempt = new ManagedInstanceLastAttempt.fromJson(_json["lastAttempt"]
); |
16041 } | 16773 } |
16042 } | 16774 } |
16043 | 16775 |
16044 core.Map toJson() { | 16776 core.Map toJson() { |
16045 var _json = new core.Map(); | 16777 var _json = new core.Map(); |
16046 if (currentAction != null) { | 16778 if (currentAction != null) { |
16047 _json["currentAction"] = currentAction; | 16779 _json["currentAction"] = currentAction; |
16048 } | 16780 } |
16049 if (incarnationId != null) { | 16781 if (id != null) { |
16050 _json["incarnationId"] = incarnationId; | 16782 _json["id"] = id; |
16051 } | 16783 } |
16052 if (instance != null) { | 16784 if (instance != null) { |
16053 _json["instance"] = instance; | 16785 _json["instance"] = instance; |
16054 } | 16786 } |
16055 if (instanceStatus != null) { | 16787 if (instanceStatus != null) { |
16056 _json["instanceStatus"] = instanceStatus; | 16788 _json["instanceStatus"] = instanceStatus; |
16057 } | 16789 } |
16058 if (lastAttempt != null) { | 16790 if (lastAttempt != null) { |
16059 _json["lastAttempt"] = (lastAttempt).toJson(); | 16791 _json["lastAttempt"] = (lastAttempt).toJson(); |
16060 } | 16792 } |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16282 class Network { | 17014 class Network { |
16283 /** | 17015 /** |
16284 * The range of internal addresses that are legal on this network. This range | 17016 * The range of internal addresses that are legal on this network. This range |
16285 * is a CIDR specification, for example: 192.168.0.0/16. Provided by the | 17017 * is a CIDR specification, for example: 192.168.0.0/16. Provided by the |
16286 * client when the network is created. | 17018 * client when the network is created. |
16287 */ | 17019 */ |
16288 core.String IPv4Range; | 17020 core.String IPv4Range; |
16289 /** [Output Only] Creation timestamp in RFC3339 text format. */ | 17021 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
16290 core.String creationTimestamp; | 17022 core.String creationTimestamp; |
16291 /** | 17023 /** |
16292 * An optional textual description of the resource; provided by the client | 17024 * An optional textual description of the resource. Provided by the client |
16293 * when the resource is created. | 17025 * when the resource is created. |
16294 */ | 17026 */ |
16295 core.String description; | 17027 core.String description; |
16296 /** | 17028 /** |
16297 * A gateway address for default routing to other networks. This value is read | 17029 * A gateway address for default routing to other networks. This value is read |
16298 * only and is selected by the Google Compute Engine, typically as the first | 17030 * only and is selected by the Google Compute Engine, typically as the first |
16299 * usable address in the IPv4Range. | 17031 * usable address in the IPv4Range. |
16300 */ | 17032 */ |
16301 core.String gatewayIPv4; | 17033 core.String gatewayIPv4; |
16302 /** | 17034 /** |
16303 * [Output Only] Unique identifier for the resource; defined by the server. | 17035 * [Output Only] Unique identifier for the resource. Defined by the server. |
16304 */ | 17036 */ |
16305 core.String id; | 17037 core.String id; |
16306 /** | 17038 /** |
16307 * [Output Only] Type of the resource. Always compute#network for networks. | 17039 * [Output Only] Type of the resource. Always compute#network for networks. |
16308 */ | 17040 */ |
16309 core.String kind; | 17041 core.String kind; |
16310 /** | 17042 /** |
16311 * Name of the resource; provided by the client when the resource is created. | 17043 * Name of the resource. Provided by the client when the resource is created. |
16312 * The name must be 1-63 characters long, and comply with RFC1035. | 17044 * The name must be 1-63 characters long, and comply with RFC1035. |
16313 * Specifically, the name must be 1-63 characters long and match the regular | 17045 * Specifically, the name must be 1-63 characters long and match the regular |
16314 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must | 17046 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must |
16315 * be a lowercase letter, and all following characters must be a dash, | 17047 * be a lowercase letter, and all following characters must be a dash, |
16316 * lowercase letter, or digit, except the last character, which cannot be a | 17048 * lowercase letter, or digit, except the last character, which cannot be a |
16317 * dash. | 17049 * dash. |
16318 */ | 17050 */ |
16319 core.String name; | 17051 core.String name; |
16320 /** [Output Only] Server defined URL for the resource. */ | 17052 /** [Output Only] Server defined URL for the resource. */ |
16321 core.String selfLink; | 17053 core.String selfLink; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16375 if (selfLink != null) { | 17107 if (selfLink != null) { |
16376 _json["selfLink"] = selfLink; | 17108 _json["selfLink"] = selfLink; |
16377 } | 17109 } |
16378 return _json; | 17110 return _json; |
16379 } | 17111 } |
16380 } | 17112 } |
16381 | 17113 |
16382 /** A network interface resource attached to an instance. */ | 17114 /** A network interface resource attached to an instance. */ |
16383 class NetworkInterface { | 17115 class NetworkInterface { |
16384 /** | 17116 /** |
16385 * An array of configurations for this interface. Currently, | 17117 * An array of configurations for this interface. Currently, ONE_TO_ONE_NAT is |
16386 * <codeONE_TO_ONE_NAT is the only access config supported. If there are no | 17118 * the only access config supported. If there are no accessConfigs specified, |
16387 * accessConfigs specified, then this instance will have no external internet | 17119 * then this instance will have no external internet access. |
16388 * access. | |
16389 */ | 17120 */ |
16390 core.List<AccessConfig> accessConfigs; | 17121 core.List<AccessConfig> accessConfigs; |
16391 /** | 17122 /** |
16392 * [Output Only] The name of the network interface, generated by the server. | 17123 * [Output Only] The name of the network interface, generated by the server. |
16393 * For network devices, these are eth0, eth1, etc. | 17124 * For network devices, these are eth0, eth1, etc. |
16394 */ | 17125 */ |
16395 core.String name; | 17126 core.String name; |
16396 /** | 17127 /** |
16397 * URL of the network resource for this instance. This is required for | 17128 * URL of the network resource for this instance. This is required for |
16398 * creating an instance but optional when creating a firewall rule. If not | 17129 * creating an instance but optional when creating a firewall rule. If not |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16445 if (networkIP != null) { | 17176 if (networkIP != null) { |
16446 _json["networkIP"] = networkIP; | 17177 _json["networkIP"] = networkIP; |
16447 } | 17178 } |
16448 return _json; | 17179 return _json; |
16449 } | 17180 } |
16450 } | 17181 } |
16451 | 17182 |
16452 /** Contains a list of Network resources. */ | 17183 /** Contains a list of Network resources. */ |
16453 class NetworkList { | 17184 class NetworkList { |
16454 /** | 17185 /** |
16455 * [Output Only] Unique identifier for the resource; defined by the server. | 17186 * [Output Only] Unique identifier for the resource. Defined by the server. |
16456 */ | 17187 */ |
16457 core.String id; | 17188 core.String id; |
16458 /** [Output Only] A list of Network resources. */ | 17189 /** [Output Only] A list of Network resources. */ |
16459 core.List<Network> items; | 17190 core.List<Network> items; |
16460 /** | 17191 /** |
16461 * [Output Only] Type of resource. Always compute#networkList for lists of | 17192 * [Output Only] Type of resource. Always compute#networkList for lists of |
16462 * networks. | 17193 * networks. |
16463 */ | 17194 */ |
16464 core.String kind; | 17195 core.String kind; |
16465 /** [Output Only] A token used to continue a truncated list request. */ | 17196 /** [Output Only] A token used to continue a truncated list request. */ |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17146 * A matcher for the path portion of the URL. The BackendService from the | 17877 * A matcher for the path portion of the URL. The BackendService from the |
17147 * longest-matched rule will serve the URL. If no rule was matched, the | 17878 * longest-matched rule will serve the URL. If no rule was matched, the |
17148 * default_service will be used. | 17879 * default_service will be used. |
17149 */ | 17880 */ |
17150 class PathMatcher { | 17881 class PathMatcher { |
17151 /** | 17882 /** |
17152 * The URL to the BackendService resource. This will be used if none of the | 17883 * The URL to the BackendService resource. This will be used if none of the |
17153 * 'pathRules' defined by this PathMatcher is met by the URL's path portion. | 17884 * 'pathRules' defined by this PathMatcher is met by the URL's path portion. |
17154 */ | 17885 */ |
17155 core.String defaultService; | 17886 core.String defaultService; |
| 17887 /** An optional textual description of the resource. */ |
17156 core.String description; | 17888 core.String description; |
17157 /** The name to which this PathMatcher is referred by the HostRule. */ | 17889 /** The name to which this PathMatcher is referred by the HostRule. */ |
17158 core.String name; | 17890 core.String name; |
17159 /** The list of path rules. */ | 17891 /** The list of path rules. */ |
17160 core.List<PathRule> pathRules; | 17892 core.List<PathRule> pathRules; |
17161 | 17893 |
17162 PathMatcher(); | 17894 PathMatcher(); |
17163 | 17895 |
17164 PathMatcher.fromJson(core.Map _json) { | 17896 PathMatcher.fromJson(core.Map _json) { |
17165 if (_json.containsKey("defaultService")) { | 17897 if (_json.containsKey("defaultService")) { |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17667 /** | 18399 /** |
17668 * The route resource. A Route is a rule that specifies how certain packets | 18400 * The route resource. A Route is a rule that specifies how certain packets |
17669 * should be handled by the virtual network. Routes are associated with VMs by | 18401 * should be handled by the virtual network. Routes are associated with VMs by |
17670 * tag and the set of Routes for a particular VM is called its routing table. | 18402 * tag and the set of Routes for a particular VM is called its routing table. |
17671 * For each packet leaving a VM, the system searches that VM's routing table for | 18403 * For each packet leaving a VM, the system searches that VM's routing table for |
17672 * a single best matching Route. Routes match packets by destination IP address, | 18404 * a single best matching Route. Routes match packets by destination IP address, |
17673 * preferring smaller or more specific ranges over larger ones. If there is a | 18405 * preferring smaller or more specific ranges over larger ones. If there is a |
17674 * tie, the system selects the Route with the smallest priority value. If there | 18406 * tie, the system selects the Route with the smallest priority value. If there |
17675 * is still a tie, it uses the layer three and four packet headers to select | 18407 * is still a tie, it uses the layer three and four packet headers to select |
17676 * just one of the remaining matching Routes. The packet is then forwarded as | 18408 * just one of the remaining matching Routes. The packet is then forwarded as |
17677 * specified by the next_hop field of the winning Route -- either to another VM | 18409 * specified by the nextHop field of the winning Route -- either to another VM |
17678 * destination, a VM gateway or a GCE operated gateway. Packets that do not | 18410 * destination, a VM gateway or a GCE operated gateway. Packets that do not |
17679 * match any Route in the sending VM's routing table will be dropped. | 18411 * match any Route in the sending VM's routing table are dropped. |
17680 */ | 18412 */ |
17681 class Route { | 18413 class Route { |
17682 /** Creation timestamp in RFC3339 text format (output only). */ | 18414 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
17683 core.String creationTimestamp; | 18415 core.String creationTimestamp; |
17684 /** | 18416 /** |
17685 * An optional textual description of the resource; provided by the client | 18417 * An optional textual description of the resource. Provided by the client |
17686 * when the resource is created. | 18418 * when the resource is created. |
17687 */ | 18419 */ |
17688 core.String description; | 18420 core.String description; |
17689 /** Which packets does this route apply to? */ | 18421 /** The destination range of outgoing packets that this route applies to. */ |
17690 core.String destRange; | 18422 core.String destRange; |
17691 /** | 18423 /** |
17692 * Unique identifier for the resource; defined by the server (output only). | 18424 * [Output Only] Unique identifier for the resource. Defined by the server. |
17693 */ | 18425 */ |
17694 core.String id; | 18426 core.String id; |
17695 /** Type of the resource. */ | 18427 /** |
| 18428 * [Output Only] Type of this resource. Always compute#routes for Route |
| 18429 * resources. |
| 18430 */ |
17696 core.String kind; | 18431 core.String kind; |
17697 /** | 18432 /** |
17698 * Name of the resource; provided by the client when the resource is created. | 18433 * Name of the resource; provided by the client when the resource is created. |
17699 * The name must be 1-63 characters long, and comply with RFC1035. | 18434 * The name must be 1-63 characters long, and comply with RFC1035. |
| 18435 * Specifically, the name must be 1-63 characters long and match the regular |
| 18436 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must |
| 18437 * be a lowercase letter, and all following characters must be a dash, |
| 18438 * lowercase letter, or digit, except the last character, which cannot be a |
| 18439 * dash. |
17700 */ | 18440 */ |
17701 core.String name; | 18441 core.String name; |
| 18442 /** Fully-qualified URL of the network that this route applies to. */ |
| 18443 core.String network; |
17702 /** | 18444 /** |
17703 * URL of the network to which this route is applied; provided by the client | 18445 * The URL to a gateway that should handle matching packets. Currently, this |
17704 * when the route is created. | 18446 * is only the internet gateway: |
| 18447 * projects/<project-id>/global/gateways/default-internet-gateway |
17705 */ | 18448 */ |
17706 core.String network; | |
17707 /** The URL to a gateway that should handle matching packets. */ | |
17708 core.String nextHopGateway; | 18449 core.String nextHopGateway; |
17709 /** The URL to an instance that should handle matching packets. */ | 18450 /** |
| 18451 * The fully-qualified URL to an instance that should handle matching packets. |
| 18452 * For example: |
| 18453 * https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances
/ |
| 18454 */ |
17710 core.String nextHopInstance; | 18455 core.String nextHopInstance; |
17711 /** | 18456 /** |
17712 * The network IP address of an instance that should handle matching packets. | 18457 * The network IP address of an instance that should handle matching packets. |
17713 */ | 18458 */ |
17714 core.String nextHopIp; | 18459 core.String nextHopIp; |
17715 /** The URL of the local network if it should handle matching packets. */ | 18460 /** The URL of the local network if it should handle matching packets. */ |
17716 core.String nextHopNetwork; | 18461 core.String nextHopNetwork; |
17717 /** The URL to a VpnTunnel that should handle matching packets. */ | 18462 /** The URL to a VpnTunnel that should handle matching packets. */ |
17718 core.String nextHopVpnTunnel; | 18463 core.String nextHopVpnTunnel; |
17719 /** | 18464 /** |
17720 * Breaks ties between Routes of equal specificity. Routes with smaller values | 18465 * Breaks ties between Routes of equal specificity. Routes with smaller values |
17721 * win when tied with routes with larger values. Default value is 1000. A | 18466 * win when tied with routes with larger values. Default value is 1000. A |
17722 * valid range is between 0 and 65535. | 18467 * valid range is between 0 and 65535. |
17723 */ | 18468 */ |
17724 core.int priority; | 18469 core.int priority; |
17725 /** Server defined URL for the resource (output only). */ | 18470 /** [Output Only] Server-defined fully-qualified URL for this resource. */ |
17726 core.String selfLink; | 18471 core.String selfLink; |
17727 /** A list of instance tags to which this route applies. */ | 18472 /** A list of instance tags to which this route applies. */ |
17728 core.List<core.String> tags; | 18473 core.List<core.String> tags; |
17729 /** | 18474 /** |
17730 * If potential misconfigurations are detected for this route, this field will | 18475 * [Output Only] If potential misconfigurations are detected for this route, |
17731 * be populated with warning messages. | 18476 * this field will be populated with warning messages. |
17732 */ | 18477 */ |
17733 core.List<RouteWarnings> warnings; | 18478 core.List<RouteWarnings> warnings; |
17734 | 18479 |
17735 Route(); | 18480 Route(); |
17736 | 18481 |
17737 Route.fromJson(core.Map _json) { | 18482 Route.fromJson(core.Map _json) { |
17738 if (_json.containsKey("creationTimestamp")) { | 18483 if (_json.containsKey("creationTimestamp")) { |
17739 creationTimestamp = _json["creationTimestamp"]; | 18484 creationTimestamp = _json["creationTimestamp"]; |
17740 } | 18485 } |
17741 if (_json.containsKey("description")) { | 18486 if (_json.containsKey("description")) { |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17835 if (warnings != null) { | 18580 if (warnings != null) { |
17836 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); | 18581 _json["warnings"] = warnings.map((value) => (value).toJson()).toList(); |
17837 } | 18582 } |
17838 return _json; | 18583 return _json; |
17839 } | 18584 } |
17840 } | 18585 } |
17841 | 18586 |
17842 /** Contains a list of route resources. */ | 18587 /** Contains a list of route resources. */ |
17843 class RouteList { | 18588 class RouteList { |
17844 /** | 18589 /** |
17845 * Unique identifier for the resource; defined by the server (output only). | 18590 * [Output Only] Unique identifier for the resource. Defined by the server. |
17846 */ | 18591 */ |
17847 core.String id; | 18592 core.String id; |
17848 /** A list of Route resources. */ | 18593 /** A list of Route resources. */ |
17849 core.List<Route> items; | 18594 core.List<Route> items; |
17850 /** Type of resource. */ | 18595 /** Type of resource. */ |
17851 core.String kind; | 18596 core.String kind; |
17852 /** A token used to continue a truncated list request (output only). */ | 18597 /** [Output Only] A token used to continue a truncated list request. */ |
17853 core.String nextPageToken; | 18598 core.String nextPageToken; |
17854 /** Server defined URL for this resource (output only). */ | 18599 /** [Output Only] Server defined URL for this resource. */ |
17855 core.String selfLink; | 18600 core.String selfLink; |
17856 | 18601 |
17857 RouteList(); | 18602 RouteList(); |
17858 | 18603 |
17859 RouteList.fromJson(core.Map _json) { | 18604 RouteList.fromJson(core.Map _json) { |
17860 if (_json.containsKey("id")) { | 18605 if (_json.containsKey("id")) { |
17861 id = _json["id"]; | 18606 id = _json["id"]; |
17862 } | 18607 } |
17863 if (_json.containsKey("items")) { | 18608 if (_json.containsKey("items")) { |
17864 items = _json["items"].map((value) => new Route.fromJson(value)).toList(); | 18609 items = _json["items"].map((value) => new Route.fromJson(value)).toList(); |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18008 } | 18753 } |
18009 if (scopes != null) { | 18754 if (scopes != null) { |
18010 _json["scopes"] = scopes; | 18755 _json["scopes"] = scopes; |
18011 } | 18756 } |
18012 return _json; | 18757 return _json; |
18013 } | 18758 } |
18014 } | 18759 } |
18015 | 18760 |
18016 /** A persistent disk snapshot resource. */ | 18761 /** A persistent disk snapshot resource. */ |
18017 class Snapshot { | 18762 class Snapshot { |
18018 /** Creation timestamp in RFC3339 text format (output only). */ | 18763 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
18019 core.String creationTimestamp; | 18764 core.String creationTimestamp; |
18020 /** | 18765 /** |
18021 * An optional textual description of the resource; provided by the client | 18766 * An optional textual description of the resource; provided by the client |
18022 * when the resource is created. | 18767 * when the resource is created. |
18023 */ | 18768 */ |
18024 core.String description; | 18769 core.String description; |
18025 /** Size of the persistent disk snapshot, specified in GB (output only). */ | 18770 /** [Output Only] Size of the snapshot, specified in GB. */ |
18026 core.String diskSizeGb; | 18771 core.String diskSizeGb; |
18027 /** | 18772 /** |
18028 * Unique identifier for the resource; defined by the server (output only). | 18773 * [Output Only] Unique identifier for the resource; defined by the server. |
18029 */ | 18774 */ |
18030 core.String id; | 18775 core.String id; |
18031 /** Type of the resource. */ | 18776 /** |
| 18777 * [Output Only] Type of the resource. Always compute#snapshot for Snapshot |
| 18778 * resources. |
| 18779 */ |
18032 core.String kind; | 18780 core.String kind; |
18033 /** Public visible licenses. */ | 18781 /** Public visible licenses. */ |
18034 core.List<core.String> licenses; | 18782 core.List<core.String> licenses; |
18035 /** | 18783 /** |
18036 * Name of the resource; provided by the client when the resource is created. | 18784 * Name of the resource; provided by the client when the resource is created. |
18037 * The name must be 1-63 characters long, and comply with RFC1035. | 18785 * The name must be 1-63 characters long, and comply with RFC1035. |
| 18786 * Specifically, the name must be 1-63 characters long and match the regular |
| 18787 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must |
| 18788 * be a lowercase letter, and all following characters must be a dash, |
| 18789 * lowercase letter, or digit, except the last character, which cannot be a |
| 18790 * dash. |
18038 */ | 18791 */ |
18039 core.String name; | 18792 core.String name; |
18040 /** Server defined URL for the resource (output only). */ | 18793 /** [Output Only] Server-defined URL for the resource. */ |
18041 core.String selfLink; | 18794 core.String selfLink; |
18042 /** The source disk used to create this snapshot. */ | 18795 /** The source disk used to create this snapshot. */ |
18043 core.String sourceDisk; | 18796 core.String sourceDisk; |
18044 /** | 18797 /** |
18045 * The 'id' value of the disk used to create this snapshot. This value may be | 18798 * [Output Only] The ID value of the disk used to create this snapshot. This |
18046 * used to determine whether the snapshot was taken from the current or a | 18799 * value may be used to determine whether the snapshot was taken from the |
18047 * previous instance of a given disk name. | 18800 * current or a previous instance of a given disk name. |
18048 */ | 18801 */ |
18049 core.String sourceDiskId; | 18802 core.String sourceDiskId; |
18050 /** | 18803 /** |
18051 * The status of the persistent disk snapshot (output only). | 18804 * [Output Only] The status of the snapshot. |
18052 * Possible string values are: | 18805 * Possible string values are: |
18053 * - "CREATING" | 18806 * - "CREATING" |
18054 * - "DELETING" | 18807 * - "DELETING" |
18055 * - "FAILED" | 18808 * - "FAILED" |
18056 * - "READY" | 18809 * - "READY" |
18057 * - "UPLOADING" | 18810 * - "UPLOADING" |
18058 */ | 18811 */ |
18059 core.String status; | 18812 core.String status; |
18060 /** | 18813 /** |
18061 * A size of the the storage used by the snapshot. As snapshots share storage | 18814 * [Output Only] A size of the the storage used by the snapshot. As snapshots |
18062 * this number is expected to change with snapshot creation/deletion. | 18815 * share storage, this number is expected to change with snapshot |
| 18816 * creation/deletion. |
18063 */ | 18817 */ |
18064 core.String storageBytes; | 18818 core.String storageBytes; |
18065 /** | 18819 /** |
18066 * An indicator whether storageBytes is in a stable state, or it is being | 18820 * [Output Only] An indicator whether storageBytes is in a stable state or it |
18067 * adjusted as a result of shared storage reallocation. | 18821 * is being adjusted as a result of shared storage reallocation. |
18068 * Possible string values are: | 18822 * Possible string values are: |
18069 * - "UPDATING" | 18823 * - "UPDATING" |
18070 * - "UP_TO_DATE" | 18824 * - "UP_TO_DATE" |
18071 */ | 18825 */ |
18072 core.String storageBytesStatus; | 18826 core.String storageBytesStatus; |
18073 | 18827 |
18074 Snapshot(); | 18828 Snapshot(); |
18075 | 18829 |
18076 Snapshot.fromJson(core.Map _json) { | 18830 Snapshot.fromJson(core.Map _json) { |
18077 if (_json.containsKey("creationTimestamp")) { | 18831 if (_json.containsKey("creationTimestamp")) { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18153 if (storageBytes != null) { | 18907 if (storageBytes != null) { |
18154 _json["storageBytes"] = storageBytes; | 18908 _json["storageBytes"] = storageBytes; |
18155 } | 18909 } |
18156 if (storageBytesStatus != null) { | 18910 if (storageBytesStatus != null) { |
18157 _json["storageBytesStatus"] = storageBytesStatus; | 18911 _json["storageBytesStatus"] = storageBytesStatus; |
18158 } | 18912 } |
18159 return _json; | 18913 return _json; |
18160 } | 18914 } |
18161 } | 18915 } |
18162 | 18916 |
18163 /** Contains a list of persistent disk snapshot resources. */ | 18917 /** Contains a list of Snapshot resources. */ |
18164 class SnapshotList { | 18918 class SnapshotList { |
18165 /** | 18919 /** |
18166 * Unique identifier for the resource; defined by the server (output only). | 18920 * Unique identifier for the resource; defined by the server (output only). |
18167 */ | 18921 */ |
18168 core.String id; | 18922 core.String id; |
18169 /** A list of Snapshot resources. */ | 18923 /** A list of Snapshot resources. */ |
18170 core.List<Snapshot> items; | 18924 core.List<Snapshot> items; |
18171 /** Type of resource. */ | 18925 /** Type of resource. */ |
18172 core.String kind; | 18926 core.String kind; |
18173 /** A token used to continue a truncated list request (output only). */ | 18927 /** A token used to continue a truncated list request (output only). */ |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18259 } | 19013 } |
18260 if (items != null) { | 19014 if (items != null) { |
18261 _json["items"] = items; | 19015 _json["items"] = items; |
18262 } | 19016 } |
18263 return _json; | 19017 return _json; |
18264 } | 19018 } |
18265 } | 19019 } |
18266 | 19020 |
18267 /** A TargetHttpProxy resource. This resource defines an HTTP proxy. */ | 19021 /** A TargetHttpProxy resource. This resource defines an HTTP proxy. */ |
18268 class TargetHttpProxy { | 19022 class TargetHttpProxy { |
18269 /** Creation timestamp in RFC3339 text format (output only). */ | 19023 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
18270 core.String creationTimestamp; | 19024 core.String creationTimestamp; |
18271 /** | 19025 /** |
18272 * An optional textual description of the resource; provided by the client | 19026 * An optional textual description of the resource; provided by the client |
18273 * when the resource is created. | 19027 * when the resource is created. |
18274 */ | 19028 */ |
18275 core.String description; | 19029 core.String description; |
18276 /** | 19030 /** |
18277 * Unique identifier for the resource; defined by the server (output only). | 19031 * [Output Only] Unique identifier for the resource. Defined by the server. |
18278 */ | 19032 */ |
18279 core.String id; | 19033 core.String id; |
18280 /** Type of the resource. */ | 19034 /** |
| 19035 * [Output Only] Type of resource. Always compute#Operation for Operation |
| 19036 * resources. |
| 19037 */ |
18281 core.String kind; | 19038 core.String kind; |
18282 /** | 19039 /** |
18283 * Name of the resource; provided by the client when the resource is created. | 19040 * Name of the resource; provided by the client when the resource is created. |
18284 * The name must be 1-63 characters long, and comply with RFC1035. | 19041 * The name must be 1-63 characters long, and comply with RFC1035. |
| 19042 * Specifically, the name must be 1-63 characters long and match the regular |
| 19043 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must |
| 19044 * be a lowercase letter, and all following characters must be a dash, |
| 19045 * lowercase letter, or digit, except the last character, which cannot be a |
| 19046 * dash. |
18285 */ | 19047 */ |
18286 core.String name; | 19048 core.String name; |
18287 /** Server defined URL for the resource (output only). */ | 19049 /** [Output Only] Server defined URL for the resource. */ |
18288 core.String selfLink; | 19050 core.String selfLink; |
18289 /** | 19051 /** |
18290 * URL to the UrlMap resource that defines the mapping from URL to the | 19052 * URL to the UrlMap resource that defines the mapping from URL to the |
18291 * BackendService. | 19053 * BackendService. |
18292 */ | 19054 */ |
18293 core.String urlMap; | 19055 core.String urlMap; |
18294 | 19056 |
18295 TargetHttpProxy(); | 19057 TargetHttpProxy(); |
18296 | 19058 |
18297 TargetHttpProxy.fromJson(core.Map _json) { | 19059 TargetHttpProxy.fromJson(core.Map _json) { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18338 if (selfLink != null) { | 19100 if (selfLink != null) { |
18339 _json["selfLink"] = selfLink; | 19101 _json["selfLink"] = selfLink; |
18340 } | 19102 } |
18341 if (urlMap != null) { | 19103 if (urlMap != null) { |
18342 _json["urlMap"] = urlMap; | 19104 _json["urlMap"] = urlMap; |
18343 } | 19105 } |
18344 return _json; | 19106 return _json; |
18345 } | 19107 } |
18346 } | 19108 } |
18347 | 19109 |
18348 /** Contains a list of TargetHttpProxy resources. */ | 19110 /** A list of TargetHttpProxy resources. */ |
18349 class TargetHttpProxyList { | 19111 class TargetHttpProxyList { |
18350 /** | 19112 /** |
18351 * Unique identifier for the resource; defined by the server (output only). | 19113 * [Output Only] Unique identifier for the resource; defined by the server. |
18352 */ | 19114 */ |
18353 core.String id; | 19115 core.String id; |
18354 /** A list of TargetHttpProxy resources. */ | 19116 /** A list of TargetHttpProxy resources. */ |
18355 core.List<TargetHttpProxy> items; | 19117 core.List<TargetHttpProxy> items; |
18356 /** Type of resource. */ | 19118 /** |
| 19119 * Type of resource. Always compute#targetHttpProxyList for lists of Target |
| 19120 * HTTP proxies. |
| 19121 */ |
18357 core.String kind; | 19122 core.String kind; |
18358 /** A token used to continue a truncated list request (output only). */ | 19123 /** [Output Only] A token used to continue a truncated list request. */ |
18359 core.String nextPageToken; | 19124 core.String nextPageToken; |
18360 /** Server defined URL for this resource (output only). */ | 19125 /** [Output Only] Server-defined URL for this resource. */ |
18361 core.String selfLink; | 19126 core.String selfLink; |
18362 | 19127 |
18363 TargetHttpProxyList(); | 19128 TargetHttpProxyList(); |
18364 | 19129 |
18365 TargetHttpProxyList.fromJson(core.Map _json) { | 19130 TargetHttpProxyList.fromJson(core.Map _json) { |
18366 if (_json.containsKey("id")) { | 19131 if (_json.containsKey("id")) { |
18367 id = _json["id"]; | 19132 id = _json["id"]; |
18368 } | 19133 } |
18369 if (_json.containsKey("items")) { | 19134 if (_json.containsKey("items")) { |
18370 items = _json["items"].map((value) => new TargetHttpProxy.fromJson(value))
.toList(); | 19135 items = _json["items"].map((value) => new TargetHttpProxy.fromJson(value))
.toList(); |
(...skipping 908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19279 /** | 20044 /** |
19280 * [Output Only] Unique identifier for the resource. Defined by the server. | 20045 * [Output Only] Unique identifier for the resource. Defined by the server. |
19281 */ | 20046 */ |
19282 core.String id; | 20047 core.String id; |
19283 /** | 20048 /** |
19284 * [Output Only] Type of resource. Always compute#targetVpnGateway for target | 20049 * [Output Only] Type of resource. Always compute#targetVpnGateway for target |
19285 * VPN gateways. | 20050 * VPN gateways. |
19286 */ | 20051 */ |
19287 core.String kind; | 20052 core.String kind; |
19288 /** | 20053 /** |
19289 * Name of the resource. Provided by the client when the resource is created. | 20054 * Name of the resource; provided by the client when the resource is created. |
19290 * The name must be 1-63 characters long and comply with RFC1035. | 20055 * The name must be 1-63 characters long, and comply with RFC1035. |
| 20056 * Specifically, the name must be 1-63 characters long and match the regular |
| 20057 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must |
| 20058 * be a lowercase letter, and all following characters must be a dash, |
| 20059 * lowercase letter, or digit, except the last character, which cannot be a |
| 20060 * dash. |
19291 */ | 20061 */ |
19292 core.String name; | 20062 core.String name; |
19293 /** | 20063 /** |
19294 * URL of the network to which this VPN gateway is attached. Provided by the | 20064 * URL of the network to which this VPN gateway is attached. Provided by the |
19295 * client when the VPN gateway is created. | 20065 * client when the VPN gateway is created. |
19296 */ | 20066 */ |
19297 core.String network; | 20067 core.String network; |
19298 /** [Output Only] URL of the region where the target VPN gateway resides. */ | 20068 /** [Output Only] URL of the region where the target VPN gateway resides. */ |
19299 core.String region; | 20069 core.String region; |
19300 /** [Output Only] Server-defined URL for the resource. */ | 20070 /** [Output Only] Server-defined URL for the resource. */ |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19667 return _json; | 20437 return _json; |
19668 } | 20438 } |
19669 } | 20439 } |
19670 | 20440 |
19671 /** | 20441 /** |
19672 * A UrlMap resource. This resource defines the mapping from URL to the | 20442 * A UrlMap resource. This resource defines the mapping from URL to the |
19673 * BackendService resource, based on the "longest-match" of the URL's host and | 20443 * BackendService resource, based on the "longest-match" of the URL's host and |
19674 * path. | 20444 * path. |
19675 */ | 20445 */ |
19676 class UrlMap { | 20446 class UrlMap { |
19677 /** Creation timestamp in RFC3339 text format (output only). */ | 20447 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
19678 core.String creationTimestamp; | 20448 core.String creationTimestamp; |
19679 /** The URL of the BackendService resource if none of the hostRules match. */ | 20449 /** The URL of the BackendService resource if none of the hostRules match. */ |
19680 core.String defaultService; | 20450 core.String defaultService; |
19681 /** | 20451 /** |
19682 * An optional textual description of the resource; provided by the client | 20452 * An optional textual description of the resource. Provided by the client |
19683 * when the resource is created. | 20453 * when the resource is created. |
19684 */ | 20454 */ |
19685 core.String description; | 20455 core.String description; |
19686 /** | 20456 /** |
19687 * Fingerprint of this resource. A hash of the contents stored in this object. | 20457 * Fingerprint of this resource. A hash of the contents stored in this object. |
19688 * This field is used in optimistic locking. This field will be ignored when | 20458 * This field is used in optimistic locking. This field will be ignored when |
19689 * inserting a UrlMap. An up-to-date fingerprint must be provided in order to | 20459 * inserting a UrlMap. An up-to-date fingerprint must be provided in order to |
19690 * update the UrlMap. | 20460 * update the UrlMap. |
19691 */ | 20461 */ |
19692 core.String fingerprint; | 20462 core.String fingerprint; |
19693 core.List<core.int> get fingerprintAsBytes { | 20463 core.List<core.int> get fingerprintAsBytes { |
19694 return crypto.CryptoUtils.base64StringToBytes(fingerprint); | 20464 return crypto.CryptoUtils.base64StringToBytes(fingerprint); |
19695 } | 20465 } |
19696 | 20466 |
19697 void set fingerprintAsBytes(core.List<core.int> _bytes) { | 20467 void set fingerprintAsBytes(core.List<core.int> _bytes) { |
19698 fingerprint = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 20468 fingerprint = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
19699 } | 20469 } |
19700 /** The list of HostRules to use against the URL. */ | 20470 /** The list of HostRules to use against the URL. */ |
19701 core.List<HostRule> hostRules; | 20471 core.List<HostRule> hostRules; |
19702 /** | 20472 /** [Output Only] Unique identifier for the resource. Set by the server. */ |
19703 * Unique identifier for the resource; defined by the server (output only). | |
19704 */ | |
19705 core.String id; | 20473 core.String id; |
19706 /** Type of the resource. */ | 20474 /** Type of the resource. */ |
19707 core.String kind; | 20475 core.String kind; |
19708 /** | 20476 /** |
19709 * Name of the resource; provided by the client when the resource is created. | 20477 * Name of the resource. Provided by the client when the resource is created. |
19710 * The name must be 1-63 characters long, and comply with RFC1035. | 20478 * The name must be 1-63 characters long, and comply with RFC1035. |
| 20479 * Specifically, the name must be 1-63 characters long and match the regular |
| 20480 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must |
| 20481 * be a lowercase letter, and all following characters must be a dash, |
| 20482 * lowercase letter, or digit, except the last character, which cannot be a |
| 20483 * dash. |
19711 */ | 20484 */ |
19712 core.String name; | 20485 core.String name; |
19713 /** The list of named PathMatchers to use against the URL. */ | 20486 /** The list of named PathMatchers to use against the URL. */ |
19714 core.List<PathMatcher> pathMatchers; | 20487 core.List<PathMatcher> pathMatchers; |
19715 /** Server defined URL for the resource (output only). */ | 20488 /** [Output Only] Server defined URL for the resource. */ |
19716 core.String selfLink; | 20489 core.String selfLink; |
19717 /** | 20490 /** |
19718 * The list of expected URL mappings. Request to update this UrlMap will | 20491 * The list of expected URL mappings. Request to update this UrlMap will |
19719 * succeed only all of the test cases pass. | 20492 * succeed only all of the test cases pass. |
19720 */ | 20493 */ |
19721 core.List<UrlMapTest> tests; | 20494 core.List<UrlMapTest> tests; |
19722 | 20495 |
19723 UrlMap(); | 20496 UrlMap(); |
19724 | 20497 |
19725 UrlMap.fromJson(core.Map _json) { | 20498 UrlMap.fromJson(core.Map _json) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19792 } | 20565 } |
19793 if (tests != null) { | 20566 if (tests != null) { |
19794 _json["tests"] = tests.map((value) => (value).toJson()).toList(); | 20567 _json["tests"] = tests.map((value) => (value).toJson()).toList(); |
19795 } | 20568 } |
19796 return _json; | 20569 return _json; |
19797 } | 20570 } |
19798 } | 20571 } |
19799 | 20572 |
19800 /** Contains a list of UrlMap resources. */ | 20573 /** Contains a list of UrlMap resources. */ |
19801 class UrlMapList { | 20574 class UrlMapList { |
19802 /** | 20575 /** [Output Only] Unique identifier for the resource. Set by the server. */ |
19803 * Unique identifier for the resource; defined by the server (output only). | |
19804 */ | |
19805 core.String id; | 20576 core.String id; |
19806 /** A list of UrlMap resources. */ | 20577 /** A list of UrlMap resources. */ |
19807 core.List<UrlMap> items; | 20578 core.List<UrlMap> items; |
19808 /** Type of resource. */ | 20579 /** Type of resource. */ |
19809 core.String kind; | 20580 core.String kind; |
19810 /** A token used to continue a truncated list request (output only). */ | 20581 /** [Output Only] A token used to continue a truncated list request. */ |
19811 core.String nextPageToken; | 20582 core.String nextPageToken; |
19812 /** Server defined URL for this resource (output only). */ | 20583 /** [Output Only] Server defined URL for this resource. */ |
19813 core.String selfLink; | 20584 core.String selfLink; |
19814 | 20585 |
19815 UrlMapList(); | 20586 UrlMapList(); |
19816 | 20587 |
19817 UrlMapList.fromJson(core.Map _json) { | 20588 UrlMapList.fromJson(core.Map _json) { |
19818 if (_json.containsKey("id")) { | 20589 if (_json.containsKey("id")) { |
19819 id = _json["id"]; | 20590 id = _json["id"]; |
19820 } | 20591 } |
19821 if (_json.containsKey("items")) { | 20592 if (_json.containsKey("items")) { |
19822 items = _json["items"].map((value) => new UrlMap.fromJson(value)).toList()
; | 20593 items = _json["items"].map((value) => new UrlMap.fromJson(value)).toList()
; |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20062 * when the resource is created. | 20833 * when the resource is created. |
20063 */ | 20834 */ |
20064 core.String description; | 20835 core.String description; |
20065 /** [Output Only] Detailed status message for the VPN tunnel. */ | 20836 /** [Output Only] Detailed status message for the VPN tunnel. */ |
20066 core.String detailedStatus; | 20837 core.String detailedStatus; |
20067 /** | 20838 /** |
20068 * [Output Only] Unique identifier for the resource. Defined by the server. | 20839 * [Output Only] Unique identifier for the resource. Defined by the server. |
20069 */ | 20840 */ |
20070 core.String id; | 20841 core.String id; |
20071 /** | 20842 /** |
20072 * IKE networks to use when establishing the VPN tunnel with peer VPN gateway. | |
20073 * The value should be a CIDR formatted string, for example: 192.168.0.0/16. | |
20074 * The ranges should be disjoint. | |
20075 */ | |
20076 core.List<core.String> ikeNetworks; | |
20077 /** | |
20078 * IKE protocol version to use when establishing the VPN tunnel with peer VPN | 20843 * IKE protocol version to use when establishing the VPN tunnel with peer VPN |
20079 * gateway. Acceptable IKE versions are 1 or 2. Default version is 2. | 20844 * gateway. Acceptable IKE versions are 1 or 2. Default version is 2. |
20080 */ | 20845 */ |
20081 core.int ikeVersion; | 20846 core.int ikeVersion; |
20082 /** | 20847 /** |
20083 * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels. | 20848 * [Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels. |
20084 */ | 20849 */ |
20085 core.String kind; | 20850 core.String kind; |
20086 /** | 20851 /** |
20087 * Name of the resource. Provided by the client when the resource is created. | 20852 * Name of the resource; provided by the client when the resource is created. |
20088 * The name must be 1-63 characters long and comply with RFC1035. | 20853 * The name must be 1-63 characters long, and comply with RFC1035. |
| 20854 * Specifically, the name must be 1-63 characters long and match the regular |
| 20855 * expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must |
| 20856 * be a lowercase letter, and all following characters must be a dash, |
| 20857 * lowercase letter, or digit, except the last character, which cannot be a |
| 20858 * dash. |
20089 */ | 20859 */ |
20090 core.String name; | 20860 core.String name; |
20091 /** IP address of the peer VPN gateway. */ | 20861 /** IP address of the peer VPN gateway. */ |
20092 core.String peerIp; | 20862 core.String peerIp; |
20093 /** [Output Only] URL of the region where the VPN tunnel resides. */ | 20863 /** [Output Only] URL of the region where the VPN tunnel resides. */ |
20094 core.String region; | 20864 core.String region; |
20095 /** [Output Only] Server defined URL for the resource. */ | 20865 /** [Output Only] Server defined URL for the resource. */ |
20096 core.String selfLink; | 20866 core.String selfLink; |
20097 /** | 20867 /** |
20098 * Shared secret used to set the secure session between the GCE VPN gateway | 20868 * Shared secret used to set the secure session between the GCE VPN gateway |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20131 } | 20901 } |
20132 if (_json.containsKey("description")) { | 20902 if (_json.containsKey("description")) { |
20133 description = _json["description"]; | 20903 description = _json["description"]; |
20134 } | 20904 } |
20135 if (_json.containsKey("detailedStatus")) { | 20905 if (_json.containsKey("detailedStatus")) { |
20136 detailedStatus = _json["detailedStatus"]; | 20906 detailedStatus = _json["detailedStatus"]; |
20137 } | 20907 } |
20138 if (_json.containsKey("id")) { | 20908 if (_json.containsKey("id")) { |
20139 id = _json["id"]; | 20909 id = _json["id"]; |
20140 } | 20910 } |
20141 if (_json.containsKey("ikeNetworks")) { | |
20142 ikeNetworks = _json["ikeNetworks"]; | |
20143 } | |
20144 if (_json.containsKey("ikeVersion")) { | 20911 if (_json.containsKey("ikeVersion")) { |
20145 ikeVersion = _json["ikeVersion"]; | 20912 ikeVersion = _json["ikeVersion"]; |
20146 } | 20913 } |
20147 if (_json.containsKey("kind")) { | 20914 if (_json.containsKey("kind")) { |
20148 kind = _json["kind"]; | 20915 kind = _json["kind"]; |
20149 } | 20916 } |
20150 if (_json.containsKey("name")) { | 20917 if (_json.containsKey("name")) { |
20151 name = _json["name"]; | 20918 name = _json["name"]; |
20152 } | 20919 } |
20153 if (_json.containsKey("peerIp")) { | 20920 if (_json.containsKey("peerIp")) { |
(...skipping 26 matching lines...) Expand all Loading... |
20180 } | 20947 } |
20181 if (description != null) { | 20948 if (description != null) { |
20182 _json["description"] = description; | 20949 _json["description"] = description; |
20183 } | 20950 } |
20184 if (detailedStatus != null) { | 20951 if (detailedStatus != null) { |
20185 _json["detailedStatus"] = detailedStatus; | 20952 _json["detailedStatus"] = detailedStatus; |
20186 } | 20953 } |
20187 if (id != null) { | 20954 if (id != null) { |
20188 _json["id"] = id; | 20955 _json["id"] = id; |
20189 } | 20956 } |
20190 if (ikeNetworks != null) { | |
20191 _json["ikeNetworks"] = ikeNetworks; | |
20192 } | |
20193 if (ikeVersion != null) { | 20957 if (ikeVersion != null) { |
20194 _json["ikeVersion"] = ikeVersion; | 20958 _json["ikeVersion"] = ikeVersion; |
20195 } | 20959 } |
20196 if (kind != null) { | 20960 if (kind != null) { |
20197 _json["kind"] = kind; | 20961 _json["kind"] = kind; |
20198 } | 20962 } |
20199 if (name != null) { | 20963 if (name != null) { |
20200 _json["name"] = name; | 20964 _json["name"] = name; |
20201 } | 20965 } |
20202 if (peerIp != null) { | 20966 if (peerIp != null) { |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
20660 } | 21424 } |
20661 if (nextPageToken != null) { | 21425 if (nextPageToken != null) { |
20662 _json["nextPageToken"] = nextPageToken; | 21426 _json["nextPageToken"] = nextPageToken; |
20663 } | 21427 } |
20664 if (selfLink != null) { | 21428 if (selfLink != null) { |
20665 _json["selfLink"] = selfLink; | 21429 _json["selfLink"] = selfLink; |
20666 } | 21430 } |
20667 return _json; | 21431 return _json; |
20668 } | 21432 } |
20669 } | 21433 } |
OLD | NEW |