| OLD | NEW |
| (Empty) | |
| 1 // This is a generated file (see the discoveryapis_generator project). |
| 2 |
| 3 library googleapis_beta.appengine.v1beta5; |
| 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/v1beta5'; |
| 16 |
| 17 /** |
| 18 * The Google App Engine Admin API enables developers to provision and manage |
| 19 * their App Engine applications. |
| 20 */ |
| 21 class AppengineApi { |
| 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 |
| 26 final commons.ApiRequester _requester; |
| 27 |
| 28 AppsResourceApi get apps => new AppsResourceApi(_requester); |
| 29 |
| 30 AppengineApi(http.Client client, {core.String rootUrl: "https://appengine.goog
leapis.com/", core.String servicePath: ""}) : |
| 31 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); |
| 32 } |
| 33 |
| 34 |
| 35 class AppsResourceApi { |
| 36 final commons.ApiRequester _requester; |
| 37 |
| 38 AppsOperationsResourceApi get operations => new AppsOperationsResourceApi(_req
uester); |
| 39 AppsServicesResourceApi get services => new AppsServicesResourceApi(_requester
); |
| 40 |
| 41 AppsResourceApi(commons.ApiRequester client) : |
| 42 _requester = client; |
| 43 |
| 44 /** |
| 45 * Gets information about an application. |
| 46 * |
| 47 * Request parameters: |
| 48 * |
| 49 * [appsId] - Part of `name`. Name of the application to get. For example: |
| 50 * "apps/myapp". |
| 51 * |
| 52 * [ensureResourcesExist] - Certain resources associated with an application |
| 53 * are created on-demand. Controls whether these resources should be created |
| 54 * when performing the `GET` operation. If specified and any resources could |
| 55 * not be created, the request will fail with an error code. Additionally, |
| 56 * this parameter can cause the request to take longer to complete. Note: This |
| 57 * parameter will be deprecated in a future version of the API. |
| 58 * |
| 59 * Completes with a [Application]. |
| 60 * |
| 61 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 62 * error. |
| 63 * |
| 64 * If the used [http.Client] completes with an error when making a REST call, |
| 65 * this method will complete with the same error. |
| 66 */ |
| 67 async.Future<Application> get(core.String appsId, {core.bool ensureResourcesEx
ist}) { |
| 68 var _url = null; |
| 69 var _queryParams = new core.Map(); |
| 70 var _uploadMedia = null; |
| 71 var _uploadOptions = null; |
| 72 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 73 var _body = null; |
| 74 |
| 75 if (appsId == null) { |
| 76 throw new core.ArgumentError("Parameter appsId is required."); |
| 77 } |
| 78 if (ensureResourcesExist != null) { |
| 79 _queryParams["ensureResourcesExist"] = ["${ensureResourcesExist}"]; |
| 80 } |
| 81 |
| 82 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId'); |
| 83 |
| 84 var _response = _requester.request(_url, |
| 85 "GET", |
| 86 body: _body, |
| 87 queryParams: _queryParams, |
| 88 uploadOptions: _uploadOptions, |
| 89 uploadMedia: _uploadMedia, |
| 90 downloadOptions: _downloadOptions); |
| 91 return _response.then((data) => new Application.fromJson(data)); |
| 92 } |
| 93 |
| 94 } |
| 95 |
| 96 |
| 97 class AppsOperationsResourceApi { |
| 98 final commons.ApiRequester _requester; |
| 99 |
| 100 AppsOperationsResourceApi(commons.ApiRequester client) : |
| 101 _requester = client; |
| 102 |
| 103 /** |
| 104 * Gets the latest state of a long-running operation. Clients can use this |
| 105 * method to poll the operation result at intervals as recommended by the API |
| 106 * service. |
| 107 * |
| 108 * Request parameters: |
| 109 * |
| 110 * [appsId] - Part of `name`. The name of the operation resource. |
| 111 * |
| 112 * [operationsId] - Part of `name`. See documentation of `appsId`. |
| 113 * |
| 114 * Completes with a [Operation]. |
| 115 * |
| 116 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 117 * error. |
| 118 * |
| 119 * If the used [http.Client] completes with an error when making a REST call, |
| 120 * this method will complete with the same error. |
| 121 */ |
| 122 async.Future<Operation> get(core.String appsId, core.String operationsId) { |
| 123 var _url = null; |
| 124 var _queryParams = new core.Map(); |
| 125 var _uploadMedia = null; |
| 126 var _uploadOptions = null; |
| 127 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 128 var _body = null; |
| 129 |
| 130 if (appsId == null) { |
| 131 throw new core.ArgumentError("Parameter appsId is required."); |
| 132 } |
| 133 if (operationsId == null) { |
| 134 throw new core.ArgumentError("Parameter operationsId is required."); |
| 135 } |
| 136 |
| 137 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/operat
ions/' + commons.Escaper.ecapeVariable('$operationsId'); |
| 138 |
| 139 var _response = _requester.request(_url, |
| 140 "GET", |
| 141 body: _body, |
| 142 queryParams: _queryParams, |
| 143 uploadOptions: _uploadOptions, |
| 144 uploadMedia: _uploadMedia, |
| 145 downloadOptions: _downloadOptions); |
| 146 return _response.then((data) => new Operation.fromJson(data)); |
| 147 } |
| 148 |
| 149 /** |
| 150 * Lists operations that match the specified filter in the request. If the |
| 151 * server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the |
| 152 * `name` binding below allows API services to override the binding to use |
| 153 * different resource name schemes, such as `users / * /operations`. |
| 154 * |
| 155 * Request parameters: |
| 156 * |
| 157 * [appsId] - Part of `name`. The name of the operation collection. |
| 158 * |
| 159 * [filter] - The standard list filter. |
| 160 * |
| 161 * [pageSize] - The standard list page size. |
| 162 * |
| 163 * [pageToken] - The standard list page token. |
| 164 * |
| 165 * Completes with a [ListOperationsResponse]. |
| 166 * |
| 167 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 168 * error. |
| 169 * |
| 170 * If the used [http.Client] completes with an error when making a REST call, |
| 171 * this method will complete with the same error. |
| 172 */ |
| 173 async.Future<ListOperationsResponse> list(core.String appsId, {core.String fil
ter, core.int pageSize, core.String pageToken}) { |
| 174 var _url = null; |
| 175 var _queryParams = new core.Map(); |
| 176 var _uploadMedia = null; |
| 177 var _uploadOptions = null; |
| 178 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 179 var _body = null; |
| 180 |
| 181 if (appsId == null) { |
| 182 throw new core.ArgumentError("Parameter appsId is required."); |
| 183 } |
| 184 if (filter != null) { |
| 185 _queryParams["filter"] = [filter]; |
| 186 } |
| 187 if (pageSize != null) { |
| 188 _queryParams["pageSize"] = ["${pageSize}"]; |
| 189 } |
| 190 if (pageToken != null) { |
| 191 _queryParams["pageToken"] = [pageToken]; |
| 192 } |
| 193 |
| 194 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/operat
ions'; |
| 195 |
| 196 var _response = _requester.request(_url, |
| 197 "GET", |
| 198 body: _body, |
| 199 queryParams: _queryParams, |
| 200 uploadOptions: _uploadOptions, |
| 201 uploadMedia: _uploadMedia, |
| 202 downloadOptions: _downloadOptions); |
| 203 return _response.then((data) => new ListOperationsResponse.fromJson(data)); |
| 204 } |
| 205 |
| 206 } |
| 207 |
| 208 |
| 209 class AppsServicesResourceApi { |
| 210 final commons.ApiRequester _requester; |
| 211 |
| 212 AppsServicesVersionsResourceApi get versions => new AppsServicesVersionsResour
ceApi(_requester); |
| 213 |
| 214 AppsServicesResourceApi(commons.ApiRequester client) : |
| 215 _requester = client; |
| 216 |
| 217 /** |
| 218 * Deletes a service and all enclosed versions. |
| 219 * |
| 220 * Request parameters: |
| 221 * |
| 222 * [appsId] - Part of `name`. Name of the resource requested. For example: |
| 223 * "apps/myapp/services/default". |
| 224 * |
| 225 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 226 * |
| 227 * Completes with a [Operation]. |
| 228 * |
| 229 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 230 * error. |
| 231 * |
| 232 * If the used [http.Client] completes with an error when making a REST call, |
| 233 * this method will complete with the same error. |
| 234 */ |
| 235 async.Future<Operation> delete(core.String appsId, core.String servicesId) { |
| 236 var _url = null; |
| 237 var _queryParams = new core.Map(); |
| 238 var _uploadMedia = null; |
| 239 var _uploadOptions = null; |
| 240 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 241 var _body = null; |
| 242 |
| 243 if (appsId == null) { |
| 244 throw new core.ArgumentError("Parameter appsId is required."); |
| 245 } |
| 246 if (servicesId == null) { |
| 247 throw new core.ArgumentError("Parameter servicesId is required."); |
| 248 } |
| 249 |
| 250 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/servic
es/' + commons.Escaper.ecapeVariable('$servicesId'); |
| 251 |
| 252 var _response = _requester.request(_url, |
| 253 "DELETE", |
| 254 body: _body, |
| 255 queryParams: _queryParams, |
| 256 uploadOptions: _uploadOptions, |
| 257 uploadMedia: _uploadMedia, |
| 258 downloadOptions: _downloadOptions); |
| 259 return _response.then((data) => new Operation.fromJson(data)); |
| 260 } |
| 261 |
| 262 /** |
| 263 * Gets the current configuration of the service. |
| 264 * |
| 265 * Request parameters: |
| 266 * |
| 267 * [appsId] - Part of `name`. Name of the resource requested. For example: |
| 268 * "apps/myapp/services/default". |
| 269 * |
| 270 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 271 * |
| 272 * Completes with a [Service]. |
| 273 * |
| 274 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 275 * error. |
| 276 * |
| 277 * If the used [http.Client] completes with an error when making a REST call, |
| 278 * this method will complete with the same error. |
| 279 */ |
| 280 async.Future<Service> get(core.String appsId, core.String servicesId) { |
| 281 var _url = null; |
| 282 var _queryParams = new core.Map(); |
| 283 var _uploadMedia = null; |
| 284 var _uploadOptions = null; |
| 285 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 286 var _body = null; |
| 287 |
| 288 if (appsId == null) { |
| 289 throw new core.ArgumentError("Parameter appsId is required."); |
| 290 } |
| 291 if (servicesId == null) { |
| 292 throw new core.ArgumentError("Parameter servicesId is required."); |
| 293 } |
| 294 |
| 295 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/servic
es/' + commons.Escaper.ecapeVariable('$servicesId'); |
| 296 |
| 297 var _response = _requester.request(_url, |
| 298 "GET", |
| 299 body: _body, |
| 300 queryParams: _queryParams, |
| 301 uploadOptions: _uploadOptions, |
| 302 uploadMedia: _uploadMedia, |
| 303 downloadOptions: _downloadOptions); |
| 304 return _response.then((data) => new Service.fromJson(data)); |
| 305 } |
| 306 |
| 307 /** |
| 308 * Lists all the services in the application. |
| 309 * |
| 310 * Request parameters: |
| 311 * |
| 312 * [appsId] - Part of `name`. Name of the resource requested. For example: |
| 313 * "apps/myapp". |
| 314 * |
| 315 * [pageSize] - Maximum results to return per page. |
| 316 * |
| 317 * [pageToken] - Continuation token for fetching the next page of results. |
| 318 * |
| 319 * Completes with a [ListServicesResponse]. |
| 320 * |
| 321 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 322 * error. |
| 323 * |
| 324 * If the used [http.Client] completes with an error when making a REST call, |
| 325 * this method will complete with the same error. |
| 326 */ |
| 327 async.Future<ListServicesResponse> list(core.String appsId, {core.int pageSize
, core.String pageToken}) { |
| 328 var _url = null; |
| 329 var _queryParams = new core.Map(); |
| 330 var _uploadMedia = null; |
| 331 var _uploadOptions = null; |
| 332 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 333 var _body = null; |
| 334 |
| 335 if (appsId == null) { |
| 336 throw new core.ArgumentError("Parameter appsId is required."); |
| 337 } |
| 338 if (pageSize != null) { |
| 339 _queryParams["pageSize"] = ["${pageSize}"]; |
| 340 } |
| 341 if (pageToken != null) { |
| 342 _queryParams["pageToken"] = [pageToken]; |
| 343 } |
| 344 |
| 345 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/servic
es'; |
| 346 |
| 347 var _response = _requester.request(_url, |
| 348 "GET", |
| 349 body: _body, |
| 350 queryParams: _queryParams, |
| 351 uploadOptions: _uploadOptions, |
| 352 uploadMedia: _uploadMedia, |
| 353 downloadOptions: _downloadOptions); |
| 354 return _response.then((data) => new ListServicesResponse.fromJson(data)); |
| 355 } |
| 356 |
| 357 /** |
| 358 * Updates the configuration of the specified service. |
| 359 * |
| 360 * [request] - The metadata request object. |
| 361 * |
| 362 * Request parameters: |
| 363 * |
| 364 * [appsId] - Part of `name`. Name of the resource to update. For example: |
| 365 * "apps/myapp/services/default". |
| 366 * |
| 367 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 368 * |
| 369 * [mask] - Standard field mask for the set of fields to be updated. |
| 370 * |
| 371 * [migrateTraffic] - Whether to use Traffic Migration to shift traffic |
| 372 * gradually. Traffic can only be migrated from a single version to another |
| 373 * single version. |
| 374 * |
| 375 * Completes with a [Operation]. |
| 376 * |
| 377 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 378 * error. |
| 379 * |
| 380 * If the used [http.Client] completes with an error when making a REST call, |
| 381 * this method will complete with the same error. |
| 382 */ |
| 383 async.Future<Operation> patch(Service request, core.String appsId, core.String
servicesId, {core.String mask, core.bool migrateTraffic}) { |
| 384 var _url = null; |
| 385 var _queryParams = new core.Map(); |
| 386 var _uploadMedia = null; |
| 387 var _uploadOptions = null; |
| 388 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 389 var _body = null; |
| 390 |
| 391 if (request != null) { |
| 392 _body = convert.JSON.encode((request).toJson()); |
| 393 } |
| 394 if (appsId == null) { |
| 395 throw new core.ArgumentError("Parameter appsId is required."); |
| 396 } |
| 397 if (servicesId == null) { |
| 398 throw new core.ArgumentError("Parameter servicesId is required."); |
| 399 } |
| 400 if (mask != null) { |
| 401 _queryParams["mask"] = [mask]; |
| 402 } |
| 403 if (migrateTraffic != null) { |
| 404 _queryParams["migrateTraffic"] = ["${migrateTraffic}"]; |
| 405 } |
| 406 |
| 407 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/servic
es/' + commons.Escaper.ecapeVariable('$servicesId'); |
| 408 |
| 409 var _response = _requester.request(_url, |
| 410 "PATCH", |
| 411 body: _body, |
| 412 queryParams: _queryParams, |
| 413 uploadOptions: _uploadOptions, |
| 414 uploadMedia: _uploadMedia, |
| 415 downloadOptions: _downloadOptions); |
| 416 return _response.then((data) => new Operation.fromJson(data)); |
| 417 } |
| 418 |
| 419 } |
| 420 |
| 421 |
| 422 class AppsServicesVersionsResourceApi { |
| 423 final commons.ApiRequester _requester; |
| 424 |
| 425 AppsServicesVersionsResourceApi(commons.ApiRequester client) : |
| 426 _requester = client; |
| 427 |
| 428 /** |
| 429 * Deploys new code and resource files to a version. |
| 430 * |
| 431 * [request] - The metadata request object. |
| 432 * |
| 433 * Request parameters: |
| 434 * |
| 435 * [appsId] - Part of `name`. Name of the resource to update. For example: |
| 436 * "apps/myapp/services/default". |
| 437 * |
| 438 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 439 * |
| 440 * Completes with a [Operation]. |
| 441 * |
| 442 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 443 * error. |
| 444 * |
| 445 * If the used [http.Client] completes with an error when making a REST call, |
| 446 * this method will complete with the same error. |
| 447 */ |
| 448 async.Future<Operation> create(Version request, core.String appsId, core.Strin
g servicesId) { |
| 449 var _url = null; |
| 450 var _queryParams = new core.Map(); |
| 451 var _uploadMedia = null; |
| 452 var _uploadOptions = null; |
| 453 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 454 var _body = null; |
| 455 |
| 456 if (request != null) { |
| 457 _body = convert.JSON.encode((request).toJson()); |
| 458 } |
| 459 if (appsId == null) { |
| 460 throw new core.ArgumentError("Parameter appsId is required."); |
| 461 } |
| 462 if (servicesId == null) { |
| 463 throw new core.ArgumentError("Parameter servicesId is required."); |
| 464 } |
| 465 |
| 466 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/servic
es/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions'; |
| 467 |
| 468 var _response = _requester.request(_url, |
| 469 "POST", |
| 470 body: _body, |
| 471 queryParams: _queryParams, |
| 472 uploadOptions: _uploadOptions, |
| 473 uploadMedia: _uploadMedia, |
| 474 downloadOptions: _downloadOptions); |
| 475 return _response.then((data) => new Operation.fromJson(data)); |
| 476 } |
| 477 |
| 478 /** |
| 479 * Deletes an existing version. |
| 480 * |
| 481 * Request parameters: |
| 482 * |
| 483 * [appsId] - Part of `name`. Name of the resource requested. For example: |
| 484 * "apps/myapp/services/default/versions/v1". |
| 485 * |
| 486 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 487 * |
| 488 * [versionsId] - Part of `name`. See documentation of `appsId`. |
| 489 * |
| 490 * Completes with a [Operation]. |
| 491 * |
| 492 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 493 * error. |
| 494 * |
| 495 * If the used [http.Client] completes with an error when making a REST call, |
| 496 * this method will complete with the same error. |
| 497 */ |
| 498 async.Future<Operation> delete(core.String appsId, core.String servicesId, cor
e.String versionsId) { |
| 499 var _url = null; |
| 500 var _queryParams = new core.Map(); |
| 501 var _uploadMedia = null; |
| 502 var _uploadOptions = null; |
| 503 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 504 var _body = null; |
| 505 |
| 506 if (appsId == null) { |
| 507 throw new core.ArgumentError("Parameter appsId is required."); |
| 508 } |
| 509 if (servicesId == null) { |
| 510 throw new core.ArgumentError("Parameter servicesId is required."); |
| 511 } |
| 512 if (versionsId == null) { |
| 513 throw new core.ArgumentError("Parameter versionsId is required."); |
| 514 } |
| 515 |
| 516 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/servic
es/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions/' + commons.Esc
aper.ecapeVariable('$versionsId'); |
| 517 |
| 518 var _response = _requester.request(_url, |
| 519 "DELETE", |
| 520 body: _body, |
| 521 queryParams: _queryParams, |
| 522 uploadOptions: _uploadOptions, |
| 523 uploadMedia: _uploadMedia, |
| 524 downloadOptions: _downloadOptions); |
| 525 return _response.then((data) => new Operation.fromJson(data)); |
| 526 } |
| 527 |
| 528 /** |
| 529 * Gets application deployment information. |
| 530 * |
| 531 * Request parameters: |
| 532 * |
| 533 * [appsId] - Part of `name`. Name of the resource requested. For example: |
| 534 * "apps/myapp/services/default/versions/v1". |
| 535 * |
| 536 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 537 * |
| 538 * [versionsId] - Part of `name`. See documentation of `appsId`. |
| 539 * |
| 540 * [view] - Controls the set of fields returned in the `Get` response. |
| 541 * Possible string values are: |
| 542 * - "BASIC" : A BASIC. |
| 543 * - "FULL" : A FULL. |
| 544 * |
| 545 * Completes with a [Version]. |
| 546 * |
| 547 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 548 * error. |
| 549 * |
| 550 * If the used [http.Client] completes with an error when making a REST call, |
| 551 * this method will complete with the same error. |
| 552 */ |
| 553 async.Future<Version> get(core.String appsId, core.String servicesId, core.Str
ing versionsId, {core.String view}) { |
| 554 var _url = null; |
| 555 var _queryParams = new core.Map(); |
| 556 var _uploadMedia = null; |
| 557 var _uploadOptions = null; |
| 558 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 559 var _body = null; |
| 560 |
| 561 if (appsId == null) { |
| 562 throw new core.ArgumentError("Parameter appsId is required."); |
| 563 } |
| 564 if (servicesId == null) { |
| 565 throw new core.ArgumentError("Parameter servicesId is required."); |
| 566 } |
| 567 if (versionsId == null) { |
| 568 throw new core.ArgumentError("Parameter versionsId is required."); |
| 569 } |
| 570 if (view != null) { |
| 571 _queryParams["view"] = [view]; |
| 572 } |
| 573 |
| 574 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/servic
es/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions/' + commons.Esc
aper.ecapeVariable('$versionsId'); |
| 575 |
| 576 var _response = _requester.request(_url, |
| 577 "GET", |
| 578 body: _body, |
| 579 queryParams: _queryParams, |
| 580 uploadOptions: _uploadOptions, |
| 581 uploadMedia: _uploadMedia, |
| 582 downloadOptions: _downloadOptions); |
| 583 return _response.then((data) => new Version.fromJson(data)); |
| 584 } |
| 585 |
| 586 /** |
| 587 * Lists the versions of a service. |
| 588 * |
| 589 * Request parameters: |
| 590 * |
| 591 * [appsId] - Part of `name`. Name of the resource requested. For example: |
| 592 * "apps/myapp/services/default". |
| 593 * |
| 594 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 595 * |
| 596 * [view] - Controls the set of fields returned in the `List` response. |
| 597 * Possible string values are: |
| 598 * - "BASIC" : A BASIC. |
| 599 * - "FULL" : A FULL. |
| 600 * |
| 601 * [pageSize] - Maximum results to return per page. |
| 602 * |
| 603 * [pageToken] - Continuation token for fetching the next page of results. |
| 604 * |
| 605 * Completes with a [ListVersionsResponse]. |
| 606 * |
| 607 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 608 * error. |
| 609 * |
| 610 * If the used [http.Client] completes with an error when making a REST call, |
| 611 * this method will complete with the same error. |
| 612 */ |
| 613 async.Future<ListVersionsResponse> list(core.String appsId, core.String servic
esId, {core.String view, core.int pageSize, core.String pageToken}) { |
| 614 var _url = null; |
| 615 var _queryParams = new core.Map(); |
| 616 var _uploadMedia = null; |
| 617 var _uploadOptions = null; |
| 618 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 619 var _body = null; |
| 620 |
| 621 if (appsId == null) { |
| 622 throw new core.ArgumentError("Parameter appsId is required."); |
| 623 } |
| 624 if (servicesId == null) { |
| 625 throw new core.ArgumentError("Parameter servicesId is required."); |
| 626 } |
| 627 if (view != null) { |
| 628 _queryParams["view"] = [view]; |
| 629 } |
| 630 if (pageSize != null) { |
| 631 _queryParams["pageSize"] = ["${pageSize}"]; |
| 632 } |
| 633 if (pageToken != null) { |
| 634 _queryParams["pageToken"] = [pageToken]; |
| 635 } |
| 636 |
| 637 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/servic
es/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions'; |
| 638 |
| 639 var _response = _requester.request(_url, |
| 640 "GET", |
| 641 body: _body, |
| 642 queryParams: _queryParams, |
| 643 uploadOptions: _uploadOptions, |
| 644 uploadMedia: _uploadMedia, |
| 645 downloadOptions: _downloadOptions); |
| 646 return _response.then((data) => new ListVersionsResponse.fromJson(data)); |
| 647 } |
| 648 |
| 649 /** |
| 650 * Updates an existing version. Note: UNIMPLEMENTED. |
| 651 * |
| 652 * [request] - The metadata request object. |
| 653 * |
| 654 * Request parameters: |
| 655 * |
| 656 * [appsId] - Part of `name`. Name of the resource to update. For example: |
| 657 * "apps/myapp/services/default/versions/1". |
| 658 * |
| 659 * [servicesId] - Part of `name`. See documentation of `appsId`. |
| 660 * |
| 661 * [versionsId] - Part of `name`. See documentation of `appsId`. |
| 662 * |
| 663 * [mask] - Standard field mask for the set of fields to be updated. |
| 664 * |
| 665 * Completes with a [Version]. |
| 666 * |
| 667 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 668 * error. |
| 669 * |
| 670 * If the used [http.Client] completes with an error when making a REST call, |
| 671 * this method will complete with the same error. |
| 672 */ |
| 673 async.Future<Version> patch(Version request, core.String appsId, core.String s
ervicesId, core.String versionsId, {core.String mask}) { |
| 674 var _url = null; |
| 675 var _queryParams = new core.Map(); |
| 676 var _uploadMedia = null; |
| 677 var _uploadOptions = null; |
| 678 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 679 var _body = null; |
| 680 |
| 681 if (request != null) { |
| 682 _body = convert.JSON.encode((request).toJson()); |
| 683 } |
| 684 if (appsId == null) { |
| 685 throw new core.ArgumentError("Parameter appsId is required."); |
| 686 } |
| 687 if (servicesId == null) { |
| 688 throw new core.ArgumentError("Parameter servicesId is required."); |
| 689 } |
| 690 if (versionsId == null) { |
| 691 throw new core.ArgumentError("Parameter versionsId is required."); |
| 692 } |
| 693 if (mask != null) { |
| 694 _queryParams["mask"] = [mask]; |
| 695 } |
| 696 |
| 697 _url = 'v1beta5/apps/' + commons.Escaper.ecapeVariable('$appsId') + '/servic
es/' + commons.Escaper.ecapeVariable('$servicesId') + '/versions/' + commons.Esc
aper.ecapeVariable('$versionsId'); |
| 698 |
| 699 var _response = _requester.request(_url, |
| 700 "PATCH", |
| 701 body: _body, |
| 702 queryParams: _queryParams, |
| 703 uploadOptions: _uploadOptions, |
| 704 uploadMedia: _uploadMedia, |
| 705 downloadOptions: _downloadOptions); |
| 706 return _response.then((data) => new Version.fromJson(data)); |
| 707 } |
| 708 |
| 709 } |
| 710 |
| 711 |
| 712 |
| 713 /** API Serving configuration for Cloud Endpoints. */ |
| 714 class ApiConfigHandler { |
| 715 /** |
| 716 * For users not logged in, how to handle access to resources with required |
| 717 * login. Defaults to "redirect". |
| 718 * Possible string values are: |
| 719 * - "AUTH_FAIL_ACTION_UNSPECIFIED" : A AUTH_FAIL_ACTION_UNSPECIFIED. |
| 720 * - "AUTH_FAIL_ACTION_REDIRECT" : A AUTH_FAIL_ACTION_REDIRECT. |
| 721 * - "AUTH_FAIL_ACTION_UNAUTHORIZED" : A AUTH_FAIL_ACTION_UNAUTHORIZED. |
| 722 */ |
| 723 core.String authFailAction; |
| 724 /** |
| 725 * What level of login is required to access this resource. Default is |
| 726 * "optional". |
| 727 * Possible string values are: |
| 728 * - "LOGIN_UNSPECIFIED" : A LOGIN_UNSPECIFIED. |
| 729 * - "LOGIN_OPTIONAL" : A LOGIN_OPTIONAL. |
| 730 * - "LOGIN_ADMIN" : A LOGIN_ADMIN. |
| 731 * - "LOGIN_REQUIRED" : A LOGIN_REQUIRED. |
| 732 */ |
| 733 core.String login; |
| 734 /** Specifies the path to the script from the application root directory. */ |
| 735 core.String script; |
| 736 /** |
| 737 * Configures whether security (HTTPS) should be enforced for this URL. |
| 738 * Possible string values are: |
| 739 * - "SECURE_UNSPECIFIED" : A SECURE_UNSPECIFIED. |
| 740 * - "SECURE_DEFAULT" : A SECURE_DEFAULT. |
| 741 * - "SECURE_NEVER" : A SECURE_NEVER. |
| 742 * - "SECURE_OPTIONAL" : A SECURE_OPTIONAL. |
| 743 * - "SECURE_ALWAYS" : A SECURE_ALWAYS. |
| 744 */ |
| 745 core.String securityLevel; |
| 746 /** URL to serve the endpoint at. */ |
| 747 core.String url; |
| 748 |
| 749 ApiConfigHandler(); |
| 750 |
| 751 ApiConfigHandler.fromJson(core.Map _json) { |
| 752 if (_json.containsKey("authFailAction")) { |
| 753 authFailAction = _json["authFailAction"]; |
| 754 } |
| 755 if (_json.containsKey("login")) { |
| 756 login = _json["login"]; |
| 757 } |
| 758 if (_json.containsKey("script")) { |
| 759 script = _json["script"]; |
| 760 } |
| 761 if (_json.containsKey("securityLevel")) { |
| 762 securityLevel = _json["securityLevel"]; |
| 763 } |
| 764 if (_json.containsKey("url")) { |
| 765 url = _json["url"]; |
| 766 } |
| 767 } |
| 768 |
| 769 core.Map toJson() { |
| 770 var _json = new core.Map(); |
| 771 if (authFailAction != null) { |
| 772 _json["authFailAction"] = authFailAction; |
| 773 } |
| 774 if (login != null) { |
| 775 _json["login"] = login; |
| 776 } |
| 777 if (script != null) { |
| 778 _json["script"] = script; |
| 779 } |
| 780 if (securityLevel != null) { |
| 781 _json["securityLevel"] = securityLevel; |
| 782 } |
| 783 if (url != null) { |
| 784 _json["url"] = url; |
| 785 } |
| 786 return _json; |
| 787 } |
| 788 } |
| 789 |
| 790 /** Use Google Cloud Endpoints to handle requests. */ |
| 791 class ApiEndpointHandler { |
| 792 /** Specifies the path to the script from the application root directory. */ |
| 793 core.String scriptPath; |
| 794 |
| 795 ApiEndpointHandler(); |
| 796 |
| 797 ApiEndpointHandler.fromJson(core.Map _json) { |
| 798 if (_json.containsKey("scriptPath")) { |
| 799 scriptPath = _json["scriptPath"]; |
| 800 } |
| 801 } |
| 802 |
| 803 core.Map toJson() { |
| 804 var _json = new core.Map(); |
| 805 if (scriptPath != null) { |
| 806 _json["scriptPath"] = scriptPath; |
| 807 } |
| 808 return _json; |
| 809 } |
| 810 } |
| 811 |
| 812 /** |
| 813 * An Application contains the top-level configuration of an App Engine |
| 814 * application. |
| 815 */ |
| 816 class Application { |
| 817 /** |
| 818 * If set, only users from the specified Google Apps authentication domain may |
| 819 * access the application. If not set, any Google Account may access the |
| 820 * application. |
| 821 */ |
| 822 core.String authDomain; |
| 823 /** |
| 824 * A Google Cloud Storage bucket which can be used for storing files |
| 825 * associated with an application. This bucket is associated with the |
| 826 * application and can be used by the gcloud deployment commands. @OutputOnly |
| 827 */ |
| 828 core.String codeBucket; |
| 829 /** |
| 830 * A Google Cloud Storage bucket which can be used by the application to store |
| 831 * content. @OutputOnly |
| 832 */ |
| 833 core.String defaultBucket; |
| 834 /** Determines the cookie expiration policy for the application. */ |
| 835 core.String defaultCookieExpiration; |
| 836 /** |
| 837 * The hostname used to reach the application, as resolved by App Engine. |
| 838 * @OutputOnly |
| 839 */ |
| 840 core.String defaultHostname; |
| 841 /** |
| 842 * HTTP path dispatch rules for requests to the app that do not explicitly |
| 843 * target a service or version. The rules are order-dependent. |
| 844 */ |
| 845 core.List<UrlDispatchRule> dispatchRules; |
| 846 /** The relative name/path of the application. Example: "myapp". */ |
| 847 core.String id; |
| 848 /** |
| 849 * The location from which the application will be run. Choices are "us" for |
| 850 * United States and "eu" for European Union. Application instances will run |
| 851 * out of data centers in the chosen location and all of the application's End |
| 852 * User Content will be stored at rest in the chosen location. The default is |
| 853 * "us". |
| 854 */ |
| 855 core.String location; |
| 856 /** |
| 857 * The full path to the application in the API. Example: "apps/myapp". |
| 858 * @OutputOnly |
| 859 */ |
| 860 core.String name; |
| 861 |
| 862 Application(); |
| 863 |
| 864 Application.fromJson(core.Map _json) { |
| 865 if (_json.containsKey("authDomain")) { |
| 866 authDomain = _json["authDomain"]; |
| 867 } |
| 868 if (_json.containsKey("codeBucket")) { |
| 869 codeBucket = _json["codeBucket"]; |
| 870 } |
| 871 if (_json.containsKey("defaultBucket")) { |
| 872 defaultBucket = _json["defaultBucket"]; |
| 873 } |
| 874 if (_json.containsKey("defaultCookieExpiration")) { |
| 875 defaultCookieExpiration = _json["defaultCookieExpiration"]; |
| 876 } |
| 877 if (_json.containsKey("defaultHostname")) { |
| 878 defaultHostname = _json["defaultHostname"]; |
| 879 } |
| 880 if (_json.containsKey("dispatchRules")) { |
| 881 dispatchRules = _json["dispatchRules"].map((value) => new UrlDispatchRule.
fromJson(value)).toList(); |
| 882 } |
| 883 if (_json.containsKey("id")) { |
| 884 id = _json["id"]; |
| 885 } |
| 886 if (_json.containsKey("location")) { |
| 887 location = _json["location"]; |
| 888 } |
| 889 if (_json.containsKey("name")) { |
| 890 name = _json["name"]; |
| 891 } |
| 892 } |
| 893 |
| 894 core.Map toJson() { |
| 895 var _json = new core.Map(); |
| 896 if (authDomain != null) { |
| 897 _json["authDomain"] = authDomain; |
| 898 } |
| 899 if (codeBucket != null) { |
| 900 _json["codeBucket"] = codeBucket; |
| 901 } |
| 902 if (defaultBucket != null) { |
| 903 _json["defaultBucket"] = defaultBucket; |
| 904 } |
| 905 if (defaultCookieExpiration != null) { |
| 906 _json["defaultCookieExpiration"] = defaultCookieExpiration; |
| 907 } |
| 908 if (defaultHostname != null) { |
| 909 _json["defaultHostname"] = defaultHostname; |
| 910 } |
| 911 if (dispatchRules != null) { |
| 912 _json["dispatchRules"] = dispatchRules.map((value) => (value).toJson()).to
List(); |
| 913 } |
| 914 if (id != null) { |
| 915 _json["id"] = id; |
| 916 } |
| 917 if (location != null) { |
| 918 _json["location"] = location; |
| 919 } |
| 920 if (name != null) { |
| 921 _json["name"] = name; |
| 922 } |
| 923 return _json; |
| 924 } |
| 925 } |
| 926 |
| 927 /** |
| 928 * Automatic scaling is the scaling policy that App Engine has used since its |
| 929 * inception. It is based on request rate, response latencies, and other |
| 930 * application metrics. |
| 931 */ |
| 932 class AutomaticScaling { |
| 933 /** |
| 934 * The amount of time that the |
| 935 * [Autoscaler](https://cloud.google.com/compute/docs/autoscaler/) should wait |
| 936 * between changes to the number of virtual machines. Applies only to the VM |
| 937 * runtime. |
| 938 */ |
| 939 core.String coolDownPeriod; |
| 940 /** Target scaling by CPU usage. */ |
| 941 CpuUtilization cpuUtilization; |
| 942 /** Target scaling by disk usage. */ |
| 943 DiskUtilization diskUtilization; |
| 944 /** |
| 945 * The number of concurrent requests an automatic scaling instance can accept |
| 946 * before the scheduler spawns a new instance. Default value is chosen based |
| 947 * on the runtime. |
| 948 */ |
| 949 core.int maxConcurrentRequests; |
| 950 /** |
| 951 * The maximum number of idle instances that App Engine should maintain for |
| 952 * this version. |
| 953 */ |
| 954 core.int maxIdleInstances; |
| 955 /** |
| 956 * The maximum amount of time that App Engine should allow a request to wait |
| 957 * in the pending queue before starting a new instance to handle it. |
| 958 */ |
| 959 core.String maxPendingLatency; |
| 960 /** |
| 961 * Max number of instances that App Engine should start to handle requests. |
| 962 */ |
| 963 core.int maxTotalInstances; |
| 964 /** |
| 965 * The minimum number of idle instances that App Engine should maintain for |
| 966 * this version. Only applies to the default version of a service, since other |
| 967 * versions are not expected to receive significant traffic. |
| 968 */ |
| 969 core.int minIdleInstances; |
| 970 /** |
| 971 * The minimum amount of time that App Engine should allow a request to wait |
| 972 * in the pending queue before starting a new instance to handle it. |
| 973 */ |
| 974 core.String minPendingLatency; |
| 975 /** Minimum number of instances that App Engine should maintain. */ |
| 976 core.int minTotalInstances; |
| 977 /** Target scaling by network usage. */ |
| 978 NetworkUtilization networkUtilization; |
| 979 /** Target scaling by request utilization. */ |
| 980 RequestUtilization requestUtilization; |
| 981 |
| 982 AutomaticScaling(); |
| 983 |
| 984 AutomaticScaling.fromJson(core.Map _json) { |
| 985 if (_json.containsKey("coolDownPeriod")) { |
| 986 coolDownPeriod = _json["coolDownPeriod"]; |
| 987 } |
| 988 if (_json.containsKey("cpuUtilization")) { |
| 989 cpuUtilization = new CpuUtilization.fromJson(_json["cpuUtilization"]); |
| 990 } |
| 991 if (_json.containsKey("diskUtilization")) { |
| 992 diskUtilization = new DiskUtilization.fromJson(_json["diskUtilization"]); |
| 993 } |
| 994 if (_json.containsKey("maxConcurrentRequests")) { |
| 995 maxConcurrentRequests = _json["maxConcurrentRequests"]; |
| 996 } |
| 997 if (_json.containsKey("maxIdleInstances")) { |
| 998 maxIdleInstances = _json["maxIdleInstances"]; |
| 999 } |
| 1000 if (_json.containsKey("maxPendingLatency")) { |
| 1001 maxPendingLatency = _json["maxPendingLatency"]; |
| 1002 } |
| 1003 if (_json.containsKey("maxTotalInstances")) { |
| 1004 maxTotalInstances = _json["maxTotalInstances"]; |
| 1005 } |
| 1006 if (_json.containsKey("minIdleInstances")) { |
| 1007 minIdleInstances = _json["minIdleInstances"]; |
| 1008 } |
| 1009 if (_json.containsKey("minPendingLatency")) { |
| 1010 minPendingLatency = _json["minPendingLatency"]; |
| 1011 } |
| 1012 if (_json.containsKey("minTotalInstances")) { |
| 1013 minTotalInstances = _json["minTotalInstances"]; |
| 1014 } |
| 1015 if (_json.containsKey("networkUtilization")) { |
| 1016 networkUtilization = new NetworkUtilization.fromJson(_json["networkUtiliza
tion"]); |
| 1017 } |
| 1018 if (_json.containsKey("requestUtilization")) { |
| 1019 requestUtilization = new RequestUtilization.fromJson(_json["requestUtiliza
tion"]); |
| 1020 } |
| 1021 } |
| 1022 |
| 1023 core.Map toJson() { |
| 1024 var _json = new core.Map(); |
| 1025 if (coolDownPeriod != null) { |
| 1026 _json["coolDownPeriod"] = coolDownPeriod; |
| 1027 } |
| 1028 if (cpuUtilization != null) { |
| 1029 _json["cpuUtilization"] = (cpuUtilization).toJson(); |
| 1030 } |
| 1031 if (diskUtilization != null) { |
| 1032 _json["diskUtilization"] = (diskUtilization).toJson(); |
| 1033 } |
| 1034 if (maxConcurrentRequests != null) { |
| 1035 _json["maxConcurrentRequests"] = maxConcurrentRequests; |
| 1036 } |
| 1037 if (maxIdleInstances != null) { |
| 1038 _json["maxIdleInstances"] = maxIdleInstances; |
| 1039 } |
| 1040 if (maxPendingLatency != null) { |
| 1041 _json["maxPendingLatency"] = maxPendingLatency; |
| 1042 } |
| 1043 if (maxTotalInstances != null) { |
| 1044 _json["maxTotalInstances"] = maxTotalInstances; |
| 1045 } |
| 1046 if (minIdleInstances != null) { |
| 1047 _json["minIdleInstances"] = minIdleInstances; |
| 1048 } |
| 1049 if (minPendingLatency != null) { |
| 1050 _json["minPendingLatency"] = minPendingLatency; |
| 1051 } |
| 1052 if (minTotalInstances != null) { |
| 1053 _json["minTotalInstances"] = minTotalInstances; |
| 1054 } |
| 1055 if (networkUtilization != null) { |
| 1056 _json["networkUtilization"] = (networkUtilization).toJson(); |
| 1057 } |
| 1058 if (requestUtilization != null) { |
| 1059 _json["requestUtilization"] = (requestUtilization).toJson(); |
| 1060 } |
| 1061 return _json; |
| 1062 } |
| 1063 } |
| 1064 |
| 1065 /** |
| 1066 * A service with basic scaling will create an instance when the application |
| 1067 * receives a request. The instance will be turned down when the app becomes |
| 1068 * idle. Basic scaling is ideal for work that is intermittent or driven by user |
| 1069 * activity. |
| 1070 */ |
| 1071 class BasicScaling { |
| 1072 /** |
| 1073 * The instance will be shut down this amount of time after receiving its last |
| 1074 * request. |
| 1075 */ |
| 1076 core.String idleTimeout; |
| 1077 /** |
| 1078 * The maximum number of instances for App Engine to create for this version. |
| 1079 */ |
| 1080 core.int maxInstances; |
| 1081 |
| 1082 BasicScaling(); |
| 1083 |
| 1084 BasicScaling.fromJson(core.Map _json) { |
| 1085 if (_json.containsKey("idleTimeout")) { |
| 1086 idleTimeout = _json["idleTimeout"]; |
| 1087 } |
| 1088 if (_json.containsKey("maxInstances")) { |
| 1089 maxInstances = _json["maxInstances"]; |
| 1090 } |
| 1091 } |
| 1092 |
| 1093 core.Map toJson() { |
| 1094 var _json = new core.Map(); |
| 1095 if (idleTimeout != null) { |
| 1096 _json["idleTimeout"] = idleTimeout; |
| 1097 } |
| 1098 if (maxInstances != null) { |
| 1099 _json["maxInstances"] = maxInstances; |
| 1100 } |
| 1101 return _json; |
| 1102 } |
| 1103 } |
| 1104 |
| 1105 /** |
| 1106 * A Docker (container) image which should be used to start the application. |
| 1107 */ |
| 1108 class ContainerInfo { |
| 1109 /** |
| 1110 * Reference to a hosted container image. Must be a URI to a resource in a |
| 1111 * Docker repository. Must be fully qualified, including tag or digest. e.g. |
| 1112 * gcr.io/my-project/image:tag or gcr.io/my-project/image@digest |
| 1113 */ |
| 1114 core.String image; |
| 1115 |
| 1116 ContainerInfo(); |
| 1117 |
| 1118 ContainerInfo.fromJson(core.Map _json) { |
| 1119 if (_json.containsKey("image")) { |
| 1120 image = _json["image"]; |
| 1121 } |
| 1122 } |
| 1123 |
| 1124 core.Map toJson() { |
| 1125 var _json = new core.Map(); |
| 1126 if (image != null) { |
| 1127 _json["image"] = image; |
| 1128 } |
| 1129 return _json; |
| 1130 } |
| 1131 } |
| 1132 |
| 1133 /** Target scaling by CPU usage. */ |
| 1134 class CpuUtilization { |
| 1135 /** The period of time over which CPU utilization is calculated. */ |
| 1136 core.String aggregationWindowLength; |
| 1137 /** Target (0-1) CPU utilization ratio to maintain when scaling. */ |
| 1138 core.double targetUtilization; |
| 1139 |
| 1140 CpuUtilization(); |
| 1141 |
| 1142 CpuUtilization.fromJson(core.Map _json) { |
| 1143 if (_json.containsKey("aggregationWindowLength")) { |
| 1144 aggregationWindowLength = _json["aggregationWindowLength"]; |
| 1145 } |
| 1146 if (_json.containsKey("targetUtilization")) { |
| 1147 targetUtilization = _json["targetUtilization"]; |
| 1148 } |
| 1149 } |
| 1150 |
| 1151 core.Map toJson() { |
| 1152 var _json = new core.Map(); |
| 1153 if (aggregationWindowLength != null) { |
| 1154 _json["aggregationWindowLength"] = aggregationWindowLength; |
| 1155 } |
| 1156 if (targetUtilization != null) { |
| 1157 _json["targetUtilization"] = targetUtilization; |
| 1158 } |
| 1159 return _json; |
| 1160 } |
| 1161 } |
| 1162 |
| 1163 /** Code and application artifacts used to deploy a version to App Engine. */ |
| 1164 class Deployment { |
| 1165 /** |
| 1166 * If supplied, a docker (container) image which should be used to start the |
| 1167 * application. Only applicable to the 'vm' runtime. |
| 1168 */ |
| 1169 ContainerInfo container; |
| 1170 /** |
| 1171 * A manifest of files stored in Google Cloud Storage which should be included |
| 1172 * as part of this application. All files must be readable using the |
| 1173 * credentials supplied with this call. |
| 1174 */ |
| 1175 core.Map<core.String, FileInfo> files; |
| 1176 /** |
| 1177 * The origin of the source code for this deployment. There can be more than |
| 1178 * one source reference per Version if source code is distributed among |
| 1179 * multiple repositories. |
| 1180 */ |
| 1181 core.List<SourceReference> sourceReferences; |
| 1182 |
| 1183 Deployment(); |
| 1184 |
| 1185 Deployment.fromJson(core.Map _json) { |
| 1186 if (_json.containsKey("container")) { |
| 1187 container = new ContainerInfo.fromJson(_json["container"]); |
| 1188 } |
| 1189 if (_json.containsKey("files")) { |
| 1190 files = commons.mapMap(_json["files"], (item) => new FileInfo.fromJson(ite
m)); |
| 1191 } |
| 1192 if (_json.containsKey("sourceReferences")) { |
| 1193 sourceReferences = _json["sourceReferences"].map((value) => new SourceRefe
rence.fromJson(value)).toList(); |
| 1194 } |
| 1195 } |
| 1196 |
| 1197 core.Map toJson() { |
| 1198 var _json = new core.Map(); |
| 1199 if (container != null) { |
| 1200 _json["container"] = (container).toJson(); |
| 1201 } |
| 1202 if (files != null) { |
| 1203 _json["files"] = commons.mapMap(files, (item) => (item).toJson()); |
| 1204 } |
| 1205 if (sourceReferences != null) { |
| 1206 _json["sourceReferences"] = sourceReferences.map((value) => (value).toJson
()).toList(); |
| 1207 } |
| 1208 return _json; |
| 1209 } |
| 1210 } |
| 1211 |
| 1212 /** Target scaling by disk usage (for VM runtimes only). */ |
| 1213 class DiskUtilization { |
| 1214 /** Target bytes per second read. */ |
| 1215 core.int targetReadBytesPerSec; |
| 1216 /** Target ops per second read. */ |
| 1217 core.int targetReadOpsPerSec; |
| 1218 /** Target bytes per second written. */ |
| 1219 core.int targetWriteBytesPerSec; |
| 1220 /** Target ops per second written. */ |
| 1221 core.int targetWriteOpsPerSec; |
| 1222 |
| 1223 DiskUtilization(); |
| 1224 |
| 1225 DiskUtilization.fromJson(core.Map _json) { |
| 1226 if (_json.containsKey("targetReadBytesPerSec")) { |
| 1227 targetReadBytesPerSec = _json["targetReadBytesPerSec"]; |
| 1228 } |
| 1229 if (_json.containsKey("targetReadOpsPerSec")) { |
| 1230 targetReadOpsPerSec = _json["targetReadOpsPerSec"]; |
| 1231 } |
| 1232 if (_json.containsKey("targetWriteBytesPerSec")) { |
| 1233 targetWriteBytesPerSec = _json["targetWriteBytesPerSec"]; |
| 1234 } |
| 1235 if (_json.containsKey("targetWriteOpsPerSec")) { |
| 1236 targetWriteOpsPerSec = _json["targetWriteOpsPerSec"]; |
| 1237 } |
| 1238 } |
| 1239 |
| 1240 core.Map toJson() { |
| 1241 var _json = new core.Map(); |
| 1242 if (targetReadBytesPerSec != null) { |
| 1243 _json["targetReadBytesPerSec"] = targetReadBytesPerSec; |
| 1244 } |
| 1245 if (targetReadOpsPerSec != null) { |
| 1246 _json["targetReadOpsPerSec"] = targetReadOpsPerSec; |
| 1247 } |
| 1248 if (targetWriteBytesPerSec != null) { |
| 1249 _json["targetWriteBytesPerSec"] = targetWriteBytesPerSec; |
| 1250 } |
| 1251 if (targetWriteOpsPerSec != null) { |
| 1252 _json["targetWriteOpsPerSec"] = targetWriteOpsPerSec; |
| 1253 } |
| 1254 return _json; |
| 1255 } |
| 1256 } |
| 1257 |
| 1258 /** A custom static error page to be served when an error occurs. */ |
| 1259 class ErrorHandler { |
| 1260 /** |
| 1261 * The error condition this handler applies to. |
| 1262 * Possible string values are: |
| 1263 * - "ERROR_CODE_UNSPECIFIED" : A ERROR_CODE_UNSPECIFIED. |
| 1264 * - "ERROR_CODE_DEFAULT" : A ERROR_CODE_DEFAULT. |
| 1265 * - "ERROR_CODE_OVER_QUOTA" : A ERROR_CODE_OVER_QUOTA. |
| 1266 * - "ERROR_CODE_DOS_API_DENIAL" : A ERROR_CODE_DOS_API_DENIAL. |
| 1267 * - "ERROR_CODE_TIMEOUT" : A ERROR_CODE_TIMEOUT. |
| 1268 */ |
| 1269 core.String errorCode; |
| 1270 /** MIME type of file. If unspecified, "text/html" is assumed. */ |
| 1271 core.String mimeType; |
| 1272 /** Static file content to be served for this error. */ |
| 1273 core.String staticFile; |
| 1274 |
| 1275 ErrorHandler(); |
| 1276 |
| 1277 ErrorHandler.fromJson(core.Map _json) { |
| 1278 if (_json.containsKey("errorCode")) { |
| 1279 errorCode = _json["errorCode"]; |
| 1280 } |
| 1281 if (_json.containsKey("mimeType")) { |
| 1282 mimeType = _json["mimeType"]; |
| 1283 } |
| 1284 if (_json.containsKey("staticFile")) { |
| 1285 staticFile = _json["staticFile"]; |
| 1286 } |
| 1287 } |
| 1288 |
| 1289 core.Map toJson() { |
| 1290 var _json = new core.Map(); |
| 1291 if (errorCode != null) { |
| 1292 _json["errorCode"] = errorCode; |
| 1293 } |
| 1294 if (mimeType != null) { |
| 1295 _json["mimeType"] = mimeType; |
| 1296 } |
| 1297 if (staticFile != null) { |
| 1298 _json["staticFile"] = staticFile; |
| 1299 } |
| 1300 return _json; |
| 1301 } |
| 1302 } |
| 1303 |
| 1304 /** A single source file which is part of the application to be deployed. */ |
| 1305 class FileInfo { |
| 1306 /** |
| 1307 * The MIME type of the file; if unspecified, the value from Google Cloud |
| 1308 * Storage will be used. |
| 1309 */ |
| 1310 core.String mimeType; |
| 1311 /** The SHA1 (160 bits) hash of the file in hex. */ |
| 1312 core.String sha1Sum; |
| 1313 /** |
| 1314 * The URL source to use to fetch this file. Must be a URL to a resource in |
| 1315 * Google Cloud Storage in the form 'http(s)://storage.googleapis.com/\/\'. |
| 1316 */ |
| 1317 core.String sourceUrl; |
| 1318 |
| 1319 FileInfo(); |
| 1320 |
| 1321 FileInfo.fromJson(core.Map _json) { |
| 1322 if (_json.containsKey("mimeType")) { |
| 1323 mimeType = _json["mimeType"]; |
| 1324 } |
| 1325 if (_json.containsKey("sha1Sum")) { |
| 1326 sha1Sum = _json["sha1Sum"]; |
| 1327 } |
| 1328 if (_json.containsKey("sourceUrl")) { |
| 1329 sourceUrl = _json["sourceUrl"]; |
| 1330 } |
| 1331 } |
| 1332 |
| 1333 core.Map toJson() { |
| 1334 var _json = new core.Map(); |
| 1335 if (mimeType != null) { |
| 1336 _json["mimeType"] = mimeType; |
| 1337 } |
| 1338 if (sha1Sum != null) { |
| 1339 _json["sha1Sum"] = sha1Sum; |
| 1340 } |
| 1341 if (sourceUrl != null) { |
| 1342 _json["sourceUrl"] = sourceUrl; |
| 1343 } |
| 1344 return _json; |
| 1345 } |
| 1346 } |
| 1347 |
| 1348 /** |
| 1349 * Configure health checking for the VM instances. Unhealthy VM instances will |
| 1350 * be killed and replaced with new instances. |
| 1351 */ |
| 1352 class HealthCheck { |
| 1353 /** The interval between health checks. */ |
| 1354 core.String checkInterval; |
| 1355 /** Whether to explicitly disable health checks for this instance. */ |
| 1356 core.bool disableHealthCheck; |
| 1357 /** |
| 1358 * The number of consecutive successful health checks before receiving |
| 1359 * traffic. |
| 1360 */ |
| 1361 core.int healthyThreshold; |
| 1362 /** |
| 1363 * The host header to send when performing an HTTP health check (e.g. |
| 1364 * myapp.appspot.com) |
| 1365 */ |
| 1366 core.String host; |
| 1367 /** |
| 1368 * The number of consecutive failed health checks before an instance is |
| 1369 * restarted. |
| 1370 */ |
| 1371 core.int restartThreshold; |
| 1372 /** The amount of time before the health check is considered failed. */ |
| 1373 core.String timeout; |
| 1374 /** |
| 1375 * The number of consecutive failed health checks before removing traffic. |
| 1376 */ |
| 1377 core.int unhealthyThreshold; |
| 1378 |
| 1379 HealthCheck(); |
| 1380 |
| 1381 HealthCheck.fromJson(core.Map _json) { |
| 1382 if (_json.containsKey("checkInterval")) { |
| 1383 checkInterval = _json["checkInterval"]; |
| 1384 } |
| 1385 if (_json.containsKey("disableHealthCheck")) { |
| 1386 disableHealthCheck = _json["disableHealthCheck"]; |
| 1387 } |
| 1388 if (_json.containsKey("healthyThreshold")) { |
| 1389 healthyThreshold = _json["healthyThreshold"]; |
| 1390 } |
| 1391 if (_json.containsKey("host")) { |
| 1392 host = _json["host"]; |
| 1393 } |
| 1394 if (_json.containsKey("restartThreshold")) { |
| 1395 restartThreshold = _json["restartThreshold"]; |
| 1396 } |
| 1397 if (_json.containsKey("timeout")) { |
| 1398 timeout = _json["timeout"]; |
| 1399 } |
| 1400 if (_json.containsKey("unhealthyThreshold")) { |
| 1401 unhealthyThreshold = _json["unhealthyThreshold"]; |
| 1402 } |
| 1403 } |
| 1404 |
| 1405 core.Map toJson() { |
| 1406 var _json = new core.Map(); |
| 1407 if (checkInterval != null) { |
| 1408 _json["checkInterval"] = checkInterval; |
| 1409 } |
| 1410 if (disableHealthCheck != null) { |
| 1411 _json["disableHealthCheck"] = disableHealthCheck; |
| 1412 } |
| 1413 if (healthyThreshold != null) { |
| 1414 _json["healthyThreshold"] = healthyThreshold; |
| 1415 } |
| 1416 if (host != null) { |
| 1417 _json["host"] = host; |
| 1418 } |
| 1419 if (restartThreshold != null) { |
| 1420 _json["restartThreshold"] = restartThreshold; |
| 1421 } |
| 1422 if (timeout != null) { |
| 1423 _json["timeout"] = timeout; |
| 1424 } |
| 1425 if (unhealthyThreshold != null) { |
| 1426 _json["unhealthyThreshold"] = unhealthyThreshold; |
| 1427 } |
| 1428 return _json; |
| 1429 } |
| 1430 } |
| 1431 |
| 1432 /** A Python runtime third-party library required by the application. */ |
| 1433 class Library { |
| 1434 /** The name of the library, e.g. "PIL" or "django". */ |
| 1435 core.String name; |
| 1436 /** The version of the library to select, or "latest". */ |
| 1437 core.String version; |
| 1438 |
| 1439 Library(); |
| 1440 |
| 1441 Library.fromJson(core.Map _json) { |
| 1442 if (_json.containsKey("name")) { |
| 1443 name = _json["name"]; |
| 1444 } |
| 1445 if (_json.containsKey("version")) { |
| 1446 version = _json["version"]; |
| 1447 } |
| 1448 } |
| 1449 |
| 1450 core.Map toJson() { |
| 1451 var _json = new core.Map(); |
| 1452 if (name != null) { |
| 1453 _json["name"] = name; |
| 1454 } |
| 1455 if (version != null) { |
| 1456 _json["version"] = version; |
| 1457 } |
| 1458 return _json; |
| 1459 } |
| 1460 } |
| 1461 |
| 1462 /** The response message for Operations.ListOperations. */ |
| 1463 class ListOperationsResponse { |
| 1464 /** The standard List next-page token. */ |
| 1465 core.String nextPageToken; |
| 1466 /** A list of operations that matches the specified filter in the request. */ |
| 1467 core.List<Operation> operations; |
| 1468 |
| 1469 ListOperationsResponse(); |
| 1470 |
| 1471 ListOperationsResponse.fromJson(core.Map _json) { |
| 1472 if (_json.containsKey("nextPageToken")) { |
| 1473 nextPageToken = _json["nextPageToken"]; |
| 1474 } |
| 1475 if (_json.containsKey("operations")) { |
| 1476 operations = _json["operations"].map((value) => new Operation.fromJson(val
ue)).toList(); |
| 1477 } |
| 1478 } |
| 1479 |
| 1480 core.Map toJson() { |
| 1481 var _json = new core.Map(); |
| 1482 if (nextPageToken != null) { |
| 1483 _json["nextPageToken"] = nextPageToken; |
| 1484 } |
| 1485 if (operations != null) { |
| 1486 _json["operations"] = operations.map((value) => (value).toJson()).toList()
; |
| 1487 } |
| 1488 return _json; |
| 1489 } |
| 1490 } |
| 1491 |
| 1492 /** Response message for `Services.ListServices`. */ |
| 1493 class ListServicesResponse { |
| 1494 /** Continuation token for fetching the next page of results. */ |
| 1495 core.String nextPageToken; |
| 1496 /** The services belonging to the requested application. */ |
| 1497 core.List<Service> services; |
| 1498 |
| 1499 ListServicesResponse(); |
| 1500 |
| 1501 ListServicesResponse.fromJson(core.Map _json) { |
| 1502 if (_json.containsKey("nextPageToken")) { |
| 1503 nextPageToken = _json["nextPageToken"]; |
| 1504 } |
| 1505 if (_json.containsKey("services")) { |
| 1506 services = _json["services"].map((value) => new Service.fromJson(value)).t
oList(); |
| 1507 } |
| 1508 } |
| 1509 |
| 1510 core.Map toJson() { |
| 1511 var _json = new core.Map(); |
| 1512 if (nextPageToken != null) { |
| 1513 _json["nextPageToken"] = nextPageToken; |
| 1514 } |
| 1515 if (services != null) { |
| 1516 _json["services"] = services.map((value) => (value).toJson()).toList(); |
| 1517 } |
| 1518 return _json; |
| 1519 } |
| 1520 } |
| 1521 |
| 1522 /** Response message for `Versions.ListVersions`. */ |
| 1523 class ListVersionsResponse { |
| 1524 /** Continuation token for fetching the next page of results. */ |
| 1525 core.String nextPageToken; |
| 1526 /** The versions belonging to the requested application service. */ |
| 1527 core.List<Version> versions; |
| 1528 |
| 1529 ListVersionsResponse(); |
| 1530 |
| 1531 ListVersionsResponse.fromJson(core.Map _json) { |
| 1532 if (_json.containsKey("nextPageToken")) { |
| 1533 nextPageToken = _json["nextPageToken"]; |
| 1534 } |
| 1535 if (_json.containsKey("versions")) { |
| 1536 versions = _json["versions"].map((value) => new Version.fromJson(value)).t
oList(); |
| 1537 } |
| 1538 } |
| 1539 |
| 1540 core.Map toJson() { |
| 1541 var _json = new core.Map(); |
| 1542 if (nextPageToken != null) { |
| 1543 _json["nextPageToken"] = nextPageToken; |
| 1544 } |
| 1545 if (versions != null) { |
| 1546 _json["versions"] = versions.map((value) => (value).toJson()).toList(); |
| 1547 } |
| 1548 return _json; |
| 1549 } |
| 1550 } |
| 1551 |
| 1552 /** |
| 1553 * A service with manual scaling runs continuously, allowing you to perform |
| 1554 * complex initialization and rely on the state of its memory over time. |
| 1555 */ |
| 1556 class ManualScaling { |
| 1557 /** |
| 1558 * The number of instances to assign to the service at the start. This number |
| 1559 * can later be altered by using the [Modules |
| 1560 * API](https://cloud.google.com/appengine/docs/python/modules/functions) |
| 1561 * `set_num_instances()` function. |
| 1562 */ |
| 1563 core.int instances; |
| 1564 |
| 1565 ManualScaling(); |
| 1566 |
| 1567 ManualScaling.fromJson(core.Map _json) { |
| 1568 if (_json.containsKey("instances")) { |
| 1569 instances = _json["instances"]; |
| 1570 } |
| 1571 } |
| 1572 |
| 1573 core.Map toJson() { |
| 1574 var _json = new core.Map(); |
| 1575 if (instances != null) { |
| 1576 _json["instances"] = instances; |
| 1577 } |
| 1578 return _json; |
| 1579 } |
| 1580 } |
| 1581 |
| 1582 /** Used to specify extra network settings (for VM runtimes only). */ |
| 1583 class Network { |
| 1584 /** |
| 1585 * A list of ports (or port pairs) to forward from the VM into the app |
| 1586 * container. |
| 1587 */ |
| 1588 core.List<core.String> forwardedPorts; |
| 1589 /** A tag to apply to the VM instance during creation. */ |
| 1590 core.String instanceTag; |
| 1591 /** |
| 1592 * The Google Compute Engine network where the VMs will be created. If not |
| 1593 * specified, or empty, the network named "default" will be used. (The short |
| 1594 * name should be specified, not the resource path.) |
| 1595 */ |
| 1596 core.String name; |
| 1597 |
| 1598 Network(); |
| 1599 |
| 1600 Network.fromJson(core.Map _json) { |
| 1601 if (_json.containsKey("forwardedPorts")) { |
| 1602 forwardedPorts = _json["forwardedPorts"]; |
| 1603 } |
| 1604 if (_json.containsKey("instanceTag")) { |
| 1605 instanceTag = _json["instanceTag"]; |
| 1606 } |
| 1607 if (_json.containsKey("name")) { |
| 1608 name = _json["name"]; |
| 1609 } |
| 1610 } |
| 1611 |
| 1612 core.Map toJson() { |
| 1613 var _json = new core.Map(); |
| 1614 if (forwardedPorts != null) { |
| 1615 _json["forwardedPorts"] = forwardedPorts; |
| 1616 } |
| 1617 if (instanceTag != null) { |
| 1618 _json["instanceTag"] = instanceTag; |
| 1619 } |
| 1620 if (name != null) { |
| 1621 _json["name"] = name; |
| 1622 } |
| 1623 return _json; |
| 1624 } |
| 1625 } |
| 1626 |
| 1627 /** Target scaling by network usage (for VM runtimes only). */ |
| 1628 class NetworkUtilization { |
| 1629 /** Target bytes per second received. */ |
| 1630 core.int targetReceivedBytesPerSec; |
| 1631 /** Target packets per second received. */ |
| 1632 core.int targetReceivedPacketsPerSec; |
| 1633 /** Target bytes per second sent. */ |
| 1634 core.int targetSentBytesPerSec; |
| 1635 /** Target packets per second sent. */ |
| 1636 core.int targetSentPacketsPerSec; |
| 1637 |
| 1638 NetworkUtilization(); |
| 1639 |
| 1640 NetworkUtilization.fromJson(core.Map _json) { |
| 1641 if (_json.containsKey("targetReceivedBytesPerSec")) { |
| 1642 targetReceivedBytesPerSec = _json["targetReceivedBytesPerSec"]; |
| 1643 } |
| 1644 if (_json.containsKey("targetReceivedPacketsPerSec")) { |
| 1645 targetReceivedPacketsPerSec = _json["targetReceivedPacketsPerSec"]; |
| 1646 } |
| 1647 if (_json.containsKey("targetSentBytesPerSec")) { |
| 1648 targetSentBytesPerSec = _json["targetSentBytesPerSec"]; |
| 1649 } |
| 1650 if (_json.containsKey("targetSentPacketsPerSec")) { |
| 1651 targetSentPacketsPerSec = _json["targetSentPacketsPerSec"]; |
| 1652 } |
| 1653 } |
| 1654 |
| 1655 core.Map toJson() { |
| 1656 var _json = new core.Map(); |
| 1657 if (targetReceivedBytesPerSec != null) { |
| 1658 _json["targetReceivedBytesPerSec"] = targetReceivedBytesPerSec; |
| 1659 } |
| 1660 if (targetReceivedPacketsPerSec != null) { |
| 1661 _json["targetReceivedPacketsPerSec"] = targetReceivedPacketsPerSec; |
| 1662 } |
| 1663 if (targetSentBytesPerSec != null) { |
| 1664 _json["targetSentBytesPerSec"] = targetSentBytesPerSec; |
| 1665 } |
| 1666 if (targetSentPacketsPerSec != null) { |
| 1667 _json["targetSentPacketsPerSec"] = targetSentPacketsPerSec; |
| 1668 } |
| 1669 return _json; |
| 1670 } |
| 1671 } |
| 1672 |
| 1673 /** |
| 1674 * This resource represents a long-running operation that is the result of a |
| 1675 * network API call. |
| 1676 */ |
| 1677 class Operation { |
| 1678 /** |
| 1679 * If the value is `false`, it means the operation is still in progress. If |
| 1680 * true, the operation is completed, and either `error` or `response` is |
| 1681 * available. |
| 1682 */ |
| 1683 core.bool done; |
| 1684 /** The error result of the operation in case of failure. */ |
| 1685 Status error; |
| 1686 /** |
| 1687 * Service-specific metadata associated with the operation. It typically |
| 1688 * contains progress information and common metadata such as create time. Some |
| 1689 * services might not provide such metadata. Any method that returns a |
| 1690 * long-running operation should document the metadata type, if any. |
| 1691 * |
| 1692 * The values for Object must be JSON objects. It can consist of `num`, |
| 1693 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1694 */ |
| 1695 core.Map<core.String, core.Object> metadata; |
| 1696 /** |
| 1697 * The server-assigned name, which is only unique within the same service that |
| 1698 * originally returns it. If you use the default HTTP mapping above, the |
| 1699 * `name` should have the format of `operations/some/unique/name`. |
| 1700 */ |
| 1701 core.String name; |
| 1702 /** |
| 1703 * The normal response of the operation in case of success. If the original |
| 1704 * method returns no data on success, such as `Delete`, the response is |
| 1705 * `google.protobuf.Empty`. If the original method is standard |
| 1706 * `Get`/`Create`/`Update`, the response should be the resource. For other |
| 1707 * methods, the response should have the type `XxxResponse`, where `Xxx` is |
| 1708 * the original method name. For example, if the original method name is |
| 1709 * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. |
| 1710 * |
| 1711 * The values for Object must be JSON objects. It can consist of `num`, |
| 1712 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 1713 */ |
| 1714 core.Map<core.String, core.Object> response; |
| 1715 |
| 1716 Operation(); |
| 1717 |
| 1718 Operation.fromJson(core.Map _json) { |
| 1719 if (_json.containsKey("done")) { |
| 1720 done = _json["done"]; |
| 1721 } |
| 1722 if (_json.containsKey("error")) { |
| 1723 error = new Status.fromJson(_json["error"]); |
| 1724 } |
| 1725 if (_json.containsKey("metadata")) { |
| 1726 metadata = _json["metadata"]; |
| 1727 } |
| 1728 if (_json.containsKey("name")) { |
| 1729 name = _json["name"]; |
| 1730 } |
| 1731 if (_json.containsKey("response")) { |
| 1732 response = _json["response"]; |
| 1733 } |
| 1734 } |
| 1735 |
| 1736 core.Map toJson() { |
| 1737 var _json = new core.Map(); |
| 1738 if (done != null) { |
| 1739 _json["done"] = done; |
| 1740 } |
| 1741 if (error != null) { |
| 1742 _json["error"] = (error).toJson(); |
| 1743 } |
| 1744 if (metadata != null) { |
| 1745 _json["metadata"] = metadata; |
| 1746 } |
| 1747 if (name != null) { |
| 1748 _json["name"] = name; |
| 1749 } |
| 1750 if (response != null) { |
| 1751 _json["response"] = response; |
| 1752 } |
| 1753 return _json; |
| 1754 } |
| 1755 } |
| 1756 |
| 1757 /** Metadata for the given google.longrunning.Operation. */ |
| 1758 class OperationMetadata { |
| 1759 /** |
| 1760 * Timestamp that this operation was completed. (Not present if the operation |
| 1761 * is still in progress.) @OutputOnly |
| 1762 */ |
| 1763 core.String endTime; |
| 1764 /** Timestamp that this operation was received. @OutputOnly */ |
| 1765 core.String insertTime; |
| 1766 /** |
| 1767 * API method name that initiated the operation. Example: |
| 1768 * "google.appengine.v1beta4.Version.CreateVersion". @OutputOnly |
| 1769 */ |
| 1770 core.String method; |
| 1771 /** |
| 1772 * The type of the operation (deprecated, use method field instead). Example: |
| 1773 * "create_version". @OutputOnly |
| 1774 */ |
| 1775 core.String operationType; |
| 1776 /** |
| 1777 * Resource that this operation is acting on. Example: |
| 1778 * "apps/myapp/modules/default". @OutputOnly |
| 1779 */ |
| 1780 core.String target; |
| 1781 /** The user who requested this operation. @OutputOnly */ |
| 1782 core.String user; |
| 1783 |
| 1784 OperationMetadata(); |
| 1785 |
| 1786 OperationMetadata.fromJson(core.Map _json) { |
| 1787 if (_json.containsKey("endTime")) { |
| 1788 endTime = _json["endTime"]; |
| 1789 } |
| 1790 if (_json.containsKey("insertTime")) { |
| 1791 insertTime = _json["insertTime"]; |
| 1792 } |
| 1793 if (_json.containsKey("method")) { |
| 1794 method = _json["method"]; |
| 1795 } |
| 1796 if (_json.containsKey("operationType")) { |
| 1797 operationType = _json["operationType"]; |
| 1798 } |
| 1799 if (_json.containsKey("target")) { |
| 1800 target = _json["target"]; |
| 1801 } |
| 1802 if (_json.containsKey("user")) { |
| 1803 user = _json["user"]; |
| 1804 } |
| 1805 } |
| 1806 |
| 1807 core.Map toJson() { |
| 1808 var _json = new core.Map(); |
| 1809 if (endTime != null) { |
| 1810 _json["endTime"] = endTime; |
| 1811 } |
| 1812 if (insertTime != null) { |
| 1813 _json["insertTime"] = insertTime; |
| 1814 } |
| 1815 if (method != null) { |
| 1816 _json["method"] = method; |
| 1817 } |
| 1818 if (operationType != null) { |
| 1819 _json["operationType"] = operationType; |
| 1820 } |
| 1821 if (target != null) { |
| 1822 _json["target"] = target; |
| 1823 } |
| 1824 if (user != null) { |
| 1825 _json["user"] = user; |
| 1826 } |
| 1827 return _json; |
| 1828 } |
| 1829 } |
| 1830 |
| 1831 /** Metadata for the given google.longrunning.Operation. */ |
| 1832 class OperationMetadataV1Beta5 { |
| 1833 /** |
| 1834 * Timestamp that this operation was completed. (Not present if the operation |
| 1835 * is still in progress.) @OutputOnly |
| 1836 */ |
| 1837 core.String endTime; |
| 1838 /** Timestamp that this operation was received. @OutputOnly */ |
| 1839 core.String insertTime; |
| 1840 /** |
| 1841 * API method name that initiated the operation. Example: |
| 1842 * "google.appengine.v1beta5.Version.CreateVersion". @OutputOnly |
| 1843 */ |
| 1844 core.String method; |
| 1845 /** |
| 1846 * Resource that this operation is acting on. Example: |
| 1847 * "apps/myapp/services/default". @OutputOnly |
| 1848 */ |
| 1849 core.String target; |
| 1850 /** The user who requested this operation. @OutputOnly */ |
| 1851 core.String user; |
| 1852 |
| 1853 OperationMetadataV1Beta5(); |
| 1854 |
| 1855 OperationMetadataV1Beta5.fromJson(core.Map _json) { |
| 1856 if (_json.containsKey("endTime")) { |
| 1857 endTime = _json["endTime"]; |
| 1858 } |
| 1859 if (_json.containsKey("insertTime")) { |
| 1860 insertTime = _json["insertTime"]; |
| 1861 } |
| 1862 if (_json.containsKey("method")) { |
| 1863 method = _json["method"]; |
| 1864 } |
| 1865 if (_json.containsKey("target")) { |
| 1866 target = _json["target"]; |
| 1867 } |
| 1868 if (_json.containsKey("user")) { |
| 1869 user = _json["user"]; |
| 1870 } |
| 1871 } |
| 1872 |
| 1873 core.Map toJson() { |
| 1874 var _json = new core.Map(); |
| 1875 if (endTime != null) { |
| 1876 _json["endTime"] = endTime; |
| 1877 } |
| 1878 if (insertTime != null) { |
| 1879 _json["insertTime"] = insertTime; |
| 1880 } |
| 1881 if (method != null) { |
| 1882 _json["method"] = method; |
| 1883 } |
| 1884 if (target != null) { |
| 1885 _json["target"] = target; |
| 1886 } |
| 1887 if (user != null) { |
| 1888 _json["user"] = user; |
| 1889 } |
| 1890 return _json; |
| 1891 } |
| 1892 } |
| 1893 |
| 1894 /** Target scaling by request utilization (for VM runtimes only). */ |
| 1895 class RequestUtilization { |
| 1896 /** Target number of concurrent requests. */ |
| 1897 core.int targetConcurrentRequests; |
| 1898 /** Target requests per second. */ |
| 1899 core.int targetRequestCountPerSec; |
| 1900 |
| 1901 RequestUtilization(); |
| 1902 |
| 1903 RequestUtilization.fromJson(core.Map _json) { |
| 1904 if (_json.containsKey("targetConcurrentRequests")) { |
| 1905 targetConcurrentRequests = _json["targetConcurrentRequests"]; |
| 1906 } |
| 1907 if (_json.containsKey("targetRequestCountPerSec")) { |
| 1908 targetRequestCountPerSec = _json["targetRequestCountPerSec"]; |
| 1909 } |
| 1910 } |
| 1911 |
| 1912 core.Map toJson() { |
| 1913 var _json = new core.Map(); |
| 1914 if (targetConcurrentRequests != null) { |
| 1915 _json["targetConcurrentRequests"] = targetConcurrentRequests; |
| 1916 } |
| 1917 if (targetRequestCountPerSec != null) { |
| 1918 _json["targetRequestCountPerSec"] = targetRequestCountPerSec; |
| 1919 } |
| 1920 return _json; |
| 1921 } |
| 1922 } |
| 1923 |
| 1924 /** Used to specify how many machine resources an app version needs. */ |
| 1925 class Resources { |
| 1926 /** How many CPU cores an app version needs. */ |
| 1927 core.double cpu; |
| 1928 /** How much disk size, in GB, an app version needs. */ |
| 1929 core.double diskGb; |
| 1930 /** How much memory, in GB, an app version needs. */ |
| 1931 core.double memoryGb; |
| 1932 |
| 1933 Resources(); |
| 1934 |
| 1935 Resources.fromJson(core.Map _json) { |
| 1936 if (_json.containsKey("cpu")) { |
| 1937 cpu = _json["cpu"]; |
| 1938 } |
| 1939 if (_json.containsKey("diskGb")) { |
| 1940 diskGb = _json["diskGb"]; |
| 1941 } |
| 1942 if (_json.containsKey("memoryGb")) { |
| 1943 memoryGb = _json["memoryGb"]; |
| 1944 } |
| 1945 } |
| 1946 |
| 1947 core.Map toJson() { |
| 1948 var _json = new core.Map(); |
| 1949 if (cpu != null) { |
| 1950 _json["cpu"] = cpu; |
| 1951 } |
| 1952 if (diskGb != null) { |
| 1953 _json["diskGb"] = diskGb; |
| 1954 } |
| 1955 if (memoryGb != null) { |
| 1956 _json["memoryGb"] = memoryGb; |
| 1957 } |
| 1958 return _json; |
| 1959 } |
| 1960 } |
| 1961 |
| 1962 /** Executes a script to handle the request that matches the URL pattern. */ |
| 1963 class ScriptHandler { |
| 1964 /** Specifies the path to the script from the application root directory. */ |
| 1965 core.String scriptPath; |
| 1966 |
| 1967 ScriptHandler(); |
| 1968 |
| 1969 ScriptHandler.fromJson(core.Map _json) { |
| 1970 if (_json.containsKey("scriptPath")) { |
| 1971 scriptPath = _json["scriptPath"]; |
| 1972 } |
| 1973 } |
| 1974 |
| 1975 core.Map toJson() { |
| 1976 var _json = new core.Map(); |
| 1977 if (scriptPath != null) { |
| 1978 _json["scriptPath"] = scriptPath; |
| 1979 } |
| 1980 return _json; |
| 1981 } |
| 1982 } |
| 1983 |
| 1984 /** |
| 1985 * A service is a logical component of an application that can share state and |
| 1986 * communicate in a secure fashion with other services. For example, an |
| 1987 * application that handles customer requests might include separate services to |
| 1988 * handle other tasks such as API requests from mobile devices or backend data |
| 1989 * analysis. Each service has a collection of versions that define a specific |
| 1990 * set of code used to implement the functionality of that service. |
| 1991 */ |
| 1992 class Service { |
| 1993 /** |
| 1994 * The relative name/path of the service within the application. Example: |
| 1995 * "default" @OutputOnly |
| 1996 */ |
| 1997 core.String id; |
| 1998 /** |
| 1999 * The full path to the Service resource in the API. Example: |
| 2000 * "apps/myapp/services/default" @OutputOnly |
| 2001 */ |
| 2002 core.String name; |
| 2003 /** |
| 2004 * A mapping that defines fractional HTTP traffic diversion to different |
| 2005 * versions within the service. |
| 2006 */ |
| 2007 TrafficSplit split; |
| 2008 |
| 2009 Service(); |
| 2010 |
| 2011 Service.fromJson(core.Map _json) { |
| 2012 if (_json.containsKey("id")) { |
| 2013 id = _json["id"]; |
| 2014 } |
| 2015 if (_json.containsKey("name")) { |
| 2016 name = _json["name"]; |
| 2017 } |
| 2018 if (_json.containsKey("split")) { |
| 2019 split = new TrafficSplit.fromJson(_json["split"]); |
| 2020 } |
| 2021 } |
| 2022 |
| 2023 core.Map toJson() { |
| 2024 var _json = new core.Map(); |
| 2025 if (id != null) { |
| 2026 _json["id"] = id; |
| 2027 } |
| 2028 if (name != null) { |
| 2029 _json["name"] = name; |
| 2030 } |
| 2031 if (split != null) { |
| 2032 _json["split"] = (split).toJson(); |
| 2033 } |
| 2034 return _json; |
| 2035 } |
| 2036 } |
| 2037 |
| 2038 /** |
| 2039 * A reference to a particular snapshot of the source tree used to build and |
| 2040 * deploy the application. |
| 2041 */ |
| 2042 class SourceReference { |
| 2043 /** |
| 2044 * Optional. A URI string identifying the repository. Example: |
| 2045 * "https://source.developers.google.com/p/app-123/r/default" |
| 2046 */ |
| 2047 core.String repository; |
| 2048 /** |
| 2049 * The canonical (and persistent) identifier of the deployed revision, i.e. |
| 2050 * any kind of aliases including tags or branch names are not allowed. Example |
| 2051 * (git): "2198322f89e0bb2e25021667c2ed489d1fd34e6b" |
| 2052 */ |
| 2053 core.String revisionId; |
| 2054 |
| 2055 SourceReference(); |
| 2056 |
| 2057 SourceReference.fromJson(core.Map _json) { |
| 2058 if (_json.containsKey("repository")) { |
| 2059 repository = _json["repository"]; |
| 2060 } |
| 2061 if (_json.containsKey("revisionId")) { |
| 2062 revisionId = _json["revisionId"]; |
| 2063 } |
| 2064 } |
| 2065 |
| 2066 core.Map toJson() { |
| 2067 var _json = new core.Map(); |
| 2068 if (repository != null) { |
| 2069 _json["repository"] = repository; |
| 2070 } |
| 2071 if (revisionId != null) { |
| 2072 _json["revisionId"] = revisionId; |
| 2073 } |
| 2074 return _json; |
| 2075 } |
| 2076 } |
| 2077 |
| 2078 /** |
| 2079 * Files served directly to the user for a given URL, such as images, CSS |
| 2080 * stylesheets, or JavaScript source files. Static file handlers describe which |
| 2081 * files in the application directory are static files, and which URLs serve |
| 2082 * them. |
| 2083 */ |
| 2084 class StaticFilesHandler { |
| 2085 /** |
| 2086 * By default, files declared in static file handlers are uploaded as static |
| 2087 * data and are only served to end users, they cannot be read by an |
| 2088 * application. If this field is set to true, the files are also uploaded as |
| 2089 * code data so your application can read them. Both uploads are charged |
| 2090 * against your code and static data storage resource quotas. |
| 2091 */ |
| 2092 core.bool applicationReadable; |
| 2093 /** |
| 2094 * The length of time a static file served by this handler ought to be cached |
| 2095 * by web proxies and browsers. |
| 2096 */ |
| 2097 core.String expiration; |
| 2098 /** HTTP headers to use for all responses from these URLs. */ |
| 2099 core.Map<core.String, core.String> httpHeaders; |
| 2100 /** |
| 2101 * If specified, all files served by this handler will be served using the |
| 2102 * specified MIME type. If not specified, the MIME type for a file will be |
| 2103 * derived from the file's filename extension. |
| 2104 */ |
| 2105 core.String mimeType; |
| 2106 /** |
| 2107 * The path to the static files matched by the URL pattern, from the |
| 2108 * application root directory. The path can refer to text matched in groupings |
| 2109 * in the URL pattern. |
| 2110 */ |
| 2111 core.String path; |
| 2112 /** |
| 2113 * If true, this UrlMap entry does not match the request unless the file |
| 2114 * referenced by the handler also exists. If no such file exists, processing |
| 2115 * will continue with the next UrlMap that matches the requested URL. |
| 2116 */ |
| 2117 core.bool requireMatchingFile; |
| 2118 /** |
| 2119 * A regular expression that matches the file paths for all files that will be |
| 2120 * referenced by this handler. |
| 2121 */ |
| 2122 core.String uploadPathRegex; |
| 2123 |
| 2124 StaticFilesHandler(); |
| 2125 |
| 2126 StaticFilesHandler.fromJson(core.Map _json) { |
| 2127 if (_json.containsKey("applicationReadable")) { |
| 2128 applicationReadable = _json["applicationReadable"]; |
| 2129 } |
| 2130 if (_json.containsKey("expiration")) { |
| 2131 expiration = _json["expiration"]; |
| 2132 } |
| 2133 if (_json.containsKey("httpHeaders")) { |
| 2134 httpHeaders = _json["httpHeaders"]; |
| 2135 } |
| 2136 if (_json.containsKey("mimeType")) { |
| 2137 mimeType = _json["mimeType"]; |
| 2138 } |
| 2139 if (_json.containsKey("path")) { |
| 2140 path = _json["path"]; |
| 2141 } |
| 2142 if (_json.containsKey("requireMatchingFile")) { |
| 2143 requireMatchingFile = _json["requireMatchingFile"]; |
| 2144 } |
| 2145 if (_json.containsKey("uploadPathRegex")) { |
| 2146 uploadPathRegex = _json["uploadPathRegex"]; |
| 2147 } |
| 2148 } |
| 2149 |
| 2150 core.Map toJson() { |
| 2151 var _json = new core.Map(); |
| 2152 if (applicationReadable != null) { |
| 2153 _json["applicationReadable"] = applicationReadable; |
| 2154 } |
| 2155 if (expiration != null) { |
| 2156 _json["expiration"] = expiration; |
| 2157 } |
| 2158 if (httpHeaders != null) { |
| 2159 _json["httpHeaders"] = httpHeaders; |
| 2160 } |
| 2161 if (mimeType != null) { |
| 2162 _json["mimeType"] = mimeType; |
| 2163 } |
| 2164 if (path != null) { |
| 2165 _json["path"] = path; |
| 2166 } |
| 2167 if (requireMatchingFile != null) { |
| 2168 _json["requireMatchingFile"] = requireMatchingFile; |
| 2169 } |
| 2170 if (uploadPathRegex != null) { |
| 2171 _json["uploadPathRegex"] = uploadPathRegex; |
| 2172 } |
| 2173 return _json; |
| 2174 } |
| 2175 } |
| 2176 |
| 2177 /** |
| 2178 * The `Status` type defines a logical error model that is suitable for |
| 2179 * different programming environments, including REST APIs and RPC APIs. It is |
| 2180 * used by [gRPC](https://github.com/grpc). The error model is designed to be: - |
| 2181 * Simple to use and understand for most users - Flexible enough to meet |
| 2182 * unexpected needs # Overview The `Status` message contains three pieces of |
| 2183 * data: error code, error message, and error details. The error code should be |
| 2184 * an enum value of google.rpc.Code, but it may accept additional error codes if |
| 2185 * needed. The error message should be a developer-facing English message that |
| 2186 * helps developers *understand* and *resolve* the error. If a localized |
| 2187 * user-facing error message is needed, put the localized message in the error |
| 2188 * details or localize it in the client. The optional error details may contain |
| 2189 * arbitrary information about the error. There is a predefined set of error |
| 2190 * detail types in the package `google.rpc` which can be used for common error |
| 2191 * conditions. # Language mapping The `Status` message is the logical |
| 2192 * representation of the error model, but it is not necessarily the actual wire |
| 2193 * format. When the `Status` message is exposed in different client libraries |
| 2194 * and different wire protocols, it can be mapped differently. For example, it |
| 2195 * will likely be mapped to some exceptions in Java, but more likely mapped to |
| 2196 * some error codes in C. # Other uses The error model and the `Status` message |
| 2197 * can be used in a variety of environments, either with or without APIs, to |
| 2198 * provide a consistent developer experience across different environments. |
| 2199 * Example uses of this error model include: - Partial errors. If a service |
| 2200 * needs to return partial errors to the client, it may embed the `Status` in |
| 2201 * the normal response to indicate the partial errors. - Workflow errors. A |
| 2202 * typical workflow has multiple steps. Each step may have a `Status` message |
| 2203 * for error reporting purpose. - Batch operations. If a client uses batch |
| 2204 * request and batch response, the `Status` message should be used directly |
| 2205 * inside batch response, one for each error sub-response. - Asynchronous |
| 2206 * operations. If an API call embeds asynchronous operation results in its |
| 2207 * response, the status of those operations should be represented directly using |
| 2208 * the `Status` message. - Logging. If some API errors are stored in logs, the |
| 2209 * message `Status` could be used directly after any stripping needed for |
| 2210 * security/privacy reasons. |
| 2211 */ |
| 2212 class Status { |
| 2213 /** The status code, which should be an enum value of google.rpc.Code. */ |
| 2214 core.int code; |
| 2215 /** |
| 2216 * A list of messages that carry the error details. There will be a common set |
| 2217 * of message types for APIs to use. |
| 2218 * |
| 2219 * The values for Object must be JSON objects. It can consist of `num`, |
| 2220 * `String`, `bool` and `null` as well as `Map` and `List` values. |
| 2221 */ |
| 2222 core.List<core.Map<core.String, core.Object>> details; |
| 2223 /** |
| 2224 * A developer-facing error message, which should be in English. Any |
| 2225 * user-facing error message should be localized and sent in the |
| 2226 * google.rpc.Status.details field, or localized by the client. |
| 2227 */ |
| 2228 core.String message; |
| 2229 |
| 2230 Status(); |
| 2231 |
| 2232 Status.fromJson(core.Map _json) { |
| 2233 if (_json.containsKey("code")) { |
| 2234 code = _json["code"]; |
| 2235 } |
| 2236 if (_json.containsKey("details")) { |
| 2237 details = _json["details"]; |
| 2238 } |
| 2239 if (_json.containsKey("message")) { |
| 2240 message = _json["message"]; |
| 2241 } |
| 2242 } |
| 2243 |
| 2244 core.Map toJson() { |
| 2245 var _json = new core.Map(); |
| 2246 if (code != null) { |
| 2247 _json["code"] = code; |
| 2248 } |
| 2249 if (details != null) { |
| 2250 _json["details"] = details; |
| 2251 } |
| 2252 if (message != null) { |
| 2253 _json["message"] = message; |
| 2254 } |
| 2255 return _json; |
| 2256 } |
| 2257 } |
| 2258 |
| 2259 /** |
| 2260 * Configuration for traffic splitting for versions within a single service. |
| 2261 * Traffic splitting allows traffic directed to the service to be assigned to |
| 2262 * one of several versions in a fractional way, enabling experiments and |
| 2263 * canarying new builds, for example. |
| 2264 */ |
| 2265 class TrafficSplit { |
| 2266 /** |
| 2267 * Mapping from service version IDs within the service to fractional (0.000, |
| 2268 * 1] allocations of traffic for that version. Each version may only be |
| 2269 * specified once, but some versions in the service may not have any traffic |
| 2270 * allocation. Services that have traffic allocated in this field may not be |
| 2271 * deleted until the service is deleted, or their traffic allocation is |
| 2272 * removed. Allocations must sum to 1. Supports precision up to two decimal |
| 2273 * places for IP-based splits and up to three decimal places for cookie-based |
| 2274 * splits. |
| 2275 */ |
| 2276 core.Map<core.String, core.double> allocations; |
| 2277 /** |
| 2278 * Which mechanism should be used as a selector when choosing a version to |
| 2279 * send a request to. The traffic selection algorithm will be stable for |
| 2280 * either type until allocations are changed. |
| 2281 * Possible string values are: |
| 2282 * - "UNSPECIFIED" : A UNSPECIFIED. |
| 2283 * - "COOKIE" : A COOKIE. |
| 2284 * - "IP" : A IP. |
| 2285 */ |
| 2286 core.String shardBy; |
| 2287 |
| 2288 TrafficSplit(); |
| 2289 |
| 2290 TrafficSplit.fromJson(core.Map _json) { |
| 2291 if (_json.containsKey("allocations")) { |
| 2292 allocations = _json["allocations"]; |
| 2293 } |
| 2294 if (_json.containsKey("shardBy")) { |
| 2295 shardBy = _json["shardBy"]; |
| 2296 } |
| 2297 } |
| 2298 |
| 2299 core.Map toJson() { |
| 2300 var _json = new core.Map(); |
| 2301 if (allocations != null) { |
| 2302 _json["allocations"] = allocations; |
| 2303 } |
| 2304 if (shardBy != null) { |
| 2305 _json["shardBy"] = shardBy; |
| 2306 } |
| 2307 return _json; |
| 2308 } |
| 2309 } |
| 2310 |
| 2311 /** Rules to match an HTTP request and dispatch that request to a service. */ |
| 2312 class UrlDispatchRule { |
| 2313 /** |
| 2314 * The domain name to match on. Supports '*' (glob) wildcarding on the |
| 2315 * left-hand side of a '.'. If empty, all domains will be matched (the same as |
| 2316 * '*'). |
| 2317 */ |
| 2318 core.String domain; |
| 2319 /** |
| 2320 * The pathname within the host. This must start with a '/'. A single '*' |
| 2321 * (glob) can be included at the end of the path. The sum of the lengths of |
| 2322 * the domain and path may not exceed 100 characters. |
| 2323 */ |
| 2324 core.String path; |
| 2325 /** |
| 2326 * The resource id of a Service in this application that should service the |
| 2327 * matched request. The Service must already exist. Example: "default". |
| 2328 */ |
| 2329 core.String service; |
| 2330 |
| 2331 UrlDispatchRule(); |
| 2332 |
| 2333 UrlDispatchRule.fromJson(core.Map _json) { |
| 2334 if (_json.containsKey("domain")) { |
| 2335 domain = _json["domain"]; |
| 2336 } |
| 2337 if (_json.containsKey("path")) { |
| 2338 path = _json["path"]; |
| 2339 } |
| 2340 if (_json.containsKey("service")) { |
| 2341 service = _json["service"]; |
| 2342 } |
| 2343 } |
| 2344 |
| 2345 core.Map toJson() { |
| 2346 var _json = new core.Map(); |
| 2347 if (domain != null) { |
| 2348 _json["domain"] = domain; |
| 2349 } |
| 2350 if (path != null) { |
| 2351 _json["path"] = path; |
| 2352 } |
| 2353 if (service != null) { |
| 2354 _json["service"] = service; |
| 2355 } |
| 2356 return _json; |
| 2357 } |
| 2358 } |
| 2359 |
| 2360 /** |
| 2361 * A URL pattern and description of how it should be handled. App Engine can |
| 2362 * handle URLs by executing application code, or by serving static files |
| 2363 * uploaded with the code, such as images, CSS or JavaScript. |
| 2364 */ |
| 2365 class UrlMap { |
| 2366 /** Use API Endpoints to handle requests. */ |
| 2367 ApiEndpointHandler apiEndpoint; |
| 2368 /** |
| 2369 * For users not logged in, how to handle access to resources with required |
| 2370 * login. Defaults to "redirect". |
| 2371 * Possible string values are: |
| 2372 * - "AUTH_FAIL_ACTION_UNSPECIFIED" : A AUTH_FAIL_ACTION_UNSPECIFIED. |
| 2373 * - "AUTH_FAIL_ACTION_REDIRECT" : A AUTH_FAIL_ACTION_REDIRECT. |
| 2374 * - "AUTH_FAIL_ACTION_UNAUTHORIZED" : A AUTH_FAIL_ACTION_UNAUTHORIZED. |
| 2375 */ |
| 2376 core.String authFailAction; |
| 2377 /** |
| 2378 * What level of login is required to access this resource. |
| 2379 * Possible string values are: |
| 2380 * - "LOGIN_UNSPECIFIED" : A LOGIN_UNSPECIFIED. |
| 2381 * - "LOGIN_OPTIONAL" : A LOGIN_OPTIONAL. |
| 2382 * - "LOGIN_ADMIN" : A LOGIN_ADMIN. |
| 2383 * - "LOGIN_REQUIRED" : A LOGIN_REQUIRED. |
| 2384 */ |
| 2385 core.String login; |
| 2386 /** |
| 2387 * `30x` code to use when performing redirects for the `secure` field. A `302` |
| 2388 * is used by default. |
| 2389 * Possible string values are: |
| 2390 * - "REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED" : A |
| 2391 * REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED. |
| 2392 * - "REDIRECT_HTTP_RESPONSE_CODE_301" : A REDIRECT_HTTP_RESPONSE_CODE_301. |
| 2393 * - "REDIRECT_HTTP_RESPONSE_CODE_302" : A REDIRECT_HTTP_RESPONSE_CODE_302. |
| 2394 * - "REDIRECT_HTTP_RESPONSE_CODE_303" : A REDIRECT_HTTP_RESPONSE_CODE_303. |
| 2395 * - "REDIRECT_HTTP_RESPONSE_CODE_307" : A REDIRECT_HTTP_RESPONSE_CODE_307. |
| 2396 */ |
| 2397 core.String redirectHttpResponseCode; |
| 2398 /** Executes a script to handle the request that matches the URL pattern. */ |
| 2399 ScriptHandler script; |
| 2400 /** |
| 2401 * Configures whether security (HTTPS) should be enforced for this URL. |
| 2402 * Possible string values are: |
| 2403 * - "SECURE_UNSPECIFIED" : A SECURE_UNSPECIFIED. |
| 2404 * - "SECURE_DEFAULT" : A SECURE_DEFAULT. |
| 2405 * - "SECURE_NEVER" : A SECURE_NEVER. |
| 2406 * - "SECURE_OPTIONAL" : A SECURE_OPTIONAL. |
| 2407 * - "SECURE_ALWAYS" : A SECURE_ALWAYS. |
| 2408 */ |
| 2409 core.String securityLevel; |
| 2410 /** Returns the contents of a file, such as an image, as the response. */ |
| 2411 StaticFilesHandler staticFiles; |
| 2412 /** |
| 2413 * A URL prefix. This value uses regular expression syntax (and so regexp |
| 2414 * special characters must be escaped), but it should not contain groupings. |
| 2415 * All URLs that begin with this prefix are handled by this handler, using the |
| 2416 * portion of the URL after the prefix as part of the file path. This is |
| 2417 * always required. |
| 2418 */ |
| 2419 core.String urlRegex; |
| 2420 |
| 2421 UrlMap(); |
| 2422 |
| 2423 UrlMap.fromJson(core.Map _json) { |
| 2424 if (_json.containsKey("apiEndpoint")) { |
| 2425 apiEndpoint = new ApiEndpointHandler.fromJson(_json["apiEndpoint"]); |
| 2426 } |
| 2427 if (_json.containsKey("authFailAction")) { |
| 2428 authFailAction = _json["authFailAction"]; |
| 2429 } |
| 2430 if (_json.containsKey("login")) { |
| 2431 login = _json["login"]; |
| 2432 } |
| 2433 if (_json.containsKey("redirectHttpResponseCode")) { |
| 2434 redirectHttpResponseCode = _json["redirectHttpResponseCode"]; |
| 2435 } |
| 2436 if (_json.containsKey("script")) { |
| 2437 script = new ScriptHandler.fromJson(_json["script"]); |
| 2438 } |
| 2439 if (_json.containsKey("securityLevel")) { |
| 2440 securityLevel = _json["securityLevel"]; |
| 2441 } |
| 2442 if (_json.containsKey("staticFiles")) { |
| 2443 staticFiles = new StaticFilesHandler.fromJson(_json["staticFiles"]); |
| 2444 } |
| 2445 if (_json.containsKey("urlRegex")) { |
| 2446 urlRegex = _json["urlRegex"]; |
| 2447 } |
| 2448 } |
| 2449 |
| 2450 core.Map toJson() { |
| 2451 var _json = new core.Map(); |
| 2452 if (apiEndpoint != null) { |
| 2453 _json["apiEndpoint"] = (apiEndpoint).toJson(); |
| 2454 } |
| 2455 if (authFailAction != null) { |
| 2456 _json["authFailAction"] = authFailAction; |
| 2457 } |
| 2458 if (login != null) { |
| 2459 _json["login"] = login; |
| 2460 } |
| 2461 if (redirectHttpResponseCode != null) { |
| 2462 _json["redirectHttpResponseCode"] = redirectHttpResponseCode; |
| 2463 } |
| 2464 if (script != null) { |
| 2465 _json["script"] = (script).toJson(); |
| 2466 } |
| 2467 if (securityLevel != null) { |
| 2468 _json["securityLevel"] = securityLevel; |
| 2469 } |
| 2470 if (staticFiles != null) { |
| 2471 _json["staticFiles"] = (staticFiles).toJson(); |
| 2472 } |
| 2473 if (urlRegex != null) { |
| 2474 _json["urlRegex"] = urlRegex; |
| 2475 } |
| 2476 return _json; |
| 2477 } |
| 2478 } |
| 2479 |
| 2480 /** |
| 2481 * A Version is a specific set of source code and configuration files deployed |
| 2482 * to a service. |
| 2483 */ |
| 2484 class Version { |
| 2485 /** |
| 2486 * Serving configuration for Google Cloud Endpoints. Only returned in `GET` |
| 2487 * requests if `view=FULL` is set. May only be set on create requests; once |
| 2488 * created, is immutable. |
| 2489 */ |
| 2490 ApiConfigHandler apiConfig; |
| 2491 /** |
| 2492 * Automatic scaling is the scaling policy that App Engine has used since its |
| 2493 * inception. It is based on request rate, response latencies, and other |
| 2494 * application metrics. |
| 2495 */ |
| 2496 AutomaticScaling automaticScaling; |
| 2497 /** |
| 2498 * A service with basic scaling will create an instance when the application |
| 2499 * receives a request. The instance will be turned down when the app becomes |
| 2500 * idle. Basic scaling is ideal for work that is intermittent or driven by |
| 2501 * user activity. |
| 2502 */ |
| 2503 BasicScaling basicScaling; |
| 2504 /** Beta settings supplied to the application via metadata. */ |
| 2505 core.Map<core.String, core.String> betaSettings; |
| 2506 /** |
| 2507 * Creation time of this version. This will be between the start and end times |
| 2508 * of the operation that creates this version. @OutputOnly |
| 2509 */ |
| 2510 core.String creationTime; |
| 2511 /** |
| 2512 * The length of time a static file served by a static file handler ought to |
| 2513 * be cached by web proxies and browsers, if the handler does not specify its |
| 2514 * own expiration. Only returned in `GET` requests if `view=FULL` is set. May |
| 2515 * only be set on create requests; once created, is immutable. |
| 2516 */ |
| 2517 core.String defaultExpiration; |
| 2518 /** The email address of the user who created this version. @OutputOnly */ |
| 2519 core.String deployer; |
| 2520 /** |
| 2521 * Code and application artifacts that make up this version. Only returned in |
| 2522 * `GET` requests if `view=FULL` is set. May only be set on create requests; |
| 2523 * once created, is immutable. |
| 2524 */ |
| 2525 Deployment deployment; |
| 2526 /** |
| 2527 * Total size of version files hosted on App Engine disk in bytes. @OutputOnly |
| 2528 */ |
| 2529 core.String diskUsageBytes; |
| 2530 /** |
| 2531 * The App Engine execution environment to use for this version. Default: "1" |
| 2532 */ |
| 2533 core.String env; |
| 2534 /** |
| 2535 * Environment variables made available to the application. Only returned in |
| 2536 * `GET` requests if `view=FULL` is set. May only be set on create requests; |
| 2537 * once created, is immutable. |
| 2538 */ |
| 2539 core.Map<core.String, core.String> envVariables; |
| 2540 /** |
| 2541 * Custom static error pages instead of these generic error pages, (limit 10 |
| 2542 * KB/page) Only returned in `GET` requests if `view=FULL` is set. May only be |
| 2543 * set on create requests; once created, is immutable. |
| 2544 */ |
| 2545 core.List<ErrorHandler> errorHandlers; |
| 2546 /** |
| 2547 * An ordered list of URL Matching patterns that should be applied to incoming |
| 2548 * requests. The first matching URL consumes the request, and subsequent |
| 2549 * handlers are not attempted. Only returned in `GET` requests if `view=FULL` |
| 2550 * is set. May only be set on create requests; once created, is immutable. |
| 2551 */ |
| 2552 core.List<UrlMap> handlers; |
| 2553 /** |
| 2554 * Configure health checking for the VM instances. Unhealthy VM instances will |
| 2555 * be stopped and replaced with new instances. Only returned in `GET` requests |
| 2556 * if `view=FULL` is set. May only be set on create requests; once created, is |
| 2557 * immutable. |
| 2558 */ |
| 2559 HealthCheck healthCheck; |
| 2560 /** |
| 2561 * The relative name/path of the Version within the service. Example: "v1". |
| 2562 * Version specifiers can contain lowercase letters, digits, and hyphens. It |
| 2563 * cannot begin with the prefix `ah-` and the names `default` and `latest` are |
| 2564 * reserved and cannot be used. |
| 2565 */ |
| 2566 core.String id; |
| 2567 /** |
| 2568 * Before an application can receive email or XMPP messages, the application |
| 2569 * must be configured to enable the service. |
| 2570 */ |
| 2571 core.List<core.String> inboundServices; |
| 2572 /** |
| 2573 * The instance class to use to run this app. Valid values for |
| 2574 * AutomaticScaling are `[F1, F2, F4, F4_1G]`. Valid values for ManualScaling |
| 2575 * and BasicScaling are `[B1, B2, B4, B8, B4_1G]`. Default: "F1" for |
| 2576 * AutomaticScaling, "B1" for ManualScaling and BasicScaling |
| 2577 */ |
| 2578 core.String instanceClass; |
| 2579 /** |
| 2580 * Configuration for Python runtime third-party libraries required by the |
| 2581 * application. Only returned in `GET` requests if `view=FULL` is set. May |
| 2582 * only be set on create requests; once created, is immutable. |
| 2583 */ |
| 2584 core.List<Library> libraries; |
| 2585 /** |
| 2586 * A service with manual scaling runs continuously, allowing you to perform |
| 2587 * complex initialization and rely on the state of its memory over time. |
| 2588 */ |
| 2589 ManualScaling manualScaling; |
| 2590 /** |
| 2591 * The full path to the Version resource in the API. Example: |
| 2592 * "apps/myapp/services/default/versions/v1". @OutputOnly |
| 2593 */ |
| 2594 core.String name; |
| 2595 /** Used to specify extra network settings (for VM runtimes only). */ |
| 2596 Network network; |
| 2597 /** |
| 2598 * Go only. Files that match this pattern will not be built into the app. May |
| 2599 * only be set on create requests. |
| 2600 */ |
| 2601 core.String nobuildFilesRegex; |
| 2602 /** |
| 2603 * Used to specify how many machine resources an app version needs (for VM |
| 2604 * runtimes only). |
| 2605 */ |
| 2606 Resources resources; |
| 2607 /** The desired runtime. Values can include python27, java7, go, etc. */ |
| 2608 core.String runtime; |
| 2609 /** |
| 2610 * The current serving status of this version. Only `SERVING` versions will |
| 2611 * have instances created or billed for. If this field is unset when a version |
| 2612 * is created, `SERVING` status will be assumed. It is an error to explicitly |
| 2613 * set this field to `SERVING_STATUS_UNSPECIFIED`. |
| 2614 * Possible string values are: |
| 2615 * - "SERVING_STATUS_UNSPECIFIED" : A SERVING_STATUS_UNSPECIFIED. |
| 2616 * - "SERVING" : A SERVING. |
| 2617 * - "STOPPED" : A STOPPED. |
| 2618 */ |
| 2619 core.String servingStatus; |
| 2620 /** If true, multiple requests can be dispatched to the app at once. */ |
| 2621 core.bool threadsafe; |
| 2622 /** Whether to deploy this app in a VM container. */ |
| 2623 core.bool vm; |
| 2624 |
| 2625 Version(); |
| 2626 |
| 2627 Version.fromJson(core.Map _json) { |
| 2628 if (_json.containsKey("apiConfig")) { |
| 2629 apiConfig = new ApiConfigHandler.fromJson(_json["apiConfig"]); |
| 2630 } |
| 2631 if (_json.containsKey("automaticScaling")) { |
| 2632 automaticScaling = new AutomaticScaling.fromJson(_json["automaticScaling"]
); |
| 2633 } |
| 2634 if (_json.containsKey("basicScaling")) { |
| 2635 basicScaling = new BasicScaling.fromJson(_json["basicScaling"]); |
| 2636 } |
| 2637 if (_json.containsKey("betaSettings")) { |
| 2638 betaSettings = _json["betaSettings"]; |
| 2639 } |
| 2640 if (_json.containsKey("creationTime")) { |
| 2641 creationTime = _json["creationTime"]; |
| 2642 } |
| 2643 if (_json.containsKey("defaultExpiration")) { |
| 2644 defaultExpiration = _json["defaultExpiration"]; |
| 2645 } |
| 2646 if (_json.containsKey("deployer")) { |
| 2647 deployer = _json["deployer"]; |
| 2648 } |
| 2649 if (_json.containsKey("deployment")) { |
| 2650 deployment = new Deployment.fromJson(_json["deployment"]); |
| 2651 } |
| 2652 if (_json.containsKey("diskUsageBytes")) { |
| 2653 diskUsageBytes = _json["diskUsageBytes"]; |
| 2654 } |
| 2655 if (_json.containsKey("env")) { |
| 2656 env = _json["env"]; |
| 2657 } |
| 2658 if (_json.containsKey("envVariables")) { |
| 2659 envVariables = _json["envVariables"]; |
| 2660 } |
| 2661 if (_json.containsKey("errorHandlers")) { |
| 2662 errorHandlers = _json["errorHandlers"].map((value) => new ErrorHandler.fro
mJson(value)).toList(); |
| 2663 } |
| 2664 if (_json.containsKey("handlers")) { |
| 2665 handlers = _json["handlers"].map((value) => new UrlMap.fromJson(value)).to
List(); |
| 2666 } |
| 2667 if (_json.containsKey("healthCheck")) { |
| 2668 healthCheck = new HealthCheck.fromJson(_json["healthCheck"]); |
| 2669 } |
| 2670 if (_json.containsKey("id")) { |
| 2671 id = _json["id"]; |
| 2672 } |
| 2673 if (_json.containsKey("inboundServices")) { |
| 2674 inboundServices = _json["inboundServices"]; |
| 2675 } |
| 2676 if (_json.containsKey("instanceClass")) { |
| 2677 instanceClass = _json["instanceClass"]; |
| 2678 } |
| 2679 if (_json.containsKey("libraries")) { |
| 2680 libraries = _json["libraries"].map((value) => new Library.fromJson(value))
.toList(); |
| 2681 } |
| 2682 if (_json.containsKey("manualScaling")) { |
| 2683 manualScaling = new ManualScaling.fromJson(_json["manualScaling"]); |
| 2684 } |
| 2685 if (_json.containsKey("name")) { |
| 2686 name = _json["name"]; |
| 2687 } |
| 2688 if (_json.containsKey("network")) { |
| 2689 network = new Network.fromJson(_json["network"]); |
| 2690 } |
| 2691 if (_json.containsKey("nobuildFilesRegex")) { |
| 2692 nobuildFilesRegex = _json["nobuildFilesRegex"]; |
| 2693 } |
| 2694 if (_json.containsKey("resources")) { |
| 2695 resources = new Resources.fromJson(_json["resources"]); |
| 2696 } |
| 2697 if (_json.containsKey("runtime")) { |
| 2698 runtime = _json["runtime"]; |
| 2699 } |
| 2700 if (_json.containsKey("servingStatus")) { |
| 2701 servingStatus = _json["servingStatus"]; |
| 2702 } |
| 2703 if (_json.containsKey("threadsafe")) { |
| 2704 threadsafe = _json["threadsafe"]; |
| 2705 } |
| 2706 if (_json.containsKey("vm")) { |
| 2707 vm = _json["vm"]; |
| 2708 } |
| 2709 } |
| 2710 |
| 2711 core.Map toJson() { |
| 2712 var _json = new core.Map(); |
| 2713 if (apiConfig != null) { |
| 2714 _json["apiConfig"] = (apiConfig).toJson(); |
| 2715 } |
| 2716 if (automaticScaling != null) { |
| 2717 _json["automaticScaling"] = (automaticScaling).toJson(); |
| 2718 } |
| 2719 if (basicScaling != null) { |
| 2720 _json["basicScaling"] = (basicScaling).toJson(); |
| 2721 } |
| 2722 if (betaSettings != null) { |
| 2723 _json["betaSettings"] = betaSettings; |
| 2724 } |
| 2725 if (creationTime != null) { |
| 2726 _json["creationTime"] = creationTime; |
| 2727 } |
| 2728 if (defaultExpiration != null) { |
| 2729 _json["defaultExpiration"] = defaultExpiration; |
| 2730 } |
| 2731 if (deployer != null) { |
| 2732 _json["deployer"] = deployer; |
| 2733 } |
| 2734 if (deployment != null) { |
| 2735 _json["deployment"] = (deployment).toJson(); |
| 2736 } |
| 2737 if (diskUsageBytes != null) { |
| 2738 _json["diskUsageBytes"] = diskUsageBytes; |
| 2739 } |
| 2740 if (env != null) { |
| 2741 _json["env"] = env; |
| 2742 } |
| 2743 if (envVariables != null) { |
| 2744 _json["envVariables"] = envVariables; |
| 2745 } |
| 2746 if (errorHandlers != null) { |
| 2747 _json["errorHandlers"] = errorHandlers.map((value) => (value).toJson()).to
List(); |
| 2748 } |
| 2749 if (handlers != null) { |
| 2750 _json["handlers"] = handlers.map((value) => (value).toJson()).toList(); |
| 2751 } |
| 2752 if (healthCheck != null) { |
| 2753 _json["healthCheck"] = (healthCheck).toJson(); |
| 2754 } |
| 2755 if (id != null) { |
| 2756 _json["id"] = id; |
| 2757 } |
| 2758 if (inboundServices != null) { |
| 2759 _json["inboundServices"] = inboundServices; |
| 2760 } |
| 2761 if (instanceClass != null) { |
| 2762 _json["instanceClass"] = instanceClass; |
| 2763 } |
| 2764 if (libraries != null) { |
| 2765 _json["libraries"] = libraries.map((value) => (value).toJson()).toList(); |
| 2766 } |
| 2767 if (manualScaling != null) { |
| 2768 _json["manualScaling"] = (manualScaling).toJson(); |
| 2769 } |
| 2770 if (name != null) { |
| 2771 _json["name"] = name; |
| 2772 } |
| 2773 if (network != null) { |
| 2774 _json["network"] = (network).toJson(); |
| 2775 } |
| 2776 if (nobuildFilesRegex != null) { |
| 2777 _json["nobuildFilesRegex"] = nobuildFilesRegex; |
| 2778 } |
| 2779 if (resources != null) { |
| 2780 _json["resources"] = (resources).toJson(); |
| 2781 } |
| 2782 if (runtime != null) { |
| 2783 _json["runtime"] = runtime; |
| 2784 } |
| 2785 if (servingStatus != null) { |
| 2786 _json["servingStatus"] = servingStatus; |
| 2787 } |
| 2788 if (threadsafe != null) { |
| 2789 _json["threadsafe"] = threadsafe; |
| 2790 } |
| 2791 if (vm != null) { |
| 2792 _json["vm"] = vm; |
| 2793 } |
| 2794 return _json; |
| 2795 } |
| 2796 } |
| OLD | NEW |