Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: generated/googleapis/lib/appengine/v1.dart

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

Powered by Google App Engine
This is Rietveld 408576698