OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis_beta.runtimeconfig.v1beta1; | 3 library googleapis_beta.runtimeconfig.v1beta1; |
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; | |
11 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
12 | 11 |
13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
14 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
15 | 14 |
16 const core.String USER_AGENT = 'dart-api-client runtimeconfig/v1beta1'; | 15 const core.String USER_AGENT = 'dart-api-client runtimeconfig/v1beta1'; |
17 | 16 |
18 /** | 17 /** |
19 * Provides capabilities for dynamic configuration and coordination for | 18 * Provides capabilities for dynamic configuration and coordination for |
20 * applications running on Google Cloud Platform. | 19 * applications running on Google Cloud Platform. |
(...skipping 29 matching lines...) Expand all Loading... |
50 final commons.ApiRequester _requester; | 49 final commons.ApiRequester _requester; |
51 | 50 |
52 ProjectsConfigsOperationsResourceApi get operations => new ProjectsConfigsOper
ationsResourceApi(_requester); | 51 ProjectsConfigsOperationsResourceApi get operations => new ProjectsConfigsOper
ationsResourceApi(_requester); |
53 ProjectsConfigsVariablesResourceApi get variables => new ProjectsConfigsVariab
lesResourceApi(_requester); | 52 ProjectsConfigsVariablesResourceApi get variables => new ProjectsConfigsVariab
lesResourceApi(_requester); |
54 ProjectsConfigsWaitersResourceApi get waiters => new ProjectsConfigsWaitersRes
ourceApi(_requester); | 53 ProjectsConfigsWaitersResourceApi get waiters => new ProjectsConfigsWaitersRes
ourceApi(_requester); |
55 | 54 |
56 ProjectsConfigsResourceApi(commons.ApiRequester client) : | 55 ProjectsConfigsResourceApi(commons.ApiRequester client) : |
57 _requester = client; | 56 _requester = client; |
58 | 57 |
59 /** | 58 /** |
60 * CreateConfig creates a new config resource object. | 59 * Creates a new RuntimeConfig resource. The configuration name must be |
61 * The configuration name must be unique within project. | 60 * unique within project. |
62 * | 61 * |
63 * [request] - The metadata request object. | 62 * [request] - The metadata request object. |
64 * | 63 * |
65 * Request parameters: | 64 * Request parameters: |
66 * | 65 * |
67 * [parent] - The cloud project to which configuration belongs. | 66 * [parent] - The [project |
68 * Required. Must be a valid GCP project. | 67 * ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848
) |
| 68 * for this request, in the format `projects/[PROJECT_ID]`. |
69 * Value must have pattern "^projects/[^/]*$". | 69 * Value must have pattern "^projects/[^/]*$". |
70 * | 70 * |
71 * Completes with a [RuntimeConfig]. | 71 * Completes with a [RuntimeConfig]. |
72 * | 72 * |
73 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 73 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
74 * error. | 74 * error. |
75 * | 75 * |
76 * If the used [http.Client] completes with an error when making a REST call, | 76 * If the used [http.Client] completes with an error when making a REST call, |
77 * this method will complete with the same error. | 77 * this method will complete with the same error. |
78 */ | 78 */ |
(...skipping 18 matching lines...) Expand all Loading... |
97 "POST", | 97 "POST", |
98 body: _body, | 98 body: _body, |
99 queryParams: _queryParams, | 99 queryParams: _queryParams, |
100 uploadOptions: _uploadOptions, | 100 uploadOptions: _uploadOptions, |
101 uploadMedia: _uploadMedia, | 101 uploadMedia: _uploadMedia, |
102 downloadOptions: _downloadOptions); | 102 downloadOptions: _downloadOptions); |
103 return _response.then((data) => new RuntimeConfig.fromJson(data)); | 103 return _response.then((data) => new RuntimeConfig.fromJson(data)); |
104 } | 104 } |
105 | 105 |
106 /** | 106 /** |
107 * Deletes the config object. | 107 * Deletes a RuntimeConfig resource. |
108 * | 108 * |
109 * Request parameters: | 109 * Request parameters: |
110 * | 110 * |
111 * [name] - The configuration resource object to delete. | 111 * [name] - The RuntimeConfig resource to delete, in the format: |
112 * Required. Must be a valid GCP project. | 112 * |
| 113 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]` |
113 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". | 114 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". |
114 * | 115 * |
115 * Completes with a [Empty]. | 116 * Completes with a [Empty]. |
116 * | 117 * |
117 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 118 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
118 * error. | 119 * error. |
119 * | 120 * |
120 * If the used [http.Client] completes with an error when making a REST call, | 121 * If the used [http.Client] completes with an error when making a REST call, |
121 * this method will complete with the same error. | 122 * this method will complete with the same error. |
122 */ | 123 */ |
(...skipping 15 matching lines...) Expand all Loading... |
138 "DELETE", | 139 "DELETE", |
139 body: _body, | 140 body: _body, |
140 queryParams: _queryParams, | 141 queryParams: _queryParams, |
141 uploadOptions: _uploadOptions, | 142 uploadOptions: _uploadOptions, |
142 uploadMedia: _uploadMedia, | 143 uploadMedia: _uploadMedia, |
143 downloadOptions: _downloadOptions); | 144 downloadOptions: _downloadOptions); |
144 return _response.then((data) => new Empty.fromJson(data)); | 145 return _response.then((data) => new Empty.fromJson(data)); |
145 } | 146 } |
146 | 147 |
147 /** | 148 /** |
148 * Gets the config resource object. | 149 * Gets information about a RuntimeConfig resource. |
149 * | 150 * |
150 * Request parameters: | 151 * Request parameters: |
151 * | 152 * |
152 * [name] - The name of the RuntimeConfig resource object to retrieve. | 153 * [name] - The name of the RuntimeConfig resource to retrieve, in the format: |
| 154 * |
| 155 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]` |
153 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". | 156 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". |
154 * | 157 * |
155 * Completes with a [RuntimeConfig]. | 158 * Completes with a [RuntimeConfig]. |
156 * | 159 * |
157 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 160 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
158 * error. | 161 * error. |
159 * | 162 * |
160 * If the used [http.Client] completes with an error when making a REST call, | 163 * If the used [http.Client] completes with an error when making a REST call, |
161 * this method will complete with the same error. | 164 * this method will complete with the same error. |
162 */ | 165 */ |
(...skipping 15 matching lines...) Expand all Loading... |
178 "GET", | 181 "GET", |
179 body: _body, | 182 body: _body, |
180 queryParams: _queryParams, | 183 queryParams: _queryParams, |
181 uploadOptions: _uploadOptions, | 184 uploadOptions: _uploadOptions, |
182 uploadMedia: _uploadMedia, | 185 uploadMedia: _uploadMedia, |
183 downloadOptions: _downloadOptions); | 186 downloadOptions: _downloadOptions); |
184 return _response.then((data) => new RuntimeConfig.fromJson(data)); | 187 return _response.then((data) => new RuntimeConfig.fromJson(data)); |
185 } | 188 } |
186 | 189 |
187 /** | 190 /** |
188 * Lists all the config objects within project. | 191 * Lists all the RuntimeConfig resources within project. |
189 * | 192 * |
190 * Request parameters: | 193 * Request parameters: |
191 * | 194 * |
192 * [parent] - The cloud project, whose configuration resources we want to | 195 * [parent] - The [project |
193 * list. | 196 * ID](https://support.google.com/cloud/answer/6158840?hl=en&ref_topic=6158848
) |
194 * Required. Must be a valid GCP project. | 197 * for this request, in the format `projects/[PROJECT_ID]`. |
195 * Value must have pattern "^projects/[^/]*$". | 198 * Value must have pattern "^projects/[^/]*$". |
196 * | 199 * |
197 * [pageSize] - List pagination support. | 200 * [pageSize] - Specifies the number of results to return per page. If there |
198 * The size of the page to return. We may return fewer elements. | 201 * are fewer |
| 202 * elements than the specified number, returns all elements. |
199 * | 203 * |
200 * [pageToken] - The token for pagination. | 204 * [pageToken] - Specifies a page token to use. Set `pageToken` to a |
| 205 * `nextPageToken` |
| 206 * returned by a previous list request to get the next page of results. |
201 * | 207 * |
202 * Completes with a [ListConfigsResponse]. | 208 * Completes with a [ListConfigsResponse]. |
203 * | 209 * |
204 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 210 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
205 * error. | 211 * error. |
206 * | 212 * |
207 * If the used [http.Client] completes with an error when making a REST call, | 213 * If the used [http.Client] completes with an error when making a REST call, |
208 * this method will complete with the same error. | 214 * this method will complete with the same error. |
209 */ | 215 */ |
210 async.Future<ListConfigsResponse> list(core.String parent, {core.int pageSize,
core.String pageToken}) { | 216 async.Future<ListConfigsResponse> list(core.String parent, {core.int pageSize,
core.String pageToken}) { |
(...skipping 20 matching lines...) Expand all Loading... |
231 "GET", | 237 "GET", |
232 body: _body, | 238 body: _body, |
233 queryParams: _queryParams, | 239 queryParams: _queryParams, |
234 uploadOptions: _uploadOptions, | 240 uploadOptions: _uploadOptions, |
235 uploadMedia: _uploadMedia, | 241 uploadMedia: _uploadMedia, |
236 downloadOptions: _downloadOptions); | 242 downloadOptions: _downloadOptions); |
237 return _response.then((data) => new ListConfigsResponse.fromJson(data)); | 243 return _response.then((data) => new ListConfigsResponse.fromJson(data)); |
238 } | 244 } |
239 | 245 |
240 /** | 246 /** |
241 * Updates the config resource object. | 247 * Updates a RuntimeConfig resource. The configuration must exist beforehand. |
242 * RuntimeConfig object must already exist. | |
243 * | 248 * |
244 * [request] - The metadata request object. | 249 * [request] - The metadata request object. |
245 * | 250 * |
246 * Request parameters: | 251 * Request parameters: |
247 * | 252 * |
248 * [name] - The name of the config resource to update. | 253 * [name] - The name of the RuntimeConfig resource to update, in the format: |
249 * Required. Must be a valid config resource. | 254 * |
| 255 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]` |
250 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". | 256 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". |
251 * | 257 * |
252 * Completes with a [RuntimeConfig]. | 258 * Completes with a [RuntimeConfig]. |
253 * | 259 * |
254 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 260 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
255 * error. | 261 * error. |
256 * | 262 * |
257 * If the used [http.Client] completes with an error when making a REST call, | 263 * If the used [http.Client] completes with an error when making a REST call, |
258 * this method will complete with the same error. | 264 * this method will complete with the same error. |
259 */ | 265 */ |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 } | 345 } |
340 | 346 |
341 | 347 |
342 class ProjectsConfigsVariablesResourceApi { | 348 class ProjectsConfigsVariablesResourceApi { |
343 final commons.ApiRequester _requester; | 349 final commons.ApiRequester _requester; |
344 | 350 |
345 ProjectsConfigsVariablesResourceApi(commons.ApiRequester client) : | 351 ProjectsConfigsVariablesResourceApi(commons.ApiRequester client) : |
346 _requester = client; | 352 _requester = client; |
347 | 353 |
348 /** | 354 /** |
349 * Creates a variable within the given configuration. | 355 * Creates a variable within the given configuration. You cannot create |
350 * Create variable will create all required intermediate path elements. | 356 * a variable with a name that is a prefix of an existing variable name, or a |
351 * It is a FAILED_PRECONDITION error to create a variable with a name that is | 357 * name that has an existing variable name as a prefix. |
352 * a prefix of an existing variable name, or that has an existing variable | 358 * |
353 * name as a prefix. | 359 * To learn more about creating a variable, read the |
| 360 * [Setting and Getting |
| 361 * Data](/deployment-manager/runtime-configurator/seta-and-get-variables) |
| 362 * documentation. |
354 * | 363 * |
355 * [request] - The metadata request object. | 364 * [request] - The metadata request object. |
356 * | 365 * |
357 * Request parameters: | 366 * Request parameters: |
358 * | 367 * |
359 * [parent] - The configuration parent, that will own the variable. | 368 * [parent] - The path to the RutimeConfig resource that this variable should |
360 * Required, must a valid configuration name within project_id. | 369 * belong to. |
| 370 * The configuration must exist beforehand; the path must by in the format: |
| 371 * |
| 372 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]` |
361 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". | 373 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". |
362 * | 374 * |
363 * Completes with a [Variable]. | 375 * Completes with a [Variable]. |
364 * | 376 * |
365 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 377 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
366 * error. | 378 * error. |
367 * | 379 * |
368 * If the used [http.Client] completes with an error when making a REST call, | 380 * If the used [http.Client] completes with an error when making a REST call, |
369 * this method will complete with the same error. | 381 * this method will complete with the same error. |
370 */ | 382 */ |
(...skipping 18 matching lines...) Expand all Loading... |
389 "POST", | 401 "POST", |
390 body: _body, | 402 body: _body, |
391 queryParams: _queryParams, | 403 queryParams: _queryParams, |
392 uploadOptions: _uploadOptions, | 404 uploadOptions: _uploadOptions, |
393 uploadMedia: _uploadMedia, | 405 uploadMedia: _uploadMedia, |
394 downloadOptions: _downloadOptions); | 406 downloadOptions: _downloadOptions); |
395 return _response.then((data) => new Variable.fromJson(data)); | 407 return _response.then((data) => new Variable.fromJson(data)); |
396 } | 408 } |
397 | 409 |
398 /** | 410 /** |
399 * Deletes variable or variables. | 411 * Deletes a variable or multiple variables. |
400 * If name denotes a variable, that variable is deleted. If name is a prefix | 412 * |
401 * and recursive is true, then all variables with that prefix are deleted, | 413 * If you specify a variable name, then that variable is deleted. If you |
402 * it's a FAILED_PRECONDITION to delete a prefix without recursive being true. | 414 * specify a prefix and `recursive` is true, then all variables with that |
| 415 * prefix are deleted. You must set a `recursive` to true if you delete |
| 416 * variables by prefix. |
403 * | 417 * |
404 * Request parameters: | 418 * Request parameters: |
405 * | 419 * |
406 * [name] - The name of the variable to delete. | 420 * [name] - The name of the variable to delete, in the format: |
| 421 * |
| 422 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]` |
407 * Value must have pattern "^projects/[^/] * / configs/[^/] * / | 423 * Value must have pattern "^projects/[^/] * / configs/[^/] * / |
408 * variables/.*$". | 424 * variables/.*$". |
409 * | 425 * |
410 * [recursive] - If recursive is false and name is a prefix of other | 426 * [recursive] - Set to `true` to recursively delete multiple variables with |
411 * variables, then | 427 * the same |
412 * the request will fail. | 428 * prefix. |
413 * | 429 * |
414 * Completes with a [Empty]. | 430 * Completes with a [Empty]. |
415 * | 431 * |
416 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 432 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
417 * error. | 433 * error. |
418 * | 434 * |
419 * If the used [http.Client] completes with an error when making a REST call, | 435 * If the used [http.Client] completes with an error when making a REST call, |
420 * this method will complete with the same error. | 436 * this method will complete with the same error. |
421 */ | 437 */ |
422 async.Future<Empty> delete(core.String name, {core.bool recursive}) { | 438 async.Future<Empty> delete(core.String name, {core.bool recursive}) { |
(...skipping 17 matching lines...) Expand all Loading... |
440 "DELETE", | 456 "DELETE", |
441 body: _body, | 457 body: _body, |
442 queryParams: _queryParams, | 458 queryParams: _queryParams, |
443 uploadOptions: _uploadOptions, | 459 uploadOptions: _uploadOptions, |
444 uploadMedia: _uploadMedia, | 460 uploadMedia: _uploadMedia, |
445 downloadOptions: _downloadOptions); | 461 downloadOptions: _downloadOptions); |
446 return _response.then((data) => new Empty.fromJson(data)); | 462 return _response.then((data) => new Empty.fromJson(data)); |
447 } | 463 } |
448 | 464 |
449 /** | 465 /** |
450 * Gets the variable resource object. | 466 * Gets information about a single variable. |
451 * | 467 * |
452 * Request parameters: | 468 * Request parameters: |
453 * | 469 * |
454 * [name] - What variable to return. | 470 * [name] - The name of the variable to return, in the format: |
| 471 * |
| 472 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIBLE_NAME]` |
455 * Value must have pattern "^projects/[^/] * / configs/[^/] * / | 473 * Value must have pattern "^projects/[^/] * / configs/[^/] * / |
456 * variables/.*$". | 474 * variables/.*$". |
457 * | 475 * |
458 * Completes with a [Variable]. | 476 * Completes with a [Variable]. |
459 * | 477 * |
460 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 478 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
461 * error. | 479 * error. |
462 * | 480 * |
463 * If the used [http.Client] completes with an error when making a REST call, | 481 * If the used [http.Client] completes with an error when making a REST call, |
464 * this method will complete with the same error. | 482 * this method will complete with the same error. |
(...skipping 16 matching lines...) Expand all Loading... |
481 "GET", | 499 "GET", |
482 body: _body, | 500 body: _body, |
483 queryParams: _queryParams, | 501 queryParams: _queryParams, |
484 uploadOptions: _uploadOptions, | 502 uploadOptions: _uploadOptions, |
485 uploadMedia: _uploadMedia, | 503 uploadMedia: _uploadMedia, |
486 downloadOptions: _downloadOptions); | 504 downloadOptions: _downloadOptions); |
487 return _response.then((data) => new Variable.fromJson(data)); | 505 return _response.then((data) => new Variable.fromJson(data)); |
488 } | 506 } |
489 | 507 |
490 /** | 508 /** |
491 * Lists variables within given RuntimeConfig object, matching optionally | 509 * Lists variables within given a configuration, matching any provided |
492 * provided filter. | 510 * filters. |
493 * List contains only variable metadata, but not values. | 511 * This only lists variable names, not the values. |
494 * | 512 * |
495 * Request parameters: | 513 * Request parameters: |
496 * | 514 * |
497 * [parent] - Which RuntimeConfig object to list for variables. | 515 * [parent] - The path to the RuntimeConfig resource for which you want to |
| 516 * list variables. |
| 517 * The configuration must exist beforehand; the path must by in the format: |
| 518 * |
| 519 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]` |
498 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". | 520 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". |
499 * | 521 * |
500 * [pageSize] - List pagination support. | 522 * [pageSize] - Specifies the number of results to return per page. If there |
501 * The size of the page to return. We may return fewer elements. | 523 * are fewer |
| 524 * elements than the specified number, returns all elements. |
502 * | 525 * |
503 * [filter] - List only variables matching filter prefix exactly. | 526 * [filter] - Filters variables by matching the specified filter. For example: |
504 * e.g. `projects/{project_id}/config/{config_id}/variables/{variable/id}`. | |
505 * | 527 * |
506 * [pageToken] - The token for pagination. | 528 * `projects/example-project/config/[CONFIG_NAME]/variables/example-variable`. |
| 529 * |
| 530 * [pageToken] - Specifies a page token to use. Set `pageToken` to a |
| 531 * `nextPageToken` |
| 532 * returned by a previous list request to get the next page of results. |
507 * | 533 * |
508 * Completes with a [ListVariablesResponse]. | 534 * Completes with a [ListVariablesResponse]. |
509 * | 535 * |
510 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 536 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
511 * error. | 537 * error. |
512 * | 538 * |
513 * If the used [http.Client] completes with an error when making a REST call, | 539 * If the used [http.Client] completes with an error when making a REST call, |
514 * this method will complete with the same error. | 540 * this method will complete with the same error. |
515 */ | 541 */ |
516 async.Future<ListVariablesResponse> list(core.String parent, {core.int pageSiz
e, core.String filter, core.String pageToken}) { | 542 async.Future<ListVariablesResponse> list(core.String parent, {core.int pageSiz
e, core.String filter, core.String pageToken}) { |
(...skipping 29 matching lines...) Expand all Loading... |
546 return _response.then((data) => new ListVariablesResponse.fromJson(data)); | 572 return _response.then((data) => new ListVariablesResponse.fromJson(data)); |
547 } | 573 } |
548 | 574 |
549 /** | 575 /** |
550 * Updates an existing variable with a new value. | 576 * Updates an existing variable with a new value. |
551 * | 577 * |
552 * [request] - The metadata request object. | 578 * [request] - The metadata request object. |
553 * | 579 * |
554 * Request parameters: | 580 * Request parameters: |
555 * | 581 * |
556 * [name] - The name of the variable to update. | 582 * [name] - The name of the variable to update, in the format: |
557 * In the format of: | 583 * |
558 * "projects/{project_id}/configs/{config_id}/variables/{variable_id}" | 584 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME]` |
559 * Value must have pattern "^projects/[^/] * / configs/[^/] * / | 585 * Value must have pattern "^projects/[^/] * / configs/[^/] * / |
560 * variables/.*$". | 586 * variables/.*$". |
561 * | 587 * |
562 * Completes with a [Variable]. | 588 * Completes with a [Variable]. |
563 * | 589 * |
564 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 590 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
565 * error. | 591 * error. |
566 * | 592 * |
567 * If the used [http.Client] completes with an error when making a REST call, | 593 * If the used [http.Client] completes with an error when making a REST call, |
568 * this method will complete with the same error. | 594 * this method will complete with the same error. |
(...skipping 19 matching lines...) Expand all Loading... |
588 "PUT", | 614 "PUT", |
589 body: _body, | 615 body: _body, |
590 queryParams: _queryParams, | 616 queryParams: _queryParams, |
591 uploadOptions: _uploadOptions, | 617 uploadOptions: _uploadOptions, |
592 uploadMedia: _uploadMedia, | 618 uploadMedia: _uploadMedia, |
593 downloadOptions: _downloadOptions); | 619 downloadOptions: _downloadOptions); |
594 return _response.then((data) => new Variable.fromJson(data)); | 620 return _response.then((data) => new Variable.fromJson(data)); |
595 } | 621 } |
596 | 622 |
597 /** | 623 /** |
598 * WatchVariable watches for a variable to change and then returns the new | 624 * Watches a specific variable and waits for a change in the variable's value. |
599 * value or times out. | 625 * When there is a change, this method returns the new value or times out. |
600 * If variable is deleted while being watched, VariableState will be DELETED | 626 * |
601 * and the Value will contain the last known value. | 627 * If a variable is deleted while being watched, the `variableState` state is |
602 * If the operation deadline is set to a larger value than internal timeout | 628 * set to `DELETED` and the method returns the last known variable `value`. |
603 * existing, current variable value will be returned and Variable state will | 629 * |
604 * be VARIABLE_STATE_UNSPECIFIED. | 630 * If you set the deadline for watching to a larger value than internal |
| 631 * timeout |
| 632 * (60 seconds), the current variable value is returned and the |
| 633 * `variableState` |
| 634 * will be `VARIABLE_STATE_UNSPECIFIED`. |
| 635 * |
| 636 * To learn more about creating a watcher, read the |
| 637 * [Watching a Variable for |
| 638 * Changes](/deployment-manager/runtime-configurator/watching-a-variable) |
| 639 * documentation. |
605 * | 640 * |
606 * [request] - The metadata request object. | 641 * [request] - The metadata request object. |
607 * | 642 * |
608 * Request parameters: | 643 * Request parameters: |
609 * | 644 * |
610 * [name] - The name of the variable to retrieve. | 645 * [name] - The name of the variable to watch, in the format: |
| 646 * |
| 647 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]` |
611 * Value must have pattern "^projects/[^/] * / configs/[^/] * / | 648 * Value must have pattern "^projects/[^/] * / configs/[^/] * / |
612 * variables/.*$". | 649 * variables/.*$". |
613 * | 650 * |
614 * Completes with a [Variable]. | 651 * Completes with a [Variable]. |
615 * | 652 * |
616 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 653 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
617 * error. | 654 * error. |
618 * | 655 * |
619 * If the used [http.Client] completes with an error when making a REST call, | 656 * If the used [http.Client] completes with an error when making a REST call, |
620 * this method will complete with the same error. | 657 * this method will complete with the same error. |
(...skipping 29 matching lines...) Expand all Loading... |
650 | 687 |
651 | 688 |
652 class ProjectsConfigsWaitersResourceApi { | 689 class ProjectsConfigsWaitersResourceApi { |
653 final commons.ApiRequester _requester; | 690 final commons.ApiRequester _requester; |
654 | 691 |
655 ProjectsConfigsWaitersResourceApi(commons.ApiRequester client) : | 692 ProjectsConfigsWaitersResourceApi(commons.ApiRequester client) : |
656 _requester = client; | 693 _requester = client; |
657 | 694 |
658 /** | 695 /** |
659 * Creates a Waiter resource. This operation returns a long-running Operation | 696 * Creates a Waiter resource. This operation returns a long-running Operation |
660 * resource which can be polled for completion. However, a Waiter with the | 697 * resource which can be polled for completion. However, a waiter with the |
661 * given name will exist (and can be retrieved) prior to the resultant | 698 * given name will exist (and can be retrieved) prior to the operation |
662 * Operation completing. If the resultant Operation indicates a failure, the | 699 * completing. If the operation fails, the failed Waiter resource will |
663 * failed Waiter resource will still exist and must be deleted prior to | 700 * still exist and must be deleted prior to subsequent creation attempts. |
664 * subsequent creation attempts. | |
665 * | 701 * |
666 * [request] - The metadata request object. | 702 * [request] - The metadata request object. |
667 * | 703 * |
668 * Request parameters: | 704 * Request parameters: |
669 * | 705 * |
670 * [parent] - The fully-qualified name of the configuration that will own the | 706 * [parent] - The path to the configuration that will own the waiter. |
671 * waiter. | 707 * The configuration must exist beforehand; the path must by in the format: |
672 * Required. Must be a valid configuration name. | 708 * |
| 709 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]`. |
673 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". | 710 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". |
674 * | 711 * |
675 * Completes with a [Operation]. | 712 * Completes with a [Operation]. |
676 * | 713 * |
677 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 714 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
678 * error. | 715 * error. |
679 * | 716 * |
680 * If the used [http.Client] completes with an error when making a REST call, | 717 * If the used [http.Client] completes with an error when making a REST call, |
681 * this method will complete with the same error. | 718 * this method will complete with the same error. |
682 */ | 719 */ |
(...skipping 18 matching lines...) Expand all Loading... |
701 "POST", | 738 "POST", |
702 body: _body, | 739 body: _body, |
703 queryParams: _queryParams, | 740 queryParams: _queryParams, |
704 uploadOptions: _uploadOptions, | 741 uploadOptions: _uploadOptions, |
705 uploadMedia: _uploadMedia, | 742 uploadMedia: _uploadMedia, |
706 downloadOptions: _downloadOptions); | 743 downloadOptions: _downloadOptions); |
707 return _response.then((data) => new Operation.fromJson(data)); | 744 return _response.then((data) => new Operation.fromJson(data)); |
708 } | 745 } |
709 | 746 |
710 /** | 747 /** |
711 * Deletes the Waiter with the specified name. | 748 * Deletes the waiter with the specified name. |
712 * | 749 * |
713 * Request parameters: | 750 * Request parameters: |
714 * | 751 * |
715 * [name] - The Waiter resource to delete. | 752 * [name] - The Waiter resource to delete, in the format: |
| 753 * |
| 754 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]` |
716 * Value must have pattern "^projects/[^/] * / configs/[^/] * / | 755 * Value must have pattern "^projects/[^/] * / configs/[^/] * / |
717 * waiters/[^/]*$". | 756 * waiters/[^/]*$". |
718 * | 757 * |
719 * Completes with a [Empty]. | 758 * Completes with a [Empty]. |
720 * | 759 * |
721 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 760 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
722 * error. | 761 * error. |
723 * | 762 * |
724 * If the used [http.Client] completes with an error when making a REST call, | 763 * If the used [http.Client] completes with an error when making a REST call, |
725 * this method will complete with the same error. | 764 * this method will complete with the same error. |
(...skipping 16 matching lines...) Expand all Loading... |
742 "DELETE", | 781 "DELETE", |
743 body: _body, | 782 body: _body, |
744 queryParams: _queryParams, | 783 queryParams: _queryParams, |
745 uploadOptions: _uploadOptions, | 784 uploadOptions: _uploadOptions, |
746 uploadMedia: _uploadMedia, | 785 uploadMedia: _uploadMedia, |
747 downloadOptions: _downloadOptions); | 786 downloadOptions: _downloadOptions); |
748 return _response.then((data) => new Empty.fromJson(data)); | 787 return _response.then((data) => new Empty.fromJson(data)); |
749 } | 788 } |
750 | 789 |
751 /** | 790 /** |
752 * Gets the Waiter resource with the specified name. | 791 * Gets information about a single waiter. |
753 * | 792 * |
754 * Request parameters: | 793 * Request parameters: |
755 * | 794 * |
756 * [name] - The fully-qualified name of the Waiter resource object to | 795 * [name] - The fully-qualified name of the Waiter resource object to |
757 * retrieve. | 796 * retrieve, in the |
| 797 * format: |
| 798 * |
| 799 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME]` |
758 * Value must have pattern "^projects/[^/] * / configs/[^/] * / | 800 * Value must have pattern "^projects/[^/] * / configs/[^/] * / |
759 * waiters/[^/]*$". | 801 * waiters/[^/]*$". |
760 * | 802 * |
761 * Completes with a [Waiter]. | 803 * Completes with a [Waiter]. |
762 * | 804 * |
763 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 805 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
764 * error. | 806 * error. |
765 * | 807 * |
766 * If the used [http.Client] completes with an error when making a REST call, | 808 * If the used [http.Client] completes with an error when making a REST call, |
767 * this method will complete with the same error. | 809 * this method will complete with the same error. |
(...skipping 16 matching lines...) Expand all Loading... |
784 "GET", | 826 "GET", |
785 body: _body, | 827 body: _body, |
786 queryParams: _queryParams, | 828 queryParams: _queryParams, |
787 uploadOptions: _uploadOptions, | 829 uploadOptions: _uploadOptions, |
788 uploadMedia: _uploadMedia, | 830 uploadMedia: _uploadMedia, |
789 downloadOptions: _downloadOptions); | 831 downloadOptions: _downloadOptions); |
790 return _response.then((data) => new Waiter.fromJson(data)); | 832 return _response.then((data) => new Waiter.fromJson(data)); |
791 } | 833 } |
792 | 834 |
793 /** | 835 /** |
794 * List Waiters within the given RuntimeConfig resource. | 836 * List waiters within the given configuration. |
795 * | 837 * |
796 * Request parameters: | 838 * Request parameters: |
797 * | 839 * |
798 * [parent] - The fully-qualified name of the configuration to list. | 840 * [parent] - The path to the configuration for which you want to get a list |
799 * Required. Must be a valid configuration name. | 841 * of waiters. |
| 842 * The configuration must exist beforehand; the path must by in the format: |
| 843 * |
| 844 * `projects/[PROJECT_ID]/configs/[CONFIG_NAME]` |
800 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". | 845 * Value must have pattern "^projects/[^/] * / configs/[^/]*$". |
801 * | 846 * |
802 * [pageSize] - List pagination support. | 847 * [pageSize] - Specifies the number of results to return per page. If there |
803 * The size of the page to return. We may return fewer elements. | 848 * are fewer |
| 849 * elements than the specified number, returns all elements. |
804 * | 850 * |
805 * [pageToken] - The token for pagination. | 851 * [pageToken] - Specifies a page token to use. Set `pageToken` to a |
| 852 * `nextPageToken` |
| 853 * returned by a previous list request to get the next page of results. |
806 * | 854 * |
807 * Completes with a [ListWaitersResponse]. | 855 * Completes with a [ListWaitersResponse]. |
808 * | 856 * |
809 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 857 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
810 * error. | 858 * error. |
811 * | 859 * |
812 * If the used [http.Client] completes with an error when making a REST call, | 860 * If the used [http.Client] completes with an error when making a REST call, |
813 * this method will complete with the same error. | 861 * this method will complete with the same error. |
814 */ | 862 */ |
815 async.Future<ListWaitersResponse> list(core.String parent, {core.int pageSize,
core.String pageToken}) { | 863 async.Future<ListWaitersResponse> list(core.String parent, {core.int pageSize,
core.String pageToken}) { |
(...skipping 24 matching lines...) Expand all Loading... |
840 uploadMedia: _uploadMedia, | 888 uploadMedia: _uploadMedia, |
841 downloadOptions: _downloadOptions); | 889 downloadOptions: _downloadOptions); |
842 return _response.then((data) => new ListWaitersResponse.fromJson(data)); | 890 return _response.then((data) => new ListWaitersResponse.fromJson(data)); |
843 } | 891 } |
844 | 892 |
845 } | 893 } |
846 | 894 |
847 | 895 |
848 | 896 |
849 /** | 897 /** |
850 * The Cardinality condition is met when the count of `Variable` resources | 898 * A Cardinality condition for the Waiter resource. A cardinality condition is |
851 * under the specified path prefix reaches the specified number. | 899 * met when the number of variables under a specified path prefix reaches a |
852 * For example, take the following variables in a RuntimeConfig object: | 900 * predefined number. For example, if you set a Cardinality condition where |
853 * /foo/variable1 = "value1" | 901 * the `path` is set to `/foo` and the number of paths is set to 2, the |
854 * /foo/variable2 = "value2" | 902 * following variables would meet the condition in a RuntimeConfig resource: |
855 * /bar/variable3 = "value3" | |
856 * | 903 * |
857 * These variables would satisfy a Cardinality condition with `path` set to | 904 * + `/foo/variable1 = "value1"` |
858 * "/foo" and `number` set to 2, but would not satisify the same condition | 905 * + `/foo/variable2 = "value2"` |
859 * with `number` set to 3. | 906 * + `/bar/variable3 = "value3"` |
| 907 * |
| 908 * It would not would not satisify the same condition with the `number` set to |
| 909 * 3, however, because there is only 2 paths that start with `/foo`. |
| 910 * Cardinality conditions are recursive; all subtrees under the specific |
| 911 * path prefix are counted. |
860 */ | 912 */ |
861 class Cardinality { | 913 class Cardinality { |
862 /** | 914 /** |
863 * The number of decendents of `path` that must exist before this condition | 915 * The number variables under the `path` that must exist to meet this |
864 * is met. Optional; defaults to 1 if not specified. | 916 * condition. Defaults to 1 if not specified. |
865 */ | 917 */ |
866 core.int number; | 918 core.int number; |
867 /** The root of the variable subtree to monitor. Required. */ | 919 /** The root of the variable subtree to monitor. For example, `/foo`. */ |
868 core.String path; | 920 core.String path; |
869 | 921 |
870 Cardinality(); | 922 Cardinality(); |
871 | 923 |
872 Cardinality.fromJson(core.Map _json) { | 924 Cardinality.fromJson(core.Map _json) { |
873 if (_json.containsKey("number")) { | 925 if (_json.containsKey("number")) { |
874 number = _json["number"]; | 926 number = _json["number"]; |
875 } | 927 } |
876 if (_json.containsKey("path")) { | 928 if (_json.containsKey("path")) { |
877 path = _json["path"]; | 929 path = _json["path"]; |
(...skipping 29 matching lines...) Expand all Loading... |
907 | 959 |
908 Empty.fromJson(core.Map _json) { | 960 Empty.fromJson(core.Map _json) { |
909 } | 961 } |
910 | 962 |
911 core.Map toJson() { | 963 core.Map toJson() { |
912 var _json = new core.Map(); | 964 var _json = new core.Map(); |
913 return _json; | 965 return _json; |
914 } | 966 } |
915 } | 967 } |
916 | 968 |
917 /** | 969 /** The condition that a Waiter resource is waiting for. */ |
918 * A condition that a Waiter resource is waiting for. The set of possible | |
919 * conditions may expand over time. | |
920 */ | |
921 class EndCondition { | 970 class EndCondition { |
922 /** The Cardinality condition type configuration. */ | 971 /** The cardinality of the `EndCondition`. */ |
923 Cardinality cardinality; | 972 Cardinality cardinality; |
924 | 973 |
925 EndCondition(); | 974 EndCondition(); |
926 | 975 |
927 EndCondition.fromJson(core.Map _json) { | 976 EndCondition.fromJson(core.Map _json) { |
928 if (_json.containsKey("cardinality")) { | 977 if (_json.containsKey("cardinality")) { |
929 cardinality = new Cardinality.fromJson(_json["cardinality"]); | 978 cardinality = new Cardinality.fromJson(_json["cardinality"]); |
930 } | 979 } |
931 } | 980 } |
932 | 981 |
933 core.Map toJson() { | 982 core.Map toJson() { |
934 var _json = new core.Map(); | 983 var _json = new core.Map(); |
935 if (cardinality != null) { | 984 if (cardinality != null) { |
936 _json["cardinality"] = (cardinality).toJson(); | 985 _json["cardinality"] = (cardinality).toJson(); |
937 } | 986 } |
938 return _json; | 987 return _json; |
939 } | 988 } |
940 } | 989 } |
941 | 990 |
942 /** | |
943 * Response for the `ListConfigs()` method. | |
944 * Order of returned configuration objects is arbitrary. | |
945 */ | |
946 class ListConfigsResponse { | 991 class ListConfigsResponse { |
947 /** Found configurations in the project. */ | 992 /** |
| 993 * A list of the configurations in the project. The order of returned |
| 994 * objects is arbitrary; that is, it is not ordered in any particular way. |
| 995 */ |
948 core.List<RuntimeConfig> configs; | 996 core.List<RuntimeConfig> configs; |
949 /** Pagination support. */ | 997 /** |
| 998 * This token allows you to get the next page of results for list requests. |
| 999 * If the number of results is larger than `pageSize`, use the `nextPageToken` |
| 1000 * as a value for the query parameter `pageToken` in the next list request. |
| 1001 * Subsequent list requests will have their own `nextPageToken` to continue |
| 1002 * paging through the results |
| 1003 */ |
950 core.String nextPageToken; | 1004 core.String nextPageToken; |
951 | 1005 |
952 ListConfigsResponse(); | 1006 ListConfigsResponse(); |
953 | 1007 |
954 ListConfigsResponse.fromJson(core.Map _json) { | 1008 ListConfigsResponse.fromJson(core.Map _json) { |
955 if (_json.containsKey("configs")) { | 1009 if (_json.containsKey("configs")) { |
956 configs = _json["configs"].map((value) => new RuntimeConfig.fromJson(value
)).toList(); | 1010 configs = _json["configs"].map((value) => new RuntimeConfig.fromJson(value
)).toList(); |
957 } | 1011 } |
958 if (_json.containsKey("nextPageToken")) { | 1012 if (_json.containsKey("nextPageToken")) { |
959 nextPageToken = _json["nextPageToken"]; | 1013 nextPageToken = _json["nextPageToken"]; |
960 } | 1014 } |
961 } | 1015 } |
962 | 1016 |
963 core.Map toJson() { | 1017 core.Map toJson() { |
964 var _json = new core.Map(); | 1018 var _json = new core.Map(); |
965 if (configs != null) { | 1019 if (configs != null) { |
966 _json["configs"] = configs.map((value) => (value).toJson()).toList(); | 1020 _json["configs"] = configs.map((value) => (value).toJson()).toList(); |
967 } | 1021 } |
968 if (nextPageToken != null) { | 1022 if (nextPageToken != null) { |
969 _json["nextPageToken"] = nextPageToken; | 1023 _json["nextPageToken"] = nextPageToken; |
970 } | 1024 } |
971 return _json; | 1025 return _json; |
972 } | 1026 } |
973 } | 1027 } |
974 | 1028 |
975 /** | |
976 * Response for the `ListVariables()` method. | |
977 * Order of returned variable objects is arbitrary. | |
978 */ | |
979 class ListVariablesResponse { | 1029 class ListVariablesResponse { |
980 /** Pagination support. */ | 1030 /** |
| 1031 * This token allows you to get the next page of results for list requests. |
| 1032 * If the number of results is larger than `pageSize`, use the `nextPageToken` |
| 1033 * as a value for the query parameter `pageToken` in the next list request. |
| 1034 * Subsequent list requests will have their own `nextPageToken` to continue |
| 1035 * paging through the results |
| 1036 */ |
981 core.String nextPageToken; | 1037 core.String nextPageToken; |
982 /** Matched variables and their values. */ | 1038 /** |
| 1039 * A list of variables and their values. The order of returned variable |
| 1040 * objects is arbitrary. |
| 1041 */ |
983 core.List<Variable> variables; | 1042 core.List<Variable> variables; |
984 | 1043 |
985 ListVariablesResponse(); | 1044 ListVariablesResponse(); |
986 | 1045 |
987 ListVariablesResponse.fromJson(core.Map _json) { | 1046 ListVariablesResponse.fromJson(core.Map _json) { |
988 if (_json.containsKey("nextPageToken")) { | 1047 if (_json.containsKey("nextPageToken")) { |
989 nextPageToken = _json["nextPageToken"]; | 1048 nextPageToken = _json["nextPageToken"]; |
990 } | 1049 } |
991 if (_json.containsKey("variables")) { | 1050 if (_json.containsKey("variables")) { |
992 variables = _json["variables"].map((value) => new Variable.fromJson(value)
).toList(); | 1051 variables = _json["variables"].map((value) => new Variable.fromJson(value)
).toList(); |
(...skipping 10 matching lines...) Expand all Loading... |
1003 } | 1062 } |
1004 return _json; | 1063 return _json; |
1005 } | 1064 } |
1006 } | 1065 } |
1007 | 1066 |
1008 /** | 1067 /** |
1009 * Response for the `ListWaiters()` method. | 1068 * Response for the `ListWaiters()` method. |
1010 * Order of returned waiter objects is arbitrary. | 1069 * Order of returned waiter objects is arbitrary. |
1011 */ | 1070 */ |
1012 class ListWaitersResponse { | 1071 class ListWaitersResponse { |
1013 /** Pagination support. */ | 1072 /** |
| 1073 * This token allows you to get the next page of results for list requests. |
| 1074 * If the number of results is larger than `pageSize`, use the `nextPageToken` |
| 1075 * as a value for the query parameter `pageToken` in the next list request. |
| 1076 * Subsequent list requests will have their own `nextPageToken` to continue |
| 1077 * paging through the results |
| 1078 */ |
1014 core.String nextPageToken; | 1079 core.String nextPageToken; |
1015 /** Found waiters in the project. */ | 1080 /** Found waiters in the project. */ |
1016 core.List<Waiter> waiters; | 1081 core.List<Waiter> waiters; |
1017 | 1082 |
1018 ListWaitersResponse(); | 1083 ListWaitersResponse(); |
1019 | 1084 |
1020 ListWaitersResponse.fromJson(core.Map _json) { | 1085 ListWaitersResponse.fromJson(core.Map _json) { |
1021 if (_json.containsKey("nextPageToken")) { | 1086 if (_json.containsKey("nextPageToken")) { |
1022 nextPageToken = _json["nextPageToken"]; | 1087 nextPageToken = _json["nextPageToken"]; |
1023 } | 1088 } |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1117 _json["name"] = name; | 1182 _json["name"] = name; |
1118 } | 1183 } |
1119 if (response != null) { | 1184 if (response != null) { |
1120 _json["response"] = response; | 1185 _json["response"] = response; |
1121 } | 1186 } |
1122 return _json; | 1187 return _json; |
1123 } | 1188 } |
1124 } | 1189 } |
1125 | 1190 |
1126 /** | 1191 /** |
1127 * RuntimeConfig is the primary resource in the Configuration service. | 1192 * A RuntimeConfig resource is the primary resource in the Cloud RuntimeConfig |
1128 * It consists of metadata and a hierarchy of variables. | 1193 * service. A RuntimeConfig resource consists of metadata and a hierarchy of |
| 1194 * variables. |
1129 */ | 1195 */ |
1130 class RuntimeConfig { | 1196 class RuntimeConfig { |
1131 /** | 1197 /** |
1132 * Description of the configuration object. | 1198 * An optional description of the RuntimeConfig object. |
1133 * `len(description)` must be less than 256. | 1199 * The length of the description must be less than 256 bytes. |
1134 */ | 1200 */ |
1135 core.String description; | 1201 core.String description; |
1136 /** | 1202 /** |
1137 * The resource name of a runtime config. | 1203 * The resource name of a runtime config. The name must have the format: |
1138 * It has the format of "projects/{project_id}/configs/{config_id}", | 1204 * |
1139 * where `project_id` is a valid Google cloud project ID, and the | 1205 * projects/[PROJECT_ID]/configs/[CONFIG_NAME] |
1140 * `config_id` must match RFC 1035 segment specification, and | 1206 * |
1141 * `len(config_id)` must be less than 64 bytes. | 1207 * The `[PROJECT_ID]` must be a valid project ID, and `[CONFIG_NAME]` is an |
1142 * The name is assigned by the client, but will be validated on the server | 1208 * arbitrary name that matches RFC 1035 segment specification. The length of |
1143 * side to adhere to the format. | 1209 * `[CONFIG_NAME]` must be less than 64 bytes. |
1144 * Name is immutable and cannot be changed. | 1210 * |
| 1211 * You pick the RuntimeConfig resource name, but the server will validate that |
| 1212 * the name adheres to this format. After you create the resource, you cannot |
| 1213 * change the resource's name. |
1145 */ | 1214 */ |
1146 core.String name; | 1215 core.String name; |
1147 | 1216 |
1148 RuntimeConfig(); | 1217 RuntimeConfig(); |
1149 | 1218 |
1150 RuntimeConfig.fromJson(core.Map _json) { | 1219 RuntimeConfig.fromJson(core.Map _json) { |
1151 if (_json.containsKey("description")) { | 1220 if (_json.containsKey("description")) { |
1152 description = _json["description"]; | 1221 description = _json["description"]; |
1153 } | 1222 } |
1154 if (_json.containsKey("name")) { | 1223 if (_json.containsKey("name")) { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 _json["details"] = details; | 1334 _json["details"] = details; |
1266 } | 1335 } |
1267 if (message != null) { | 1336 if (message != null) { |
1268 _json["message"] = message; | 1337 _json["message"] = message; |
1269 } | 1338 } |
1270 return _json; | 1339 return _json; |
1271 } | 1340 } |
1272 } | 1341 } |
1273 | 1342 |
1274 /** | 1343 /** |
1275 * Variable message describes a single variable within a Configuration object. | 1344 * Describes a single variable within a RuntimeConfig resource. |
1276 * name denotes the hierarchical variable name, e.g. | 1345 * The name denotes the hierarchical variable name. For example, |
1277 * ports/serving_port within flags configuration object. | 1346 * `ports/serving_port` is a valid variable name. The variable value is an |
1278 * Value is an opaque string and only leaf variables can have values. | 1347 * opaque string and only leaf variables can have values (that is, variables |
| 1348 * that do not have any child variables). |
1279 */ | 1349 */ |
1280 class Variable { | 1350 class Variable { |
1281 /** | 1351 /** |
1282 * Name of the variable resource. | 1352 * The name of the variable resource, in the format: |
1283 * It has format of | 1353 * |
1284 * "projects/{project_id}/configs/{config_id}/variables/{variable_id}", | 1354 * projects/[PROJECT_ID]/configs/[CONFIG_NAME]/variables/[VARIABLE_NAME] |
1285 * Where `project_id` must be a valid Google Cloud project ID, `config_id` | 1355 * |
1286 * must be a valid RuntimeConfig object and `variable_id` follows Unix | 1356 * The `[PROJECT_ID]` must be a valid project ID, `[CONFIG_NAME]` must be a |
1287 * file system file path naming. | 1357 * valid RuntimeConfig reource and `[VARIABLE_NAME]` follows Unix file system |
1288 * `variable_id` can contain ASCII letters, numbers, slashes and dashes. | 1358 * file path naming. |
1289 * Slashes are used as path element separators and are not part of the | 1359 * |
1290 * `variable_id` itself, so `variable_id` must contain at least one non-slash | 1360 * The `[VARIABLE_NAME]` can contain ASCII letters, numbers, slashes and |
1291 * character. Multiple slashes are coalesced into single slash character. | 1361 * dashes. Slashes are used as path element separators and are not part of the |
1292 * Each path segment should follow RFC 1035 segment specification. | 1362 * `[VARIABLE_NAME]` itself, so `[VARIABLE_NAME]` must contain at least one |
1293 * `len(variable_id)` must be less than 256 bytes. | 1363 * non-slash character. Multiple slashes are coalesced into single slash |
1294 * The name is assigned by the client, but will be validated on the server | 1364 * character. Each path segment should follow RFC 1035 segment specification. |
1295 * side to adhere to the format. | 1365 * The length of a `[VARIABLE_NAME]` must be less than 256 bytes. |
1296 * Name is immutable and cannot be changed. | 1366 * |
| 1367 * Once you create a variable, you cannot change the variable name. |
1297 */ | 1368 */ |
1298 core.String name; | 1369 core.String name; |
1299 /** | 1370 /** |
1300 * [Ouput only] The current state of the variable. | 1371 * [Ouput only] The current state of the variable. The variable state |
1301 * State denotes the outcome of the Watch call and is unset by the Get/List | 1372 * indicates |
1302 * calls. | 1373 * the outcome of the `variables().watch` call and is visible through the |
| 1374 * `get` and `list` calls. |
1303 * Possible string values are: | 1375 * Possible string values are: |
1304 * - "VARIABLE_STATE_UNSPECIFIED" : Default variable state. | 1376 * - "VARIABLE_STATE_UNSPECIFIED" : Default variable state. |
1305 * - "UPDATED" : Variable had been updated, while watch was executing. | 1377 * - "UPDATED" : The variable was updated, while `variables().watch` was |
1306 * - "DELETED" : Variable had been deleted, while watch was executing. | 1378 * executing. |
| 1379 * - "DELETED" : The variable was deleted, while `variables().watch` was |
| 1380 * executing. |
1307 */ | 1381 */ |
1308 core.String state; | 1382 core.String state; |
1309 /** [Output Only] The time of the last variable update. */ | 1383 /** [Output Only] The time of the last variable update. */ |
1310 core.String updateTime; | 1384 core.String updateTime; |
1311 /** | 1385 /** |
1312 * `len(value)` must be less than 4096 bytes. Empty values are also accepted. | 1386 * The value of the variable. The length of the value must be less than 4096 |
1313 * value must be Base64 encoded. | 1387 * bytes. Empty values are also accepted. The value must be Base64 encoded. |
1314 */ | 1388 */ |
1315 core.String value; | 1389 core.String value; |
1316 core.List<core.int> get valueAsBytes { | 1390 core.List<core.int> get valueAsBytes { |
1317 return crypto.CryptoUtils.base64StringToBytes(value); | 1391 return convert.BASE64.decode(value); |
1318 } | 1392 } |
1319 | 1393 |
1320 void set valueAsBytes(core.List<core.int> _bytes) { | 1394 void set valueAsBytes(core.List<core.int> _bytes) { |
1321 value = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1395 value = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "
-"); |
1322 } | 1396 } |
1323 | 1397 |
1324 Variable(); | 1398 Variable(); |
1325 | 1399 |
1326 Variable.fromJson(core.Map _json) { | 1400 Variable.fromJson(core.Map _json) { |
1327 if (_json.containsKey("name")) { | 1401 if (_json.containsKey("name")) { |
1328 name = _json["name"]; | 1402 name = _json["name"]; |
1329 } | 1403 } |
1330 if (_json.containsKey("state")) { | 1404 if (_json.containsKey("state")) { |
1331 state = _json["state"]; | 1405 state = _json["state"]; |
(...skipping 18 matching lines...) Expand all Loading... |
1350 _json["updateTime"] = updateTime; | 1424 _json["updateTime"] = updateTime; |
1351 } | 1425 } |
1352 if (value != null) { | 1426 if (value != null) { |
1353 _json["value"] = value; | 1427 _json["value"] = value; |
1354 } | 1428 } |
1355 return _json; | 1429 return _json; |
1356 } | 1430 } |
1357 } | 1431 } |
1358 | 1432 |
1359 /** | 1433 /** |
1360 * A Waiter resource waits for some condition within a RuntimeConfig resource | 1434 * A Waiter resource waits for some end condition within a RuntimeConfig |
1361 * to be met. For example: each node in a distributed system startup process | 1435 * resource |
1362 * writes a value to a Variable resource indicating its readiness. A Waiter | 1436 * to be met before it returns. For example, assume you have a distributed |
1363 * configured with the proper `success` condition can be used to wait until | 1437 * system where each node writes to a Variable resource indidicating the node's |
1364 * some number of nodes have checked in. | 1438 * readiness as part of the startup process. |
| 1439 * |
| 1440 * You then configure a Waiter resource with the success condition set to wait |
| 1441 * until some number of nodes have checked in. Afterwards, your application |
| 1442 * runs some arbitrary code after the condition has been met and the waiter |
| 1443 * returns successfully. |
| 1444 * |
1365 * Once created, a Waiter resource is immutable. | 1445 * Once created, a Waiter resource is immutable. |
| 1446 * |
| 1447 * To learn more about using waiters, read the |
| 1448 * [Creating a Waiter](/deployment-manager/runtime-config/creating-a-water) |
| 1449 * documentation. |
1366 */ | 1450 */ |
1367 class Waiter { | 1451 class Waiter { |
1368 /** | 1452 /** |
1369 * The instant at which this Waiter was created. Adding the value of `timeout` | 1453 * [Output Only] The instant at which this Waiter resource was created. Adding |
1370 * to this instant yields the timeout deadline for this Waiter. Output only. | 1454 * the value of `timeout` to this instant yields the timeout deadline for the |
| 1455 * waiter. |
1371 */ | 1456 */ |
1372 core.String createTime; | 1457 core.String createTime; |
1373 /** | 1458 /** |
1374 * If the value is `false`, it means the Waiter is still waiting for one of | 1459 * [Output Only] If the value is `false`, it means the waiter is still waiting |
1375 * its conditions to be met. | 1460 * for one of its conditions to be met. |
1376 * If true, the Waiter has finished. If the Waiter finished due to a timeout | 1461 * |
1377 * or failure, `error` will be set. Output only. | 1462 * If true, the waiter has finished. If the waiter finished due to a timeout |
| 1463 * or failure, `error` will be set. |
1378 */ | 1464 */ |
1379 core.bool done; | 1465 core.bool done; |
1380 /** | 1466 /** |
1381 * If the Waiter ended due to a failure or timeout, this value will be set. | 1467 * [Output Only] If the waiter ended due to a failure or timeout, this value |
1382 * Output only. | 1468 * will be set. |
1383 */ | 1469 */ |
1384 Status error; | 1470 Status error; |
1385 /** | 1471 /** |
1386 * The failure condition. If this condition is met, `done` will be set to | 1472 * [Optional] The failure condition of this waiter. If this condition is met, |
1387 * `true` and the `error` code will be set to ABORTED. The failure condition | 1473 * `done` will be set to `true` and the `error` code will be set to `ABORTED`. |
1388 * takes precedence over the success condition. If both conditions are met, a | 1474 * The failure condition takes precedence over the success condition. If both |
1389 * failure will be indicated. This value is optional; if no failure condition | 1475 * conditions are met, a failure will be indicated. This value is optional; if |
1390 * is set, the only failure scenario will be a timeout. Optional. | 1476 * no failure condition is set, the only failure scenario will be a timeout. |
1391 */ | 1477 */ |
1392 EndCondition failure; | 1478 EndCondition failure; |
1393 /** | 1479 /** |
1394 * Name of the variable resource. | 1480 * The name of the Waiter resource, in the format: |
1395 * It has format of | 1481 * |
1396 * "projects/{project_id}/configs/{config_id}/waiters/{waiter_id}", | 1482 * projects/[PROJECT_ID]/configs/[CONFIG_NAME]/waiters/[WAITER_NAME] |
1397 * Where `project_id` must be a valid Google Cloud project ID, `config_id` | 1483 * |
1398 * must be a valid RuntimeConfig object and the `waiter_id` must match | 1484 * The `[PROJECT_ID]` must be a valid Google Cloud project ID, |
1399 * RFC 1035 segment specification, and `len(waiter_id)` must be less than | 1485 * the `[CONFIG_NAME]` must be a valid RuntimeConfig resource, the |
1400 * 64 bytes. | 1486 * `[WAITER_NAME]` must match RFC 1035 segment specification, and the length |
1401 * The name is assigned by the client, but will be validated on the server | 1487 * of `[WAITER_NAME]` must be less than 64 bytes. |
1402 * side to adhere to the format. | 1488 * |
1403 * Name is immutable and cannot be changed. Required. | 1489 * After you create a Waiter resource, you cannot change the resource name. |
1404 */ | 1490 */ |
1405 core.String name; | 1491 core.String name; |
1406 /** | 1492 /** |
1407 * The success condition. If this condition is met, `done` will be set to | 1493 * [Required] The success condition. If this condition is met, `done` will be |
1408 * `true` and the `error` value will remain unset. The failure condition | 1494 * set to `true` and the `error` value will remain unset. The failure |
| 1495 * condition |
1409 * takes precedence over the success condition. If both conditions are met, a | 1496 * takes precedence over the success condition. If both conditions are met, a |
1410 * failure will be indicated. Required. | 1497 * failure will be indicated. |
1411 */ | 1498 */ |
1412 EndCondition success; | 1499 EndCondition success; |
1413 /** | 1500 /** |
1414 * The timeout, beginning from the instant that CreateWaiter is called. If | 1501 * [Required] Specifies the timeout of the waiter in seconds, beginning from |
1415 * this timeout elapses prior to the success or failure conditions being met, | 1502 * the instant that `waiters().create` method is called. If this time elapses |
1416 * the Waiter will fail and the `error` code will be set to DEADLINE_EXCEEDED. | 1503 * before the success or failure conditions are met, the waiter fails and sets |
1417 * Required. | 1504 * the `error` code to `DEADLINE_EXCEEDED`. |
1418 */ | 1505 */ |
1419 core.String timeout; | 1506 core.String timeout; |
1420 | 1507 |
1421 Waiter(); | 1508 Waiter(); |
1422 | 1509 |
1423 Waiter.fromJson(core.Map _json) { | 1510 Waiter.fromJson(core.Map _json) { |
1424 if (_json.containsKey("createTime")) { | 1511 if (_json.containsKey("createTime")) { |
1425 createTime = _json["createTime"]; | 1512 createTime = _json["createTime"]; |
1426 } | 1513 } |
1427 if (_json.containsKey("done")) { | 1514 if (_json.containsKey("done")) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 if (timeout != null) { | 1554 if (timeout != null) { |
1468 _json["timeout"] = timeout; | 1555 _json["timeout"] = timeout; |
1469 } | 1556 } |
1470 return _json; | 1557 return _json; |
1471 } | 1558 } |
1472 } | 1559 } |
1473 | 1560 |
1474 /** Request for the `WatchVariable()` method. */ | 1561 /** Request for the `WatchVariable()` method. */ |
1475 class WatchVariableRequest { | 1562 class WatchVariableRequest { |
1476 /** | 1563 /** |
1477 * If backend has a variable that has a newer value than this timestamp, then | 1564 * If specified, checks the current timestamp of the variable and if the |
1478 * request will return immediately with current value. | 1565 * current timestamp is newer than `newerThan` timestamp, the method returns |
1479 * If not specified or variable has an older timestamp, will wait for the new | 1566 * immediately. |
1480 * value. | 1567 * |
| 1568 * If not specified or the variable has an older timestamp, the watcher waits |
| 1569 * for a the value to change before returning. |
1481 */ | 1570 */ |
1482 core.String newerThan; | 1571 core.String newerThan; |
1483 | 1572 |
1484 WatchVariableRequest(); | 1573 WatchVariableRequest(); |
1485 | 1574 |
1486 WatchVariableRequest.fromJson(core.Map _json) { | 1575 WatchVariableRequest.fromJson(core.Map _json) { |
1487 if (_json.containsKey("newerThan")) { | 1576 if (_json.containsKey("newerThan")) { |
1488 newerThan = _json["newerThan"]; | 1577 newerThan = _json["newerThan"]; |
1489 } | 1578 } |
1490 } | 1579 } |
1491 | 1580 |
1492 core.Map toJson() { | 1581 core.Map toJson() { |
1493 var _json = new core.Map(); | 1582 var _json = new core.Map(); |
1494 if (newerThan != null) { | 1583 if (newerThan != null) { |
1495 _json["newerThan"] = newerThan; | 1584 _json["newerThan"] = newerThan; |
1496 } | 1585 } |
1497 return _json; | 1586 return _json; |
1498 } | 1587 } |
1499 } | 1588 } |
OLD | NEW |