OLD | NEW |
1 library googleapis_beta.replicapoolupdater.v1beta1; | 1 library googleapis_beta.replicapoolupdater.v1beta1; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
(...skipping 14 matching lines...) Expand all Loading... |
25 static const ReplicapoolScope = "https://www.googleapis.com/auth/replicapool"; | 25 static const ReplicapoolScope = "https://www.googleapis.com/auth/replicapool"; |
26 | 26 |
27 /** View replica pools */ | 27 /** View replica pools */ |
28 static const ReplicapoolReadonlyScope = "https://www.googleapis.com/auth/repli
capool.readonly"; | 28 static const ReplicapoolReadonlyScope = "https://www.googleapis.com/auth/repli
capool.readonly"; |
29 | 29 |
30 | 30 |
31 final common_internal.ApiRequester _requester; | 31 final common_internal.ApiRequester _requester; |
32 | 32 |
33 UpdatesResourceApi get updates => new UpdatesResourceApi(_requester); | 33 UpdatesResourceApi get updates => new UpdatesResourceApi(_requester); |
34 | 34 |
35 ReplicapoolupdaterApi(http.Client client) : | 35 ReplicapoolupdaterApi(http.Client client, {core.String rootUrl: "https://www.g
oogleapis.com/", core.String servicePath: "replicapoolupdater/v1beta1/projects/"
}) : |
36 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "replicapoolupdater/v1beta1/projects/"); | 36 _requester = new common_internal.ApiRequester(client, rootUrl, servicePath
); |
37 } | 37 } |
38 | 38 |
39 | 39 |
40 /** Not documented yet. */ | 40 /** Not documented yet. */ |
41 class UpdatesResourceApi { | 41 class UpdatesResourceApi { |
42 final common_internal.ApiRequester _requester; | 42 final common_internal.ApiRequester _requester; |
43 | 43 |
44 UpdatesResourceApi(common_internal.ApiRequester client) : | 44 UpdatesResourceApi(common_internal.ApiRequester client) : |
45 _requester = client; | 45 _requester = client; |
46 | 46 |
47 /** | 47 /** |
48 * Called on the particular Update endpoint. Cancels the update in state | 48 * Called on the particular Update endpoint. Cancels the update in state |
49 * PAUSED. No-op if invoked in state CANCELLED. | 49 * PAUSED. No-op if invoked in state CANCELLED. |
50 * | 50 * |
51 * Request parameters: | 51 * Request parameters: |
52 * | 52 * |
53 * [project] - Project ID for this request. | 53 * [project] - The Google Developers Console project name. |
| 54 * Value must have pattern |
| 55 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
54 * | 56 * |
55 * [zone] - Zone for the instance group manager. | 57 * [zone] - The name of the zone in which the update's target resides. |
56 * | 58 * |
57 * [instanceGroupManager] - Name of the instance group manager for this | 59 * [instanceGroupManager] - The name of the instance group manager. |
58 * request. | |
59 * | 60 * |
60 * [update] - Unique (in the context of a group) handle of an update. | 61 * [update] - Unique (in the context of a group) handle of an update. |
61 * | 62 * |
62 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 63 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
63 * error. | 64 * error. |
64 * | 65 * |
65 * If the used [http.Client] completes with an error when making a REST call, | 66 * If the used [http.Client] completes with an error when making a REST call, |
66 * this method will complete with the same error. | 67 * this method will complete with the same error. |
67 */ | 68 */ |
68 async.Future cancel(core.String project, core.String zone, core.String instanc
eGroupManager, core.String update) { | 69 async.Future cancel(core.String project, core.String zone, core.String instanc
eGroupManager, core.String update) { |
(...skipping 29 matching lines...) Expand all Loading... |
98 uploadMedia: _uploadMedia, | 99 uploadMedia: _uploadMedia, |
99 downloadOptions: _downloadOptions); | 100 downloadOptions: _downloadOptions); |
100 return _response.then((data) => null); | 101 return _response.then((data) => null); |
101 } | 102 } |
102 | 103 |
103 /** | 104 /** |
104 * Called on the particular Update endpoint. Returns the Update resource. | 105 * Called on the particular Update endpoint. Returns the Update resource. |
105 * | 106 * |
106 * Request parameters: | 107 * Request parameters: |
107 * | 108 * |
108 * [project] - Project ID for this request. | 109 * [project] - The Google Developers Console project name. |
| 110 * Value must have pattern |
| 111 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
109 * | 112 * |
110 * [zone] - Zone for the instance group manager. | 113 * [zone] - The name of the zone in which the update's target resides. |
111 * | 114 * |
112 * [instanceGroupManager] - Name of the instance group manager for this | 115 * [instanceGroupManager] - The name of the instance group manager. |
113 * request. | |
114 * | 116 * |
115 * [update] - Unique (in the context of a group) handle of an update. | 117 * [update] - Unique (in the context of a group) handle of an update. |
116 * | 118 * |
117 * Completes with a [Update]. | 119 * Completes with a [Update]. |
118 * | 120 * |
119 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 121 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
120 * error. | 122 * error. |
121 * | 123 * |
122 * If the used [http.Client] completes with an error when making a REST call, | 124 * If the used [http.Client] completes with an error when making a REST call, |
123 * this method will complete with the same error. | 125 * this method will complete with the same error. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 } | 159 } |
158 | 160 |
159 /** | 161 /** |
160 * Called on the collection endpoint. Inserts the new Update resource and | 162 * Called on the collection endpoint. Inserts the new Update resource and |
161 * starts the update. | 163 * starts the update. |
162 * | 164 * |
163 * [request] - The metadata request object. | 165 * [request] - The metadata request object. |
164 * | 166 * |
165 * Request parameters: | 167 * Request parameters: |
166 * | 168 * |
167 * [project] - Project ID for this request. | 169 * [project] - The Google Developers Console project name. |
| 170 * Value must have pattern |
| 171 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
168 * | 172 * |
169 * [zone] - Zone for the instance group manager. | 173 * [zone] - The name of the zone in which the update's target resides. |
170 * | 174 * |
171 * [instanceGroupManager] - Name of the instance group manager for this | 175 * [instanceGroupManager] - The name of the instance group manager. |
172 * request. | |
173 * | 176 * |
174 * Completes with a [InsertResponse]. | 177 * Completes with a [InsertResponse]. |
175 * | 178 * |
176 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 179 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
177 * error. | 180 * error. |
178 * | 181 * |
179 * If the used [http.Client] completes with an error when making a REST call, | 182 * If the used [http.Client] completes with an error when making a REST call, |
180 * this method will complete with the same error. | 183 * this method will complete with the same error. |
181 */ | 184 */ |
182 async.Future<InsertResponse> insert(Update request, core.String project, core.
String zone, core.String instanceGroupManager) { | 185 async.Future<InsertResponse> insert(Update request, core.String project, core.
String zone, core.String instanceGroupManager) { |
(...skipping 30 matching lines...) Expand all Loading... |
213 return _response.then((data) => new InsertResponse.fromJson(data)); | 216 return _response.then((data) => new InsertResponse.fromJson(data)); |
214 } | 217 } |
215 | 218 |
216 /** | 219 /** |
217 * Called on the collection endpoint. Lists updates for a given instance | 220 * Called on the collection endpoint. Lists updates for a given instance |
218 * group, in reverse chronological order. Pagination is supported, see | 221 * group, in reverse chronological order. Pagination is supported, see |
219 * ListRequestHeader. | 222 * ListRequestHeader. |
220 * | 223 * |
221 * Request parameters: | 224 * Request parameters: |
222 * | 225 * |
223 * [project] - Project ID for this request. | 226 * [project] - The Google Developers Console project name. |
| 227 * Value must have pattern |
| 228 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
224 * | 229 * |
225 * [zone] - Zone for the instance group manager. | 230 * [zone] - The name of the zone in which the update's target resides. |
226 * | 231 * |
227 * [instanceGroupManager] - Name of the instance group manager for this | 232 * [instanceGroupManager] - The name of the instance group manager. |
228 * request. | |
229 * | 233 * |
230 * [maxResults] - Maximum count of results to be returned. Acceptable values | 234 * [maxResults] - Maximum count of results to be returned. Acceptable values |
231 * are 1 to 100, inclusive. (Default: 50) | 235 * are 1 to 100, inclusive. (Default: 50) |
232 * Value must be between "1" and "100". | 236 * Value must be between "1" and "100". |
233 * | 237 * |
234 * [pageToken] - Set this to the nextPageToken value returned by a previous | 238 * [pageToken] - Set this to the nextPageToken value returned by a previous |
235 * list request to obtain the next page of results from the previous list | 239 * list request to obtain the next page of results from the previous list |
236 * request. | 240 * request. |
237 * | 241 * |
238 * Completes with a [UpdateList]. | 242 * Completes with a [UpdateList]. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 "GET", | 278 "GET", |
275 body: _body, | 279 body: _body, |
276 queryParams: _queryParams, | 280 queryParams: _queryParams, |
277 uploadOptions: _uploadOptions, | 281 uploadOptions: _uploadOptions, |
278 uploadMedia: _uploadMedia, | 282 uploadMedia: _uploadMedia, |
279 downloadOptions: _downloadOptions); | 283 downloadOptions: _downloadOptions); |
280 return _response.then((data) => new UpdateList.fromJson(data)); | 284 return _response.then((data) => new UpdateList.fromJson(data)); |
281 } | 285 } |
282 | 286 |
283 /** | 287 /** |
| 288 * Called on the particular Update endpoint. Lists instance updates for a |
| 289 * given update. |
| 290 * |
| 291 * Request parameters: |
| 292 * |
| 293 * [project] - The Google Developers Console project name. |
| 294 * Value must have pattern |
| 295 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
| 296 * |
| 297 * [zone] - The name of the zone in which the update's target resides. |
| 298 * |
| 299 * [instanceGroupManager] - The name of the instance group manager. |
| 300 * |
| 301 * [update] - Unique (in the context of a group) handle of an update. |
| 302 * |
| 303 * [maxResults] - Maximum count of results to be returned. Acceptable values |
| 304 * are 1 to 100, inclusive. (Default: 50) |
| 305 * Value must be between "1" and "100". |
| 306 * |
| 307 * [pageToken] - Set this to the nextPageToken value returned by a previous |
| 308 * list request to obtain the next page of results from the previous list |
| 309 * request. |
| 310 * |
| 311 * Completes with a [InstanceUpdateList]. |
| 312 * |
| 313 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 314 * error. |
| 315 * |
| 316 * If the used [http.Client] completes with an error when making a REST call, |
| 317 * this method will complete with the same error. |
| 318 */ |
| 319 async.Future<InstanceUpdateList> listInstanceUpdates(core.String project, core
.String zone, core.String instanceGroupManager, core.String update, {core.int ma
xResults, core.String pageToken}) { |
| 320 var _url = null; |
| 321 var _queryParams = new core.Map(); |
| 322 var _uploadMedia = null; |
| 323 var _uploadOptions = null; |
| 324 var _downloadOptions = common.DownloadOptions.Metadata; |
| 325 var _body = null; |
| 326 |
| 327 if (project == null) { |
| 328 throw new core.ArgumentError("Parameter project is required."); |
| 329 } |
| 330 if (zone == null) { |
| 331 throw new core.ArgumentError("Parameter zone is required."); |
| 332 } |
| 333 if (instanceGroupManager == null) { |
| 334 throw new core.ArgumentError("Parameter instanceGroupManager is required."
); |
| 335 } |
| 336 if (update == null) { |
| 337 throw new core.ArgumentError("Parameter update is required."); |
| 338 } |
| 339 if (maxResults != null) { |
| 340 _queryParams["maxResults"] = ["${maxResults}"]; |
| 341 } |
| 342 if (pageToken != null) { |
| 343 _queryParams["pageToken"] = [pageToken]; |
| 344 } |
| 345 |
| 346 |
| 347 _url = common_internal.Escaper.ecapeVariable('$project') + '/zones/' + commo
n_internal.Escaper.ecapeVariable('$zone') + '/instanceGroupManagers/' + common_i
nternal.Escaper.ecapeVariable('$instanceGroupManager') + '/updates/' + common_in
ternal.Escaper.ecapeVariable('$update') + '/instanceUpdates'; |
| 348 |
| 349 var _response = _requester.request(_url, |
| 350 "GET", |
| 351 body: _body, |
| 352 queryParams: _queryParams, |
| 353 uploadOptions: _uploadOptions, |
| 354 uploadMedia: _uploadMedia, |
| 355 downloadOptions: _downloadOptions); |
| 356 return _response.then((data) => new InstanceUpdateList.fromJson(data)); |
| 357 } |
| 358 |
| 359 /** |
284 * Called on the particular Update endpoint. Pauses the update in state | 360 * Called on the particular Update endpoint. Pauses the update in state |
285 * ROLLING_FORWARD or ROLLING_BACK. No-op if invoked in state PAUSED. | 361 * ROLLING_FORWARD or ROLLING_BACK. No-op if invoked in state PAUSED. |
286 * | 362 * |
287 * Request parameters: | 363 * Request parameters: |
288 * | 364 * |
289 * [project] - Project ID for this request. | 365 * [project] - The Google Developers Console project name. |
| 366 * Value must have pattern |
| 367 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
290 * | 368 * |
291 * [zone] - Zone for the instance group manager. | 369 * [zone] - The name of the zone in which the update's target resides. |
292 * | 370 * |
293 * [instanceGroupManager] - Name of the instance group manager for this | 371 * [instanceGroupManager] - The name of the instance group manager. |
294 * request. | |
295 * | 372 * |
296 * [update] - Unique (in the context of a group) handle of an update. | 373 * [update] - Unique (in the context of a group) handle of an update. |
297 * | 374 * |
298 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 375 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
299 * error. | 376 * error. |
300 * | 377 * |
301 * If the used [http.Client] completes with an error when making a REST call, | 378 * If the used [http.Client] completes with an error when making a REST call, |
302 * this method will complete with the same error. | 379 * this method will complete with the same error. |
303 */ | 380 */ |
304 async.Future pause(core.String project, core.String zone, core.String instance
GroupManager, core.String update) { | 381 async.Future pause(core.String project, core.String zone, core.String instance
GroupManager, core.String update) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 return _response.then((data) => null); | 413 return _response.then((data) => null); |
337 } | 414 } |
338 | 415 |
339 /** | 416 /** |
340 * Called on the particular Update endpoint. Rolls back the update in state | 417 * Called on the particular Update endpoint. Rolls back the update in state |
341 * ROLLING_FORWARD or PAUSED. No-op if invoked in state ROLLED_BACK or | 418 * ROLLING_FORWARD or PAUSED. No-op if invoked in state ROLLED_BACK or |
342 * ROLLING_BACK. | 419 * ROLLING_BACK. |
343 * | 420 * |
344 * Request parameters: | 421 * Request parameters: |
345 * | 422 * |
346 * [project] - Project ID for this request. | 423 * [project] - The Google Developers Console project name. |
| 424 * Value must have pattern |
| 425 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
347 * | 426 * |
348 * [zone] - Zone for the instance group manager. | 427 * [zone] - The name of the zone in which the update's target resides. |
349 * | 428 * |
350 * [instanceGroupManager] - Name of the instance group manager for this | 429 * [instanceGroupManager] - The name of the instance group manager. |
351 * request. | |
352 * | 430 * |
353 * [update] - Unique (in the context of a group) handle of an update. | 431 * [update] - Unique (in the context of a group) handle of an update. |
354 * | 432 * |
355 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 433 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
356 * error. | 434 * error. |
357 * | 435 * |
358 * If the used [http.Client] completes with an error when making a REST call, | 436 * If the used [http.Client] completes with an error when making a REST call, |
359 * this method will complete with the same error. | 437 * this method will complete with the same error. |
360 */ | 438 */ |
361 async.Future rollback(core.String project, core.String zone, core.String insta
nceGroupManager, core.String update) { | 439 async.Future rollback(core.String project, core.String zone, core.String insta
nceGroupManager, core.String update) { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
393 return _response.then((data) => null); | 471 return _response.then((data) => null); |
394 } | 472 } |
395 | 473 |
396 /** | 474 /** |
397 * Called on the particular Update endpoint. Rolls forward the update in state | 475 * Called on the particular Update endpoint. Rolls forward the update in state |
398 * ROLLING_BACK or PAUSED. No-op if invoked in state ROLLED_OUT or | 476 * ROLLING_BACK or PAUSED. No-op if invoked in state ROLLED_OUT or |
399 * ROLLING_FORWARD. | 477 * ROLLING_FORWARD. |
400 * | 478 * |
401 * Request parameters: | 479 * Request parameters: |
402 * | 480 * |
403 * [project] - Project ID for this request. | 481 * [project] - The Google Developers Console project name. |
| 482 * Value must have pattern |
| 483 * "(?:(?:[-a-z0-9]{1,63}\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{
1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))". |
404 * | 484 * |
405 * [zone] - Zone for the instance group manager. | 485 * [zone] - The name of the zone in which the update's target resides. |
406 * | 486 * |
407 * [instanceGroupManager] - Name of the instance group manager for this | 487 * [instanceGroupManager] - The name of the instance group manager. |
408 * request. | |
409 * | 488 * |
410 * [update] - Unique (in the context of a group) handle of an update. | 489 * [update] - Unique (in the context of a group) handle of an update. |
411 * | 490 * |
412 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 491 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
413 * error. | 492 * error. |
414 * | 493 * |
415 * If the used [http.Client] completes with an error when making a REST call, | 494 * If the used [http.Client] completes with an error when making a REST call, |
416 * this method will complete with the same error. | 495 * this method will complete with the same error. |
417 */ | 496 */ |
418 async.Future rollforward(core.String project, core.String zone, core.String in
stanceGroupManager, core.String update) { | 497 async.Future rollforward(core.String project, core.String zone, core.String in
stanceGroupManager, core.String update) { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 if (update != null) { | 552 if (update != null) { |
474 _json["update"] = update; | 553 _json["update"] = update; |
475 } | 554 } |
476 return _json; | 555 return _json; |
477 } | 556 } |
478 } | 557 } |
479 | 558 |
480 | 559 |
481 /** Update of a single instance. */ | 560 /** Update of a single instance. */ |
482 class InstanceUpdate { | 561 class InstanceUpdate { |
483 /** Name of an instance. */ | 562 /** URL of the instance being updated. */ |
484 core.String instanceName; | 563 core.String instance; |
485 | 564 |
486 /** | 565 /** |
487 * State of an instance update. Possible values are: | 566 * State of the instance update. Possible values are: |
488 * - "PENDING/code>": The instance update is pending execution. | 567 * - "PENDING/code>": The instance update is pending execution. |
489 * - "ROLLING_FORWARD": The instance update is going forward. | 568 * - "ROLLING_FORWARD": The instance update is going forward. |
490 * - "ROLLING_BACK": The instance update being rolled back. | 569 * - "ROLLING_BACK": The instance update is being rolled back. |
491 * - "PAUSED": The instance update is temporarily paused (inactive). | 570 * - "PAUSED": The instance update is temporarily paused (inactive). |
492 * - "ROLLED_OUT": The instance update is finished, the instance is running | 571 * - "ROLLED_OUT": The instance update is finished, the instance is running |
493 * the new template. | 572 * the new template. |
494 * - "ROLLED_BACK": The instance update is finished, the instance has been | 573 * - "ROLLED_BACK": The instance update is finished, the instance has been |
495 * reverted to the previous template. | 574 * reverted to the previous template. |
496 * - "CANCELLED": The instance update is paused and no longer can be resumed, | 575 * - "CANCELLED": The instance update is paused and no longer can be resumed, |
497 * undefined in which template the instance is running. | 576 * undefined in which template the instance is running. |
498 */ | 577 */ |
499 core.String state; | 578 core.String state; |
500 | 579 |
| 580 /** |
| 581 * Status of the instance update. Possible values are: |
| 582 * - "PENDING/code>": The instance update is pending execution. |
| 583 * - "ROLLING_FORWARD": The instance update is going forward. |
| 584 * - "ROLLING_BACK": The instance update is being rolled back. |
| 585 * - "PAUSED": The instance update is temporarily paused (inactive). |
| 586 * - "ROLLED_OUT": The instance update is finished, the instance is running |
| 587 * the new template. |
| 588 * - "ROLLED_BACK": The instance update is finished, the instance has been |
| 589 * reverted to the previous template. |
| 590 * - "CANCELLED": The instance update is paused and no longer can be resumed, |
| 591 * undefined in which template the instance is running. |
| 592 */ |
| 593 core.String status; |
| 594 |
501 | 595 |
502 InstanceUpdate(); | 596 InstanceUpdate(); |
503 | 597 |
504 InstanceUpdate.fromJson(core.Map _json) { | 598 InstanceUpdate.fromJson(core.Map _json) { |
505 if (_json.containsKey("instanceName")) { | 599 if (_json.containsKey("instance")) { |
506 instanceName = _json["instanceName"]; | 600 instance = _json["instance"]; |
507 } | 601 } |
508 if (_json.containsKey("state")) { | 602 if (_json.containsKey("state")) { |
509 state = _json["state"]; | 603 state = _json["state"]; |
510 } | 604 } |
| 605 if (_json.containsKey("status")) { |
| 606 status = _json["status"]; |
| 607 } |
511 } | 608 } |
512 | 609 |
513 core.Map toJson() { | 610 core.Map toJson() { |
514 var _json = new core.Map(); | 611 var _json = new core.Map(); |
515 if (instanceName != null) { | 612 if (instance != null) { |
516 _json["instanceName"] = instanceName; | 613 _json["instance"] = instance; |
517 } | 614 } |
518 if (state != null) { | 615 if (state != null) { |
519 _json["state"] = state; | 616 _json["state"] = state; |
520 } | 617 } |
| 618 if (status != null) { |
| 619 _json["status"] = status; |
| 620 } |
| 621 return _json; |
| 622 } |
| 623 } |
| 624 |
| 625 |
| 626 /** Response returned by ListInstanceUpdates method. */ |
| 627 class InstanceUpdateList { |
| 628 /** A list of instance updates. */ |
| 629 core.List<InstanceUpdate> items; |
| 630 |
| 631 /** [Output Only] Type of the resource. */ |
| 632 core.String kind; |
| 633 |
| 634 /** A token used to continue a truncated list request (output only). */ |
| 635 core.String nextPageToken; |
| 636 |
| 637 /** [Output Only] The fully qualified URL for the resource. */ |
| 638 core.String selfLink; |
| 639 |
| 640 |
| 641 InstanceUpdateList(); |
| 642 |
| 643 InstanceUpdateList.fromJson(core.Map _json) { |
| 644 if (_json.containsKey("items")) { |
| 645 items = _json["items"].map((value) => new InstanceUpdate.fromJson(value)).
toList(); |
| 646 } |
| 647 if (_json.containsKey("kind")) { |
| 648 kind = _json["kind"]; |
| 649 } |
| 650 if (_json.containsKey("nextPageToken")) { |
| 651 nextPageToken = _json["nextPageToken"]; |
| 652 } |
| 653 if (_json.containsKey("selfLink")) { |
| 654 selfLink = _json["selfLink"]; |
| 655 } |
| 656 } |
| 657 |
| 658 core.Map toJson() { |
| 659 var _json = new core.Map(); |
| 660 if (items != null) { |
| 661 _json["items"] = items.map((value) => (value).toJson()).toList(); |
| 662 } |
| 663 if (kind != null) { |
| 664 _json["kind"] = kind; |
| 665 } |
| 666 if (nextPageToken != null) { |
| 667 _json["nextPageToken"] = nextPageToken; |
| 668 } |
| 669 if (selfLink != null) { |
| 670 _json["selfLink"] = selfLink; |
| 671 } |
521 return _json; | 672 return _json; |
522 } | 673 } |
523 } | 674 } |
524 | 675 |
525 | 676 |
526 /** | 677 /** |
527 * Resource describing a single update (rollout) of an instance group to the | 678 * Resource describing a single update (rollout) of a group of instances to the |
528 * given template. | 679 * given template. |
529 */ | 680 */ |
530 class Update { | 681 class Update { |
531 /** [Output only] The time the update was created, in RFC3339 text format. */ | 682 /** [Output Only] Creation timestamp in RFC3339 text format. */ |
532 core.String creationTimestamp; | 683 core.String creationTimestamp; |
533 | 684 |
534 /** [Output only] Human-readable description of an update progress. */ | 685 /** |
| 686 * [Output Only] An optional textual description of the current status of the |
| 687 * update. |
| 688 */ |
535 core.String details; | 689 core.String details; |
536 | 690 |
537 /** | 691 /** |
538 * [Output only] Unique (in the context of a group) handle assigned to this | 692 * [Output Only] Unique (in the context of a group) handle assigned to this |
539 * update. | 693 * update. |
540 */ | 694 */ |
541 core.String handle; | 695 core.String handle; |
542 | 696 |
543 /** Url of an instance template to be applied. */ | 697 /** |
| 698 * [Output Only] Unique identifier for the resource; defined by the server. |
| 699 */ |
| 700 core.String id; |
| 701 |
| 702 /** [Output Only] URL of an instance group manager being updated. */ |
| 703 core.String instanceGroupManager; |
| 704 |
| 705 /** URL of an instance template to be applied. */ |
544 core.String instanceTemplate; | 706 core.String instanceTemplate; |
545 | 707 |
546 /** [Output only] Collection of instance updates. */ | 708 /** [Output Only] Type of the resource. */ |
547 core.List<InstanceUpdate> instanceUpdates; | |
548 | |
549 /** [Output only] The resource type. Always replicapoolupdater#update. */ | |
550 core.String kind; | 709 core.String kind; |
551 | 710 |
552 /** Parameters of an update process. */ | 711 /** Parameters of an update process. */ |
553 UpdatePolicy policy; | 712 UpdatePolicy policy; |
554 | 713 |
555 /** [Output only] The fully qualified URL for this resource. */ | 714 /** |
| 715 * [Output Only] An optional progress indicator that ranges from 0 to 100. |
| 716 * There is no requirement that this be linear or support any granularity of |
| 717 * operations. This should not be used to guess at when the update will be |
| 718 * complete. This number should be monotonically increasing as the update |
| 719 * progresses. |
| 720 */ |
| 721 core.int progress; |
| 722 |
| 723 /** [Output Only] The fully qualified URL for the resource. */ |
556 core.String selfLink; | 724 core.String selfLink; |
557 | 725 |
558 /** | 726 /** |
559 * [Output only] Current state of an update. Possible values are: | 727 * [Output Only] Current state of the update. Possible values are: |
560 * - "ROLLING_FORWARD": The update is going forward. | 728 * - "ROLLING_FORWARD": The update is going forward. |
561 * - "ROLLING_BACK": The update is being rolled back. | 729 * - "ROLLING_BACK": The update is being rolled back. |
562 * - "PAUSED": The update is temporarily paused (inactive). | 730 * - "PAUSED": The update is temporarily paused (inactive). |
563 * - "ROLLED_OUT": The update is finished, all instances have been updated | 731 * - "ROLLED_OUT": The update is finished, all instances have been updated |
564 * successfully. | 732 * successfully. |
565 * - "ROLLED_BACK": The update is finished, all instances have been reverted | 733 * - "ROLLED_BACK": The update is finished, all instances have been reverted |
566 * to the previous template. | 734 * to the previous template. |
567 * - "CANCELLED": The update is paused and no longer can be resumed, undefined | 735 * - "CANCELLED": The update is paused and no longer can be resumed, undefined |
568 * how many instances are running in which template. | 736 * how many instances are running in which template. |
569 */ | 737 */ |
570 core.String state; | 738 core.String state; |
571 | 739 |
572 /** | 740 /** |
573 * [Output only] Requested state of an update. This is the state that the | 741 * [Output Only] Status of the update. Possible values are: |
| 742 * - "ROLLING_FORWARD": The update is going forward. |
| 743 * - "ROLLING_BACK": The update is being rolled back. |
| 744 * - "PAUSED": The update is temporarily paused (inactive). |
| 745 * - "ROLLED_OUT": The update is finished, all instances have been updated |
| 746 * successfully. |
| 747 * - "ROLLED_BACK": The update is finished, all instances have been reverted |
| 748 * to the previous template. |
| 749 * - "CANCELLED": The update is paused and no longer can be resumed, undefined |
| 750 * how many instances are running in which template. |
| 751 */ |
| 752 core.String status; |
| 753 |
| 754 /** |
| 755 * [Output Only] An optional textual description of the current status of the |
| 756 * update. |
| 757 */ |
| 758 core.String statusMessage; |
| 759 |
| 760 /** |
| 761 * [Output Only] Requested state of the update. This is the state that the |
574 * updater is moving towards. Acceptable values are: | 762 * updater is moving towards. Acceptable values are: |
575 * - "ROLLED_OUT": The user has requested the update to go forward. | 763 * - "ROLLED_OUT": The user has requested the update to go forward. |
576 * - "ROLLED_BACK": The user has requested the update to be rolled back. | 764 * - "ROLLED_BACK": The user has requested the update to be rolled back. |
577 * - "PAUSED": The user has requested the update to be paused. | 765 * - "PAUSED": The user has requested the update to be paused. |
578 * | 766 * |
579 * - "CANCELLED": The user has requested the update to be cancelled. The | 767 * - "CANCELLED": The user has requested the update to be cancelled. The |
580 * updater service is in the process of canceling the update. | 768 * updater service is in the process of canceling the update. |
581 */ | 769 */ |
582 core.String targetState; | 770 core.String targetState; |
583 | 771 |
584 /** | 772 /** |
585 * [Output only] User who requested the update, for example: user@example.com. | 773 * [Output Only] User who requested the update, for example: user@example.com. |
586 */ | 774 */ |
587 core.String user; | 775 core.String user; |
588 | 776 |
589 | 777 |
590 Update(); | 778 Update(); |
591 | 779 |
592 Update.fromJson(core.Map _json) { | 780 Update.fromJson(core.Map _json) { |
593 if (_json.containsKey("creationTimestamp")) { | 781 if (_json.containsKey("creationTimestamp")) { |
594 creationTimestamp = _json["creationTimestamp"]; | 782 creationTimestamp = _json["creationTimestamp"]; |
595 } | 783 } |
596 if (_json.containsKey("details")) { | 784 if (_json.containsKey("details")) { |
597 details = _json["details"]; | 785 details = _json["details"]; |
598 } | 786 } |
599 if (_json.containsKey("handle")) { | 787 if (_json.containsKey("handle")) { |
600 handle = _json["handle"]; | 788 handle = _json["handle"]; |
601 } | 789 } |
| 790 if (_json.containsKey("id")) { |
| 791 id = _json["id"]; |
| 792 } |
| 793 if (_json.containsKey("instanceGroupManager")) { |
| 794 instanceGroupManager = _json["instanceGroupManager"]; |
| 795 } |
602 if (_json.containsKey("instanceTemplate")) { | 796 if (_json.containsKey("instanceTemplate")) { |
603 instanceTemplate = _json["instanceTemplate"]; | 797 instanceTemplate = _json["instanceTemplate"]; |
604 } | 798 } |
605 if (_json.containsKey("instanceUpdates")) { | |
606 instanceUpdates = _json["instanceUpdates"].map((value) => new InstanceUpda
te.fromJson(value)).toList(); | |
607 } | |
608 if (_json.containsKey("kind")) { | 799 if (_json.containsKey("kind")) { |
609 kind = _json["kind"]; | 800 kind = _json["kind"]; |
610 } | 801 } |
611 if (_json.containsKey("policy")) { | 802 if (_json.containsKey("policy")) { |
612 policy = new UpdatePolicy.fromJson(_json["policy"]); | 803 policy = new UpdatePolicy.fromJson(_json["policy"]); |
613 } | 804 } |
| 805 if (_json.containsKey("progress")) { |
| 806 progress = _json["progress"]; |
| 807 } |
614 if (_json.containsKey("selfLink")) { | 808 if (_json.containsKey("selfLink")) { |
615 selfLink = _json["selfLink"]; | 809 selfLink = _json["selfLink"]; |
616 } | 810 } |
617 if (_json.containsKey("state")) { | 811 if (_json.containsKey("state")) { |
618 state = _json["state"]; | 812 state = _json["state"]; |
619 } | 813 } |
| 814 if (_json.containsKey("status")) { |
| 815 status = _json["status"]; |
| 816 } |
| 817 if (_json.containsKey("statusMessage")) { |
| 818 statusMessage = _json["statusMessage"]; |
| 819 } |
620 if (_json.containsKey("targetState")) { | 820 if (_json.containsKey("targetState")) { |
621 targetState = _json["targetState"]; | 821 targetState = _json["targetState"]; |
622 } | 822 } |
623 if (_json.containsKey("user")) { | 823 if (_json.containsKey("user")) { |
624 user = _json["user"]; | 824 user = _json["user"]; |
625 } | 825 } |
626 } | 826 } |
627 | 827 |
628 core.Map toJson() { | 828 core.Map toJson() { |
629 var _json = new core.Map(); | 829 var _json = new core.Map(); |
630 if (creationTimestamp != null) { | 830 if (creationTimestamp != null) { |
631 _json["creationTimestamp"] = creationTimestamp; | 831 _json["creationTimestamp"] = creationTimestamp; |
632 } | 832 } |
633 if (details != null) { | 833 if (details != null) { |
634 _json["details"] = details; | 834 _json["details"] = details; |
635 } | 835 } |
636 if (handle != null) { | 836 if (handle != null) { |
637 _json["handle"] = handle; | 837 _json["handle"] = handle; |
638 } | 838 } |
| 839 if (id != null) { |
| 840 _json["id"] = id; |
| 841 } |
| 842 if (instanceGroupManager != null) { |
| 843 _json["instanceGroupManager"] = instanceGroupManager; |
| 844 } |
639 if (instanceTemplate != null) { | 845 if (instanceTemplate != null) { |
640 _json["instanceTemplate"] = instanceTemplate; | 846 _json["instanceTemplate"] = instanceTemplate; |
641 } | 847 } |
642 if (instanceUpdates != null) { | |
643 _json["instanceUpdates"] = instanceUpdates.map((value) => (value).toJson()
).toList(); | |
644 } | |
645 if (kind != null) { | 848 if (kind != null) { |
646 _json["kind"] = kind; | 849 _json["kind"] = kind; |
647 } | 850 } |
648 if (policy != null) { | 851 if (policy != null) { |
649 _json["policy"] = (policy).toJson(); | 852 _json["policy"] = (policy).toJson(); |
650 } | 853 } |
| 854 if (progress != null) { |
| 855 _json["progress"] = progress; |
| 856 } |
651 if (selfLink != null) { | 857 if (selfLink != null) { |
652 _json["selfLink"] = selfLink; | 858 _json["selfLink"] = selfLink; |
653 } | 859 } |
654 if (state != null) { | 860 if (state != null) { |
655 _json["state"] = state; | 861 _json["state"] = state; |
656 } | 862 } |
| 863 if (status != null) { |
| 864 _json["status"] = status; |
| 865 } |
| 866 if (statusMessage != null) { |
| 867 _json["statusMessage"] = statusMessage; |
| 868 } |
657 if (targetState != null) { | 869 if (targetState != null) { |
658 _json["targetState"] = targetState; | 870 _json["targetState"] = targetState; |
659 } | 871 } |
660 if (user != null) { | 872 if (user != null) { |
661 _json["user"] = user; | 873 _json["user"] = user; |
662 } | 874 } |
663 return _json; | 875 return _json; |
664 } | 876 } |
665 } | 877 } |
666 | 878 |
667 | 879 |
668 /** Response returned by List method. */ | 880 /** Response returned by List method. */ |
669 class UpdateList { | 881 class UpdateList { |
670 /** Collection of requested updates. */ | 882 /** A list of update resources. */ |
671 core.List<Update> items; | 883 core.List<Update> items; |
672 | 884 |
673 /** A token used to continue a truncated list request. */ | 885 /** [Output Only] Type of the resource. */ |
| 886 core.String kind; |
| 887 |
| 888 /** A token used to continue a truncated list request (output only). */ |
674 core.String nextPageToken; | 889 core.String nextPageToken; |
675 | 890 |
| 891 /** [Output Only] The fully qualified URL for the resource. */ |
| 892 core.String selfLink; |
| 893 |
676 | 894 |
677 UpdateList(); | 895 UpdateList(); |
678 | 896 |
679 UpdateList.fromJson(core.Map _json) { | 897 UpdateList.fromJson(core.Map _json) { |
680 if (_json.containsKey("items")) { | 898 if (_json.containsKey("items")) { |
681 items = _json["items"].map((value) => new Update.fromJson(value)).toList()
; | 899 items = _json["items"].map((value) => new Update.fromJson(value)).toList()
; |
682 } | 900 } |
| 901 if (_json.containsKey("kind")) { |
| 902 kind = _json["kind"]; |
| 903 } |
683 if (_json.containsKey("nextPageToken")) { | 904 if (_json.containsKey("nextPageToken")) { |
684 nextPageToken = _json["nextPageToken"]; | 905 nextPageToken = _json["nextPageToken"]; |
685 } | 906 } |
| 907 if (_json.containsKey("selfLink")) { |
| 908 selfLink = _json["selfLink"]; |
| 909 } |
686 } | 910 } |
687 | 911 |
688 core.Map toJson() { | 912 core.Map toJson() { |
689 var _json = new core.Map(); | 913 var _json = new core.Map(); |
690 if (items != null) { | 914 if (items != null) { |
691 _json["items"] = items.map((value) => (value).toJson()).toList(); | 915 _json["items"] = items.map((value) => (value).toJson()).toList(); |
692 } | 916 } |
| 917 if (kind != null) { |
| 918 _json["kind"] = kind; |
| 919 } |
693 if (nextPageToken != null) { | 920 if (nextPageToken != null) { |
694 _json["nextPageToken"] = nextPageToken; | 921 _json["nextPageToken"] = nextPageToken; |
695 } | 922 } |
| 923 if (selfLink != null) { |
| 924 _json["selfLink"] = selfLink; |
| 925 } |
696 return _json; | 926 return _json; |
697 } | 927 } |
698 } | 928 } |
699 | 929 |
700 | 930 |
701 /** Parameters of an update process. */ | 931 /** Parameters of an update process. */ |
702 class UpdatePolicy { | 932 class UpdatePolicy { |
703 /** Parameters of a canary phase. If absent, canary will NOT be performed. */ | 933 /** Parameters of a canary phase. If absent, canary will NOT be performed. */ |
704 UpdatePolicyCanary canary; | 934 UpdatePolicyCanary canary; |
705 | 935 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 core.Map toJson() { | 998 core.Map toJson() { |
769 var _json = new core.Map(); | 999 var _json = new core.Map(); |
770 if (numInstances != null) { | 1000 if (numInstances != null) { |
771 _json["numInstances"] = numInstances; | 1001 _json["numInstances"] = numInstances; |
772 } | 1002 } |
773 return _json; | 1003 return _json; |
774 } | 1004 } |
775 } | 1005 } |
776 | 1006 |
777 | 1007 |
OLD | NEW |