OLD | NEW |
(Empty) | |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 3 library googleapis_beta.appengine.v1beta; |
| 4 |
| 5 import 'dart:core' as core; |
| 6 import 'dart:async' as async; |
| 7 import 'dart:convert' as convert; |
| 8 |
| 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
| 10 import 'package:http/http.dart' as http; |
| 11 |
| 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
| 13 ApiRequestError, DetailedApiRequestError; |
| 14 |
| 15 const core.String USER_AGENT = 'dart-api-client appengine/v1beta'; |
| 16 |
| 17 /** Provisions and manages App Engine applications. */ |
| 18 class AppengineApi { |
| 19 /** View and manage your applications deployed on Google App Engine */ |
| 20 static const AppengineAdminScope = "https://www.googleapis.com/auth/appengine.
admin"; |
| 21 |
| 22 /** View and manage your data across Google Cloud Platform services */ |
| 23 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
| 24 |
| 25 /** View your data across Google Cloud Platform services */ |
| 26 static const CloudPlatformReadOnlyScope = "https://www.googleapis.com/auth/clo
ud-platform.read-only"; |
| 27 |
| 28 |
| 29 final commons.ApiRequester _requester; |
| 30 |
| 31 AppsResourceApi get apps => new AppsResourceApi(_requester); |
| 32 |
| 33 AppengineApi(http.Client client, {core.String rootUrl: "https://appengine.goog
leapis.com/", core.String servicePath: ""}) : |
| 34 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 35 } |
| 36 |
| 37 |
| 38 class AppsResourceApi { |
| 39 final commons.ApiRequester _requester; |
| 40 |
| 41 AppsLocationsResourceApi get locations => new AppsLocationsResourceApi(_reques
ter); |
| 42 AppsOperationsResourceApi get operations => new AppsOperationsResourceApi(_req
uester); |
| 43 AppsServicesResourceApi get services => new AppsServicesResourceApi(_requester
); |
| 44 |
| 45 AppsResourceApi(commons.ApiRequester client) : |
| 46 _requester = client; |
| 47 |
| 48 /** |
| 49 * Creates an App Engine application for a Google Cloud Platform project. |
| 50 * Required fields: |
| 51 * id - The ID of the target Cloud Platform project. |
| 52 * location - The region (https://cloud.google.com/appengine/docs/locations) |
| 53 * where you want the App Engine application located.For more information |
| 54 * about App Engine applications, see Managing Projects, Applications, and |
| 55 * Billing (https://cloud.google.com/appengine/docs/python/console/). |
| 56 * |
| 57 * [request] - The metadata request object. |
| 58 * |
| 59 * Request parameters: |
| 60 * |
| 61 * Completes with a [Operation]. |
| 62 * |
| 63 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 64 * error. |
| 65 * |
| 66 * If the used [http.Client] completes with an error when making a REST call, |
| 67 * this method will complete with the same error. |
| 68 */ |
| 69 async.Future<Operation> create(Application request) { |
| 70 var _url = null; |
| 71 var _queryParams = new core.Map(); |
| 72 var _uploadMedia = null; |
| 73 var _uploadOptions = null; |
| 74 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 75 var _body = null; |
| 76 |
| 77 if (request != null) { |
| 78 _body = convert.JSON.encode((request).toJson()); |
| 79 } |
| 80 |
| 81 _url = 'v1beta/apps'; |
| 82 |
| 83 var _response = _requester.request(_url, |
| 84 "POST", |
| 85 body: _body, |
| 86 queryParams: _queryParams, |
| 87 uploadOptions: _uploadOptions, |
| 88 uploadMedia: _uploadMedia, |
| 89 downloadOptions: _downloadOptions); |
| 90 return _response.then((data) => new Operation.fromJson(data)); |
| 91 } |
| 92 |
| 93 /** |
| 94 * Gets information about an application. |
| 95 * |
| 96 * Request parameters: |
| 97 * |
| 98 * [appsId] - Part of `name`. Name of the Application resource to get. |
| 99 * Example: apps/myapp. |
| 100 * |
| 101 * Completes with a [Application]. |
| 102 * |
| 103 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 104 * error. |
| 105 * |
| 106 * If the used [http.Client] completes with an error when making a REST call, |
| 107 * this method will complete with the same error. |
| 108 */ |
| 109 async.Future<Application> get(core.String appsId) { |
| 110 var _url = null; |
| 111 var _queryParams = new core.Map(); |
| 112 var _uploadMedia = null; |
| 113 var _uploadOptions = null; |
| 114 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 115 var _body = null; |
| 116 |
| 117 if (appsId == null) { |
| 118 throw new core.ArgumentError("Parameter appsId is required."); |
| 119 } |
| 120 |
| 121 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId'); |
| 122 |
| 123 var _response = _requester.request(_url, |
| 124 "GET", |
| 125 body: _body, |
| 126 queryParams: _queryParams, |
| 127 uploadOptions: _uploadOptions, |
| 128 uploadMedia: _uploadMedia, |
| 129 downloadOptions: _downloadOptions); |
| 130 return _response.then((data) => new Application.fromJson(data)); |
| 131 } |
| 132 |
| 133 /** |
| 134 * Updates the specified Application resource. You can update the following |
| 135 * fields: |
| 136 * auth_domain - Google authentication domain for controlling user access to |
| 137 * the application. |
| 138 * default_cookie_expiration - Cookie expiration policy for the application. |
| 139 * |
| 140 * [request] - The metadata request object. |
| 141 * |
| 142 * Request parameters: |
| 143 * |
| 144 * [appsId] - Part of `name`. Name of the Application resource to update. |
| 145 * Example: apps/myapp. |
| 146 * |
| 147 * [updateMask] - Standard field mask for the set of fields to be updated. |
| 148 * |
| 149 * Completes with a [Operation]. |
| 150 * |
| 151 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 152 * error. |
| 153 * |
| 154 * If the used [http.Client] completes with an error when making a REST call, |
| 155 * this method will complete with the same error. |
| 156 */ |
| 157 async.Future<Operation> patch(Application request, core.String appsId, {core.S
tring updateMask}) { |
| 158 var _url = null; |
| 159 var _queryParams = new core.Map(); |
| 160 var _uploadMedia = null; |
| 161 var _uploadOptions = null; |
| 162 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 163 var _body = null; |
| 164 |
| 165 if (request != null) { |
| 166 _body = convert.JSON.encode((request).toJson()); |
| 167 } |
| 168 if (appsId == null) { |
| 169 throw new core.ArgumentError("Parameter appsId is required."); |
| 170 } |
| 171 if (updateMask != null) { |
| 172 _queryParams["updateMask"] = [updateMask]; |
| 173 } |
| 174 |
| 175 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId'); |
| 176 |
| 177 var _response = _requester.request(_url, |
| 178 "PATCH", |
| 179 body: _body, |
| 180 queryParams: _queryParams, |
| 181 uploadOptions: _uploadOptions, |
| 182 uploadMedia: _uploadMedia, |
| 183 downloadOptions: _downloadOptions); |
| 184 return _response.then((data) => new Operation.fromJson(data)); |
| 185 } |
| 186 |
| 187 /** |
| 188 * Recreates the required App Engine features for the specified App Engine |
| 189 * application, for example a Cloud Storage bucket or App Engine service |
| 190 * account. Use this method if you receive an error message about a missing |
| 191 * feature, for example, Error retrieving the App Engine service account. |
| 192 * |
| 193 * [request] - The metadata request object. |
| 194 * |
| 195 * Request parameters: |
| 196 * |
| 197 * [appsId] - Part of `name`. Name of the application to repair. Example: |
| 198 * apps/myapp |
| 199 * |
| 200 * Completes with a [Operation]. |
| 201 * |
| 202 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 203 * error. |
| 204 * |
| 205 * If the used [http.Client] completes with an error when making a REST call, |
| 206 * this method will complete with the same error. |
| 207 */ |
| 208 async.Future<Operation> repair(RepairApplicationRequest request, core.String a
ppsId) { |
| 209 var _url = null; |
| 210 var _queryParams = new core.Map(); |
| 211 var _uploadMedia = null; |
| 212 var _uploadOptions = null; |
| 213 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 214 var _body = null; |
| 215 |
| 216 if (request != null) { |
| 217 _body = convert.JSON.encode((request).toJson()); |
| 218 } |
| 219 if (appsId == null) { |
| 220 throw new core.ArgumentError("Parameter appsId is required."); |
| 221 } |
| 222 |
| 223 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + ':repair'
; |
| 224 |
| 225 var _response = _requester.request(_url, |
| 226 "POST", |
| 227 body: _body, |
| 228 queryParams: _queryParams, |
| 229 uploadOptions: _uploadOptions, |
| 230 uploadMedia: _uploadMedia, |
| 231 downloadOptions: _downloadOptions); |
| 232 return _response.then((data) => new Operation.fromJson(data)); |
| 233 } |
| 234 |
| 235 } |
| 236 |
| 237 |
| 238 class AppsLocationsResourceApi { |
| 239 final commons.ApiRequester _requester; |
| 240 |
| 241 AppsLocationsResourceApi(commons.ApiRequester client) : |
| 242 _requester = client; |
| 243 |
| 244 /** |
| 245 * Get information about a location. |
| 246 * |
| 247 * Request parameters: |
| 248 * |
| 249 * [appsId] - Part of `name`. Resource name for the location. |
| 250 * |
| 251 * [locationsId] - Part of `name`. See documentation of `appsId`. |
| 252 * |
| 253 * Completes with a [Location]. |
| 254 * |
| 255 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 256 * error. |
| 257 * |
| 258 * If the used [http.Client] completes with an error when making a REST call, |
| 259 * this method will complete with the same error. |
| 260 */ |
| 261 async.Future<Location> get(core.String appsId, core.String locationsId) { |
| 262 var _url = null; |
| 263 var _queryParams = new core.Map(); |
| 264 var _uploadMedia = null; |
| 265 var _uploadOptions = null; |
| 266 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 267 var _body = null; |
| 268 |
| 269 if (appsId == null) { |
| 270 throw new core.ArgumentError("Parameter appsId is required."); |
| 271 } |
| 272 if (locationsId == null) { |
| 273 throw new core.ArgumentError("Parameter locationsId is required."); |
| 274 } |
| 275 |
| 276 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/locatio
ns/' + commons.Escaper.ecapeVariable('$locationsId'); |
| 277 |
| 278 var _response = _requester.request(_url, |
| 279 "GET", |
| 280 body: _body, |
| 281 queryParams: _queryParams, |
| 282 uploadOptions: _uploadOptions, |
| 283 uploadMedia: _uploadMedia, |
| 284 downloadOptions: _downloadOptions); |
| 285 return _response.then((data) => new Location.fromJson(data)); |
| 286 } |
| 287 |
| 288 /** |
| 289 * Lists information about the supported locations for this service. |
| 290 * |
| 291 * Request parameters: |
| 292 * |
| 293 * [appsId] - Part of `name`. The resource that owns the locations collection, |
| 294 * if applicable. |
| 295 * |
| 296 * [pageToken] - The standard list page token. |
| 297 * |
| 298 * [pageSize] - The standard list page size. |
| 299 * |
| 300 * [filter] - The standard list filter. |
| 301 * |
| 302 * Completes with a [ListLocationsResponse]. |
| 303 * |
| 304 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 305 * error. |
| 306 * |
| 307 * If the used [http.Client] completes with an error when making a REST call, |
| 308 * this method will complete with the same error. |
| 309 */ |
| 310 async.Future<ListLocationsResponse> list(core.String appsId, {core.String page
Token, core.int pageSize, core.String filter}) { |
| 311 var _url = null; |
| 312 var _queryParams = new core.Map(); |
| 313 var _uploadMedia = null; |
| 314 var _uploadOptions = null; |
| 315 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 316 var _body = null; |
| 317 |
| 318 if (appsId == null) { |
| 319 throw new core.ArgumentError("Parameter appsId is required."); |
| 320 } |
| 321 if (pageToken != null) { |
| 322 _queryParams["pageToken"] = [pageToken]; |
| 323 } |
| 324 if (pageSize != null) { |
| 325 _queryParams["pageSize"] = ["${pageSize}"]; |
| 326 } |
| 327 if (filter != null) { |
| 328 _queryParams["filter"] = [filter]; |
| 329 } |
| 330 |
| 331 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/locatio
ns'; |
| 332 |
| 333 var _response = _requester.request(_url, |
| 334 "GET", |
| 335 body: _body, |
| 336 queryParams: _queryParams, |
| 337 uploadOptions: _uploadOptions, |
| 338 uploadMedia: _uploadMedia, |
| 339 downloadOptions: _downloadOptions); |
| 340 return _response.then((data) => new ListLocationsResponse.fromJson(data)); |
| 341 } |
| 342 |
| 343 } |
| 344 |
| 345 |
| 346 class AppsOperationsResourceApi { |
| 347 final commons.ApiRequester _requester; |
| 348 |
| 349 AppsOperationsResourceApi(commons.ApiRequester client) : |
| 350 _requester = client; |
| 351 |
| 352 /** |
| 353 * Gets the latest state of a long-running operation. Clients can use this |
| 354 * method to poll the operation result at intervals as recommended by the API |
| 355 * service. |
| 356 * |
| 357 * Request parameters: |
| 358 * |
| 359 * [appsId] - Part of `name`. The name of the operation resource. |
| 360 * |
| 361 * [operationsId] - Part of `name`. See documentation of `appsId`. |
| 362 * |
| 363 * Completes with a [Operation]. |
| 364 * |
| 365 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 366 * error. |
| 367 * |
| 368 * If the used [http.Client] completes with an error when making a REST call, |
| 369 * this method will complete with the same error. |
| 370 */ |
| 371 async.Future<Operation> get(core.String appsId, core.String operationsId) { |
| 372 var _url = null; |
| 373 var _queryParams = new core.Map(); |
| 374 var _uploadMedia = null; |
| 375 var _uploadOptions = null; |
| 376 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 377 var _body = null; |
| 378 |
| 379 if (appsId == null) { |
| 380 throw new core.ArgumentError("Parameter appsId is required."); |
| 381 } |
| 382 if (operationsId == null) { |
| 383 throw new core.ArgumentError("Parameter operationsId is required."); |
| 384 } |
| 385 |
| 386 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/operati
ons/' + commons.Escaper.ecapeVariable('$operationsId'); |
| 387 |
| 388 var _response = _requester.request(_url, |
| 389 "GET", |
| 390 body: _body, |
| 391 queryParams: _queryParams, |
| 392 uploadOptions: _uploadOptions, |
| 393 uploadMedia: _uploadMedia, |
| 394 downloadOptions: _downloadOptions); |
| 395 return _response.then((data) => new Operation.fromJson(data)); |
| 396 } |
| 397 |
| 398 /** |
| 399 * Lists operations that match the specified filter in the request. If the |
| 400 * server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name |
| 401 * binding below allows API services to override the binding to use different |
| 402 * resource name schemes, such as users / * /operations. |
| 403 * |
| 404 * Request parameters: |
| 405 * |
| 406 * [appsId] - Part of `name`. The name of the operation collection. |
| 407 * |
| 408 * [filter] - The standard list filter. |
| 409 * |
| 410 * [pageToken] - The standard list page token. |
| 411 * |
| 412 * [pageSize] - The standard list page size. |
| 413 * |
| 414 * Completes with a [ListOperationsResponse]. |
| 415 * |
| 416 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 417 * error. |
| 418 * |
| 419 * If the used [http.Client] completes with an error when making a REST call, |
| 420 * this method will complete with the same error. |
| 421 */ |
| 422 async.Future<ListOperationsResponse> list(core.String appsId, {core.String fil
ter, core.String pageToken, core.int pageSize}) { |
| 423 var _url = null; |
| 424 var _queryParams = new core.Map(); |
| 425 var _uploadMedia = null; |
| 426 var _uploadOptions = null; |
| 427 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 428 var _body = null; |
| 429 |
| 430 if (appsId == null) { |
| 431 throw new core.ArgumentError("Parameter appsId is required."); |
| 432 } |
| 433 if (filter != null) { |
| 434 _queryParams["filter"] = [filter]; |
| 435 } |
| 436 if (pageToken != null) { |
| 437 _queryParams["pageToken"] = [pageToken]; |
| 438 } |
| 439 if (pageSize != null) { |
| 440 _queryParams["pageSize"] = ["${pageSize}"]; |
| 441 } |
| 442 |
| 443 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/operati
ons'; |
| 444 |
| 445 var _response = _requester.request(_url, |
| 446 "GET", |
| 447 body: _body, |
| 448 queryParams: _queryParams, |
| 449 uploadOptions: _uploadOptions, |
| 450 uploadMedia: _uploadMedia, |
| 451 downloadOptions: _downloadOptions); |
| 452 return _response.then((data) => new ListOperationsResponse.fromJson(data)); |
| 453 } |
| 454 |
| 455 } |
| 456 |
| 457 |
| 458 class AppsServicesResourceApi { |
| 459 final commons.ApiRequester _requester; |
| 460 |
| 461 AppsServicesVersionsResourceApi get versions => new AppsServicesVersionsResour
ceApi(_requester); |
| 462 |
| 463 AppsServicesResourceApi(commons.ApiRequester client) : |
| 464 _requester = client; |
| 465 |
| 466 /** |
| 467 * Deletes the specified service and all enclosed versions. |
| 468 * |
| 469 * Request parameters: |
| 470 * |
| 471 * [appsId] - Part of `name`. Name of the resource requested. Example: |
| 472 * apps/myapp/services/default. |
| 473 * |
| 474 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 475 * |
| 476 * Completes with a [Operation]. |
| 477 * |
| 478 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 479 * error. |
| 480 * |
| 481 * If the used [http.Client] completes with an error when making a REST call, |
| 482 * this method will complete with the same error. |
| 483 */ |
| 484 async.Future<Operation> delete(core.String appsId, core.String servicesId) { |
| 485 var _url = null; |
| 486 var _queryParams = new core.Map(); |
| 487 var _uploadMedia = null; |
| 488 var _uploadOptions = null; |
| 489 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 490 var _body = null; |
| 491 |
| 492 if (appsId == null) { |
| 493 throw new core.ArgumentError("Parameter appsId is required."); |
| 494 } |
| 495 if (servicesId == null) { |
| 496 throw new core.ArgumentError("Parameter servicesId is required."); |
| 497 } |
| 498 |
| 499 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId'); |
| 500 |
| 501 var _response = _requester.request(_url, |
| 502 "DELETE", |
| 503 body: _body, |
| 504 queryParams: _queryParams, |
| 505 uploadOptions: _uploadOptions, |
| 506 uploadMedia: _uploadMedia, |
| 507 downloadOptions: _downloadOptions); |
| 508 return _response.then((data) => new Operation.fromJson(data)); |
| 509 } |
| 510 |
| 511 /** |
| 512 * Gets the current configuration of the specified service. |
| 513 * |
| 514 * Request parameters: |
| 515 * |
| 516 * [appsId] - Part of `name`. Name of the resource requested. Example: |
| 517 * apps/myapp/services/default. |
| 518 * |
| 519 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 520 * |
| 521 * Completes with a [Service]. |
| 522 * |
| 523 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 524 * error. |
| 525 * |
| 526 * If the used [http.Client] completes with an error when making a REST call, |
| 527 * this method will complete with the same error. |
| 528 */ |
| 529 async.Future<Service> get(core.String appsId, core.String servicesId) { |
| 530 var _url = null; |
| 531 var _queryParams = new core.Map(); |
| 532 var _uploadMedia = null; |
| 533 var _uploadOptions = null; |
| 534 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 535 var _body = null; |
| 536 |
| 537 if (appsId == null) { |
| 538 throw new core.ArgumentError("Parameter appsId is required."); |
| 539 } |
| 540 if (servicesId == null) { |
| 541 throw new core.ArgumentError("Parameter servicesId is required."); |
| 542 } |
| 543 |
| 544 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId'); |
| 545 |
| 546 var _response = _requester.request(_url, |
| 547 "GET", |
| 548 body: _body, |
| 549 queryParams: _queryParams, |
| 550 uploadOptions: _uploadOptions, |
| 551 uploadMedia: _uploadMedia, |
| 552 downloadOptions: _downloadOptions); |
| 553 return _response.then((data) => new Service.fromJson(data)); |
| 554 } |
| 555 |
| 556 /** |
| 557 * Lists all the services in the application. |
| 558 * |
| 559 * Request parameters: |
| 560 * |
| 561 * [appsId] - Part of `parent`. Name of the parent Application resource. |
| 562 * Example: apps/myapp. |
| 563 * |
| 564 * [pageToken] - Continuation token for fetching the next page of results. |
| 565 * |
| 566 * [pageSize] - Maximum results to return per page. |
| 567 * |
| 568 * Completes with a [ListServicesResponse]. |
| 569 * |
| 570 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 571 * error. |
| 572 * |
| 573 * If the used [http.Client] completes with an error when making a REST call, |
| 574 * this method will complete with the same error. |
| 575 */ |
| 576 async.Future<ListServicesResponse> list(core.String appsId, {core.String pageT
oken, core.int pageSize}) { |
| 577 var _url = null; |
| 578 var _queryParams = new core.Map(); |
| 579 var _uploadMedia = null; |
| 580 var _uploadOptions = null; |
| 581 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 582 var _body = null; |
| 583 |
| 584 if (appsId == null) { |
| 585 throw new core.ArgumentError("Parameter appsId is required."); |
| 586 } |
| 587 if (pageToken != null) { |
| 588 _queryParams["pageToken"] = [pageToken]; |
| 589 } |
| 590 if (pageSize != null) { |
| 591 _queryParams["pageSize"] = ["${pageSize}"]; |
| 592 } |
| 593 |
| 594 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s'; |
| 595 |
| 596 var _response = _requester.request(_url, |
| 597 "GET", |
| 598 body: _body, |
| 599 queryParams: _queryParams, |
| 600 uploadOptions: _uploadOptions, |
| 601 uploadMedia: _uploadMedia, |
| 602 downloadOptions: _downloadOptions); |
| 603 return _response.then((data) => new ListServicesResponse.fromJson(data)); |
| 604 } |
| 605 |
| 606 /** |
| 607 * Updates the configuration of the specified service. |
| 608 * |
| 609 * [request] - The metadata request object. |
| 610 * |
| 611 * Request parameters: |
| 612 * |
| 613 * [appsId] - Part of `name`. Name of the resource to update. Example: |
| 614 * apps/myapp/services/default. |
| 615 * |
| 616 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 617 * |
| 618 * [updateMask] - Standard field mask for the set of fields to be updated. |
| 619 * |
| 620 * [migrateTraffic] - Set to true to gradually shift traffic to one or more |
| 621 * versions that you specify. By default, traffic is shifted immediately. For |
| 622 * gradual traffic migration, the target versions must be located within |
| 623 * instances that are configured for both warmup requests |
| 624 * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/ap
ps.services.versions#inboundservicetype) |
| 625 * and automatic scaling |
| 626 * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/ap
ps.services.versions#automaticscaling). |
| 627 * You must specify the shardBy |
| 628 * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/ap
ps.services#shardby) |
| 629 * field in the Service resource. Gradual traffic migration is not supported |
| 630 * in the App Engine flexible environment. For examples, see Migrating and |
| 631 * Splitting Traffic |
| 632 * (https://cloud.google.com/appengine/docs/admin-api/migrating-splitting-traf
fic). |
| 633 * |
| 634 * Completes with a [Operation]. |
| 635 * |
| 636 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 637 * error. |
| 638 * |
| 639 * If the used [http.Client] completes with an error when making a REST call, |
| 640 * this method will complete with the same error. |
| 641 */ |
| 642 async.Future<Operation> patch(Service request, core.String appsId, core.String
servicesId, {core.String updateMask, core.bool migrateTraffic}) { |
| 643 var _url = null; |
| 644 var _queryParams = new core.Map(); |
| 645 var _uploadMedia = null; |
| 646 var _uploadOptions = null; |
| 647 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 648 var _body = null; |
| 649 |
| 650 if (request != null) { |
| 651 _body = convert.JSON.encode((request).toJson()); |
| 652 } |
| 653 if (appsId == null) { |
| 654 throw new core.ArgumentError("Parameter appsId is required."); |
| 655 } |
| 656 if (servicesId == null) { |
| 657 throw new core.ArgumentError("Parameter servicesId is required."); |
| 658 } |
| 659 if (updateMask != null) { |
| 660 _queryParams["updateMask"] = [updateMask]; |
| 661 } |
| 662 if (migrateTraffic != null) { |
| 663 _queryParams["migrateTraffic"] = ["${migrateTraffic}"]; |
| 664 } |
| 665 |
| 666 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId'); |
| 667 |
| 668 var _response = _requester.request(_url, |
| 669 "PATCH", |
| 670 body: _body, |
| 671 queryParams: _queryParams, |
| 672 uploadOptions: _uploadOptions, |
| 673 uploadMedia: _uploadMedia, |
| 674 downloadOptions: _downloadOptions); |
| 675 return _response.then((data) => new Operation.fromJson(data)); |
| 676 } |
| 677 |
| 678 } |
| 679 |
| 680 |
| 681 class AppsServicesVersionsResourceApi { |
| 682 final commons.ApiRequester _requester; |
| 683 |
| 684 AppsServicesVersionsInstancesResourceApi get instances => new AppsServicesVers
ionsInstancesResourceApi(_requester); |
| 685 |
| 686 AppsServicesVersionsResourceApi(commons.ApiRequester client) : |
| 687 _requester = client; |
| 688 |
| 689 /** |
| 690 * Deploys code and resource files to a new version. |
| 691 * |
| 692 * [request] - The metadata request object. |
| 693 * |
| 694 * Request parameters: |
| 695 * |
| 696 * [appsId] - Part of `parent`. Name of the parent resource to create this |
| 697 * version under. Example: apps/myapp/services/default. |
| 698 * |
| 699 * [servicesId] - Part of `parent`. See documentation of `appsId`. |
| 700 * |
| 701 * Completes with a [Operation]. |
| 702 * |
| 703 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 704 * error. |
| 705 * |
| 706 * If the used [http.Client] completes with an error when making a REST call, |
| 707 * this method will complete with the same error. |
| 708 */ |
| 709 async.Future<Operation> create(Version request, core.String appsId, core.Strin
g servicesId) { |
| 710 var _url = null; |
| 711 var _queryParams = new core.Map(); |
| 712 var _uploadMedia = null; |
| 713 var _uploadOptions = null; |
| 714 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 715 var _body = null; |
| 716 |
| 717 if (request != null) { |
| 718 _body = convert.JSON.encode((request).toJson()); |
| 719 } |
| 720 if (appsId == null) { |
| 721 throw new core.ArgumentError("Parameter appsId is required."); |
| 722 } |
| 723 if (servicesId == null) { |
| 724 throw new core.ArgumentError("Parameter servicesId is required."); |
| 725 } |
| 726 |
| 727 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions'; |
| 728 |
| 729 var _response = _requester.request(_url, |
| 730 "POST", |
| 731 body: _body, |
| 732 queryParams: _queryParams, |
| 733 uploadOptions: _uploadOptions, |
| 734 uploadMedia: _uploadMedia, |
| 735 downloadOptions: _downloadOptions); |
| 736 return _response.then((data) => new Operation.fromJson(data)); |
| 737 } |
| 738 |
| 739 /** |
| 740 * Deletes an existing Version resource. |
| 741 * |
| 742 * Request parameters: |
| 743 * |
| 744 * [appsId] - Part of `name`. Name of the resource requested. Example: |
| 745 * apps/myapp/services/default/versions/v1. |
| 746 * |
| 747 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 748 * |
| 749 * [versionsId] - Part of `name`. See documentation of `appsId`. |
| 750 * |
| 751 * Completes with a [Operation]. |
| 752 * |
| 753 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 754 * error. |
| 755 * |
| 756 * If the used [http.Client] completes with an error when making a REST call, |
| 757 * this method will complete with the same error. |
| 758 */ |
| 759 async.Future<Operation> delete(core.String appsId, core.String servicesId, cor
e.String versionsId) { |
| 760 var _url = null; |
| 761 var _queryParams = new core.Map(); |
| 762 var _uploadMedia = null; |
| 763 var _uploadOptions = null; |
| 764 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 765 var _body = null; |
| 766 |
| 767 if (appsId == null) { |
| 768 throw new core.ArgumentError("Parameter appsId is required."); |
| 769 } |
| 770 if (servicesId == null) { |
| 771 throw new core.ArgumentError("Parameter servicesId is required."); |
| 772 } |
| 773 if (versionsId == null) { |
| 774 throw new core.ArgumentError("Parameter versionsId is required."); |
| 775 } |
| 776 |
| 777 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions/' + commons.Esca
per.ecapeVariable('$versionsId'); |
| 778 |
| 779 var _response = _requester.request(_url, |
| 780 "DELETE", |
| 781 body: _body, |
| 782 queryParams: _queryParams, |
| 783 uploadOptions: _uploadOptions, |
| 784 uploadMedia: _uploadMedia, |
| 785 downloadOptions: _downloadOptions); |
| 786 return _response.then((data) => new Operation.fromJson(data)); |
| 787 } |
| 788 |
| 789 /** |
| 790 * Gets the specified Version resource. By default, only a BASIC_VIEW will be |
| 791 * returned. Specify the FULL_VIEW parameter to get the full resource. |
| 792 * |
| 793 * Request parameters: |
| 794 * |
| 795 * [appsId] - Part of `name`. Name of the resource requested. Example: |
| 796 * apps/myapp/services/default/versions/v1. |
| 797 * |
| 798 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 799 * |
| 800 * [versionsId] - Part of `name`. See documentation of `appsId`. |
| 801 * |
| 802 * [view] - Controls the set of fields returned in the Get response. |
| 803 * Possible string values are: |
| 804 * - "BASIC" : A BASIC. |
| 805 * - "FULL" : A FULL. |
| 806 * |
| 807 * Completes with a [Version]. |
| 808 * |
| 809 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 810 * error. |
| 811 * |
| 812 * If the used [http.Client] completes with an error when making a REST call, |
| 813 * this method will complete with the same error. |
| 814 */ |
| 815 async.Future<Version> get(core.String appsId, core.String servicesId, core.Str
ing versionsId, {core.String view}) { |
| 816 var _url = null; |
| 817 var _queryParams = new core.Map(); |
| 818 var _uploadMedia = null; |
| 819 var _uploadOptions = null; |
| 820 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 821 var _body = null; |
| 822 |
| 823 if (appsId == null) { |
| 824 throw new core.ArgumentError("Parameter appsId is required."); |
| 825 } |
| 826 if (servicesId == null) { |
| 827 throw new core.ArgumentError("Parameter servicesId is required."); |
| 828 } |
| 829 if (versionsId == null) { |
| 830 throw new core.ArgumentError("Parameter versionsId is required."); |
| 831 } |
| 832 if (view != null) { |
| 833 _queryParams["view"] = [view]; |
| 834 } |
| 835 |
| 836 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions/' + commons.Esca
per.ecapeVariable('$versionsId'); |
| 837 |
| 838 var _response = _requester.request(_url, |
| 839 "GET", |
| 840 body: _body, |
| 841 queryParams: _queryParams, |
| 842 uploadOptions: _uploadOptions, |
| 843 uploadMedia: _uploadMedia, |
| 844 downloadOptions: _downloadOptions); |
| 845 return _response.then((data) => new Version.fromJson(data)); |
| 846 } |
| 847 |
| 848 /** |
| 849 * Lists the versions of a service. |
| 850 * |
| 851 * Request parameters: |
| 852 * |
| 853 * [appsId] - Part of `parent`. Name of the parent Service resource. Example: |
| 854 * apps/myapp/services/default. |
| 855 * |
| 856 * [servicesId] - Part of `parent`. See documentation of `appsId`. |
| 857 * |
| 858 * [pageToken] - Continuation token for fetching the next page of results. |
| 859 * |
| 860 * [pageSize] - Maximum results to return per page. |
| 861 * |
| 862 * [view] - Controls the set of fields returned in the List response. |
| 863 * Possible string values are: |
| 864 * - "BASIC" : A BASIC. |
| 865 * - "FULL" : A FULL. |
| 866 * |
| 867 * Completes with a [ListVersionsResponse]. |
| 868 * |
| 869 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 870 * error. |
| 871 * |
| 872 * If the used [http.Client] completes with an error when making a REST call, |
| 873 * this method will complete with the same error. |
| 874 */ |
| 875 async.Future<ListVersionsResponse> list(core.String appsId, core.String servic
esId, {core.String pageToken, core.int pageSize, core.String view}) { |
| 876 var _url = null; |
| 877 var _queryParams = new core.Map(); |
| 878 var _uploadMedia = null; |
| 879 var _uploadOptions = null; |
| 880 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 881 var _body = null; |
| 882 |
| 883 if (appsId == null) { |
| 884 throw new core.ArgumentError("Parameter appsId is required."); |
| 885 } |
| 886 if (servicesId == null) { |
| 887 throw new core.ArgumentError("Parameter servicesId is required."); |
| 888 } |
| 889 if (pageToken != null) { |
| 890 _queryParams["pageToken"] = [pageToken]; |
| 891 } |
| 892 if (pageSize != null) { |
| 893 _queryParams["pageSize"] = ["${pageSize}"]; |
| 894 } |
| 895 if (view != null) { |
| 896 _queryParams["view"] = [view]; |
| 897 } |
| 898 |
| 899 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions'; |
| 900 |
| 901 var _response = _requester.request(_url, |
| 902 "GET", |
| 903 body: _body, |
| 904 queryParams: _queryParams, |
| 905 uploadOptions: _uploadOptions, |
| 906 uploadMedia: _uploadMedia, |
| 907 downloadOptions: _downloadOptions); |
| 908 return _response.then((data) => new ListVersionsResponse.fromJson(data)); |
| 909 } |
| 910 |
| 911 /** |
| 912 * Updates the specified Version resource. You can specify the following |
| 913 * fields depending on the App Engine environment and type of scaling that the |
| 914 * version resource uses: |
| 915 * serving_status |
| 916 * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/ap
ps.services.versions#Version.FIELDS.serving_status): |
| 917 * For Version resources that use basic scaling, manual scaling, or run in |
| 918 * the App Engine flexible environment. |
| 919 * instance_class |
| 920 * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/ap
ps.services.versions#Version.FIELDS.instance_class): |
| 921 * For Version resources that run in the App Engine standard environment. |
| 922 * automatic_scaling.min_idle_instances |
| 923 * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/ap
ps.services.versions#Version.FIELDS.automatic_scaling): |
| 924 * For Version resources that use automatic scaling and run in the App Engine |
| 925 * standard environment. |
| 926 * automatic_scaling.max_idle_instances |
| 927 * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/ap
ps.services.versions#Version.FIELDS.automatic_scaling): |
| 928 * For Version resources that use automatic scaling and run in the App Engine |
| 929 * standard environment. |
| 930 * |
| 931 * [request] - The metadata request object. |
| 932 * |
| 933 * Request parameters: |
| 934 * |
| 935 * [appsId] - Part of `name`. Name of the resource to update. Example: |
| 936 * apps/myapp/services/default/versions/1. |
| 937 * |
| 938 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 939 * |
| 940 * [versionsId] - Part of `name`. See documentation of `appsId`. |
| 941 * |
| 942 * [updateMask] - Standard field mask for the set of fields to be updated. |
| 943 * |
| 944 * Completes with a [Operation]. |
| 945 * |
| 946 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 947 * error. |
| 948 * |
| 949 * If the used [http.Client] completes with an error when making a REST call, |
| 950 * this method will complete with the same error. |
| 951 */ |
| 952 async.Future<Operation> patch(Version request, core.String appsId, core.String
servicesId, core.String versionsId, {core.String updateMask}) { |
| 953 var _url = null; |
| 954 var _queryParams = new core.Map(); |
| 955 var _uploadMedia = null; |
| 956 var _uploadOptions = null; |
| 957 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 958 var _body = null; |
| 959 |
| 960 if (request != null) { |
| 961 _body = convert.JSON.encode((request).toJson()); |
| 962 } |
| 963 if (appsId == null) { |
| 964 throw new core.ArgumentError("Parameter appsId is required."); |
| 965 } |
| 966 if (servicesId == null) { |
| 967 throw new core.ArgumentError("Parameter servicesId is required."); |
| 968 } |
| 969 if (versionsId == null) { |
| 970 throw new core.ArgumentError("Parameter versionsId is required."); |
| 971 } |
| 972 if (updateMask != null) { |
| 973 _queryParams["updateMask"] = [updateMask]; |
| 974 } |
| 975 |
| 976 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions/' + commons.Esca
per.ecapeVariable('$versionsId'); |
| 977 |
| 978 var _response = _requester.request(_url, |
| 979 "PATCH", |
| 980 body: _body, |
| 981 queryParams: _queryParams, |
| 982 uploadOptions: _uploadOptions, |
| 983 uploadMedia: _uploadMedia, |
| 984 downloadOptions: _downloadOptions); |
| 985 return _response.then((data) => new Operation.fromJson(data)); |
| 986 } |
| 987 |
| 988 } |
| 989 |
| 990 |
| 991 class AppsServicesVersionsInstancesResourceApi { |
| 992 final commons.ApiRequester _requester; |
| 993 |
| 994 AppsServicesVersionsInstancesResourceApi(commons.ApiRequester client) : |
| 995 _requester = client; |
| 996 |
| 997 /** |
| 998 * Enables debugging on a VM instance. This allows you to use the SSH command |
| 999 * to connect to the virtual machine where the instance lives. While in "debug |
| 1000 * mode", the instance continues to serve live traffic. You should delete the |
| 1001 * instance when you are done debugging and then allow the system to take over |
| 1002 * and determine if another instance should be started.Only applicable for |
| 1003 * instances in App Engine flexible environment. |
| 1004 * |
| 1005 * [request] - The metadata request object. |
| 1006 * |
| 1007 * Request parameters: |
| 1008 * |
| 1009 * [appsId] - Part of `name`. Name of the resource requested. Example: |
| 1010 * apps/myapp/services/default/versions/v1/instances/instance-1. |
| 1011 * |
| 1012 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 1013 * |
| 1014 * [versionsId] - Part of `name`. See documentation of `appsId`. |
| 1015 * |
| 1016 * [instancesId] - Part of `name`. See documentation of `appsId`. |
| 1017 * |
| 1018 * Completes with a [Operation]. |
| 1019 * |
| 1020 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1021 * error. |
| 1022 * |
| 1023 * If the used [http.Client] completes with an error when making a REST call, |
| 1024 * this method will complete with the same error. |
| 1025 */ |
| 1026 async.Future<Operation> debug(DebugInstanceRequest request, core.String appsId
, core.String servicesId, core.String versionsId, core.String instancesId) { |
| 1027 var _url = null; |
| 1028 var _queryParams = new core.Map(); |
| 1029 var _uploadMedia = null; |
| 1030 var _uploadOptions = null; |
| 1031 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1032 var _body = null; |
| 1033 |
| 1034 if (request != null) { |
| 1035 _body = convert.JSON.encode((request).toJson()); |
| 1036 } |
| 1037 if (appsId == null) { |
| 1038 throw new core.ArgumentError("Parameter appsId is required."); |
| 1039 } |
| 1040 if (servicesId == null) { |
| 1041 throw new core.ArgumentError("Parameter servicesId is required."); |
| 1042 } |
| 1043 if (versionsId == null) { |
| 1044 throw new core.ArgumentError("Parameter versionsId is required."); |
| 1045 } |
| 1046 if (instancesId == null) { |
| 1047 throw new core.ArgumentError("Parameter instancesId is required."); |
| 1048 } |
| 1049 |
| 1050 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions/' + commons.Esca
per.ecapeVariable('$versionsId') + '/instances/' + commons.Escaper.ecapeVariable
('$instancesId') + ':debug'; |
| 1051 |
| 1052 var _response = _requester.request(_url, |
| 1053 "POST", |
| 1054 body: _body, |
| 1055 queryParams: _queryParams, |
| 1056 uploadOptions: _uploadOptions, |
| 1057 uploadMedia: _uploadMedia, |
| 1058 downloadOptions: _downloadOptions); |
| 1059 return _response.then((data) => new Operation.fromJson(data)); |
| 1060 } |
| 1061 |
| 1062 /** |
| 1063 * Stops a running instance. |
| 1064 * |
| 1065 * Request parameters: |
| 1066 * |
| 1067 * [appsId] - Part of `name`. Name of the resource requested. Example: |
| 1068 * apps/myapp/services/default/versions/v1/instances/instance-1. |
| 1069 * |
| 1070 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 1071 * |
| 1072 * [versionsId] - Part of `name`. See documentation of `appsId`. |
| 1073 * |
| 1074 * [instancesId] - Part of `name`. See documentation of `appsId`. |
| 1075 * |
| 1076 * Completes with a [Operation]. |
| 1077 * |
| 1078 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1079 * error. |
| 1080 * |
| 1081 * If the used [http.Client] completes with an error when making a REST call, |
| 1082 * this method will complete with the same error. |
| 1083 */ |
| 1084 async.Future<Operation> delete(core.String appsId, core.String servicesId, cor
e.String versionsId, core.String instancesId) { |
| 1085 var _url = null; |
| 1086 var _queryParams = new core.Map(); |
| 1087 var _uploadMedia = null; |
| 1088 var _uploadOptions = null; |
| 1089 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1090 var _body = null; |
| 1091 |
| 1092 if (appsId == null) { |
| 1093 throw new core.ArgumentError("Parameter appsId is required."); |
| 1094 } |
| 1095 if (servicesId == null) { |
| 1096 throw new core.ArgumentError("Parameter servicesId is required."); |
| 1097 } |
| 1098 if (versionsId == null) { |
| 1099 throw new core.ArgumentError("Parameter versionsId is required."); |
| 1100 } |
| 1101 if (instancesId == null) { |
| 1102 throw new core.ArgumentError("Parameter instancesId is required."); |
| 1103 } |
| 1104 |
| 1105 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions/' + commons.Esca
per.ecapeVariable('$versionsId') + '/instances/' + commons.Escaper.ecapeVariable
('$instancesId'); |
| 1106 |
| 1107 var _response = _requester.request(_url, |
| 1108 "DELETE", |
| 1109 body: _body, |
| 1110 queryParams: _queryParams, |
| 1111 uploadOptions: _uploadOptions, |
| 1112 uploadMedia: _uploadMedia, |
| 1113 downloadOptions: _downloadOptions); |
| 1114 return _response.then((data) => new Operation.fromJson(data)); |
| 1115 } |
| 1116 |
| 1117 /** |
| 1118 * Gets instance information. |
| 1119 * |
| 1120 * Request parameters: |
| 1121 * |
| 1122 * [appsId] - Part of `name`. Name of the resource requested. Example: |
| 1123 * apps/myapp/services/default/versions/v1/instances/instance-1. |
| 1124 * |
| 1125 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 1126 * |
| 1127 * [versionsId] - Part of `name`. See documentation of `appsId`. |
| 1128 * |
| 1129 * [instancesId] - Part of `name`. See documentation of `appsId`. |
| 1130 * |
| 1131 * Completes with a [Instance]. |
| 1132 * |
| 1133 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1134 * error. |
| 1135 * |
| 1136 * If the used [http.Client] completes with an error when making a REST call, |
| 1137 * this method will complete with the same error. |
| 1138 */ |
| 1139 async.Future<Instance> get(core.String appsId, core.String servicesId, core.St
ring versionsId, core.String instancesId) { |
| 1140 var _url = null; |
| 1141 var _queryParams = new core.Map(); |
| 1142 var _uploadMedia = null; |
| 1143 var _uploadOptions = null; |
| 1144 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1145 var _body = null; |
| 1146 |
| 1147 if (appsId == null) { |
| 1148 throw new core.ArgumentError("Parameter appsId is required."); |
| 1149 } |
| 1150 if (servicesId == null) { |
| 1151 throw new core.ArgumentError("Parameter servicesId is required."); |
| 1152 } |
| 1153 if (versionsId == null) { |
| 1154 throw new core.ArgumentError("Parameter versionsId is required."); |
| 1155 } |
| 1156 if (instancesId == null) { |
| 1157 throw new core.ArgumentError("Parameter instancesId is required."); |
| 1158 } |
| 1159 |
| 1160 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions/' + commons.Esca
per.ecapeVariable('$versionsId') + '/instances/' + commons.Escaper.ecapeVariable
('$instancesId'); |
| 1161 |
| 1162 var _response = _requester.request(_url, |
| 1163 "GET", |
| 1164 body: _body, |
| 1165 queryParams: _queryParams, |
| 1166 uploadOptions: _uploadOptions, |
| 1167 uploadMedia: _uploadMedia, |
| 1168 downloadOptions: _downloadOptions); |
| 1169 return _response.then((data) => new Instance.fromJson(data)); |
| 1170 } |
| 1171 |
| 1172 /** |
| 1173 * Lists the instances of a version. |
| 1174 * |
| 1175 * Request parameters: |
| 1176 * |
| 1177 * [appsId] - Part of `parent`. Name of the parent Version resource. Example: |
| 1178 * apps/myapp/services/default/versions/v1. |
| 1179 * |
| 1180 * [servicesId] - Part of `parent`. See documentation of `appsId`. |
| 1181 * |
| 1182 * [versionsId] - Part of `parent`. See documentation of `appsId`. |
| 1183 * |
| 1184 * [pageToken] - Continuation token for fetching the next page of results. |
| 1185 * |
| 1186 * [pageSize] - Maximum results to return per page. |
| 1187 * |
| 1188 * Completes with a [ListInstancesResponse]. |
| 1189 * |
| 1190 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1191 * error. |
| 1192 * |
| 1193 * If the used [http.Client] completes with an error when making a REST call, |
| 1194 * this method will complete with the same error. |
| 1195 */ |
| 1196 async.Future<ListInstancesResponse> list(core.String appsId, core.String servi
cesId, core.String versionsId, {core.String pageToken, core.int pageSize}) { |
| 1197 var _url = null; |
| 1198 var _queryParams = new core.Map(); |
| 1199 var _uploadMedia = null; |
| 1200 var _uploadOptions = null; |
| 1201 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1202 var _body = null; |
| 1203 |
| 1204 if (appsId == null) { |
| 1205 throw new core.ArgumentError("Parameter appsId is required."); |
| 1206 } |
| 1207 if (servicesId == null) { |
| 1208 throw new core.ArgumentError("Parameter servicesId is required."); |
| 1209 } |
| 1210 if (versionsId == null) { |
| 1211 throw new core.ArgumentError("Parameter versionsId is required."); |
| 1212 } |
| 1213 if (pageToken != null) { |
| 1214 _queryParams["pageToken"] = [pageToken]; |
| 1215 } |
| 1216 if (pageSize != null) { |
| 1217 _queryParams["pageSize"] = ["${pageSize}"]; |
| 1218 } |
| 1219 |
| 1220 _url = 'v1beta/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/service
s/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions/' + commons.Esca
per.ecapeVariable('$versionsId') + '/instances'; |
| 1221 |
| 1222 var _response = _requester.request(_url, |
| 1223 "GET", |
| 1224 body: _body, |
| 1225 queryParams: _queryParams, |
| 1226 uploadOptions: _uploadOptions, |
| 1227 uploadMedia: _uploadMedia, |
| 1228 downloadOptions: _downloadOptions); |
| 1229 return _response.then((data) => new ListInstancesResponse.fromJson(data)); |
| 1230 } |
| 1231 |
| 1232 } |
| 1233 |
| 1234 |
| 1235 |
| 1236 /** |
| 1237 * Google Cloud Endpoints |
| 1238 * (https://cloud.google.com/appengine/docs/python/endpoints/) configuration for |
| 1239 * API handlers. |
| 1240 */ |
| 1241 class ApiConfigHandler { |
| 1242 /** |
| 1243 * Action to take when users access resources that require authentication. |
| 1244 * Defaults to redirect. |
| 1245 * Possible string values are: |
| 1246 * - "AUTH_FAIL_ACTION_UNSPECIFIED" : Not specified. AUTH_FAIL_ACTION_REDIRECT |
| 1247 * is assumed. |
| 1248 * - "AUTH_FAIL_ACTION_REDIRECT" : Redirects user to "accounts.google.com". |
| 1249 * The user is redirected back to the application URL after signing in or |
| 1250 * creating an account. |
| 1251 * - "AUTH_FAIL_ACTION_UNAUTHORIZED" : Rejects request with a 401 HTTP status |
| 1252 * code and an error message. |
| 1253 */ |
| 1254 core.String authFailAction; |
| 1255 /** |
| 1256 * Level of login required to access this resource. Defaults to optional. |
| 1257 * Possible string values are: |
| 1258 * - "LOGIN_UNSPECIFIED" : Not specified. LOGIN_OPTIONAL is assumed. |
| 1259 * - "LOGIN_OPTIONAL" : Does not require that the user is signed in. |
| 1260 * - "LOGIN_ADMIN" : If the user is not signed in, the auth_fail_action is |
| 1261 * taken. In addition, if the user is not an administrator for the |
| 1262 * application, they are given an error message regardless of |
| 1263 * auth_fail_action. If the user is an administrator, the handler proceeds. |
| 1264 * - "LOGIN_REQUIRED" : If the user has signed in, the handler proceeds |
| 1265 * normally. Otherwise, the auth_fail_action is taken. |
| 1266 */ |
| 1267 core.String login; |
| 1268 /** Path to the script from the application root directory. */ |
| 1269 core.String script; |
| 1270 /** |
| 1271 * Security (HTTPS) enforcement for this URL. |
| 1272 * Possible string values are: |
| 1273 * - "SECURE_UNSPECIFIED" : Not specified. |
| 1274 * - "SECURE_DEFAULT" : Both HTTP and HTTPS requests with URLs that match the |
| 1275 * handler succeed without redirects. The application can examine the request |
| 1276 * to determine which protocol was used, and respond accordingly. |
| 1277 * - "SECURE_NEVER" : Requests for a URL that match this handler that use |
| 1278 * HTTPS are automatically redirected to the HTTP equivalent URL. |
| 1279 * - "SECURE_OPTIONAL" : Both HTTP and HTTPS requests with URLs that match the |
| 1280 * handler succeed without redirects. The application can examine the request |
| 1281 * to determine which protocol was used and respond accordingly. |
| 1282 * - "SECURE_ALWAYS" : Requests for a URL that match this handler that do not |
| 1283 * use HTTPS are automatically redirected to the HTTPS URL with the same path. |
| 1284 * Query parameters are reserved for the redirect. |
| 1285 */ |
| 1286 core.String securityLevel; |
| 1287 /** URL to serve the endpoint at. */ |
| 1288 core.String url; |
| 1289 |
| 1290 ApiConfigHandler(); |
| 1291 |
| 1292 ApiConfigHandler.fromJson(core.Map _json) { |
| 1293 if (_json.containsKey("authFailAction")) { |
| 1294 authFailAction = _json["authFailAction"]; |
| 1295 } |
| 1296 if (_json.containsKey("login")) { |
| 1297 login = _json["login"]; |
| 1298 } |
| 1299 if (_json.containsKey("script")) { |
| 1300 script = _json["script"]; |
| 1301 } |
| 1302 if (_json.containsKey("securityLevel")) { |
| 1303 securityLevel = _json["securityLevel"]; |
| 1304 } |
| 1305 if (_json.containsKey("url")) { |
| 1306 url = _json["url"]; |
| 1307 } |
| 1308 } |
| 1309 |
| 1310 core.Map toJson() { |
| 1311 var _json = new core.Map(); |
| 1312 if (authFailAction != null) { |
| 1313 _json["authFailAction"] = authFailAction; |
| 1314 } |
| 1315 if (login != null) { |
| 1316 _json["login"] = login; |
| 1317 } |
| 1318 if (script != null) { |
| 1319 _json["script"] = script; |
| 1320 } |
| 1321 if (securityLevel != null) { |
| 1322 _json["securityLevel"] = securityLevel; |
| 1323 } |
| 1324 if (url != null) { |
| 1325 _json["url"] = url; |
| 1326 } |
| 1327 return _json; |
| 1328 } |
| 1329 } |
| 1330 |
| 1331 /** Uses Google Cloud Endpoints to handle requests. */ |
| 1332 class ApiEndpointHandler { |
| 1333 /** Path to the script from the application root directory. */ |
| 1334 core.String scriptPath; |
| 1335 |
| 1336 ApiEndpointHandler(); |
| 1337 |
| 1338 ApiEndpointHandler.fromJson(core.Map _json) { |
| 1339 if (_json.containsKey("scriptPath")) { |
| 1340 scriptPath = _json["scriptPath"]; |
| 1341 } |
| 1342 } |
| 1343 |
| 1344 core.Map toJson() { |
| 1345 var _json = new core.Map(); |
| 1346 if (scriptPath != null) { |
| 1347 _json["scriptPath"] = scriptPath; |
| 1348 } |
| 1349 return _json; |
| 1350 } |
| 1351 } |
| 1352 |
| 1353 /** |
| 1354 * An Application resource contains the top-level configuration of an App Engine |
| 1355 * application. |
| 1356 */ |
| 1357 class Application { |
| 1358 /** |
| 1359 * Google Apps authentication domain that controls which users can access this |
| 1360 * application.Defaults to open access for any Google Account. |
| 1361 */ |
| 1362 core.String authDomain; |
| 1363 /** |
| 1364 * Google Cloud Storage bucket that can be used for storing files associated |
| 1365 * with this application. This bucket is associated with the application and |
| 1366 * can be used by the gcloud deployment commands.@OutputOnly |
| 1367 */ |
| 1368 core.String codeBucket; |
| 1369 /** |
| 1370 * Google Cloud Storage bucket that can be used by this application to store |
| 1371 * content.@OutputOnly |
| 1372 */ |
| 1373 core.String defaultBucket; |
| 1374 /** Cookie expiration policy for this application. */ |
| 1375 core.String defaultCookieExpiration; |
| 1376 /** |
| 1377 * Hostname used to reach this application, as resolved by App |
| 1378 * Engine.@OutputOnly |
| 1379 */ |
| 1380 core.String defaultHostname; |
| 1381 /** |
| 1382 * HTTP path dispatch rules for requests to the application that do not |
| 1383 * explicitly target a service or version. Rules are |
| 1384 * order-dependent.@OutputOnly |
| 1385 */ |
| 1386 core.List<UrlDispatchRule> dispatchRules; |
| 1387 IdentityAwareProxy iap; |
| 1388 /** |
| 1389 * Identifier of the Application resource. This identifier is equivalent to |
| 1390 * the project ID of the Google Cloud Platform project where you want to |
| 1391 * deploy your application. Example: myapp. |
| 1392 */ |
| 1393 core.String id; |
| 1394 /** |
| 1395 * Location from which this application will be run. Application instances |
| 1396 * will run out of data centers in the chosen location, which is also where |
| 1397 * all of the application's end user content is stored.Defaults to |
| 1398 * us-central.Options are:us-central - Central USeurope-west - Western |
| 1399 * Europeus-east1 - Eastern US |
| 1400 */ |
| 1401 core.String locationId; |
| 1402 /** |
| 1403 * Full path to the Application resource in the API. Example: |
| 1404 * apps/myapp.@OutputOnly |
| 1405 */ |
| 1406 core.String name; |
| 1407 |
| 1408 Application(); |
| 1409 |
| 1410 Application.fromJson(core.Map _json) { |
| 1411 if (_json.containsKey("authDomain")) { |
| 1412 authDomain = _json["authDomain"]; |
| 1413 } |
| 1414 if (_json.containsKey("codeBucket")) { |
| 1415 codeBucket = _json["codeBucket"]; |
| 1416 } |
| 1417 if (_json.containsKey("defaultBucket")) { |
| 1418 defaultBucket = _json["defaultBucket"]; |
| 1419 } |
| 1420 if (_json.containsKey("defaultCookieExpiration")) { |
| 1421 defaultCookieExpiration = _json["defaultCookieExpiration"]; |
| 1422 } |
| 1423 if (_json.containsKey("defaultHostname")) { |
| 1424 defaultHostname = _json["defaultHostname"]; |
| 1425 } |
| 1426 if (_json.containsKey("dispatchRules")) { |
| 1427 dispatchRules = _json["dispatchRules"].map((value) => new UrlDispatchRule.
fromJson(value)).toList(); |
| 1428 } |
| 1429 if (_json.containsKey("iap")) { |
| 1430 iap = new IdentityAwareProxy.fromJson(_json["iap"]); |
| 1431 } |
| 1432 if (_json.containsKey("id")) { |
| 1433 id = _json["id"]; |
| 1434 } |
| 1435 if (_json.containsKey("locationId")) { |
| 1436 locationId = _json["locationId"]; |
| 1437 } |
| 1438 if (_json.containsKey("name")) { |
| 1439 name = _json["name"]; |
| 1440 } |
| 1441 } |
| 1442 |
| 1443 core.Map toJson() { |
| 1444 var _json = new core.Map(); |
| 1445 if (authDomain != null) { |
| 1446 _json["authDomain"] = authDomain; |
| 1447 } |
| 1448 if (codeBucket != null) { |
| 1449 _json["codeBucket"] = codeBucket; |
| 1450 } |
| 1451 if (defaultBucket != null) { |
| 1452 _json["defaultBucket"] = defaultBucket; |
| 1453 } |
| 1454 if (defaultCookieExpiration != null) { |
| 1455 _json["defaultCookieExpiration"] = defaultCookieExpiration; |
| 1456 } |
| 1457 if (defaultHostname != null) { |
| 1458 _json["defaultHostname"] = defaultHostname; |
| 1459 } |
| 1460 if (dispatchRules != null) { |
| 1461 _json["dispatchRules"] = dispatchRules.map((value) => (value).toJson()).to
List(); |
| 1462 } |
| 1463 if (iap != null) { |
| 1464 _json["iap"] = (iap).toJson(); |
| 1465 } |
| 1466 if (id != null) { |
| 1467 _json["id"] = id; |
| 1468 } |
| 1469 if (locationId != null) { |
| 1470 _json["locationId"] = locationId; |
| 1471 } |
| 1472 if (name != null) { |
| 1473 _json["name"] = name; |
| 1474 } |
| 1475 return _json; |
| 1476 } |
| 1477 } |
| 1478 |
| 1479 /** |
| 1480 * Automatic scaling is based on request rate, response latencies, and other |
| 1481 * application metrics. |
| 1482 */ |
| 1483 class AutomaticScaling { |
| 1484 /** |
| 1485 * Amount of time that the Autoscaler |
| 1486 * (https://cloud.google.com/compute/docs/autoscaler/) should wait between |
| 1487 * changes to the number of virtual machines. Only applicable for VM runtimes. |
| 1488 */ |
| 1489 core.String coolDownPeriod; |
| 1490 /** Target scaling by CPU usage. */ |
| 1491 CpuUtilization cpuUtilization; |
| 1492 /** Target scaling by disk usage. */ |
| 1493 DiskUtilization diskUtilization; |
| 1494 /** |
| 1495 * Number of concurrent requests an automatic scaling instance can accept |
| 1496 * before the scheduler spawns a new instance.Defaults to a runtime-specific |
| 1497 * value. |
| 1498 */ |
| 1499 core.int maxConcurrentRequests; |
| 1500 /** |
| 1501 * Maximum number of idle instances that should be maintained for this |
| 1502 * version. |
| 1503 */ |
| 1504 core.int maxIdleInstances; |
| 1505 /** |
| 1506 * Maximum amount of time that a request should wait in the pending queue |
| 1507 * before starting a new instance to handle it. |
| 1508 */ |
| 1509 core.String maxPendingLatency; |
| 1510 /** Maximum number of instances that should be started to handle requests. */ |
| 1511 core.int maxTotalInstances; |
| 1512 /** |
| 1513 * Minimum number of idle instances that should be maintained for this |
| 1514 * version. Only applicable for the default version of a service. |
| 1515 */ |
| 1516 core.int minIdleInstances; |
| 1517 /** |
| 1518 * Minimum amount of time a request should wait in the pending queue before |
| 1519 * starting a new instance to handle it. |
| 1520 */ |
| 1521 core.String minPendingLatency; |
| 1522 /** |
| 1523 * Minimum number of instances that should be maintained for this version. |
| 1524 */ |
| 1525 core.int minTotalInstances; |
| 1526 /** Target scaling by network usage. */ |
| 1527 NetworkUtilization networkUtilization; |
| 1528 /** Target scaling by request utilization. */ |
| 1529 RequestUtilization requestUtilization; |
| 1530 |
| 1531 AutomaticScaling(); |
| 1532 |
| 1533 AutomaticScaling.fromJson(core.Map _json) { |
| 1534 if (_json.containsKey("coolDownPeriod")) { |
| 1535 coolDownPeriod = _json["coolDownPeriod"]; |
| 1536 } |
| 1537 if (_json.containsKey("cpuUtilization")) { |
| 1538 cpuUtilization = new CpuUtilization.fromJson(_json["cpuUtilization"]); |
| 1539 } |
| 1540 if (_json.containsKey("diskUtilization")) { |
| 1541 diskUtilization = new DiskUtilization.fromJson(_json["diskUtilization"]); |
| 1542 } |
| 1543 if (_json.containsKey("maxConcurrentRequests")) { |
| 1544 maxConcurrentRequests = _json["maxConcurrentRequests"]; |
| 1545 } |
| 1546 if (_json.containsKey("maxIdleInstances")) { |
| 1547 maxIdleInstances = _json["maxIdleInstances"]; |
| 1548 } |
| 1549 if (_json.containsKey("maxPendingLatency")) { |
| 1550 maxPendingLatency = _json["maxPendingLatency"]; |
| 1551 } |
| 1552 if (_json.containsKey("maxTotalInstances")) { |
| 1553 maxTotalInstances = _json["maxTotalInstances"]; |
| 1554 } |
| 1555 if (_json.containsKey("minIdleInstances")) { |
| 1556 minIdleInstances = _json["minIdleInstances"]; |
| 1557 } |
| 1558 if (_json.containsKey("minPendingLatency")) { |
| 1559 minPendingLatency = _json["minPendingLatency"]; |
| 1560 } |
| 1561 if (_json.containsKey("minTotalInstances")) { |
| 1562 minTotalInstances = _json["minTotalInstances"]; |
| 1563 } |
| 1564 if (_json.containsKey("networkUtilization")) { |
| 1565 networkUtilization = new NetworkUtilization.fromJson(_json["networkUtiliza
tion"]); |
| 1566 } |
| 1567 if (_json.containsKey("requestUtilization")) { |
| 1568 requestUtilization = new RequestUtilization.fromJson(_json["requestUtiliza
tion"]); |
| 1569 } |
| 1570 } |
| 1571 |
| 1572 core.Map toJson() { |
| 1573 var _json = new core.Map(); |
| 1574 if (coolDownPeriod != null) { |
| 1575 _json["coolDownPeriod"] = coolDownPeriod; |
| 1576 } |
| 1577 if (cpuUtilization != null) { |
| 1578 _json["cpuUtilization"] = (cpuUtilization).toJson(); |
| 1579 } |
| 1580 if (diskUtilization != null) { |
| 1581 _json["diskUtilization"] = (diskUtilization).toJson(); |
| 1582 } |
| 1583 if (maxConcurrentRequests != null) { |
| 1584 _json["maxConcurrentRequests"] = maxConcurrentRequests; |
| 1585 } |
| 1586 if (maxIdleInstances != null) { |
| 1587 _json["maxIdleInstances"] = maxIdleInstances; |
| 1588 } |
| 1589 if (maxPendingLatency != null) { |
| 1590 _json["maxPendingLatency"] = maxPendingLatency; |
| 1591 } |
| 1592 if (maxTotalInstances != null) { |
| 1593 _json["maxTotalInstances"] = maxTotalInstances; |
| 1594 } |
| 1595 if (minIdleInstances != null) { |
| 1596 _json["minIdleInstances"] = minIdleInstances; |
| 1597 } |
| 1598 if (minPendingLatency != null) { |
| 1599 _json["minPendingLatency"] = minPendingLatency; |
| 1600 } |
| 1601 if (minTotalInstances != null) { |
| 1602 _json["minTotalInstances"] = minTotalInstances; |
| 1603 } |
| 1604 if (networkUtilization != null) { |
| 1605 _json["networkUtilization"] = (networkUtilization).toJson(); |
| 1606 } |
| 1607 if (requestUtilization != null) { |
| 1608 _json["requestUtilization"] = (requestUtilization).toJson(); |
| 1609 } |
| 1610 return _json; |
| 1611 } |
| 1612 } |
| 1613 |
| 1614 /** |
| 1615 * A service with basic scaling will create an instance when the application |
| 1616 * receives a request. The instance will be turned down when the app becomes |
| 1617 * idle. Basic scaling is ideal for work that is intermittent or driven by user |
| 1618 * activity. |
| 1619 */ |
| 1620 class BasicScaling { |
| 1621 /** |
| 1622 * Duration of time after the last request that an instance must wait before |
| 1623 * the instance is shut down. |
| 1624 */ |
| 1625 core.String idleTimeout; |
| 1626 /** Maximum number of instances to create for this version. */ |
| 1627 core.int maxInstances; |
| 1628 |
| 1629 BasicScaling(); |
| 1630 |
| 1631 BasicScaling.fromJson(core.Map _json) { |
| 1632 if (_json.containsKey("idleTimeout")) { |
| 1633 idleTimeout = _json["idleTimeout"]; |
| 1634 } |
| 1635 if (_json.containsKey("maxInstances")) { |
| 1636 maxInstances = _json["maxInstances"]; |
| 1637 } |
| 1638 } |
| 1639 |
| 1640 core.Map toJson() { |
| 1641 var _json = new core.Map(); |
| 1642 if (idleTimeout != null) { |
| 1643 _json["idleTimeout"] = idleTimeout; |
| 1644 } |
| 1645 if (maxInstances != null) { |
| 1646 _json["maxInstances"] = maxInstances; |
| 1647 } |
| 1648 return _json; |
| 1649 } |
| 1650 } |
| 1651 |
| 1652 /** |
| 1653 * Docker image that is used to create a container and start a VM instance for |
| 1654 * the version that you deploy. Only applicable for instances running in the App |
| 1655 * Engine flexible environment. |
| 1656 */ |
| 1657 class ContainerInfo { |
| 1658 /** |
| 1659 * URI to the hosted container image in Google Container Registry. The URI |
| 1660 * must be fully qualified and include a tag or digest. Examples: |
| 1661 * "gcr.io/my-project/image:tag" or "gcr.io/my-project/image@digest" |
| 1662 */ |
| 1663 core.String image; |
| 1664 |
| 1665 ContainerInfo(); |
| 1666 |
| 1667 ContainerInfo.fromJson(core.Map _json) { |
| 1668 if (_json.containsKey("image")) { |
| 1669 image = _json["image"]; |
| 1670 } |
| 1671 } |
| 1672 |
| 1673 core.Map toJson() { |
| 1674 var _json = new core.Map(); |
| 1675 if (image != null) { |
| 1676 _json["image"] = image; |
| 1677 } |
| 1678 return _json; |
| 1679 } |
| 1680 } |
| 1681 |
| 1682 /** Target scaling by CPU usage. */ |
| 1683 class CpuUtilization { |
| 1684 /** Period of time over which CPU utilization is calculated. */ |
| 1685 core.String aggregationWindowLength; |
| 1686 /** |
| 1687 * Target CPU utilization ratio to maintain when scaling. Must be between 0 |
| 1688 * and 1. |
| 1689 */ |
| 1690 core.double targetUtilization; |
| 1691 |
| 1692 CpuUtilization(); |
| 1693 |
| 1694 CpuUtilization.fromJson(core.Map _json) { |
| 1695 if (_json.containsKey("aggregationWindowLength")) { |
| 1696 aggregationWindowLength = _json["aggregationWindowLength"]; |
| 1697 } |
| 1698 if (_json.containsKey("targetUtilization")) { |
| 1699 targetUtilization = _json["targetUtilization"]; |
| 1700 } |
| 1701 } |
| 1702 |
| 1703 core.Map toJson() { |
| 1704 var _json = new core.Map(); |
| 1705 if (aggregationWindowLength != null) { |
| 1706 _json["aggregationWindowLength"] = aggregationWindowLength; |
| 1707 } |
| 1708 if (targetUtilization != null) { |
| 1709 _json["targetUtilization"] = targetUtilization; |
| 1710 } |
| 1711 return _json; |
| 1712 } |
| 1713 } |
| 1714 |
| 1715 /** Request message for Instances.DebugInstance. */ |
| 1716 class DebugInstanceRequest { |
| 1717 /** |
| 1718 * Public SSH key to add to the instance. Examples: |
| 1719 * [USERNAME]:ssh-rsa [KEY_VALUE] [USERNAME] |
| 1720 * [USERNAME]:ssh-rsa [KEY_VALUE] google-ssh |
| 1721 * {"userName":"[USERNAME]","expireOn":"[EXPIRE_TIME]"}For more information, |
| 1722 * see Adding and Removing SSH Keys |
| 1723 * (https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys). |
| 1724 */ |
| 1725 core.String sshKey; |
| 1726 |
| 1727 DebugInstanceRequest(); |
| 1728 |
| 1729 DebugInstanceRequest.fromJson(core.Map _json) { |
| 1730 if (_json.containsKey("sshKey")) { |
| 1731 sshKey = _json["sshKey"]; |
| 1732 } |
| 1733 } |
| 1734 |
| 1735 core.Map toJson() { |
| 1736 var _json = new core.Map(); |
| 1737 if (sshKey != null) { |
| 1738 _json["sshKey"] = sshKey; |
| 1739 } |
| 1740 return _json; |
| 1741 } |
| 1742 } |
| 1743 |
| 1744 /** Code and application artifacts used to deploy a version to App Engine. */ |
| 1745 class Deployment { |
| 1746 /** |
| 1747 * The Docker image for the container that runs the version. Only applicable |
| 1748 * for instances running in the App Engine flexible environment. |
| 1749 */ |
| 1750 ContainerInfo container; |
| 1751 /** |
| 1752 * Manifest of the files stored in Google Cloud Storage that are included as |
| 1753 * part of this version. All files must be readable using the credentials |
| 1754 * supplied with this call. |
| 1755 */ |
| 1756 core.Map<core.String, FileInfo> files; |
| 1757 /** The zip file for this deployment, if this is a zip deployment. */ |
| 1758 ZipInfo zip; |
| 1759 |
| 1760 Deployment(); |
| 1761 |
| 1762 Deployment.fromJson(core.Map _json) { |
| 1763 if (_json.containsKey("container")) { |
| 1764 container = new ContainerInfo.fromJson(_json["container"]); |
| 1765 } |
| 1766 if (_json.containsKey("files")) { |
| 1767 files = commons.mapMap(_json["files"], (item) => new FileInfo.fromJson(ite
m)); |
| 1768 } |
| 1769 if (_json.containsKey("zip")) { |
| 1770 zip = new ZipInfo.fromJson(_json["zip"]); |
| 1771 } |
| 1772 } |
| 1773 |
| 1774 core.Map toJson() { |
| 1775 var _json = new core.Map(); |
| 1776 if (container != null) { |
| 1777 _json["container"] = (container).toJson(); |
| 1778 } |
| 1779 if (files != null) { |
| 1780 _json["files"] = commons.mapMap(files, (item) => (item).toJson()); |
| 1781 } |
| 1782 if (zip != null) { |
| 1783 _json["zip"] = (zip).toJson(); |
| 1784 } |
| 1785 return _json; |
| 1786 } |
| 1787 } |
| 1788 |
| 1789 /** Target scaling by disk usage. Only applicable for VM runtimes. */ |
| 1790 class DiskUtilization { |
| 1791 /** Target bytes read per second. */ |
| 1792 core.int targetReadBytesPerSecond; |
| 1793 /** Target ops read per seconds. */ |
| 1794 core.int targetReadOpsPerSecond; |
| 1795 /** Target bytes written per second. */ |
| 1796 core.int targetWriteBytesPerSecond; |
| 1797 /** Target ops written per second. */ |
| 1798 core.int targetWriteOpsPerSecond; |
| 1799 |
| 1800 DiskUtilization(); |
| 1801 |
| 1802 DiskUtilization.fromJson(core.Map _json) { |
| 1803 if (_json.containsKey("targetReadBytesPerSecond")) { |
| 1804 targetReadBytesPerSecond = _json["targetReadBytesPerSecond"]; |
| 1805 } |
| 1806 if (_json.containsKey("targetReadOpsPerSecond")) { |
| 1807 targetReadOpsPerSecond = _json["targetReadOpsPerSecond"]; |
| 1808 } |
| 1809 if (_json.containsKey("targetWriteBytesPerSecond")) { |
| 1810 targetWriteBytesPerSecond = _json["targetWriteBytesPerSecond"]; |
| 1811 } |
| 1812 if (_json.containsKey("targetWriteOpsPerSecond")) { |
| 1813 targetWriteOpsPerSecond = _json["targetWriteOpsPerSecond"]; |
| 1814 } |
| 1815 } |
| 1816 |
| 1817 core.Map toJson() { |
| 1818 var _json = new core.Map(); |
| 1819 if (targetReadBytesPerSecond != null) { |
| 1820 _json["targetReadBytesPerSecond"] = targetReadBytesPerSecond; |
| 1821 } |
| 1822 if (targetReadOpsPerSecond != null) { |
| 1823 _json["targetReadOpsPerSecond"] = targetReadOpsPerSecond; |
| 1824 } |
| 1825 if (targetWriteBytesPerSecond != null) { |
| 1826 _json["targetWriteBytesPerSecond"] = targetWriteBytesPerSecond; |
| 1827 } |
| 1828 if (targetWriteOpsPerSecond != null) { |
| 1829 _json["targetWriteOpsPerSecond"] = targetWriteOpsPerSecond; |
| 1830 } |
| 1831 return _json; |
| 1832 } |
| 1833 } |
| 1834 |
| 1835 /** |
| 1836 * Cloud Endpoints (https://cloud.google.com/endpoints) configuration. The |
| 1837 * Endpoints API Service provides tooling for serving Open API and gRPC |
| 1838 * endpoints via an NGINX proxy.The fields here refer to the name and |
| 1839 * configuration id of a "service" resource in the Service Management API |
| 1840 * (https://cloud.google.com/service-management/overview). |
| 1841 */ |
| 1842 class EndpointsApiService { |
| 1843 /** |
| 1844 * Endpoints service configuration id as specified by the Service Management |
| 1845 * API. For example "2016-09-19r1" |
| 1846 */ |
| 1847 core.String configId; |
| 1848 /** |
| 1849 * Endpoints service name which is the name of the "service" resource in the |
| 1850 * Service Management API. For example "myapi.endpoints.myproject.cloud.goog" |
| 1851 */ |
| 1852 core.String name; |
| 1853 |
| 1854 EndpointsApiService(); |
| 1855 |
| 1856 EndpointsApiService.fromJson(core.Map _json) { |
| 1857 if (_json.containsKey("configId")) { |
| 1858 configId = _json["configId"]; |
| 1859 } |
| 1860 if (_json.containsKey("name")) { |
| 1861 name = _json["name"]; |
| 1862 } |
| 1863 } |
| 1864 |
| 1865 core.Map toJson() { |
| 1866 var _json = new core.Map(); |
| 1867 if (configId != null) { |
| 1868 _json["configId"] = configId; |
| 1869 } |
| 1870 if (name != null) { |
| 1871 _json["name"] = name; |
| 1872 } |
| 1873 return _json; |
| 1874 } |
| 1875 } |
| 1876 |
| 1877 /** Custom static error page to be served when an error occurs. */ |
| 1878 class ErrorHandler { |
| 1879 /** |
| 1880 * Error condition this handler applies to. |
| 1881 * Possible string values are: |
| 1882 * - "ERROR_CODE_UNSPECIFIED" : Not specified. ERROR_CODE_DEFAULT is assumed. |
| 1883 * - "ERROR_CODE_DEFAULT" : All other error types. |
| 1884 * - "ERROR_CODE_OVER_QUOTA" : Application has exceeded a resource quota. |
| 1885 * - "ERROR_CODE_DOS_API_DENIAL" : Client blocked by the application's Denial |
| 1886 * of Service protection configuration. |
| 1887 * - "ERROR_CODE_TIMEOUT" : Deadline reached before the application responds. |
| 1888 */ |
| 1889 core.String errorCode; |
| 1890 /** MIME type of file. Defaults to text/html. */ |
| 1891 core.String mimeType; |
| 1892 /** Static file content to be served for this error. */ |
| 1893 core.String staticFile; |
| 1894 |
| 1895 ErrorHandler(); |
| 1896 |
| 1897 ErrorHandler.fromJson(core.Map _json) { |
| 1898 if (_json.containsKey("errorCode")) { |
| 1899 errorCode = _json["errorCode"]; |
| 1900 } |
| 1901 if (_json.containsKey("mimeType")) { |
| 1902 mimeType = _json["mimeType"]; |
| 1903 } |
| 1904 if (_json.containsKey("staticFile")) { |
| 1905 staticFile = _json["staticFile"]; |
| 1906 } |
| 1907 } |
| 1908 |
| 1909 core.Map toJson() { |
| 1910 var _json = new core.Map(); |
| 1911 if (errorCode != null) { |
| 1912 _json["errorCode"] = errorCode; |
| 1913 } |
| 1914 if (mimeType != null) { |
| 1915 _json["mimeType"] = mimeType; |
| 1916 } |
| 1917 if (staticFile != null) { |
| 1918 _json["staticFile"] = staticFile; |
| 1919 } |
| 1920 return _json; |
| 1921 } |
| 1922 } |
| 1923 |
| 1924 /** |
| 1925 * Single source file that is part of the version to be deployed. Each source |
| 1926 * file that is deployed must be specified separately. |
| 1927 */ |
| 1928 class FileInfo { |
| 1929 /** |
| 1930 * The MIME type of the file.Defaults to the value from Google Cloud Storage. |
| 1931 */ |
| 1932 core.String mimeType; |
| 1933 /** The SHA1 hash of the file, in hex. */ |
| 1934 core.String sha1Sum; |
| 1935 /** |
| 1936 * URL source to use to fetch this file. Must be a URL to a resource in Google |
| 1937 * Cloud Storage in the form |
| 1938 * 'http(s)://storage.googleapis.com/<bucket>/<object>'. |
| 1939 */ |
| 1940 core.String sourceUrl; |
| 1941 |
| 1942 FileInfo(); |
| 1943 |
| 1944 FileInfo.fromJson(core.Map _json) { |
| 1945 if (_json.containsKey("mimeType")) { |
| 1946 mimeType = _json["mimeType"]; |
| 1947 } |
| 1948 if (_json.containsKey("sha1Sum")) { |
| 1949 sha1Sum = _json["sha1Sum"]; |
| 1950 } |
| 1951 if (_json.containsKey("sourceUrl")) { |
| 1952 sourceUrl = _json["sourceUrl"]; |
| 1953 } |
| 1954 } |
| 1955 |
| 1956 core.Map toJson() { |
| 1957 var _json = new core.Map(); |
| 1958 if (mimeType != null) { |
| 1959 _json["mimeType"] = mimeType; |
| 1960 } |
| 1961 if (sha1Sum != null) { |
| 1962 _json["sha1Sum"] = sha1Sum; |
| 1963 } |
| 1964 if (sourceUrl != null) { |
| 1965 _json["sourceUrl"] = sourceUrl; |
| 1966 } |
| 1967 return _json; |
| 1968 } |
| 1969 } |
| 1970 |
| 1971 /** |
| 1972 * Health checking configuration for VM instances. Unhealthy instances are |
| 1973 * killed and replaced with new instances. Only applicable for instances in App |
| 1974 * Engine flexible environment. |
| 1975 */ |
| 1976 class HealthCheck { |
| 1977 /** Interval between health checks. */ |
| 1978 core.String checkInterval; |
| 1979 /** Whether to explicitly disable health checks for this instance. */ |
| 1980 core.bool disableHealthCheck; |
| 1981 /** |
| 1982 * Number of consecutive successful health checks required before receiving |
| 1983 * traffic. |
| 1984 */ |
| 1985 core.int healthyThreshold; |
| 1986 /** |
| 1987 * Host header to send when performing an HTTP health check. Example: |
| 1988 * "myapp.appspot.com" |
| 1989 */ |
| 1990 core.String host; |
| 1991 /** |
| 1992 * Number of consecutive failed health checks required before an instance is |
| 1993 * restarted. |
| 1994 */ |
| 1995 core.int restartThreshold; |
| 1996 /** Time before the health check is considered failed. */ |
| 1997 core.String timeout; |
| 1998 /** |
| 1999 * Number of consecutive failed health checks required before removing |
| 2000 * traffic. |
| 2001 */ |
| 2002 core.int unhealthyThreshold; |
| 2003 |
| 2004 HealthCheck(); |
| 2005 |
| 2006 HealthCheck.fromJson(core.Map _json) { |
| 2007 if (_json.containsKey("checkInterval")) { |
| 2008 checkInterval = _json["checkInterval"]; |
| 2009 } |
| 2010 if (_json.containsKey("disableHealthCheck")) { |
| 2011 disableHealthCheck = _json["disableHealthCheck"]; |
| 2012 } |
| 2013 if (_json.containsKey("healthyThreshold")) { |
| 2014 healthyThreshold = _json["healthyThreshold"]; |
| 2015 } |
| 2016 if (_json.containsKey("host")) { |
| 2017 host = _json["host"]; |
| 2018 } |
| 2019 if (_json.containsKey("restartThreshold")) { |
| 2020 restartThreshold = _json["restartThreshold"]; |
| 2021 } |
| 2022 if (_json.containsKey("timeout")) { |
| 2023 timeout = _json["timeout"]; |
| 2024 } |
| 2025 if (_json.containsKey("unhealthyThreshold")) { |
| 2026 unhealthyThreshold = _json["unhealthyThreshold"]; |
| 2027 } |
| 2028 } |
| 2029 |
| 2030 core.Map toJson() { |
| 2031 var _json = new core.Map(); |
| 2032 if (checkInterval != null) { |
| 2033 _json["checkInterval"] = checkInterval; |
| 2034 } |
| 2035 if (disableHealthCheck != null) { |
| 2036 _json["disableHealthCheck"] = disableHealthCheck; |
| 2037 } |
| 2038 if (healthyThreshold != null) { |
| 2039 _json["healthyThreshold"] = healthyThreshold; |
| 2040 } |
| 2041 if (host != null) { |
| 2042 _json["host"] = host; |
| 2043 } |
| 2044 if (restartThreshold != null) { |
| 2045 _json["restartThreshold"] = restartThreshold; |
| 2046 } |
| 2047 if (timeout != null) { |
| 2048 _json["timeout"] = timeout; |
| 2049 } |
| 2050 if (unhealthyThreshold != null) { |
| 2051 _json["unhealthyThreshold"] = unhealthyThreshold; |
| 2052 } |
| 2053 return _json; |
| 2054 } |
| 2055 } |
| 2056 |
| 2057 /** Identity-Aware Proxy */ |
| 2058 class IdentityAwareProxy { |
| 2059 /** |
| 2060 * Whether the serving infrastructure will authenticate and authorize all |
| 2061 * incoming requests.If true, the oauth2_client_id and oauth2_client_secret |
| 2062 * fields must be non-empty. |
| 2063 */ |
| 2064 core.bool enabled; |
| 2065 /** OAuth2 client ID to use for the authentication flow. */ |
| 2066 core.String oauth2ClientId; |
| 2067 /** |
| 2068 * OAuth2 client secret to use for the authentication flow.For security |
| 2069 * reasons, this value cannot be retrieved via the API. Instead, the SHA-256 |
| 2070 * hash of the value is returned in the oauth2_client_secret_sha256 |
| 2071 * field.@InputOnly |
| 2072 */ |
| 2073 core.String oauth2ClientSecret; |
| 2074 /** Hex-encoded SHA-256 hash of the client secret.@OutputOnly */ |
| 2075 core.String oauth2ClientSecretSha256; |
| 2076 |
| 2077 IdentityAwareProxy(); |
| 2078 |
| 2079 IdentityAwareProxy.fromJson(core.Map _json) { |
| 2080 if (_json.containsKey("enabled")) { |
| 2081 enabled = _json["enabled"]; |
| 2082 } |
| 2083 if (_json.containsKey("oauth2ClientId")) { |
| 2084 oauth2ClientId = _json["oauth2ClientId"]; |
| 2085 } |
| 2086 if (_json.containsKey("oauth2ClientSecret")) { |
| 2087 oauth2ClientSecret = _json["oauth2ClientSecret"]; |
| 2088 } |
| 2089 if (_json.containsKey("oauth2ClientSecretSha256")) { |
| 2090 oauth2ClientSecretSha256 = _json["oauth2ClientSecretSha256"]; |
| 2091 } |
| 2092 } |
| 2093 |
| 2094 core.Map toJson() { |
| 2095 var _json = new core.Map(); |
| 2096 if (enabled != null) { |
| 2097 _json["enabled"] = enabled; |
| 2098 } |
| 2099 if (oauth2ClientId != null) { |
| 2100 _json["oauth2ClientId"] = oauth2ClientId; |
| 2101 } |
| 2102 if (oauth2ClientSecret != null) { |
| 2103 _json["oauth2ClientSecret"] = oauth2ClientSecret; |
| 2104 } |
| 2105 if (oauth2ClientSecretSha256 != null) { |
| 2106 _json["oauth2ClientSecretSha256"] = oauth2ClientSecretSha256; |
| 2107 } |
| 2108 return _json; |
| 2109 } |
| 2110 } |
| 2111 |
| 2112 /** |
| 2113 * An Instance resource is the computing unit that App Engine uses to |
| 2114 * automatically scale an application. |
| 2115 */ |
| 2116 class Instance { |
| 2117 /** App Engine release this instance is running on.@OutputOnly */ |
| 2118 core.String appEngineRelease; |
| 2119 /** |
| 2120 * Availability of the instance.@OutputOnly |
| 2121 * Possible string values are: |
| 2122 * - "UNSPECIFIED" |
| 2123 * - "RESIDENT" |
| 2124 * - "DYNAMIC" |
| 2125 */ |
| 2126 core.String availability; |
| 2127 /** Average latency (ms) over the last minute.@OutputOnly */ |
| 2128 core.int averageLatency; |
| 2129 /** Number of errors since this instance was started.@OutputOnly */ |
| 2130 core.int errors; |
| 2131 /** |
| 2132 * Relative name of the instance within the version. Example: |
| 2133 * instance-1.@OutputOnly |
| 2134 */ |
| 2135 core.String id; |
| 2136 /** Total memory in use (bytes).@OutputOnly */ |
| 2137 core.String memoryUsage; |
| 2138 /** |
| 2139 * Full path to the Instance resource in the API. Example: |
| 2140 * apps/myapp/services/default/versions/v1/instances/instance-1.@OutputOnly |
| 2141 */ |
| 2142 core.String name; |
| 2143 /** Average queries per second (QPS) over the last minute.@OutputOnly */ |
| 2144 core.double qps; |
| 2145 /** Number of requests since this instance was started.@OutputOnly */ |
| 2146 core.int requests; |
| 2147 /** Time that this instance was started.@OutputOnly */ |
| 2148 core.String startTime; |
| 2149 /** |
| 2150 * Whether this instance is in debug mode. Only applicable for instances in |
| 2151 * App Engine flexible environment.@OutputOnly |
| 2152 */ |
| 2153 core.bool vmDebugEnabled; |
| 2154 /** |
| 2155 * Virtual machine ID of this instance. Only applicable for instances in App |
| 2156 * Engine flexible environment.@OutputOnly |
| 2157 */ |
| 2158 core.String vmId; |
| 2159 /** |
| 2160 * The IP address of this instance. Only applicable for instances in App |
| 2161 * Engine flexible environment.@OutputOnly |
| 2162 */ |
| 2163 core.String vmIp; |
| 2164 /** |
| 2165 * Name of the virtual machine where this instance lives. Only applicable for |
| 2166 * instances in App Engine flexible environment.@OutputOnly |
| 2167 */ |
| 2168 core.String vmName; |
| 2169 /** |
| 2170 * Status of the virtual machine where this instance lives. Only applicable |
| 2171 * for instances in App Engine flexible environment.@OutputOnly |
| 2172 */ |
| 2173 core.String vmStatus; |
| 2174 /** |
| 2175 * Zone where the virtual machine is located. Only applicable for instances in |
| 2176 * App Engine flexible environment.@OutputOnly |
| 2177 */ |
| 2178 core.String vmZoneName; |
| 2179 |
| 2180 Instance(); |
| 2181 |
| 2182 Instance.fromJson(core.Map _json) { |
| 2183 if (_json.containsKey("appEngineRelease")) { |
| 2184 appEngineRelease = _json["appEngineRelease"]; |
| 2185 } |
| 2186 if (_json.containsKey("availability")) { |
| 2187 availability = _json["availability"]; |
| 2188 } |
| 2189 if (_json.containsKey("averageLatency")) { |
| 2190 averageLatency = _json["averageLatency"]; |
| 2191 } |
| 2192 if (_json.containsKey("errors")) { |
| 2193 errors = _json["errors"]; |
| 2194 } |
| 2195 if (_json.containsKey("id")) { |
| 2196 id = _json["id"]; |
| 2197 } |
| 2198 if (_json.containsKey("memoryUsage")) { |
| 2199 memoryUsage = _json["memoryUsage"]; |
| 2200 } |
| 2201 if (_json.containsKey("name")) { |
| 2202 name = _json["name"]; |
| 2203 } |
| 2204 if (_json.containsKey("qps")) { |
| 2205 qps = _json["qps"]; |
| 2206 } |
| 2207 if (_json.containsKey("requests")) { |
| 2208 requests = _json["requests"]; |
| 2209 } |
| 2210 if (_json.containsKey("startTime")) { |
| 2211 startTime = _json["startTime"]; |
| 2212 } |
| 2213 if (_json.containsKey("vmDebugEnabled")) { |
| 2214 vmDebugEnabled = _json["vmDebugEnabled"]; |
| 2215 } |
| 2216 if (_json.containsKey("vmId")) { |
| 2217 vmId = _json["vmId"]; |
| 2218 } |
| 2219 if (_json.containsKey("vmIp")) { |
| 2220 vmIp = _json["vmIp"]; |
| 2221 } |
| 2222 if (_json.containsKey("vmName")) { |
| 2223 vmName = _json["vmName"]; |
| 2224 } |
| 2225 if (_json.containsKey("vmStatus")) { |
| 2226 vmStatus = _json["vmStatus"]; |
| 2227 } |
| 2228 if (_json.containsKey("vmZoneName")) { |
| 2229 vmZoneName = _json["vmZoneName"]; |
| 2230 } |
| 2231 } |
| 2232 |
| 2233 core.Map toJson() { |
| 2234 var _json = new core.Map(); |
| 2235 if (appEngineRelease != null) { |
| 2236 _json["appEngineRelease"] = appEngineRelease; |
| 2237 } |
| 2238 if (availability != null) { |
| 2239 _json["availability"] = availability; |
| 2240 } |
| 2241 if (averageLatency != null) { |
| 2242 _json["averageLatency"] = averageLatency; |
| 2243 } |
| 2244 if (errors != null) { |
| 2245 _json["errors"] = errors; |
| 2246 } |
| 2247 if (id != null) { |
| 2248 _json["id"] = id; |
| 2249 } |
| 2250 if (memoryUsage != null) { |
| 2251 _json["memoryUsage"] = memoryUsage; |
| 2252 } |
| 2253 if (name != null) { |
| 2254 _json["name"] = name; |
| 2255 } |
| 2256 if (qps != null) { |
| 2257 _json["qps"] = qps; |
| 2258 } |
| 2259 if (requests != null) { |
| 2260 _json["requests"] = requests; |
| 2261 } |
| 2262 if (startTime != null) { |
| 2263 _json["startTime"] = startTime; |
| 2264 } |
| 2265 if (vmDebugEnabled != null) { |
| 2266 _json["vmDebugEnabled"] = vmDebugEnabled; |
| 2267 } |
| 2268 if (vmId != null) { |
| 2269 _json["vmId"] = vmId; |
| 2270 } |
| 2271 if (vmIp != null) { |
| 2272 _json["vmIp"] = vmIp; |
| 2273 } |
| 2274 if (vmName != null) { |
| 2275 _json["vmName"] = vmName; |
| 2276 } |
| 2277 if (vmStatus != null) { |
| 2278 _json["vmStatus"] = vmStatus; |
| 2279 } |
| 2280 if (vmZoneName != null) { |
| 2281 _json["vmZoneName"] = vmZoneName; |
| 2282 } |
| 2283 return _json; |
| 2284 } |
| 2285 } |
| 2286 |
| 2287 /** Third-party Python runtime library that is required by the application. */ |
| 2288 class Library { |
| 2289 /** Name of the library. Example: "django". */ |
| 2290 core.String name; |
| 2291 /** Version of the library to select, or "latest". */ |
| 2292 core.String version; |
| 2293 |
| 2294 Library(); |
| 2295 |
| 2296 Library.fromJson(core.Map _json) { |
| 2297 if (_json.containsKey("name")) { |
| 2298 name = _json["name"]; |
| 2299 } |
| 2300 if (_json.containsKey("version")) { |
| 2301 version = _json["version"]; |
| 2302 } |
| 2303 } |
| 2304 |
| 2305 core.Map toJson() { |
| 2306 var _json = new core.Map(); |
| 2307 if (name != null) { |
| 2308 _json["name"] = name; |
| 2309 } |
| 2310 if (version != null) { |
| 2311 _json["version"] = version; |
| 2312 } |
| 2313 return _json; |
| 2314 } |
| 2315 } |
| 2316 |
| 2317 /** Response message for Instances.ListInstances. */ |
| 2318 class ListInstancesResponse { |
| 2319 /** The instances belonging to the requested version. */ |
| 2320 core.List<Instance> instances; |
| 2321 /** Continuation token for fetching the next page of results. */ |
| 2322 core.String nextPageToken; |
| 2323 |
| 2324 ListInstancesResponse(); |
| 2325 |
| 2326 ListInstancesResponse.fromJson(core.Map _json) { |
| 2327 if (_json.containsKey("instances")) { |
| 2328 instances = _json["instances"].map((value) => new Instance.fromJson(value)
).toList(); |
| 2329 } |
| 2330 if (_json.containsKey("nextPageToken")) { |
| 2331 nextPageToken = _json["nextPageToken"]; |
| 2332 } |
| 2333 } |
| 2334 |
| 2335 core.Map toJson() { |
| 2336 var _json = new core.Map(); |
| 2337 if (instances != null) { |
| 2338 _json["instances"] = instances.map((value) => (value).toJson()).toList(); |
| 2339 } |
| 2340 if (nextPageToken != null) { |
| 2341 _json["nextPageToken"] = nextPageToken; |
| 2342 } |
| 2343 return _json; |
| 2344 } |
| 2345 } |
| 2346 |
| 2347 /** The response message for Locations.ListLocations. */ |
| 2348 class ListLocationsResponse { |
| 2349 /** A list of locations that matches the specified filter in the request. */ |
| 2350 core.List<Location> locations; |
| 2351 /** The standard List next-page token. */ |
| 2352 core.String nextPageToken; |
| 2353 |
| 2354 ListLocationsResponse(); |
| 2355 |
| 2356 ListLocationsResponse.fromJson(core.Map _json) { |
| 2357 if (_json.containsKey("locations")) { |
| 2358 locations = _json["locations"].map((value) => new Location.fromJson(value)
).toList(); |
| 2359 } |
| 2360 if (_json.containsKey("nextPageToken")) { |
| 2361 nextPageToken = _json["nextPageToken"]; |
| 2362 } |
| 2363 } |
| 2364 |
| 2365 core.Map toJson() { |
| 2366 var _json = new core.Map(); |
| 2367 if (locations != null) { |
| 2368 _json["locations"] = locations.map((value) => (value).toJson()).toList(); |
| 2369 } |
| 2370 if (nextPageToken != null) { |
| 2371 _json["nextPageToken"] = nextPageToken; |
| 2372 } |
| 2373 return _json; |
| 2374 } |
| 2375 } |
| 2376 |
| 2377 /** The response message for Operations.ListOperations. */ |
| 2378 class ListOperationsResponse { |
| 2379 /** The standard List next-page token. */ |
| 2380 core.String nextPageToken; |
| 2381 /** A list of operations that matches the specified filter in the request. */ |
| 2382 core.List<Operation> operations; |
| 2383 |
| 2384 ListOperationsResponse(); |
| 2385 |
| 2386 ListOperationsResponse.fromJson(core.Map _json) { |
| 2387 if (_json.containsKey("nextPageToken")) { |
| 2388 nextPageToken = _json["nextPageToken"]; |
| 2389 } |
| 2390 if (_json.containsKey("operations")) { |
| 2391 operations = _json["operations"].map((value) => new Operation.fromJson(val
ue)).toList(); |
| 2392 } |
| 2393 } |
| 2394 |
| 2395 core.Map toJson() { |
| 2396 var _json = new core.Map(); |
| 2397 if (nextPageToken != null) { |
| 2398 _json["nextPageToken"] = nextPageToken; |
| 2399 } |
| 2400 if (operations != null) { |
| 2401 _json["operations"] = operations.map((value) => (value).toJson()).toList()
; |
| 2402 } |
| 2403 return _json; |
| 2404 } |
| 2405 } |
| 2406 |
| 2407 /** Response message for Services.ListServices. */ |
| 2408 class ListServicesResponse { |
| 2409 /** Continuation token for fetching the next page of results. */ |
| 2410 core.String nextPageToken; |
| 2411 /** The services belonging to the requested application. */ |
| 2412 core.List<Service> services; |
| 2413 |
| 2414 ListServicesResponse(); |
| 2415 |
| 2416 ListServicesResponse.fromJson(core.Map _json) { |
| 2417 if (_json.containsKey("nextPageToken")) { |
| 2418 nextPageToken = _json["nextPageToken"]; |
| 2419 } |
| 2420 if (_json.containsKey("services")) { |
| 2421 services = _json["services"].map((value) => new Service.fromJson(value)).t
oList(); |
| 2422 } |
| 2423 } |
| 2424 |
| 2425 core.Map toJson() { |
| 2426 var _json = new core.Map(); |
| 2427 if (nextPageToken != null) { |
| 2428 _json["nextPageToken"] = nextPageToken; |
| 2429 } |
| 2430 if (services != null) { |
| 2431 _json["services"] = services.map((value) => (value).toJson()).toList(); |
| 2432 } |
| 2433 return _json; |
| 2434 } |
| 2435 } |
| 2436 |
| 2437 /** Response message for Versions.ListVersions. */ |
| 2438 class ListVersionsResponse { |
| 2439 /** Continuation token for fetching the next page of results. */ |
| 2440 core.String nextPageToken; |
| 2441 /** The versions belonging to the requested service. */ |
| 2442 core.List<Version> versions; |
| 2443 |
| 2444 ListVersionsResponse(); |
| 2445 |
| 2446 ListVersionsResponse.fromJson(core.Map _json) { |
| 2447 if (_json.containsKey("nextPageToken")) { |
| 2448 nextPageToken = _json["nextPageToken"]; |
| 2449 } |
| 2450 if (_json.containsKey("versions")) { |
| 2451 versions = _json["versions"].map((value) => new Version.fromJson(value)).t
oList(); |
| 2452 } |
| 2453 } |
| 2454 |
| 2455 core.Map toJson() { |
| 2456 var _json = new core.Map(); |
| 2457 if (nextPageToken != null) { |
| 2458 _json["nextPageToken"] = nextPageToken; |
| 2459 } |
| 2460 if (versions != null) { |
| 2461 _json["versions"] = versions.map((value) => (value).toJson()).toList(); |
| 2462 } |
| 2463 return _json; |
| 2464 } |
| 2465 } |
| 2466 |
| 2467 /** |
| 2468 * Health checking configuration for VM instances. Unhealthy instances are |
| 2469 * killed and replaced with new instances. |
| 2470 */ |
| 2471 class LivenessCheck { |
| 2472 /** Interval between health checks. */ |
| 2473 core.String checkInterval; |
| 2474 /** |
| 2475 * Number of consecutive successful checks required before considering the VM |
| 2476 * healthy. |
| 2477 */ |
| 2478 core.int healthyThreshold; |
| 2479 /** |
| 2480 * Host header to send when performing a HTTP Liveness check. Example: |
| 2481 * "myapp.appspot.com" |
| 2482 */ |
| 2483 core.String host; |
| 2484 /** The initial delay before starting to execute the checks. */ |
| 2485 core.String initialDelay; |
| 2486 /** The request path. */ |
| 2487 core.String path; |
| 2488 /** Time before the check is considered failed. */ |
| 2489 core.String timeout; |
| 2490 /** |
| 2491 * Number of consecutive failed checks required before considering the VM |
| 2492 * unhealthy. |
| 2493 */ |
| 2494 core.int unhealthyThreshold; |
| 2495 |
| 2496 LivenessCheck(); |
| 2497 |
| 2498 LivenessCheck.fromJson(core.Map _json) { |
| 2499 if (_json.containsKey("checkInterval")) { |
| 2500 checkInterval = _json["checkInterval"]; |
| 2501 } |
| 2502 if (_json.containsKey("healthyThreshold")) { |
| 2503 healthyThreshold = _json["healthyThreshold"]; |
| 2504 } |
| 2505 if (_json.containsKey("host")) { |
| 2506 host = _json["host"]; |
| 2507 } |
| 2508 if (_json.containsKey("initialDelay")) { |
| 2509 initialDelay = _json["initialDelay"]; |
| 2510 } |
| 2511 if (_json.containsKey("path")) { |
| 2512 path = _json["path"]; |
| 2513 } |
| 2514 if (_json.containsKey("timeout")) { |
| 2515 timeout = _json["timeout"]; |
| 2516 } |
| 2517 if (_json.containsKey("unhealthyThreshold")) { |
| 2518 unhealthyThreshold = _json["unhealthyThreshold"]; |
| 2519 } |
| 2520 } |
| 2521 |
| 2522 core.Map toJson() { |
| 2523 var _json = new core.Map(); |
| 2524 if (checkInterval != null) { |
| 2525 _json["checkInterval"] = checkInterval; |
| 2526 } |
| 2527 if (healthyThreshold != null) { |
| 2528 _json["healthyThreshold"] = healthyThreshold; |
| 2529 } |
| 2530 if (host != null) { |
| 2531 _json["host"] = host; |
| 2532 } |
| 2533 if (initialDelay != null) { |
| 2534 _json["initialDelay"] = initialDelay; |
| 2535 } |
| 2536 if (path != null) { |
| 2537 _json["path"] = path; |
| 2538 } |
| 2539 if (timeout != null) { |
| 2540 _json["timeout"] = timeout; |
| 2541 } |
| 2542 if (unhealthyThreshold != null) { |
| 2543 _json["unhealthyThreshold"] = unhealthyThreshold; |
| 2544 } |
| 2545 return _json; |
| 2546 } |
| 2547 } |
| 2548 |
| 2549 /** A resource that represents Google Cloud Platform location. */ |
| 2550 class Location { |
| 2551 /** |
| 2552 * Cross-service attributes for the location. For example |
| 2553 * {"cloud.googleapis.com/region": "us-east1"} |
| 2554 */ |
| 2555 core.Map<core.String, core.String> labels; |
| 2556 /** The canonical id for this location. For example: "us-east1". */ |
| 2557 core.String locationId; |
| 2558 /** |
| 2559 * Service-specific metadata. For example the available capacity at the given |
| 2560 * location. |
| 2561 * |
| 2562 * The values for Object must be JSON objects. It can consist of `num`, |
| 2563 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 2564 */ |
| 2565 core.Map<core.String, core.Object> metadata; |
| 2566 /** |
| 2567 * Resource name for the location, which may vary between implementations. For |
| 2568 * example: "projects/example-project/locations/us-east1" |
| 2569 */ |
| 2570 core.String name; |
| 2571 |
| 2572 Location(); |
| 2573 |
| 2574 Location.fromJson(core.Map _json) { |
| 2575 if (_json.containsKey("labels")) { |
| 2576 labels = _json["labels"]; |
| 2577 } |
| 2578 if (_json.containsKey("locationId")) { |
| 2579 locationId = _json["locationId"]; |
| 2580 } |
| 2581 if (_json.containsKey("metadata")) { |
| 2582 metadata = _json["metadata"]; |
| 2583 } |
| 2584 if (_json.containsKey("name")) { |
| 2585 name = _json["name"]; |
| 2586 } |
| 2587 } |
| 2588 |
| 2589 core.Map toJson() { |
| 2590 var _json = new core.Map(); |
| 2591 if (labels != null) { |
| 2592 _json["labels"] = labels; |
| 2593 } |
| 2594 if (locationId != null) { |
| 2595 _json["locationId"] = locationId; |
| 2596 } |
| 2597 if (metadata != null) { |
| 2598 _json["metadata"] = metadata; |
| 2599 } |
| 2600 if (name != null) { |
| 2601 _json["name"] = name; |
| 2602 } |
| 2603 return _json; |
| 2604 } |
| 2605 } |
| 2606 |
| 2607 /** Metadata for the given google.cloud.location.Location. */ |
| 2608 class LocationMetadata { |
| 2609 /** |
| 2610 * App Engine Flexible Environment is available in the given |
| 2611 * location.@OutputOnly |
| 2612 */ |
| 2613 core.bool flexibleEnvironmentAvailable; |
| 2614 /** |
| 2615 * App Engine Standard Environment is available in the given |
| 2616 * location.@OutputOnly |
| 2617 */ |
| 2618 core.bool standardEnvironmentAvailable; |
| 2619 |
| 2620 LocationMetadata(); |
| 2621 |
| 2622 LocationMetadata.fromJson(core.Map _json) { |
| 2623 if (_json.containsKey("flexibleEnvironmentAvailable")) { |
| 2624 flexibleEnvironmentAvailable = _json["flexibleEnvironmentAvailable"]; |
| 2625 } |
| 2626 if (_json.containsKey("standardEnvironmentAvailable")) { |
| 2627 standardEnvironmentAvailable = _json["standardEnvironmentAvailable"]; |
| 2628 } |
| 2629 } |
| 2630 |
| 2631 core.Map toJson() { |
| 2632 var _json = new core.Map(); |
| 2633 if (flexibleEnvironmentAvailable != null) { |
| 2634 _json["flexibleEnvironmentAvailable"] = flexibleEnvironmentAvailable; |
| 2635 } |
| 2636 if (standardEnvironmentAvailable != null) { |
| 2637 _json["standardEnvironmentAvailable"] = standardEnvironmentAvailable; |
| 2638 } |
| 2639 return _json; |
| 2640 } |
| 2641 } |
| 2642 |
| 2643 /** |
| 2644 * A service with manual scaling runs continuously, allowing you to perform |
| 2645 * complex initialization and rely on the state of its memory over time. |
| 2646 */ |
| 2647 class ManualScaling { |
| 2648 /** |
| 2649 * Number of instances to assign to the service at the start. This number can |
| 2650 * later be altered by using the Modules API |
| 2651 * (https://cloud.google.com/appengine/docs/python/modules/functions) |
| 2652 * set_num_instances() function. |
| 2653 */ |
| 2654 core.int instances; |
| 2655 |
| 2656 ManualScaling(); |
| 2657 |
| 2658 ManualScaling.fromJson(core.Map _json) { |
| 2659 if (_json.containsKey("instances")) { |
| 2660 instances = _json["instances"]; |
| 2661 } |
| 2662 } |
| 2663 |
| 2664 core.Map toJson() { |
| 2665 var _json = new core.Map(); |
| 2666 if (instances != null) { |
| 2667 _json["instances"] = instances; |
| 2668 } |
| 2669 return _json; |
| 2670 } |
| 2671 } |
| 2672 |
| 2673 /** Extra network settings. Only applicable for VM runtimes. */ |
| 2674 class Network { |
| 2675 /** |
| 2676 * List of ports, or port pairs, to forward from the virtual machine to the |
| 2677 * application container. |
| 2678 */ |
| 2679 core.List<core.String> forwardedPorts; |
| 2680 /** Tag to apply to the VM instance during creation. */ |
| 2681 core.String instanceTag; |
| 2682 /** |
| 2683 * Google Cloud Platform network where the virtual machines are created. |
| 2684 * Specify the short name, not the resource path.Defaults to default. |
| 2685 */ |
| 2686 core.String name; |
| 2687 /** |
| 2688 * Google Cloud Platform sub-network where the virtual machines are created. |
| 2689 * Specify the short name, not the resource path.If a subnetwork name is |
| 2690 * specified, a network name will also be required unless it is for the |
| 2691 * default network. |
| 2692 * If the network the VM instance is being created in is a Legacy network, |
| 2693 * then the IP address is allocated from the IPv4Range. |
| 2694 * If the network the VM instance is being created in is an auto Subnet Mode |
| 2695 * Network, then only network name should be specified (not the |
| 2696 * subnetwork_name) and the IP address is created from the IPCidrRange of the |
| 2697 * subnetwork that exists in that zone for that network. |
| 2698 * If the network the VM instance is being created in is a custom Subnet Mode |
| 2699 * Network, then the subnetwork_name must be specified and the IP address is |
| 2700 * created from the IPCidrRange of the subnetwork.If specified, the subnetwork |
| 2701 * must exist in the same region as the Flex app. |
| 2702 */ |
| 2703 core.String subnetworkName; |
| 2704 |
| 2705 Network(); |
| 2706 |
| 2707 Network.fromJson(core.Map _json) { |
| 2708 if (_json.containsKey("forwardedPorts")) { |
| 2709 forwardedPorts = _json["forwardedPorts"]; |
| 2710 } |
| 2711 if (_json.containsKey("instanceTag")) { |
| 2712 instanceTag = _json["instanceTag"]; |
| 2713 } |
| 2714 if (_json.containsKey("name")) { |
| 2715 name = _json["name"]; |
| 2716 } |
| 2717 if (_json.containsKey("subnetworkName")) { |
| 2718 subnetworkName = _json["subnetworkName"]; |
| 2719 } |
| 2720 } |
| 2721 |
| 2722 core.Map toJson() { |
| 2723 var _json = new core.Map(); |
| 2724 if (forwardedPorts != null) { |
| 2725 _json["forwardedPorts"] = forwardedPorts; |
| 2726 } |
| 2727 if (instanceTag != null) { |
| 2728 _json["instanceTag"] = instanceTag; |
| 2729 } |
| 2730 if (name != null) { |
| 2731 _json["name"] = name; |
| 2732 } |
| 2733 if (subnetworkName != null) { |
| 2734 _json["subnetworkName"] = subnetworkName; |
| 2735 } |
| 2736 return _json; |
| 2737 } |
| 2738 } |
| 2739 |
| 2740 /** Target scaling by network usage. Only applicable for VM runtimes. */ |
| 2741 class NetworkUtilization { |
| 2742 /** Target bytes received per second. */ |
| 2743 core.int targetReceivedBytesPerSecond; |
| 2744 /** Target packets received per second. */ |
| 2745 core.int targetReceivedPacketsPerSecond; |
| 2746 /** Target bytes sent per second. */ |
| 2747 core.int targetSentBytesPerSecond; |
| 2748 /** Target packets sent per second. */ |
| 2749 core.int targetSentPacketsPerSecond; |
| 2750 |
| 2751 NetworkUtilization(); |
| 2752 |
| 2753 NetworkUtilization.fromJson(core.Map _json) { |
| 2754 if (_json.containsKey("targetReceivedBytesPerSecond")) { |
| 2755 targetReceivedBytesPerSecond = _json["targetReceivedBytesPerSecond"]; |
| 2756 } |
| 2757 if (_json.containsKey("targetReceivedPacketsPerSecond")) { |
| 2758 targetReceivedPacketsPerSecond = _json["targetReceivedPacketsPerSecond"]; |
| 2759 } |
| 2760 if (_json.containsKey("targetSentBytesPerSecond")) { |
| 2761 targetSentBytesPerSecond = _json["targetSentBytesPerSecond"]; |
| 2762 } |
| 2763 if (_json.containsKey("targetSentPacketsPerSecond")) { |
| 2764 targetSentPacketsPerSecond = _json["targetSentPacketsPerSecond"]; |
| 2765 } |
| 2766 } |
| 2767 |
| 2768 core.Map toJson() { |
| 2769 var _json = new core.Map(); |
| 2770 if (targetReceivedBytesPerSecond != null) { |
| 2771 _json["targetReceivedBytesPerSecond"] = targetReceivedBytesPerSecond; |
| 2772 } |
| 2773 if (targetReceivedPacketsPerSecond != null) { |
| 2774 _json["targetReceivedPacketsPerSecond"] = targetReceivedPacketsPerSecond; |
| 2775 } |
| 2776 if (targetSentBytesPerSecond != null) { |
| 2777 _json["targetSentBytesPerSecond"] = targetSentBytesPerSecond; |
| 2778 } |
| 2779 if (targetSentPacketsPerSecond != null) { |
| 2780 _json["targetSentPacketsPerSecond"] = targetSentPacketsPerSecond; |
| 2781 } |
| 2782 return _json; |
| 2783 } |
| 2784 } |
| 2785 |
| 2786 /** |
| 2787 * This resource represents a long-running operation that is the result of a |
| 2788 * network API call. |
| 2789 */ |
| 2790 class Operation { |
| 2791 /** |
| 2792 * If the value is false, it means the operation is still in progress. If |
| 2793 * true, the operation is completed, and either error or response is |
| 2794 * available. |
| 2795 */ |
| 2796 core.bool done; |
| 2797 /** The error result of the operation in case of failure or cancellation. */ |
| 2798 Status error; |
| 2799 /** |
| 2800 * Service-specific metadata associated with the operation. It typically |
| 2801 * contains progress information and common metadata such as create time. Some |
| 2802 * services might not provide such metadata. Any method that returns a |
| 2803 * long-running operation should document the metadata type, if any. |
| 2804 * |
| 2805 * The values for Object must be JSON objects. It can consist of `num`, |
| 2806 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 2807 */ |
| 2808 core.Map<core.String, core.Object> metadata; |
| 2809 /** |
| 2810 * The server-assigned name, which is only unique within the same service that |
| 2811 * originally returns it. If you use the default HTTP mapping, the name should |
| 2812 * have the format of operations/some/unique/name. |
| 2813 */ |
| 2814 core.String name; |
| 2815 /** |
| 2816 * The normal response of the operation in case of success. If the original |
| 2817 * method returns no data on success, such as Delete, the response is |
| 2818 * google.protobuf.Empty. If the original method is standard |
| 2819 * Get/Create/Update, the response should be the resource. For other methods, |
| 2820 * the response should have the type XxxResponse, where Xxx is the original |
| 2821 * method name. For example, if the original method name is TakeSnapshot(), |
| 2822 * the inferred response type is TakeSnapshotResponse. |
| 2823 * |
| 2824 * The values for Object must be JSON objects. It can consist of `num`, |
| 2825 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 2826 */ |
| 2827 core.Map<core.String, core.Object> response; |
| 2828 |
| 2829 Operation(); |
| 2830 |
| 2831 Operation.fromJson(core.Map _json) { |
| 2832 if (_json.containsKey("done")) { |
| 2833 done = _json["done"]; |
| 2834 } |
| 2835 if (_json.containsKey("error")) { |
| 2836 error = new Status.fromJson(_json["error"]); |
| 2837 } |
| 2838 if (_json.containsKey("metadata")) { |
| 2839 metadata = _json["metadata"]; |
| 2840 } |
| 2841 if (_json.containsKey("name")) { |
| 2842 name = _json["name"]; |
| 2843 } |
| 2844 if (_json.containsKey("response")) { |
| 2845 response = _json["response"]; |
| 2846 } |
| 2847 } |
| 2848 |
| 2849 core.Map toJson() { |
| 2850 var _json = new core.Map(); |
| 2851 if (done != null) { |
| 2852 _json["done"] = done; |
| 2853 } |
| 2854 if (error != null) { |
| 2855 _json["error"] = (error).toJson(); |
| 2856 } |
| 2857 if (metadata != null) { |
| 2858 _json["metadata"] = metadata; |
| 2859 } |
| 2860 if (name != null) { |
| 2861 _json["name"] = name; |
| 2862 } |
| 2863 if (response != null) { |
| 2864 _json["response"] = response; |
| 2865 } |
| 2866 return _json; |
| 2867 } |
| 2868 } |
| 2869 |
| 2870 /** Metadata for the given google.longrunning.Operation. */ |
| 2871 class OperationMetadata { |
| 2872 /** Timestamp that this operation completed.@OutputOnly */ |
| 2873 core.String endTime; |
| 2874 /** Timestamp that this operation was created.@OutputOnly */ |
| 2875 core.String insertTime; |
| 2876 /** |
| 2877 * API method that initiated this operation. Example: |
| 2878 * google.appengine.v1beta4.Version.CreateVersion.@OutputOnly |
| 2879 */ |
| 2880 core.String method; |
| 2881 /** |
| 2882 * Type of this operation. Deprecated, use method field instead. Example: |
| 2883 * "create_version".@OutputOnly |
| 2884 */ |
| 2885 core.String operationType; |
| 2886 /** |
| 2887 * Name of the resource that this operation is acting on. Example: |
| 2888 * apps/myapp/modules/default.@OutputOnly |
| 2889 */ |
| 2890 core.String target; |
| 2891 /** User who requested this operation.@OutputOnly */ |
| 2892 core.String user; |
| 2893 |
| 2894 OperationMetadata(); |
| 2895 |
| 2896 OperationMetadata.fromJson(core.Map _json) { |
| 2897 if (_json.containsKey("endTime")) { |
| 2898 endTime = _json["endTime"]; |
| 2899 } |
| 2900 if (_json.containsKey("insertTime")) { |
| 2901 insertTime = _json["insertTime"]; |
| 2902 } |
| 2903 if (_json.containsKey("method")) { |
| 2904 method = _json["method"]; |
| 2905 } |
| 2906 if (_json.containsKey("operationType")) { |
| 2907 operationType = _json["operationType"]; |
| 2908 } |
| 2909 if (_json.containsKey("target")) { |
| 2910 target = _json["target"]; |
| 2911 } |
| 2912 if (_json.containsKey("user")) { |
| 2913 user = _json["user"]; |
| 2914 } |
| 2915 } |
| 2916 |
| 2917 core.Map toJson() { |
| 2918 var _json = new core.Map(); |
| 2919 if (endTime != null) { |
| 2920 _json["endTime"] = endTime; |
| 2921 } |
| 2922 if (insertTime != null) { |
| 2923 _json["insertTime"] = insertTime; |
| 2924 } |
| 2925 if (method != null) { |
| 2926 _json["method"] = method; |
| 2927 } |
| 2928 if (operationType != null) { |
| 2929 _json["operationType"] = operationType; |
| 2930 } |
| 2931 if (target != null) { |
| 2932 _json["target"] = target; |
| 2933 } |
| 2934 if (user != null) { |
| 2935 _json["user"] = user; |
| 2936 } |
| 2937 return _json; |
| 2938 } |
| 2939 } |
| 2940 |
| 2941 /** Metadata for the given google.longrunning.Operation. */ |
| 2942 class OperationMetadataExperimental { |
| 2943 /** Time that this operation completed.@OutputOnly */ |
| 2944 core.String endTime; |
| 2945 /** Time that this operation was created.@OutputOnly */ |
| 2946 core.String insertTime; |
| 2947 /** |
| 2948 * API method that initiated this operation. Example: |
| 2949 * google.appengine.experimental.CustomDomains.CreateCustomDomain.@OutputOnly |
| 2950 */ |
| 2951 core.String method; |
| 2952 /** |
| 2953 * Name of the resource that this operation is acting on. Example: |
| 2954 * apps/myapp/customDomains/example.com.@OutputOnly |
| 2955 */ |
| 2956 core.String target; |
| 2957 /** User who requested this operation.@OutputOnly */ |
| 2958 core.String user; |
| 2959 |
| 2960 OperationMetadataExperimental(); |
| 2961 |
| 2962 OperationMetadataExperimental.fromJson(core.Map _json) { |
| 2963 if (_json.containsKey("endTime")) { |
| 2964 endTime = _json["endTime"]; |
| 2965 } |
| 2966 if (_json.containsKey("insertTime")) { |
| 2967 insertTime = _json["insertTime"]; |
| 2968 } |
| 2969 if (_json.containsKey("method")) { |
| 2970 method = _json["method"]; |
| 2971 } |
| 2972 if (_json.containsKey("target")) { |
| 2973 target = _json["target"]; |
| 2974 } |
| 2975 if (_json.containsKey("user")) { |
| 2976 user = _json["user"]; |
| 2977 } |
| 2978 } |
| 2979 |
| 2980 core.Map toJson() { |
| 2981 var _json = new core.Map(); |
| 2982 if (endTime != null) { |
| 2983 _json["endTime"] = endTime; |
| 2984 } |
| 2985 if (insertTime != null) { |
| 2986 _json["insertTime"] = insertTime; |
| 2987 } |
| 2988 if (method != null) { |
| 2989 _json["method"] = method; |
| 2990 } |
| 2991 if (target != null) { |
| 2992 _json["target"] = target; |
| 2993 } |
| 2994 if (user != null) { |
| 2995 _json["user"] = user; |
| 2996 } |
| 2997 return _json; |
| 2998 } |
| 2999 } |
| 3000 |
| 3001 /** Metadata for the given google.longrunning.Operation. */ |
| 3002 class OperationMetadataV1 { |
| 3003 /** Time that this operation completed.@OutputOnly */ |
| 3004 core.String endTime; |
| 3005 /** |
| 3006 * Ephemeral message that may change every time the operation is polled. |
| 3007 * @OutputOnly |
| 3008 */ |
| 3009 core.String ephemeralMessage; |
| 3010 /** Time that this operation was created.@OutputOnly */ |
| 3011 core.String insertTime; |
| 3012 /** |
| 3013 * API method that initiated this operation. Example: |
| 3014 * google.appengine.v1.Versions.CreateVersion.@OutputOnly |
| 3015 */ |
| 3016 core.String method; |
| 3017 /** |
| 3018 * Name of the resource that this operation is acting on. Example: |
| 3019 * apps/myapp/services/default.@OutputOnly |
| 3020 */ |
| 3021 core.String target; |
| 3022 /** User who requested this operation.@OutputOnly */ |
| 3023 core.String user; |
| 3024 /** Durable messages that persist on every operation poll. @OutputOnly */ |
| 3025 core.List<core.String> warning; |
| 3026 |
| 3027 OperationMetadataV1(); |
| 3028 |
| 3029 OperationMetadataV1.fromJson(core.Map _json) { |
| 3030 if (_json.containsKey("endTime")) { |
| 3031 endTime = _json["endTime"]; |
| 3032 } |
| 3033 if (_json.containsKey("ephemeralMessage")) { |
| 3034 ephemeralMessage = _json["ephemeralMessage"]; |
| 3035 } |
| 3036 if (_json.containsKey("insertTime")) { |
| 3037 insertTime = _json["insertTime"]; |
| 3038 } |
| 3039 if (_json.containsKey("method")) { |
| 3040 method = _json["method"]; |
| 3041 } |
| 3042 if (_json.containsKey("target")) { |
| 3043 target = _json["target"]; |
| 3044 } |
| 3045 if (_json.containsKey("user")) { |
| 3046 user = _json["user"]; |
| 3047 } |
| 3048 if (_json.containsKey("warning")) { |
| 3049 warning = _json["warning"]; |
| 3050 } |
| 3051 } |
| 3052 |
| 3053 core.Map toJson() { |
| 3054 var _json = new core.Map(); |
| 3055 if (endTime != null) { |
| 3056 _json["endTime"] = endTime; |
| 3057 } |
| 3058 if (ephemeralMessage != null) { |
| 3059 _json["ephemeralMessage"] = ephemeralMessage; |
| 3060 } |
| 3061 if (insertTime != null) { |
| 3062 _json["insertTime"] = insertTime; |
| 3063 } |
| 3064 if (method != null) { |
| 3065 _json["method"] = method; |
| 3066 } |
| 3067 if (target != null) { |
| 3068 _json["target"] = target; |
| 3069 } |
| 3070 if (user != null) { |
| 3071 _json["user"] = user; |
| 3072 } |
| 3073 if (warning != null) { |
| 3074 _json["warning"] = warning; |
| 3075 } |
| 3076 return _json; |
| 3077 } |
| 3078 } |
| 3079 |
| 3080 /** Metadata for the given google.longrunning.Operation. */ |
| 3081 class OperationMetadataV1Alpha { |
| 3082 /** Time that this operation completed.@OutputOnly */ |
| 3083 core.String endTime; |
| 3084 /** |
| 3085 * Ephemeral message that may change every time the operation is polled. |
| 3086 * @OutputOnly |
| 3087 */ |
| 3088 core.String ephemeralMessage; |
| 3089 /** Time that this operation was created.@OutputOnly */ |
| 3090 core.String insertTime; |
| 3091 /** |
| 3092 * API method that initiated this operation. Example: |
| 3093 * google.appengine.v1alpha.Versions.CreateVersion.@OutputOnly |
| 3094 */ |
| 3095 core.String method; |
| 3096 /** |
| 3097 * Name of the resource that this operation is acting on. Example: |
| 3098 * apps/myapp/services/default.@OutputOnly |
| 3099 */ |
| 3100 core.String target; |
| 3101 /** User who requested this operation.@OutputOnly */ |
| 3102 core.String user; |
| 3103 /** Durable messages that persist on every operation poll. @OutputOnly */ |
| 3104 core.List<core.String> warning; |
| 3105 |
| 3106 OperationMetadataV1Alpha(); |
| 3107 |
| 3108 OperationMetadataV1Alpha.fromJson(core.Map _json) { |
| 3109 if (_json.containsKey("endTime")) { |
| 3110 endTime = _json["endTime"]; |
| 3111 } |
| 3112 if (_json.containsKey("ephemeralMessage")) { |
| 3113 ephemeralMessage = _json["ephemeralMessage"]; |
| 3114 } |
| 3115 if (_json.containsKey("insertTime")) { |
| 3116 insertTime = _json["insertTime"]; |
| 3117 } |
| 3118 if (_json.containsKey("method")) { |
| 3119 method = _json["method"]; |
| 3120 } |
| 3121 if (_json.containsKey("target")) { |
| 3122 target = _json["target"]; |
| 3123 } |
| 3124 if (_json.containsKey("user")) { |
| 3125 user = _json["user"]; |
| 3126 } |
| 3127 if (_json.containsKey("warning")) { |
| 3128 warning = _json["warning"]; |
| 3129 } |
| 3130 } |
| 3131 |
| 3132 core.Map toJson() { |
| 3133 var _json = new core.Map(); |
| 3134 if (endTime != null) { |
| 3135 _json["endTime"] = endTime; |
| 3136 } |
| 3137 if (ephemeralMessage != null) { |
| 3138 _json["ephemeralMessage"] = ephemeralMessage; |
| 3139 } |
| 3140 if (insertTime != null) { |
| 3141 _json["insertTime"] = insertTime; |
| 3142 } |
| 3143 if (method != null) { |
| 3144 _json["method"] = method; |
| 3145 } |
| 3146 if (target != null) { |
| 3147 _json["target"] = target; |
| 3148 } |
| 3149 if (user != null) { |
| 3150 _json["user"] = user; |
| 3151 } |
| 3152 if (warning != null) { |
| 3153 _json["warning"] = warning; |
| 3154 } |
| 3155 return _json; |
| 3156 } |
| 3157 } |
| 3158 |
| 3159 /** Metadata for the given google.longrunning.Operation. */ |
| 3160 class OperationMetadataV1Beta { |
| 3161 /** Time that this operation completed.@OutputOnly */ |
| 3162 core.String endTime; |
| 3163 /** |
| 3164 * Ephemeral message that may change every time the operation is polled. |
| 3165 * @OutputOnly |
| 3166 */ |
| 3167 core.String ephemeralMessage; |
| 3168 /** Time that this operation was created.@OutputOnly */ |
| 3169 core.String insertTime; |
| 3170 /** |
| 3171 * API method that initiated this operation. Example: |
| 3172 * google.appengine.v1beta.Versions.CreateVersion.@OutputOnly |
| 3173 */ |
| 3174 core.String method; |
| 3175 /** |
| 3176 * Name of the resource that this operation is acting on. Example: |
| 3177 * apps/myapp/services/default.@OutputOnly |
| 3178 */ |
| 3179 core.String target; |
| 3180 /** User who requested this operation.@OutputOnly */ |
| 3181 core.String user; |
| 3182 /** Durable messages that persist on every operation poll. @OutputOnly */ |
| 3183 core.List<core.String> warning; |
| 3184 |
| 3185 OperationMetadataV1Beta(); |
| 3186 |
| 3187 OperationMetadataV1Beta.fromJson(core.Map _json) { |
| 3188 if (_json.containsKey("endTime")) { |
| 3189 endTime = _json["endTime"]; |
| 3190 } |
| 3191 if (_json.containsKey("ephemeralMessage")) { |
| 3192 ephemeralMessage = _json["ephemeralMessage"]; |
| 3193 } |
| 3194 if (_json.containsKey("insertTime")) { |
| 3195 insertTime = _json["insertTime"]; |
| 3196 } |
| 3197 if (_json.containsKey("method")) { |
| 3198 method = _json["method"]; |
| 3199 } |
| 3200 if (_json.containsKey("target")) { |
| 3201 target = _json["target"]; |
| 3202 } |
| 3203 if (_json.containsKey("user")) { |
| 3204 user = _json["user"]; |
| 3205 } |
| 3206 if (_json.containsKey("warning")) { |
| 3207 warning = _json["warning"]; |
| 3208 } |
| 3209 } |
| 3210 |
| 3211 core.Map toJson() { |
| 3212 var _json = new core.Map(); |
| 3213 if (endTime != null) { |
| 3214 _json["endTime"] = endTime; |
| 3215 } |
| 3216 if (ephemeralMessage != null) { |
| 3217 _json["ephemeralMessage"] = ephemeralMessage; |
| 3218 } |
| 3219 if (insertTime != null) { |
| 3220 _json["insertTime"] = insertTime; |
| 3221 } |
| 3222 if (method != null) { |
| 3223 _json["method"] = method; |
| 3224 } |
| 3225 if (target != null) { |
| 3226 _json["target"] = target; |
| 3227 } |
| 3228 if (user != null) { |
| 3229 _json["user"] = user; |
| 3230 } |
| 3231 if (warning != null) { |
| 3232 _json["warning"] = warning; |
| 3233 } |
| 3234 return _json; |
| 3235 } |
| 3236 } |
| 3237 |
| 3238 /** Metadata for the given google.longrunning.Operation. */ |
| 3239 class OperationMetadataV1Beta5 { |
| 3240 /** Timestamp that this operation completed.@OutputOnly */ |
| 3241 core.String endTime; |
| 3242 /** Timestamp that this operation was created.@OutputOnly */ |
| 3243 core.String insertTime; |
| 3244 /** |
| 3245 * API method name that initiated this operation. Example: |
| 3246 * google.appengine.v1beta5.Version.CreateVersion.@OutputOnly |
| 3247 */ |
| 3248 core.String method; |
| 3249 /** |
| 3250 * Name of the resource that this operation is acting on. Example: |
| 3251 * apps/myapp/services/default.@OutputOnly |
| 3252 */ |
| 3253 core.String target; |
| 3254 /** User who requested this operation.@OutputOnly */ |
| 3255 core.String user; |
| 3256 |
| 3257 OperationMetadataV1Beta5(); |
| 3258 |
| 3259 OperationMetadataV1Beta5.fromJson(core.Map _json) { |
| 3260 if (_json.containsKey("endTime")) { |
| 3261 endTime = _json["endTime"]; |
| 3262 } |
| 3263 if (_json.containsKey("insertTime")) { |
| 3264 insertTime = _json["insertTime"]; |
| 3265 } |
| 3266 if (_json.containsKey("method")) { |
| 3267 method = _json["method"]; |
| 3268 } |
| 3269 if (_json.containsKey("target")) { |
| 3270 target = _json["target"]; |
| 3271 } |
| 3272 if (_json.containsKey("user")) { |
| 3273 user = _json["user"]; |
| 3274 } |
| 3275 } |
| 3276 |
| 3277 core.Map toJson() { |
| 3278 var _json = new core.Map(); |
| 3279 if (endTime != null) { |
| 3280 _json["endTime"] = endTime; |
| 3281 } |
| 3282 if (insertTime != null) { |
| 3283 _json["insertTime"] = insertTime; |
| 3284 } |
| 3285 if (method != null) { |
| 3286 _json["method"] = method; |
| 3287 } |
| 3288 if (target != null) { |
| 3289 _json["target"] = target; |
| 3290 } |
| 3291 if (user != null) { |
| 3292 _json["user"] = user; |
| 3293 } |
| 3294 return _json; |
| 3295 } |
| 3296 } |
| 3297 |
| 3298 /** |
| 3299 * Readiness checking configuration for VM instances. Unhealthy instances are |
| 3300 * removed from traffic rotation. |
| 3301 */ |
| 3302 class ReadinessCheck { |
| 3303 /** Interval between health checks. */ |
| 3304 core.String checkInterval; |
| 3305 /** |
| 3306 * Number of consecutive successful checks required before receiving traffic. |
| 3307 */ |
| 3308 core.int healthyThreshold; |
| 3309 /** |
| 3310 * Host header to send when performing a HTTP Readiness check. Example: |
| 3311 * "myapp.appspot.com" |
| 3312 */ |
| 3313 core.String host; |
| 3314 /** The request path. */ |
| 3315 core.String path; |
| 3316 /** Time before the check is considered failed. */ |
| 3317 core.String timeout; |
| 3318 /** Number of consecutive failed checks required before removing traffic. */ |
| 3319 core.int unhealthyThreshold; |
| 3320 |
| 3321 ReadinessCheck(); |
| 3322 |
| 3323 ReadinessCheck.fromJson(core.Map _json) { |
| 3324 if (_json.containsKey("checkInterval")) { |
| 3325 checkInterval = _json["checkInterval"]; |
| 3326 } |
| 3327 if (_json.containsKey("healthyThreshold")) { |
| 3328 healthyThreshold = _json["healthyThreshold"]; |
| 3329 } |
| 3330 if (_json.containsKey("host")) { |
| 3331 host = _json["host"]; |
| 3332 } |
| 3333 if (_json.containsKey("path")) { |
| 3334 path = _json["path"]; |
| 3335 } |
| 3336 if (_json.containsKey("timeout")) { |
| 3337 timeout = _json["timeout"]; |
| 3338 } |
| 3339 if (_json.containsKey("unhealthyThreshold")) { |
| 3340 unhealthyThreshold = _json["unhealthyThreshold"]; |
| 3341 } |
| 3342 } |
| 3343 |
| 3344 core.Map toJson() { |
| 3345 var _json = new core.Map(); |
| 3346 if (checkInterval != null) { |
| 3347 _json["checkInterval"] = checkInterval; |
| 3348 } |
| 3349 if (healthyThreshold != null) { |
| 3350 _json["healthyThreshold"] = healthyThreshold; |
| 3351 } |
| 3352 if (host != null) { |
| 3353 _json["host"] = host; |
| 3354 } |
| 3355 if (path != null) { |
| 3356 _json["path"] = path; |
| 3357 } |
| 3358 if (timeout != null) { |
| 3359 _json["timeout"] = timeout; |
| 3360 } |
| 3361 if (unhealthyThreshold != null) { |
| 3362 _json["unhealthyThreshold"] = unhealthyThreshold; |
| 3363 } |
| 3364 return _json; |
| 3365 } |
| 3366 } |
| 3367 |
| 3368 /** Request message for 'Applications.RepairApplication'. */ |
| 3369 class RepairApplicationRequest { |
| 3370 |
| 3371 RepairApplicationRequest(); |
| 3372 |
| 3373 RepairApplicationRequest.fromJson(core.Map _json) { |
| 3374 } |
| 3375 |
| 3376 core.Map toJson() { |
| 3377 var _json = new core.Map(); |
| 3378 return _json; |
| 3379 } |
| 3380 } |
| 3381 |
| 3382 /** Target scaling by request utilization. Only applicable for VM runtimes. */ |
| 3383 class RequestUtilization { |
| 3384 /** Target number of concurrent requests. */ |
| 3385 core.int targetConcurrentRequests; |
| 3386 /** Target requests per second. */ |
| 3387 core.int targetRequestCountPerSecond; |
| 3388 |
| 3389 RequestUtilization(); |
| 3390 |
| 3391 RequestUtilization.fromJson(core.Map _json) { |
| 3392 if (_json.containsKey("targetConcurrentRequests")) { |
| 3393 targetConcurrentRequests = _json["targetConcurrentRequests"]; |
| 3394 } |
| 3395 if (_json.containsKey("targetRequestCountPerSecond")) { |
| 3396 targetRequestCountPerSecond = _json["targetRequestCountPerSecond"]; |
| 3397 } |
| 3398 } |
| 3399 |
| 3400 core.Map toJson() { |
| 3401 var _json = new core.Map(); |
| 3402 if (targetConcurrentRequests != null) { |
| 3403 _json["targetConcurrentRequests"] = targetConcurrentRequests; |
| 3404 } |
| 3405 if (targetRequestCountPerSecond != null) { |
| 3406 _json["targetRequestCountPerSecond"] = targetRequestCountPerSecond; |
| 3407 } |
| 3408 return _json; |
| 3409 } |
| 3410 } |
| 3411 |
| 3412 /** Machine resources for a version. */ |
| 3413 class Resources { |
| 3414 /** Number of CPU cores needed. */ |
| 3415 core.double cpu; |
| 3416 /** Disk size (GB) needed. */ |
| 3417 core.double diskGb; |
| 3418 /** Memory (GB) needed. */ |
| 3419 core.double memoryGb; |
| 3420 /** User specified volumes. */ |
| 3421 core.List<Volume> volumes; |
| 3422 |
| 3423 Resources(); |
| 3424 |
| 3425 Resources.fromJson(core.Map _json) { |
| 3426 if (_json.containsKey("cpu")) { |
| 3427 cpu = _json["cpu"]; |
| 3428 } |
| 3429 if (_json.containsKey("diskGb")) { |
| 3430 diskGb = _json["diskGb"]; |
| 3431 } |
| 3432 if (_json.containsKey("memoryGb")) { |
| 3433 memoryGb = _json["memoryGb"]; |
| 3434 } |
| 3435 if (_json.containsKey("volumes")) { |
| 3436 volumes = _json["volumes"].map((value) => new Volume.fromJson(value)).toLi
st(); |
| 3437 } |
| 3438 } |
| 3439 |
| 3440 core.Map toJson() { |
| 3441 var _json = new core.Map(); |
| 3442 if (cpu != null) { |
| 3443 _json["cpu"] = cpu; |
| 3444 } |
| 3445 if (diskGb != null) { |
| 3446 _json["diskGb"] = diskGb; |
| 3447 } |
| 3448 if (memoryGb != null) { |
| 3449 _json["memoryGb"] = memoryGb; |
| 3450 } |
| 3451 if (volumes != null) { |
| 3452 _json["volumes"] = volumes.map((value) => (value).toJson()).toList(); |
| 3453 } |
| 3454 return _json; |
| 3455 } |
| 3456 } |
| 3457 |
| 3458 /** Executes a script to handle the request that matches the URL pattern. */ |
| 3459 class ScriptHandler { |
| 3460 /** Path to the script from the application root directory. */ |
| 3461 core.String scriptPath; |
| 3462 |
| 3463 ScriptHandler(); |
| 3464 |
| 3465 ScriptHandler.fromJson(core.Map _json) { |
| 3466 if (_json.containsKey("scriptPath")) { |
| 3467 scriptPath = _json["scriptPath"]; |
| 3468 } |
| 3469 } |
| 3470 |
| 3471 core.Map toJson() { |
| 3472 var _json = new core.Map(); |
| 3473 if (scriptPath != null) { |
| 3474 _json["scriptPath"] = scriptPath; |
| 3475 } |
| 3476 return _json; |
| 3477 } |
| 3478 } |
| 3479 |
| 3480 /** |
| 3481 * A Service resource is a logical component of an application that can share |
| 3482 * state and communicate in a secure fashion with other services. For example, |
| 3483 * an application that handles customer requests might include separate services |
| 3484 * to handle tasks such as backend data analysis or API requests from mobile |
| 3485 * devices. Each service has a collection of versions that define a specific set |
| 3486 * of code used to implement the functionality of that service. |
| 3487 */ |
| 3488 class Service { |
| 3489 /** |
| 3490 * Relative name of the service within the application. Example: |
| 3491 * default.@OutputOnly |
| 3492 */ |
| 3493 core.String id; |
| 3494 /** |
| 3495 * Full path to the Service resource in the API. Example: |
| 3496 * apps/myapp/services/default.@OutputOnly |
| 3497 */ |
| 3498 core.String name; |
| 3499 /** |
| 3500 * Mapping that defines fractional HTTP traffic diversion to different |
| 3501 * versions within the service. |
| 3502 */ |
| 3503 TrafficSplit split; |
| 3504 |
| 3505 Service(); |
| 3506 |
| 3507 Service.fromJson(core.Map _json) { |
| 3508 if (_json.containsKey("id")) { |
| 3509 id = _json["id"]; |
| 3510 } |
| 3511 if (_json.containsKey("name")) { |
| 3512 name = _json["name"]; |
| 3513 } |
| 3514 if (_json.containsKey("split")) { |
| 3515 split = new TrafficSplit.fromJson(_json["split"]); |
| 3516 } |
| 3517 } |
| 3518 |
| 3519 core.Map toJson() { |
| 3520 var _json = new core.Map(); |
| 3521 if (id != null) { |
| 3522 _json["id"] = id; |
| 3523 } |
| 3524 if (name != null) { |
| 3525 _json["name"] = name; |
| 3526 } |
| 3527 if (split != null) { |
| 3528 _json["split"] = (split).toJson(); |
| 3529 } |
| 3530 return _json; |
| 3531 } |
| 3532 } |
| 3533 |
| 3534 /** |
| 3535 * Files served directly to the user for a given URL, such as images, CSS |
| 3536 * stylesheets, or JavaScript source files. Static file handlers describe which |
| 3537 * files in the application directory are static files, and which URLs serve |
| 3538 * them. |
| 3539 */ |
| 3540 class StaticFilesHandler { |
| 3541 /** |
| 3542 * Whether files should also be uploaded as code data. By default, files |
| 3543 * declared in static file handlers are uploaded as static data and are only |
| 3544 * served to end users; they cannot be read by the application. If enabled, |
| 3545 * uploads are charged against both your code and static data storage resource |
| 3546 * quotas. |
| 3547 */ |
| 3548 core.bool applicationReadable; |
| 3549 /** |
| 3550 * Time a static file served by this handler should be cached by web proxies |
| 3551 * and browsers. |
| 3552 */ |
| 3553 core.String expiration; |
| 3554 /** HTTP headers to use for all responses from these URLs. */ |
| 3555 core.Map<core.String, core.String> httpHeaders; |
| 3556 /** |
| 3557 * MIME type used to serve all files served by this handler.Defaults to |
| 3558 * file-specific MIME types, which are derived from each file's filename |
| 3559 * extension. |
| 3560 */ |
| 3561 core.String mimeType; |
| 3562 /** |
| 3563 * Path to the static files matched by the URL pattern, from the application |
| 3564 * root directory. The path can refer to text matched in groupings in the URL |
| 3565 * pattern. |
| 3566 */ |
| 3567 core.String path; |
| 3568 /** |
| 3569 * Whether this handler should match the request if the file referenced by the |
| 3570 * handler does not exist. |
| 3571 */ |
| 3572 core.bool requireMatchingFile; |
| 3573 /** |
| 3574 * Regular expression that matches the file paths for all files that should be |
| 3575 * referenced by this handler. |
| 3576 */ |
| 3577 core.String uploadPathRegex; |
| 3578 |
| 3579 StaticFilesHandler(); |
| 3580 |
| 3581 StaticFilesHandler.fromJson(core.Map _json) { |
| 3582 if (_json.containsKey("applicationReadable")) { |
| 3583 applicationReadable = _json["applicationReadable"]; |
| 3584 } |
| 3585 if (_json.containsKey("expiration")) { |
| 3586 expiration = _json["expiration"]; |
| 3587 } |
| 3588 if (_json.containsKey("httpHeaders")) { |
| 3589 httpHeaders = _json["httpHeaders"]; |
| 3590 } |
| 3591 if (_json.containsKey("mimeType")) { |
| 3592 mimeType = _json["mimeType"]; |
| 3593 } |
| 3594 if (_json.containsKey("path")) { |
| 3595 path = _json["path"]; |
| 3596 } |
| 3597 if (_json.containsKey("requireMatchingFile")) { |
| 3598 requireMatchingFile = _json["requireMatchingFile"]; |
| 3599 } |
| 3600 if (_json.containsKey("uploadPathRegex")) { |
| 3601 uploadPathRegex = _json["uploadPathRegex"]; |
| 3602 } |
| 3603 } |
| 3604 |
| 3605 core.Map toJson() { |
| 3606 var _json = new core.Map(); |
| 3607 if (applicationReadable != null) { |
| 3608 _json["applicationReadable"] = applicationReadable; |
| 3609 } |
| 3610 if (expiration != null) { |
| 3611 _json["expiration"] = expiration; |
| 3612 } |
| 3613 if (httpHeaders != null) { |
| 3614 _json["httpHeaders"] = httpHeaders; |
| 3615 } |
| 3616 if (mimeType != null) { |
| 3617 _json["mimeType"] = mimeType; |
| 3618 } |
| 3619 if (path != null) { |
| 3620 _json["path"] = path; |
| 3621 } |
| 3622 if (requireMatchingFile != null) { |
| 3623 _json["requireMatchingFile"] = requireMatchingFile; |
| 3624 } |
| 3625 if (uploadPathRegex != null) { |
| 3626 _json["uploadPathRegex"] = uploadPathRegex; |
| 3627 } |
| 3628 return _json; |
| 3629 } |
| 3630 } |
| 3631 |
| 3632 /** |
| 3633 * The Status type defines a logical error model that is suitable for different |
| 3634 * programming environments, including REST APIs and RPC APIs. It is used by |
| 3635 * gRPC (https://github.com/grpc). The error model is designed to be: |
| 3636 * Simple to use and understand for most users |
| 3637 * Flexible enough to meet unexpected needsOverviewThe Status message contains |
| 3638 * three pieces of data: error code, error message, and error details. The error |
| 3639 * code should be an enum value of google.rpc.Code, but it may accept additional |
| 3640 * error codes if needed. The error message should be a developer-facing English |
| 3641 * message that helps developers understand and resolve the error. If a |
| 3642 * localized user-facing error message is needed, put the localized message in |
| 3643 * the error details or localize it in the client. The optional error details |
| 3644 * may contain arbitrary information about the error. There is a predefined set |
| 3645 * of error detail types in the package google.rpc which can be used for common |
| 3646 * error conditions.Language mappingThe Status message is the logical |
| 3647 * representation of the error model, but it is not necessarily the actual wire |
| 3648 * format. When the Status message is exposed in different client libraries and |
| 3649 * different wire protocols, it can be mapped differently. For example, it will |
| 3650 * likely be mapped to some exceptions in Java, but more likely mapped to some |
| 3651 * error codes in C.Other usesThe error model and the Status message can be used |
| 3652 * in a variety of environments, either with or without APIs, to provide a |
| 3653 * consistent developer experience across different environments.Example uses of |
| 3654 * this error model include: |
| 3655 * Partial errors. If a service needs to return partial errors to the client, it |
| 3656 * may embed the Status in the normal response to indicate the partial errors. |
| 3657 * Workflow errors. A typical workflow has multiple steps. Each step may have a |
| 3658 * Status message for error reporting purpose. |
| 3659 * Batch operations. If a client uses batch request and batch response, the |
| 3660 * Status message should be used directly inside batch response, one for each |
| 3661 * error sub-response. |
| 3662 * Asynchronous operations. If an API call embeds asynchronous operation results |
| 3663 * in its response, the status of those operations should be represented |
| 3664 * directly using the Status message. |
| 3665 * Logging. If some API errors are stored in logs, the message Status could be |
| 3666 * used directly after any stripping needed for security/privacy reasons. |
| 3667 */ |
| 3668 class Status { |
| 3669 /** The status code, which should be an enum value of google.rpc.Code. */ |
| 3670 core.int code; |
| 3671 /** |
| 3672 * A list of messages that carry the error details. There will be a common set |
| 3673 * of message types for APIs to use. |
| 3674 * |
| 3675 * The values for Object must be JSON objects. It can consist of `num`, |
| 3676 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 3677 */ |
| 3678 core.List<core.Map<core.String, core.Object>> details; |
| 3679 /** |
| 3680 * A developer-facing error message, which should be in English. Any |
| 3681 * user-facing error message should be localized and sent in the |
| 3682 * google.rpc.Status.details field, or localized by the client. |
| 3683 */ |
| 3684 core.String message; |
| 3685 |
| 3686 Status(); |
| 3687 |
| 3688 Status.fromJson(core.Map _json) { |
| 3689 if (_json.containsKey("code")) { |
| 3690 code = _json["code"]; |
| 3691 } |
| 3692 if (_json.containsKey("details")) { |
| 3693 details = _json["details"]; |
| 3694 } |
| 3695 if (_json.containsKey("message")) { |
| 3696 message = _json["message"]; |
| 3697 } |
| 3698 } |
| 3699 |
| 3700 core.Map toJson() { |
| 3701 var _json = new core.Map(); |
| 3702 if (code != null) { |
| 3703 _json["code"] = code; |
| 3704 } |
| 3705 if (details != null) { |
| 3706 _json["details"] = details; |
| 3707 } |
| 3708 if (message != null) { |
| 3709 _json["message"] = message; |
| 3710 } |
| 3711 return _json; |
| 3712 } |
| 3713 } |
| 3714 |
| 3715 /** |
| 3716 * Traffic routing configuration for versions within a single service. Traffic |
| 3717 * splits define how traffic directed to the service is assigned to versions. |
| 3718 */ |
| 3719 class TrafficSplit { |
| 3720 /** |
| 3721 * Mapping from version IDs within the service to fractional (0.000, 1] |
| 3722 * allocations of traffic for that version. Each version can be specified only |
| 3723 * once, but some versions in the service may not have any traffic allocation. |
| 3724 * Services that have traffic allocated cannot be deleted until either the |
| 3725 * service is deleted or their traffic allocation is removed. Allocations must |
| 3726 * sum to 1. Up to two decimal place precision is supported for IP-based |
| 3727 * splits and up to three decimal places is supported for cookie-based splits. |
| 3728 */ |
| 3729 core.Map<core.String, core.double> allocations; |
| 3730 /** |
| 3731 * Mechanism used to determine which version a request is sent to. The traffic |
| 3732 * selection algorithm will be stable for either type until allocations are |
| 3733 * changed. |
| 3734 * Possible string values are: |
| 3735 * - "UNSPECIFIED" : Diversion method unspecified. |
| 3736 * - "COOKIE" : Diversion based on a specially named cookie, "GOOGAPPUID." The |
| 3737 * cookie must be set by the application itself or no diversion will occur. |
| 3738 * - "IP" : Diversion based on applying the modulus operation to a fingerprint |
| 3739 * of the IP address. |
| 3740 */ |
| 3741 core.String shardBy; |
| 3742 |
| 3743 TrafficSplit(); |
| 3744 |
| 3745 TrafficSplit.fromJson(core.Map _json) { |
| 3746 if (_json.containsKey("allocations")) { |
| 3747 allocations = _json["allocations"]; |
| 3748 } |
| 3749 if (_json.containsKey("shardBy")) { |
| 3750 shardBy = _json["shardBy"]; |
| 3751 } |
| 3752 } |
| 3753 |
| 3754 core.Map toJson() { |
| 3755 var _json = new core.Map(); |
| 3756 if (allocations != null) { |
| 3757 _json["allocations"] = allocations; |
| 3758 } |
| 3759 if (shardBy != null) { |
| 3760 _json["shardBy"] = shardBy; |
| 3761 } |
| 3762 return _json; |
| 3763 } |
| 3764 } |
| 3765 |
| 3766 /** Rules to match an HTTP request and dispatch that request to a service. */ |
| 3767 class UrlDispatchRule { |
| 3768 /** |
| 3769 * Domain name to match against. The wildcard "*" is supported if specified |
| 3770 * before a period: "*.".Defaults to matching all domains: "*". |
| 3771 */ |
| 3772 core.String domain; |
| 3773 /** |
| 3774 * Pathname within the host. Must start with a "/". A single "*" can be |
| 3775 * included at the end of the path. The sum of the lengths of the domain and |
| 3776 * path may not exceed 100 characters. |
| 3777 */ |
| 3778 core.String path; |
| 3779 /** |
| 3780 * Resource ID of a service in this application that should serve the matched |
| 3781 * request. The service must already exist. Example: default. |
| 3782 */ |
| 3783 core.String service; |
| 3784 |
| 3785 UrlDispatchRule(); |
| 3786 |
| 3787 UrlDispatchRule.fromJson(core.Map _json) { |
| 3788 if (_json.containsKey("domain")) { |
| 3789 domain = _json["domain"]; |
| 3790 } |
| 3791 if (_json.containsKey("path")) { |
| 3792 path = _json["path"]; |
| 3793 } |
| 3794 if (_json.containsKey("service")) { |
| 3795 service = _json["service"]; |
| 3796 } |
| 3797 } |
| 3798 |
| 3799 core.Map toJson() { |
| 3800 var _json = new core.Map(); |
| 3801 if (domain != null) { |
| 3802 _json["domain"] = domain; |
| 3803 } |
| 3804 if (path != null) { |
| 3805 _json["path"] = path; |
| 3806 } |
| 3807 if (service != null) { |
| 3808 _json["service"] = service; |
| 3809 } |
| 3810 return _json; |
| 3811 } |
| 3812 } |
| 3813 |
| 3814 /** |
| 3815 * URL pattern and description of how the URL should be handled. App Engine can |
| 3816 * handle URLs by executing application code or by serving static files uploaded |
| 3817 * with the version, such as images, CSS, or JavaScript. |
| 3818 */ |
| 3819 class UrlMap { |
| 3820 /** Uses API Endpoints to handle requests. */ |
| 3821 ApiEndpointHandler apiEndpoint; |
| 3822 /** |
| 3823 * Action to take when users access resources that require authentication. |
| 3824 * Defaults to redirect. |
| 3825 * Possible string values are: |
| 3826 * - "AUTH_FAIL_ACTION_UNSPECIFIED" : Not specified. AUTH_FAIL_ACTION_REDIRECT |
| 3827 * is assumed. |
| 3828 * - "AUTH_FAIL_ACTION_REDIRECT" : Redirects user to "accounts.google.com". |
| 3829 * The user is redirected back to the application URL after signing in or |
| 3830 * creating an account. |
| 3831 * - "AUTH_FAIL_ACTION_UNAUTHORIZED" : Rejects request with a 401 HTTP status |
| 3832 * code and an error message. |
| 3833 */ |
| 3834 core.String authFailAction; |
| 3835 /** |
| 3836 * Level of login required to access this resource. |
| 3837 * Possible string values are: |
| 3838 * - "LOGIN_UNSPECIFIED" : Not specified. LOGIN_OPTIONAL is assumed. |
| 3839 * - "LOGIN_OPTIONAL" : Does not require that the user is signed in. |
| 3840 * - "LOGIN_ADMIN" : If the user is not signed in, the auth_fail_action is |
| 3841 * taken. In addition, if the user is not an administrator for the |
| 3842 * application, they are given an error message regardless of |
| 3843 * auth_fail_action. If the user is an administrator, the handler proceeds. |
| 3844 * - "LOGIN_REQUIRED" : If the user has signed in, the handler proceeds |
| 3845 * normally. Otherwise, the auth_fail_action is taken. |
| 3846 */ |
| 3847 core.String login; |
| 3848 /** |
| 3849 * 30x code to use when performing redirects for the secure field. Defaults to |
| 3850 * 302. |
| 3851 * Possible string values are: |
| 3852 * - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" : Not specified. 302 is |
| 3853 * assumed. |
| 3854 * - "REDIRECT_HTTP_RESPONSE_CODE_301" : 301 Moved Permanently code. |
| 3855 * - "REDIRECT_HTTP_RESPONSE_CODE_302" : 302 Moved Temporarily code. |
| 3856 * - "REDIRECT_HTTP_RESPONSE_CODE_303" : 303 See Other code. |
| 3857 * - "REDIRECT_HTTP_RESPONSE_CODE_307" : 307 Temporary Redirect code. |
| 3858 */ |
| 3859 core.String redirectHttpResponseCode; |
| 3860 /** Executes a script to handle the request that matches this URL pattern. */ |
| 3861 ScriptHandler script; |
| 3862 /** |
| 3863 * Security (HTTPS) enforcement for this URL. |
| 3864 * Possible string values are: |
| 3865 * - "SECURE_UNSPECIFIED" : Not specified. |
| 3866 * - "SECURE_DEFAULT" : Both HTTP and HTTPS requests with URLs that match the |
| 3867 * handler succeed without redirects. The application can examine the request |
| 3868 * to determine which protocol was used, and respond accordingly. |
| 3869 * - "SECURE_NEVER" : Requests for a URL that match this handler that use |
| 3870 * HTTPS are automatically redirected to the HTTP equivalent URL. |
| 3871 * - "SECURE_OPTIONAL" : Both HTTP and HTTPS requests with URLs that match the |
| 3872 * handler succeed without redirects. The application can examine the request |
| 3873 * to determine which protocol was used and respond accordingly. |
| 3874 * - "SECURE_ALWAYS" : Requests for a URL that match this handler that do not |
| 3875 * use HTTPS are automatically redirected to the HTTPS URL with the same path. |
| 3876 * Query parameters are reserved for the redirect. |
| 3877 */ |
| 3878 core.String securityLevel; |
| 3879 /** Returns the contents of a file, such as an image, as the response. */ |
| 3880 StaticFilesHandler staticFiles; |
| 3881 /** |
| 3882 * URL prefix. Uses regular expression syntax, which means regexp special |
| 3883 * characters must be escaped, but should not contain groupings. All URLs that |
| 3884 * begin with this prefix are handled by this handler, using the portion of |
| 3885 * the URL after the prefix as part of the file path. |
| 3886 */ |
| 3887 core.String urlRegex; |
| 3888 |
| 3889 UrlMap(); |
| 3890 |
| 3891 UrlMap.fromJson(core.Map _json) { |
| 3892 if (_json.containsKey("apiEndpoint")) { |
| 3893 apiEndpoint = new ApiEndpointHandler.fromJson(_json["apiEndpoint"]); |
| 3894 } |
| 3895 if (_json.containsKey("authFailAction")) { |
| 3896 authFailAction = _json["authFailAction"]; |
| 3897 } |
| 3898 if (_json.containsKey("login")) { |
| 3899 login = _json["login"]; |
| 3900 } |
| 3901 if (_json.containsKey("redirectHttpResponseCode")) { |
| 3902 redirectHttpResponseCode = _json["redirectHttpResponseCode"]; |
| 3903 } |
| 3904 if (_json.containsKey("script")) { |
| 3905 script = new ScriptHandler.fromJson(_json["script"]); |
| 3906 } |
| 3907 if (_json.containsKey("securityLevel")) { |
| 3908 securityLevel = _json["securityLevel"]; |
| 3909 } |
| 3910 if (_json.containsKey("staticFiles")) { |
| 3911 staticFiles = new StaticFilesHandler.fromJson(_json["staticFiles"]); |
| 3912 } |
| 3913 if (_json.containsKey("urlRegex")) { |
| 3914 urlRegex = _json["urlRegex"]; |
| 3915 } |
| 3916 } |
| 3917 |
| 3918 core.Map toJson() { |
| 3919 var _json = new core.Map(); |
| 3920 if (apiEndpoint != null) { |
| 3921 _json["apiEndpoint"] = (apiEndpoint).toJson(); |
| 3922 } |
| 3923 if (authFailAction != null) { |
| 3924 _json["authFailAction"] = authFailAction; |
| 3925 } |
| 3926 if (login != null) { |
| 3927 _json["login"] = login; |
| 3928 } |
| 3929 if (redirectHttpResponseCode != null) { |
| 3930 _json["redirectHttpResponseCode"] = redirectHttpResponseCode; |
| 3931 } |
| 3932 if (script != null) { |
| 3933 _json["script"] = (script).toJson(); |
| 3934 } |
| 3935 if (securityLevel != null) { |
| 3936 _json["securityLevel"] = securityLevel; |
| 3937 } |
| 3938 if (staticFiles != null) { |
| 3939 _json["staticFiles"] = (staticFiles).toJson(); |
| 3940 } |
| 3941 if (urlRegex != null) { |
| 3942 _json["urlRegex"] = urlRegex; |
| 3943 } |
| 3944 return _json; |
| 3945 } |
| 3946 } |
| 3947 |
| 3948 /** |
| 3949 * A Version resource is a specific set of source code and configuration files |
| 3950 * that are deployed into a service. |
| 3951 */ |
| 3952 class Version { |
| 3953 /** |
| 3954 * Serving configuration for Google Cloud Endpoints |
| 3955 * (https://cloud.google.com/appengine/docs/python/endpoints/).Only returned |
| 3956 * in GET requests if view=FULL is set. |
| 3957 */ |
| 3958 ApiConfigHandler apiConfig; |
| 3959 /** |
| 3960 * Automatic scaling is based on request rate, response latencies, and other |
| 3961 * application metrics. |
| 3962 */ |
| 3963 AutomaticScaling automaticScaling; |
| 3964 /** |
| 3965 * A service with basic scaling will create an instance when the application |
| 3966 * receives a request. The instance will be turned down when the app becomes |
| 3967 * idle. Basic scaling is ideal for work that is intermittent or driven by |
| 3968 * user activity. |
| 3969 */ |
| 3970 BasicScaling basicScaling; |
| 3971 /** |
| 3972 * Metadata settings that are supplied to this version to enable beta runtime |
| 3973 * features. |
| 3974 */ |
| 3975 core.Map<core.String, core.String> betaSettings; |
| 3976 /** Time that this version was created.@OutputOnly */ |
| 3977 core.String createTime; |
| 3978 /** Email address of the user who created this version.@OutputOnly */ |
| 3979 core.String createdBy; |
| 3980 /** |
| 3981 * Duration that static files should be cached by web proxies and browsers. |
| 3982 * Only applicable if the corresponding StaticFilesHandler |
| 3983 * (https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1beta/ap
ps.services.versions#staticfileshandler) |
| 3984 * does not specify its own expiration time.Only returned in GET requests if |
| 3985 * view=FULL is set. |
| 3986 */ |
| 3987 core.String defaultExpiration; |
| 3988 /** |
| 3989 * Code and application artifacts that make up this version.Only returned in |
| 3990 * GET requests if view=FULL is set. |
| 3991 */ |
| 3992 Deployment deployment; |
| 3993 /** |
| 3994 * Total size in bytes of all the files that are included in this version and |
| 3995 * curerntly hosted on the App Engine disk.@OutputOnly |
| 3996 */ |
| 3997 core.String diskUsageBytes; |
| 3998 /** |
| 3999 * Cloud Endpoints configuration.If endpoints_api_service is set, the Cloud |
| 4000 * Endpoints Extensible Service Proxy will be provided to serve the API |
| 4001 * implemented by the app. |
| 4002 */ |
| 4003 EndpointsApiService endpointsApiService; |
| 4004 /** |
| 4005 * App Engine execution environment for this version.Defaults to standard. |
| 4006 */ |
| 4007 core.String env; |
| 4008 /** |
| 4009 * Environment variables available to the application.Only returned in GET |
| 4010 * requests if view=FULL is set. |
| 4011 */ |
| 4012 core.Map<core.String, core.String> envVariables; |
| 4013 /** |
| 4014 * Custom static error pages. Limited to 10KB per page.Only returned in GET |
| 4015 * requests if view=FULL is set. |
| 4016 */ |
| 4017 core.List<ErrorHandler> errorHandlers; |
| 4018 /** |
| 4019 * An ordered list of URL-matching patterns that should be applied to incoming |
| 4020 * requests. The first matching URL handles the request and other request |
| 4021 * handlers are not attempted.Only returned in GET requests if view=FULL is |
| 4022 * set. |
| 4023 */ |
| 4024 core.List<UrlMap> handlers; |
| 4025 /** |
| 4026 * Configures health checking for VM instances. Unhealthy instances are |
| 4027 * stopped and replaced with new instances. Only applicable for VM |
| 4028 * runtimes.Only returned in GET requests if view=FULL is set. |
| 4029 */ |
| 4030 HealthCheck healthCheck; |
| 4031 /** |
| 4032 * Relative name of the version within the service. Example: v1. Version names |
| 4033 * can contain only lowercase letters, numbers, or hyphens. Reserved names: |
| 4034 * "default", "latest", and any name with the prefix "ah-". |
| 4035 */ |
| 4036 core.String id; |
| 4037 /** |
| 4038 * Before an application can receive email or XMPP messages, the application |
| 4039 * must be configured to enable the service. |
| 4040 */ |
| 4041 core.List<core.String> inboundServices; |
| 4042 /** |
| 4043 * Instance class that is used to run this version. Valid values are: |
| 4044 * AutomaticScaling: F1, F2, F4, F4_1G |
| 4045 * ManualScaling or BasicScaling: B1, B2, B4, B8, B4_1GDefaults to F1 for |
| 4046 * AutomaticScaling and B1 for ManualScaling or BasicScaling. |
| 4047 */ |
| 4048 core.String instanceClass; |
| 4049 /** |
| 4050 * Configuration for third-party Python runtime libraries that are required by |
| 4051 * the application.Only returned in GET requests if view=FULL is set. |
| 4052 */ |
| 4053 core.List<Library> libraries; |
| 4054 /** |
| 4055 * Configures liveness health checking for VM instances. Unhealthy instances |
| 4056 * are stopped and replaced with new instancesOnly returned in GET requests if |
| 4057 * view=FULL is set. |
| 4058 */ |
| 4059 LivenessCheck livenessCheck; |
| 4060 /** |
| 4061 * A service with manual scaling runs continuously, allowing you to perform |
| 4062 * complex initialization and rely on the state of its memory over time. |
| 4063 */ |
| 4064 ManualScaling manualScaling; |
| 4065 /** |
| 4066 * Full path to the Version resource in the API. Example: |
| 4067 * apps/myapp/services/default/versions/v1.@OutputOnly |
| 4068 */ |
| 4069 core.String name; |
| 4070 /** Extra network settings. Only applicable for VM runtimes. */ |
| 4071 Network network; |
| 4072 /** |
| 4073 * Files that match this pattern will not be built into this version. Only |
| 4074 * applicable for Go runtimes.Only returned in GET requests if view=FULL is |
| 4075 * set. |
| 4076 */ |
| 4077 core.String nobuildFilesRegex; |
| 4078 /** |
| 4079 * Configures readiness health checking for VM instances. Unhealthy instances |
| 4080 * are not put into the backend traffic rotation.Only returned in GET requests |
| 4081 * if view=FULL is set. |
| 4082 */ |
| 4083 ReadinessCheck readinessCheck; |
| 4084 /** Machine resources for this version. Only applicable for VM runtimes. */ |
| 4085 Resources resources; |
| 4086 /** Desired runtime. Example: python27. */ |
| 4087 core.String runtime; |
| 4088 /** |
| 4089 * Current serving status of this version. Only the versions with a SERVING |
| 4090 * status create instances and can be billed.SERVING_STATUS_UNSPECIFIED is an |
| 4091 * invalid value. Defaults to SERVING. |
| 4092 * Possible string values are: |
| 4093 * - "SERVING_STATUS_UNSPECIFIED" : Not specified. |
| 4094 * - "SERVING" : Currently serving. Instances are created according to the |
| 4095 * scaling settings of the version. |
| 4096 * - "STOPPED" : Disabled. No instances will be created and the scaling |
| 4097 * settings are ignored until the state of the version changes to SERVING. |
| 4098 */ |
| 4099 core.String servingStatus; |
| 4100 /** Whether multiple requests can be dispatched to this version at once. */ |
| 4101 core.bool threadsafe; |
| 4102 /** |
| 4103 * Serving URL for this version. Example: |
| 4104 * "https://myversion-dot-myservice-dot-myapp.appspot.com"@OutputOnly |
| 4105 */ |
| 4106 core.String versionUrl; |
| 4107 /** Whether to deploy this version in a container on a virtual machine. */ |
| 4108 core.bool vm; |
| 4109 |
| 4110 Version(); |
| 4111 |
| 4112 Version.fromJson(core.Map _json) { |
| 4113 if (_json.containsKey("apiConfig")) { |
| 4114 apiConfig = new ApiConfigHandler.fromJson(_json["apiConfig"]); |
| 4115 } |
| 4116 if (_json.containsKey("automaticScaling")) { |
| 4117 automaticScaling = new AutomaticScaling.fromJson(_json["automaticScaling"]
); |
| 4118 } |
| 4119 if (_json.containsKey("basicScaling")) { |
| 4120 basicScaling = new BasicScaling.fromJson(_json["basicScaling"]); |
| 4121 } |
| 4122 if (_json.containsKey("betaSettings")) { |
| 4123 betaSettings = _json["betaSettings"]; |
| 4124 } |
| 4125 if (_json.containsKey("createTime")) { |
| 4126 createTime = _json["createTime"]; |
| 4127 } |
| 4128 if (_json.containsKey("createdBy")) { |
| 4129 createdBy = _json["createdBy"]; |
| 4130 } |
| 4131 if (_json.containsKey("defaultExpiration")) { |
| 4132 defaultExpiration = _json["defaultExpiration"]; |
| 4133 } |
| 4134 if (_json.containsKey("deployment")) { |
| 4135 deployment = new Deployment.fromJson(_json["deployment"]); |
| 4136 } |
| 4137 if (_json.containsKey("diskUsageBytes")) { |
| 4138 diskUsageBytes = _json["diskUsageBytes"]; |
| 4139 } |
| 4140 if (_json.containsKey("endpointsApiService")) { |
| 4141 endpointsApiService = new EndpointsApiService.fromJson(_json["endpointsApi
Service"]); |
| 4142 } |
| 4143 if (_json.containsKey("env")) { |
| 4144 env = _json["env"]; |
| 4145 } |
| 4146 if (_json.containsKey("envVariables")) { |
| 4147 envVariables = _json["envVariables"]; |
| 4148 } |
| 4149 if (_json.containsKey("errorHandlers")) { |
| 4150 errorHandlers = _json["errorHandlers"].map((value) => new ErrorHandler.fro
mJson(value)).toList(); |
| 4151 } |
| 4152 if (_json.containsKey("handlers")) { |
| 4153 handlers = _json["handlers"].map((value) => new UrlMap.fromJson(value)).to
List(); |
| 4154 } |
| 4155 if (_json.containsKey("healthCheck")) { |
| 4156 healthCheck = new HealthCheck.fromJson(_json["healthCheck"]); |
| 4157 } |
| 4158 if (_json.containsKey("id")) { |
| 4159 id = _json["id"]; |
| 4160 } |
| 4161 if (_json.containsKey("inboundServices")) { |
| 4162 inboundServices = _json["inboundServices"]; |
| 4163 } |
| 4164 if (_json.containsKey("instanceClass")) { |
| 4165 instanceClass = _json["instanceClass"]; |
| 4166 } |
| 4167 if (_json.containsKey("libraries")) { |
| 4168 libraries = _json["libraries"].map((value) => new Library.fromJson(value))
.toList(); |
| 4169 } |
| 4170 if (_json.containsKey("livenessCheck")) { |
| 4171 livenessCheck = new LivenessCheck.fromJson(_json["livenessCheck"]); |
| 4172 } |
| 4173 if (_json.containsKey("manualScaling")) { |
| 4174 manualScaling = new ManualScaling.fromJson(_json["manualScaling"]); |
| 4175 } |
| 4176 if (_json.containsKey("name")) { |
| 4177 name = _json["name"]; |
| 4178 } |
| 4179 if (_json.containsKey("network")) { |
| 4180 network = new Network.fromJson(_json["network"]); |
| 4181 } |
| 4182 if (_json.containsKey("nobuildFilesRegex")) { |
| 4183 nobuildFilesRegex = _json["nobuildFilesRegex"]; |
| 4184 } |
| 4185 if (_json.containsKey("readinessCheck")) { |
| 4186 readinessCheck = new ReadinessCheck.fromJson(_json["readinessCheck"]); |
| 4187 } |
| 4188 if (_json.containsKey("resources")) { |
| 4189 resources = new Resources.fromJson(_json["resources"]); |
| 4190 } |
| 4191 if (_json.containsKey("runtime")) { |
| 4192 runtime = _json["runtime"]; |
| 4193 } |
| 4194 if (_json.containsKey("servingStatus")) { |
| 4195 servingStatus = _json["servingStatus"]; |
| 4196 } |
| 4197 if (_json.containsKey("threadsafe")) { |
| 4198 threadsafe = _json["threadsafe"]; |
| 4199 } |
| 4200 if (_json.containsKey("versionUrl")) { |
| 4201 versionUrl = _json["versionUrl"]; |
| 4202 } |
| 4203 if (_json.containsKey("vm")) { |
| 4204 vm = _json["vm"]; |
| 4205 } |
| 4206 } |
| 4207 |
| 4208 core.Map toJson() { |
| 4209 var _json = new core.Map(); |
| 4210 if (apiConfig != null) { |
| 4211 _json["apiConfig"] = (apiConfig).toJson(); |
| 4212 } |
| 4213 if (automaticScaling != null) { |
| 4214 _json["automaticScaling"] = (automaticScaling).toJson(); |
| 4215 } |
| 4216 if (basicScaling != null) { |
| 4217 _json["basicScaling"] = (basicScaling).toJson(); |
| 4218 } |
| 4219 if (betaSettings != null) { |
| 4220 _json["betaSettings"] = betaSettings; |
| 4221 } |
| 4222 if (createTime != null) { |
| 4223 _json["createTime"] = createTime; |
| 4224 } |
| 4225 if (createdBy != null) { |
| 4226 _json["createdBy"] = createdBy; |
| 4227 } |
| 4228 if (defaultExpiration != null) { |
| 4229 _json["defaultExpiration"] = defaultExpiration; |
| 4230 } |
| 4231 if (deployment != null) { |
| 4232 _json["deployment"] = (deployment).toJson(); |
| 4233 } |
| 4234 if (diskUsageBytes != null) { |
| 4235 _json["diskUsageBytes"] = diskUsageBytes; |
| 4236 } |
| 4237 if (endpointsApiService != null) { |
| 4238 _json["endpointsApiService"] = (endpointsApiService).toJson(); |
| 4239 } |
| 4240 if (env != null) { |
| 4241 _json["env"] = env; |
| 4242 } |
| 4243 if (envVariables != null) { |
| 4244 _json["envVariables"] = envVariables; |
| 4245 } |
| 4246 if (errorHandlers != null) { |
| 4247 _json["errorHandlers"] = errorHandlers.map((value) => (value).toJson()).to
List(); |
| 4248 } |
| 4249 if (handlers != null) { |
| 4250 _json["handlers"] = handlers.map((value) => (value).toJson()).toList(); |
| 4251 } |
| 4252 if (healthCheck != null) { |
| 4253 _json["healthCheck"] = (healthCheck).toJson(); |
| 4254 } |
| 4255 if (id != null) { |
| 4256 _json["id"] = id; |
| 4257 } |
| 4258 if (inboundServices != null) { |
| 4259 _json["inboundServices"] = inboundServices; |
| 4260 } |
| 4261 if (instanceClass != null) { |
| 4262 _json["instanceClass"] = instanceClass; |
| 4263 } |
| 4264 if (libraries != null) { |
| 4265 _json["libraries"] = libraries.map((value) => (value).toJson()).toList(); |
| 4266 } |
| 4267 if (livenessCheck != null) { |
| 4268 _json["livenessCheck"] = (livenessCheck).toJson(); |
| 4269 } |
| 4270 if (manualScaling != null) { |
| 4271 _json["manualScaling"] = (manualScaling).toJson(); |
| 4272 } |
| 4273 if (name != null) { |
| 4274 _json["name"] = name; |
| 4275 } |
| 4276 if (network != null) { |
| 4277 _json["network"] = (network).toJson(); |
| 4278 } |
| 4279 if (nobuildFilesRegex != null) { |
| 4280 _json["nobuildFilesRegex"] = nobuildFilesRegex; |
| 4281 } |
| 4282 if (readinessCheck != null) { |
| 4283 _json["readinessCheck"] = (readinessCheck).toJson(); |
| 4284 } |
| 4285 if (resources != null) { |
| 4286 _json["resources"] = (resources).toJson(); |
| 4287 } |
| 4288 if (runtime != null) { |
| 4289 _json["runtime"] = runtime; |
| 4290 } |
| 4291 if (servingStatus != null) { |
| 4292 _json["servingStatus"] = servingStatus; |
| 4293 } |
| 4294 if (threadsafe != null) { |
| 4295 _json["threadsafe"] = threadsafe; |
| 4296 } |
| 4297 if (versionUrl != null) { |
| 4298 _json["versionUrl"] = versionUrl; |
| 4299 } |
| 4300 if (vm != null) { |
| 4301 _json["vm"] = vm; |
| 4302 } |
| 4303 return _json; |
| 4304 } |
| 4305 } |
| 4306 |
| 4307 /** |
| 4308 * Volumes mounted within the app container. Only applicable for VM runtimes. |
| 4309 */ |
| 4310 class Volume { |
| 4311 /** Unique name for the volume. */ |
| 4312 core.String name; |
| 4313 /** Volume size in gigabytes. */ |
| 4314 core.double sizeGb; |
| 4315 /** Underlying volume type, e.g. 'tmpfs'. */ |
| 4316 core.String volumeType; |
| 4317 |
| 4318 Volume(); |
| 4319 |
| 4320 Volume.fromJson(core.Map _json) { |
| 4321 if (_json.containsKey("name")) { |
| 4322 name = _json["name"]; |
| 4323 } |
| 4324 if (_json.containsKey("sizeGb")) { |
| 4325 sizeGb = _json["sizeGb"]; |
| 4326 } |
| 4327 if (_json.containsKey("volumeType")) { |
| 4328 volumeType = _json["volumeType"]; |
| 4329 } |
| 4330 } |
| 4331 |
| 4332 core.Map toJson() { |
| 4333 var _json = new core.Map(); |
| 4334 if (name != null) { |
| 4335 _json["name"] = name; |
| 4336 } |
| 4337 if (sizeGb != null) { |
| 4338 _json["sizeGb"] = sizeGb; |
| 4339 } |
| 4340 if (volumeType != null) { |
| 4341 _json["volumeType"] = volumeType; |
| 4342 } |
| 4343 return _json; |
| 4344 } |
| 4345 } |
| 4346 |
| 4347 /** The zip file information for a zip deployment. */ |
| 4348 class ZipInfo { |
| 4349 /** |
| 4350 * An estimate of the number of files in a zip for a zip deployment. If set, |
| 4351 * must be greater than or equal to the actual number of files. Used for |
| 4352 * optimizing performance; if not provided, deployment may be slow. |
| 4353 */ |
| 4354 core.int filesCount; |
| 4355 /** |
| 4356 * URL of the zip file to deploy from. Must be a URL to a resource in Google |
| 4357 * Cloud Storage in the form |
| 4358 * 'http(s)://storage.googleapis.com/<bucket>/<object>'. |
| 4359 */ |
| 4360 core.String sourceUrl; |
| 4361 |
| 4362 ZipInfo(); |
| 4363 |
| 4364 ZipInfo.fromJson(core.Map _json) { |
| 4365 if (_json.containsKey("filesCount")) { |
| 4366 filesCount = _json["filesCount"]; |
| 4367 } |
| 4368 if (_json.containsKey("sourceUrl")) { |
| 4369 sourceUrl = _json["sourceUrl"]; |
| 4370 } |
| 4371 } |
| 4372 |
| 4373 core.Map toJson() { |
| 4374 var _json = new core.Map(); |
| 4375 if (filesCount != null) { |
| 4376 _json["filesCount"] = filesCount; |
| 4377 } |
| 4378 if (sourceUrl != null) { |
| 4379 _json["sourceUrl"] = sourceUrl; |
| 4380 } |
| 4381 return _json; |
| 4382 } |
| 4383 } |
OLD | NEW |