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

Side by Side Diff: generated/googleapis_beta/lib/appengine/v1beta4.dart

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

Powered by Google App Engine
This is Rietveld 408576698