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

Side by Side Diff: generated/googleapis/lib/cloudbuild/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
« no previous file with comments | « generated/googleapis/lib/civicinfo/v2.dart ('k') | generated/googleapis/lib/compute/v1.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // This is a generated file (see the discoveryapis_generator project).
2
3 library googleapis.cloudbuild.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 cloudbuild/v1';
16
17 /** Builds container images in the cloud. */
18 class CloudbuildApi {
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 OperationsResourceApi get operations => new OperationsResourceApi(_requester);
26 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
27
28 CloudbuildApi(http.Client client, {core.String rootUrl: "https://cloudbuild.go ogleapis.com/", core.String servicePath: ""}) :
29 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
30 }
31
32
33 class OperationsResourceApi {
34 final commons.ApiRequester _requester;
35
36 OperationsResourceApi(commons.ApiRequester client) :
37 _requester = client;
38
39 /**
40 * Gets the latest state of a long-running operation. Clients can use this
41 * method to poll the operation result at intervals as recommended by the API
42 * service.
43 *
44 * Request parameters:
45 *
46 * [name] - The name of the operation resource.
47 * Value must have pattern "^operations/.*$".
48 *
49 * Completes with a [Operation].
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<Operation> get(core.String name) {
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 (name == null) {
66 throw new core.ArgumentError("Parameter name is required.");
67 }
68
69 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
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 Operation.fromJson(data));
79 }
80
81 /**
82 * Lists operations that match the specified filter in the request. If the
83 * server doesn't support this method, it returns `UNIMPLEMENTED`.
84 *
85 * NOTE: the `name` binding below allows API services to override the binding
86 * to use different resource name schemes, such as `users / * /operations`.
87 *
88 * Request parameters:
89 *
90 * [name] - The name of the operation collection.
91 * Value must have pattern "^operations$".
92 *
93 * [pageSize] - The standard list page size.
94 *
95 * [filter] - The standard list filter.
96 *
97 * [pageToken] - The standard list page token.
98 *
99 * Completes with a [ListOperationsResponse].
100 *
101 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
102 * error.
103 *
104 * If the used [http.Client] completes with an error when making a REST call,
105 * this method will complete with the same error.
106 */
107 async.Future<ListOperationsResponse> list(core.String name, {core.int pageSize , core.String filter, core.String pageToken}) {
108 var _url = null;
109 var _queryParams = new core.Map();
110 var _uploadMedia = null;
111 var _uploadOptions = null;
112 var _downloadOptions = commons.DownloadOptions.Metadata;
113 var _body = null;
114
115 if (name == null) {
116 throw new core.ArgumentError("Parameter name is required.");
117 }
118 if (pageSize != null) {
119 _queryParams["pageSize"] = ["${pageSize}"];
120 }
121 if (filter != null) {
122 _queryParams["filter"] = [filter];
123 }
124 if (pageToken != null) {
125 _queryParams["pageToken"] = [pageToken];
126 }
127
128 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
129
130 var _response = _requester.request(_url,
131 "GET",
132 body: _body,
133 queryParams: _queryParams,
134 uploadOptions: _uploadOptions,
135 uploadMedia: _uploadMedia,
136 downloadOptions: _downloadOptions);
137 return _response.then((data) => new ListOperationsResponse.fromJson(data));
138 }
139
140 }
141
142
143 class ProjectsResourceApi {
144 final commons.ApiRequester _requester;
145
146 ProjectsBuildsResourceApi get builds => new ProjectsBuildsResourceApi(_request er);
147
148 ProjectsResourceApi(commons.ApiRequester client) :
149 _requester = client;
150 }
151
152
153 class ProjectsBuildsResourceApi {
154 final commons.ApiRequester _requester;
155
156 ProjectsBuildsResourceApi(commons.ApiRequester client) :
157 _requester = client;
158
159 /**
160 * Cancels a requested build in progress.
161 *
162 * [request] - The metadata request object.
163 *
164 * Request parameters:
165 *
166 * [projectId] - ID of the project.
167 *
168 * [id] - ID of the build.
169 *
170 * Completes with a [Build].
171 *
172 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
173 * error.
174 *
175 * If the used [http.Client] completes with an error when making a REST call,
176 * this method will complete with the same error.
177 */
178 async.Future<Build> cancel(CancelBuildRequest request, core.String projectId, core.String id) {
179 var _url = null;
180 var _queryParams = new core.Map();
181 var _uploadMedia = null;
182 var _uploadOptions = null;
183 var _downloadOptions = commons.DownloadOptions.Metadata;
184 var _body = null;
185
186 if (request != null) {
187 _body = convert.JSON.encode((request).toJson());
188 }
189 if (projectId == null) {
190 throw new core.ArgumentError("Parameter projectId is required.");
191 }
192 if (id == null) {
193 throw new core.ArgumentError("Parameter id is required.");
194 }
195
196 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/buil ds/' + commons.Escaper.ecapeVariable('$id') + ':cancel';
197
198 var _response = _requester.request(_url,
199 "POST",
200 body: _body,
201 queryParams: _queryParams,
202 uploadOptions: _uploadOptions,
203 uploadMedia: _uploadMedia,
204 downloadOptions: _downloadOptions);
205 return _response.then((data) => new Build.fromJson(data));
206 }
207
208 /**
209 * Starts a build with the specified configuration.
210 *
211 * The long-running Operation returned by this method will include the ID of
212 * the build, which can be passed to GetBuild to determine its status (e.g.,
213 * success or failure).
214 *
215 * [request] - The metadata request object.
216 *
217 * Request parameters:
218 *
219 * [projectId] - ID of the project.
220 *
221 * Completes with a [Operation].
222 *
223 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
224 * error.
225 *
226 * If the used [http.Client] completes with an error when making a REST call,
227 * this method will complete with the same error.
228 */
229 async.Future<Operation> create(Build request, core.String projectId) {
230 var _url = null;
231 var _queryParams = new core.Map();
232 var _uploadMedia = null;
233 var _uploadOptions = null;
234 var _downloadOptions = commons.DownloadOptions.Metadata;
235 var _body = null;
236
237 if (request != null) {
238 _body = convert.JSON.encode((request).toJson());
239 }
240 if (projectId == null) {
241 throw new core.ArgumentError("Parameter projectId is required.");
242 }
243
244 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/buil ds';
245
246 var _response = _requester.request(_url,
247 "POST",
248 body: _body,
249 queryParams: _queryParams,
250 uploadOptions: _uploadOptions,
251 uploadMedia: _uploadMedia,
252 downloadOptions: _downloadOptions);
253 return _response.then((data) => new Operation.fromJson(data));
254 }
255
256 /**
257 * Returns information about a previously requested build.
258 *
259 * The Build that is returned includes its status (e.g., success or failure,
260 * or in-progress), and timing information.
261 *
262 * Request parameters:
263 *
264 * [projectId] - ID of the project.
265 *
266 * [id] - ID of the build.
267 *
268 * Completes with a [Build].
269 *
270 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
271 * error.
272 *
273 * If the used [http.Client] completes with an error when making a REST call,
274 * this method will complete with the same error.
275 */
276 async.Future<Build> get(core.String projectId, core.String id) {
277 var _url = null;
278 var _queryParams = new core.Map();
279 var _uploadMedia = null;
280 var _uploadOptions = null;
281 var _downloadOptions = commons.DownloadOptions.Metadata;
282 var _body = null;
283
284 if (projectId == null) {
285 throw new core.ArgumentError("Parameter projectId is required.");
286 }
287 if (id == null) {
288 throw new core.ArgumentError("Parameter id is required.");
289 }
290
291 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/buil ds/' + commons.Escaper.ecapeVariable('$id');
292
293 var _response = _requester.request(_url,
294 "GET",
295 body: _body,
296 queryParams: _queryParams,
297 uploadOptions: _uploadOptions,
298 uploadMedia: _uploadMedia,
299 downloadOptions: _downloadOptions);
300 return _response.then((data) => new Build.fromJson(data));
301 }
302
303 /**
304 * Lists previously requested builds.
305 *
306 * Previously requested builds may still be in-progress, or may have finished
307 * successfully or unsuccessfully.
308 *
309 * Request parameters:
310 *
311 * [projectId] - ID of the project.
312 *
313 * [pageSize] - Number of results to return in the list.
314 *
315 * [pageToken] - Token to provide to skip to a particular spot in the list.
316 *
317 * Completes with a [ListBuildsResponse].
318 *
319 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
320 * error.
321 *
322 * If the used [http.Client] completes with an error when making a REST call,
323 * this method will complete with the same error.
324 */
325 async.Future<ListBuildsResponse> list(core.String projectId, {core.int pageSiz e, core.String pageToken}) {
326 var _url = null;
327 var _queryParams = new core.Map();
328 var _uploadMedia = null;
329 var _uploadOptions = null;
330 var _downloadOptions = commons.DownloadOptions.Metadata;
331 var _body = null;
332
333 if (projectId == null) {
334 throw new core.ArgumentError("Parameter projectId is required.");
335 }
336 if (pageSize != null) {
337 _queryParams["pageSize"] = ["${pageSize}"];
338 }
339 if (pageToken != null) {
340 _queryParams["pageToken"] = [pageToken];
341 }
342
343 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/buil ds';
344
345 var _response = _requester.request(_url,
346 "GET",
347 body: _body,
348 queryParams: _queryParams,
349 uploadOptions: _uploadOptions,
350 uploadMedia: _uploadMedia,
351 downloadOptions: _downloadOptions);
352 return _response.then((data) => new ListBuildsResponse.fromJson(data));
353 }
354
355 }
356
357
358
359 /**
360 * A build resource in the Container Builder API.
361 *
362 * At a high level, a Build describes where to find source code, how to build
363 * it (for example, the builder image to run on the source), and what tag to
364 * apply to the built image when it is pushed to Google Container Registry.
365 */
366 class Build {
367 /**
368 * Time at which the build was created.
369 * @OutputOnly
370 */
371 core.String createTime;
372 /**
373 * Time at which execution of the build was finished.
374 * @OutputOnly
375 */
376 core.String finishTime;
377 /**
378 * Unique identifier of the build.
379 * @OutputOnly
380 */
381 core.String id;
382 /**
383 * List of images expected to be built and pushed to Google Container
384 * Registry. If an image is listed here and the image is not produced by
385 * one of the build steps, the build will fail. Any images present when
386 * the build steps are complete will be pushed to Container Registry.
387 */
388 core.List<core.String> images;
389 /**
390 * Google Cloud Storage bucket where logs should be written (see
391 * [Bucket Name
392 * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requireme nts)).
393 * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
394 */
395 core.String logsBucket;
396 /** Special options for this build. */
397 BuildOptions options;
398 /**
399 * ID of the project.
400 * @OutputOnly.
401 */
402 core.String projectId;
403 /**
404 * Results of the build.
405 * @OutputOnly
406 */
407 Results results;
408 /** Describes where to find the source files to build. */
409 Source source;
410 /**
411 * A permanent fixed identifier for source.
412 * @OutputOnly
413 */
414 SourceProvenance sourceProvenance;
415 /**
416 * Time at which execution of the build was started.
417 * @OutputOnly
418 */
419 core.String startTime;
420 /**
421 * Status of the build.
422 * @OutputOnly
423 * Possible string values are:
424 * - "STATUS_UNKNOWN" : Status of the build is unknown.
425 * - "QUEUING" : Build has been received and is being queued.
426 * - "QUEUED" : Build is queued; work has not yet begun.
427 * - "WORKING" : Build is being executed.
428 * - "SUCCESS" : Build finished successfully.
429 * - "FAILURE" : Build failed to complete successfully.
430 * - "INTERNAL_ERROR" : Build failed due to an internal cause.
431 * - "TIMEOUT" : Build took longer than was allowed.
432 * - "CANCELLED" : Build was canceled by a user.
433 * next_id = 9
434 */
435 core.String status;
436 /**
437 * Customer-readable message about the current status.
438 * @OutputOnly
439 */
440 core.String statusDetail;
441 /** Describes the operations to be performed on the workspace. */
442 core.List<BuildStep> steps;
443 /**
444 * Amount of time that this build should be allowed to run, to second
445 * granularity. If this amount of time elapses, work on the build will cease
446 * and the build status will be TIMEOUT.
447 *
448 * Default time is ten minutes.
449 */
450 core.String timeout;
451
452 Build();
453
454 Build.fromJson(core.Map _json) {
455 if (_json.containsKey("createTime")) {
456 createTime = _json["createTime"];
457 }
458 if (_json.containsKey("finishTime")) {
459 finishTime = _json["finishTime"];
460 }
461 if (_json.containsKey("id")) {
462 id = _json["id"];
463 }
464 if (_json.containsKey("images")) {
465 images = _json["images"];
466 }
467 if (_json.containsKey("logsBucket")) {
468 logsBucket = _json["logsBucket"];
469 }
470 if (_json.containsKey("options")) {
471 options = new BuildOptions.fromJson(_json["options"]);
472 }
473 if (_json.containsKey("projectId")) {
474 projectId = _json["projectId"];
475 }
476 if (_json.containsKey("results")) {
477 results = new Results.fromJson(_json["results"]);
478 }
479 if (_json.containsKey("source")) {
480 source = new Source.fromJson(_json["source"]);
481 }
482 if (_json.containsKey("sourceProvenance")) {
483 sourceProvenance = new SourceProvenance.fromJson(_json["sourceProvenance"] );
484 }
485 if (_json.containsKey("startTime")) {
486 startTime = _json["startTime"];
487 }
488 if (_json.containsKey("status")) {
489 status = _json["status"];
490 }
491 if (_json.containsKey("statusDetail")) {
492 statusDetail = _json["statusDetail"];
493 }
494 if (_json.containsKey("steps")) {
495 steps = _json["steps"].map((value) => new BuildStep.fromJson(value)).toLis t();
496 }
497 if (_json.containsKey("timeout")) {
498 timeout = _json["timeout"];
499 }
500 }
501
502 core.Map toJson() {
503 var _json = new core.Map();
504 if (createTime != null) {
505 _json["createTime"] = createTime;
506 }
507 if (finishTime != null) {
508 _json["finishTime"] = finishTime;
509 }
510 if (id != null) {
511 _json["id"] = id;
512 }
513 if (images != null) {
514 _json["images"] = images;
515 }
516 if (logsBucket != null) {
517 _json["logsBucket"] = logsBucket;
518 }
519 if (options != null) {
520 _json["options"] = (options).toJson();
521 }
522 if (projectId != null) {
523 _json["projectId"] = projectId;
524 }
525 if (results != null) {
526 _json["results"] = (results).toJson();
527 }
528 if (source != null) {
529 _json["source"] = (source).toJson();
530 }
531 if (sourceProvenance != null) {
532 _json["sourceProvenance"] = (sourceProvenance).toJson();
533 }
534 if (startTime != null) {
535 _json["startTime"] = startTime;
536 }
537 if (status != null) {
538 _json["status"] = status;
539 }
540 if (statusDetail != null) {
541 _json["statusDetail"] = statusDetail;
542 }
543 if (steps != null) {
544 _json["steps"] = steps.map((value) => (value).toJson()).toList();
545 }
546 if (timeout != null) {
547 _json["timeout"] = timeout;
548 }
549 return _json;
550 }
551 }
552
553 /** Metadata for build operations. */
554 class BuildOperationMetadata {
555 /** The build that the operation is tracking. */
556 Build build;
557
558 BuildOperationMetadata();
559
560 BuildOperationMetadata.fromJson(core.Map _json) {
561 if (_json.containsKey("build")) {
562 build = new Build.fromJson(_json["build"]);
563 }
564 }
565
566 core.Map toJson() {
567 var _json = new core.Map();
568 if (build != null) {
569 _json["build"] = (build).toJson();
570 }
571 return _json;
572 }
573 }
574
575 /** Optional arguments to enable specific features of builds. */
576 class BuildOptions {
577 /**
578 * Options for a verifiable build with details uploaded to the Analysis API.
579 * Possible string values are:
580 * - "NOT_VERIFIED" : Not a verifiable build. (default)
581 * - "VERIFIED" : Verified build.
582 */
583 core.String requestedVerifyOption;
584 /** Requested hash for SourceProvenance. */
585 core.List<core.String> sourceProvenanceHash;
586
587 BuildOptions();
588
589 BuildOptions.fromJson(core.Map _json) {
590 if (_json.containsKey("requestedVerifyOption")) {
591 requestedVerifyOption = _json["requestedVerifyOption"];
592 }
593 if (_json.containsKey("sourceProvenanceHash")) {
594 sourceProvenanceHash = _json["sourceProvenanceHash"];
595 }
596 }
597
598 core.Map toJson() {
599 var _json = new core.Map();
600 if (requestedVerifyOption != null) {
601 _json["requestedVerifyOption"] = requestedVerifyOption;
602 }
603 if (sourceProvenanceHash != null) {
604 _json["sourceProvenanceHash"] = sourceProvenanceHash;
605 }
606 return _json;
607 }
608 }
609
610 /** BuildStep describes a step to perform in the build pipeline. */
611 class BuildStep {
612 /** Command-line arguments to use when running this step's container. */
613 core.List<core.String> args;
614 /**
615 * Working directory (relative to project source root) to use when running
616 * this operation's container.
617 */
618 core.String dir;
619 /** Additional environment variables to set for this step's container. */
620 core.List<core.String> env;
621 /**
622 * Name of the container image to use for creating this stage in the
623 * pipeline, as presented to `docker pull`.
624 */
625 core.String name;
626
627 BuildStep();
628
629 BuildStep.fromJson(core.Map _json) {
630 if (_json.containsKey("args")) {
631 args = _json["args"];
632 }
633 if (_json.containsKey("dir")) {
634 dir = _json["dir"];
635 }
636 if (_json.containsKey("env")) {
637 env = _json["env"];
638 }
639 if (_json.containsKey("name")) {
640 name = _json["name"];
641 }
642 }
643
644 core.Map toJson() {
645 var _json = new core.Map();
646 if (args != null) {
647 _json["args"] = args;
648 }
649 if (dir != null) {
650 _json["dir"] = dir;
651 }
652 if (env != null) {
653 _json["env"] = env;
654 }
655 if (name != null) {
656 _json["name"] = name;
657 }
658 return _json;
659 }
660 }
661
662 /** BuiltImage describes an image built by the pipeline. */
663 class BuiltImage {
664 /** Docker Registry 2.0 digest. */
665 core.String digest;
666 /**
667 * Name used to push the container image to Google Container Registry, as
668 * presented to `docker push`.
669 */
670 core.String name;
671
672 BuiltImage();
673
674 BuiltImage.fromJson(core.Map _json) {
675 if (_json.containsKey("digest")) {
676 digest = _json["digest"];
677 }
678 if (_json.containsKey("name")) {
679 name = _json["name"];
680 }
681 }
682
683 core.Map toJson() {
684 var _json = new core.Map();
685 if (digest != null) {
686 _json["digest"] = digest;
687 }
688 if (name != null) {
689 _json["name"] = name;
690 }
691 return _json;
692 }
693 }
694
695 /** Request to cancel an ongoing build. */
696 class CancelBuildRequest {
697
698 CancelBuildRequest();
699
700 CancelBuildRequest.fromJson(core.Map _json) {
701 }
702
703 core.Map toJson() {
704 var _json = new core.Map();
705 return _json;
706 }
707 }
708
709 /**
710 * Container message for hashes of byte content of files, used in
711 * SourceProvenance messages to verify integrity of source input to the build.
712 */
713 class FileHashes {
714 /** Collection of file hashes. */
715 core.List<Hash> fileHash;
716
717 FileHashes();
718
719 FileHashes.fromJson(core.Map _json) {
720 if (_json.containsKey("fileHash")) {
721 fileHash = _json["fileHash"].map((value) => new Hash.fromJson(value)).toLi st();
722 }
723 }
724
725 core.Map toJson() {
726 var _json = new core.Map();
727 if (fileHash != null) {
728 _json["fileHash"] = fileHash.map((value) => (value).toJson()).toList();
729 }
730 return _json;
731 }
732 }
733
734 /** Container message for hash values. */
735 class Hash {
736 /**
737 * The type of hash that was performed.
738 * Possible string values are:
739 * - "NONE" : No hash requested.
740 * - "SHA256" : Use a sha256 hash.
741 */
742 core.String type;
743 /** The hash value. */
744 core.String value;
745 core.List<core.int> get valueAsBytes {
746 return convert.BASE64.decode(value);
747 }
748
749 void set valueAsBytes(core.List<core.int> _bytes) {
750 value = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", " -");
751 }
752
753 Hash();
754
755 Hash.fromJson(core.Map _json) {
756 if (_json.containsKey("type")) {
757 type = _json["type"];
758 }
759 if (_json.containsKey("value")) {
760 value = _json["value"];
761 }
762 }
763
764 core.Map toJson() {
765 var _json = new core.Map();
766 if (type != null) {
767 _json["type"] = type;
768 }
769 if (value != null) {
770 _json["value"] = value;
771 }
772 return _json;
773 }
774 }
775
776 /** Response including listed builds. */
777 class ListBuildsResponse {
778 /** Builds will be sorted by create_time, descending. */
779 core.List<Build> builds;
780 /** Token to receive the next page of results. */
781 core.String nextPageToken;
782
783 ListBuildsResponse();
784
785 ListBuildsResponse.fromJson(core.Map _json) {
786 if (_json.containsKey("builds")) {
787 builds = _json["builds"].map((value) => new Build.fromJson(value)).toList( );
788 }
789 if (_json.containsKey("nextPageToken")) {
790 nextPageToken = _json["nextPageToken"];
791 }
792 }
793
794 core.Map toJson() {
795 var _json = new core.Map();
796 if (builds != null) {
797 _json["builds"] = builds.map((value) => (value).toJson()).toList();
798 }
799 if (nextPageToken != null) {
800 _json["nextPageToken"] = nextPageToken;
801 }
802 return _json;
803 }
804 }
805
806 /** The response message for Operations.ListOperations. */
807 class ListOperationsResponse {
808 /** The standard List next-page token. */
809 core.String nextPageToken;
810 /** A list of operations that matches the specified filter in the request. */
811 core.List<Operation> operations;
812
813 ListOperationsResponse();
814
815 ListOperationsResponse.fromJson(core.Map _json) {
816 if (_json.containsKey("nextPageToken")) {
817 nextPageToken = _json["nextPageToken"];
818 }
819 if (_json.containsKey("operations")) {
820 operations = _json["operations"].map((value) => new Operation.fromJson(val ue)).toList();
821 }
822 }
823
824 core.Map toJson() {
825 var _json = new core.Map();
826 if (nextPageToken != null) {
827 _json["nextPageToken"] = nextPageToken;
828 }
829 if (operations != null) {
830 _json["operations"] = operations.map((value) => (value).toJson()).toList() ;
831 }
832 return _json;
833 }
834 }
835
836 /**
837 * This resource represents a long-running operation that is the result of a
838 * network API call.
839 */
840 class Operation {
841 /**
842 * If the value is `false`, it means the operation is still in progress.
843 * If true, the operation is completed, and either `error` or `response` is
844 * available.
845 */
846 core.bool done;
847 /** The error result of the operation in case of failure. */
848 Status error;
849 /**
850 * Service-specific metadata associated with the operation. It typically
851 * contains progress information and common metadata such as create time.
852 * Some services might not provide such metadata. Any method that returns a
853 * long-running operation should document the metadata type, if any.
854 *
855 * The values for Object must be JSON objects. It can consist of `num`,
856 * `String`, `bool` and `null` as well as `Map` and `List` values.
857 */
858 core.Map<core.String, core.Object> metadata;
859 /**
860 * The server-assigned name, which is only unique within the same service that
861 * originally returns it. If you use the default HTTP mapping, the
862 * `name` should have the format of `operations/some/unique/name`.
863 */
864 core.String name;
865 /**
866 * The normal response of the operation in case of success. If the original
867 * method returns no data on success, such as `Delete`, the response is
868 * `google.protobuf.Empty`. If the original method is standard
869 * `Get`/`Create`/`Update`, the response should be the resource. For other
870 * methods, the response should have the type `XxxResponse`, where `Xxx`
871 * is the original method name. For example, if the original method name
872 * is `TakeSnapshot()`, the inferred response type is
873 * `TakeSnapshotResponse`.
874 *
875 * The values for Object must be JSON objects. It can consist of `num`,
876 * `String`, `bool` and `null` as well as `Map` and `List` values.
877 */
878 core.Map<core.String, core.Object> response;
879
880 Operation();
881
882 Operation.fromJson(core.Map _json) {
883 if (_json.containsKey("done")) {
884 done = _json["done"];
885 }
886 if (_json.containsKey("error")) {
887 error = new Status.fromJson(_json["error"]);
888 }
889 if (_json.containsKey("metadata")) {
890 metadata = _json["metadata"];
891 }
892 if (_json.containsKey("name")) {
893 name = _json["name"];
894 }
895 if (_json.containsKey("response")) {
896 response = _json["response"];
897 }
898 }
899
900 core.Map toJson() {
901 var _json = new core.Map();
902 if (done != null) {
903 _json["done"] = done;
904 }
905 if (error != null) {
906 _json["error"] = (error).toJson();
907 }
908 if (metadata != null) {
909 _json["metadata"] = metadata;
910 }
911 if (name != null) {
912 _json["name"] = name;
913 }
914 if (response != null) {
915 _json["response"] = response;
916 }
917 return _json;
918 }
919 }
920
921 /** Results describes the artifacts created by the build pipeline. */
922 class Results {
923 /** Images that were built as a part of the build. */
924 core.List<BuiltImage> images;
925
926 Results();
927
928 Results.fromJson(core.Map _json) {
929 if (_json.containsKey("images")) {
930 images = _json["images"].map((value) => new BuiltImage.fromJson(value)).to List();
931 }
932 }
933
934 core.Map toJson() {
935 var _json = new core.Map();
936 if (images != null) {
937 _json["images"] = images.map((value) => (value).toJson()).toList();
938 }
939 return _json;
940 }
941 }
942
943 /**
944 * Source describes the location of the source in a supported storage
945 * service.
946 */
947 class Source {
948 /**
949 * If provided, get the source from this location in in Google Cloud
950 * Storage.
951 */
952 StorageSource storageSource;
953
954 Source();
955
956 Source.fromJson(core.Map _json) {
957 if (_json.containsKey("storageSource")) {
958 storageSource = new StorageSource.fromJson(_json["storageSource"]);
959 }
960 }
961
962 core.Map toJson() {
963 var _json = new core.Map();
964 if (storageSource != null) {
965 _json["storageSource"] = (storageSource).toJson();
966 }
967 return _json;
968 }
969 }
970
971 /**
972 * Provenance of the source. Ways to find the original source, or verify that
973 * some source was used for this build.
974 */
975 class SourceProvenance {
976 /**
977 * Hash(es) of the build source, which can be used to verify that the original
978 * source integrity was maintained in the build. Note that FileHashes will
979 * only be populated if BuildOptions has requested a SourceProvenanceHash.
980 *
981 * The keys to this map are file paths used as build source and the values
982 * contain the hash values for those files.
983 *
984 * If the build source came in a single package such as a gzipped tarfile
985 * (.tar.gz), the FileHash will be for the single path to that file.
986 * @OutputOnly
987 */
988 core.Map<core.String, FileHashes> fileHashes;
989
990 SourceProvenance();
991
992 SourceProvenance.fromJson(core.Map _json) {
993 if (_json.containsKey("fileHashes")) {
994 fileHashes = commons.mapMap(_json["fileHashes"], (item) => new FileHashes. fromJson(item));
995 }
996 }
997
998 core.Map toJson() {
999 var _json = new core.Map();
1000 if (fileHashes != null) {
1001 _json["fileHashes"] = commons.mapMap(fileHashes, (item) => (item).toJson() );
1002 }
1003 return _json;
1004 }
1005 }
1006
1007 /**
1008 * The `Status` type defines a logical error model that is suitable for
1009 * different
1010 * programming environments, including REST APIs and RPC APIs. It is used by
1011 * [gRPC](https://github.com/grpc). The error model is designed to be:
1012 *
1013 * - Simple to use and understand for most users
1014 * - Flexible enough to meet unexpected needs
1015 *
1016 * # Overview
1017 *
1018 * The `Status` message contains three pieces of data: error code, error
1019 * message,
1020 * and error details. The error code should be an enum value of
1021 * google.rpc.Code, but it may accept additional error codes if needed. The
1022 * error message should be a developer-facing English message that helps
1023 * developers *understand* and *resolve* the error. If a localized user-facing
1024 * error message is needed, put the localized message in the error details or
1025 * localize it in the client. The optional error details may contain arbitrary
1026 * information about the error. There is a predefined set of error detail types
1027 * in the package `google.rpc` which can be used for common error conditions.
1028 *
1029 * # Language mapping
1030 *
1031 * The `Status` message is the logical representation of the error model, but it
1032 * is not necessarily the actual wire format. When the `Status` message is
1033 * exposed in different client libraries and different wire protocols, it can be
1034 * mapped differently. For example, it will likely be mapped to some exceptions
1035 * in Java, but more likely mapped to some error codes in C.
1036 *
1037 * # Other uses
1038 *
1039 * The error model and the `Status` message can be used in a variety of
1040 * environments, either with or without APIs, to provide a
1041 * consistent developer experience across different environments.
1042 *
1043 * Example uses of this error model include:
1044 *
1045 * - Partial errors. If a service needs to return partial errors to the client,
1046 * it may embed the `Status` in the normal response to indicate the partial
1047 * errors.
1048 *
1049 * - Workflow errors. A typical workflow has multiple steps. Each step may
1050 * have a `Status` message for error reporting purpose.
1051 *
1052 * - Batch operations. If a client uses batch request and batch response, the
1053 * `Status` message should be used directly inside batch response, one for
1054 * each error sub-response.
1055 *
1056 * - Asynchronous operations. If an API call embeds asynchronous operation
1057 * results in its response, the status of those operations should be
1058 * represented directly using the `Status` message.
1059 *
1060 * - Logging. If some API errors are stored in logs, the message `Status` could
1061 * be used directly after any stripping needed for security/privacy reasons.
1062 */
1063 class Status {
1064 /** The status code, which should be an enum value of google.rpc.Code. */
1065 core.int code;
1066 /**
1067 * A list of messages that carry the error details. There will be a
1068 * common set of message types for APIs to use.
1069 *
1070 * The values for Object must be JSON objects. It can consist of `num`,
1071 * `String`, `bool` and `null` as well as `Map` and `List` values.
1072 */
1073 core.List<core.Map<core.String, core.Object>> details;
1074 /**
1075 * A developer-facing error message, which should be in English. Any
1076 * user-facing error message should be localized and sent in the
1077 * google.rpc.Status.details field, or localized by the client.
1078 */
1079 core.String message;
1080
1081 Status();
1082
1083 Status.fromJson(core.Map _json) {
1084 if (_json.containsKey("code")) {
1085 code = _json["code"];
1086 }
1087 if (_json.containsKey("details")) {
1088 details = _json["details"];
1089 }
1090 if (_json.containsKey("message")) {
1091 message = _json["message"];
1092 }
1093 }
1094
1095 core.Map toJson() {
1096 var _json = new core.Map();
1097 if (code != null) {
1098 _json["code"] = code;
1099 }
1100 if (details != null) {
1101 _json["details"] = details;
1102 }
1103 if (message != null) {
1104 _json["message"] = message;
1105 }
1106 return _json;
1107 }
1108 }
1109
1110 /**
1111 * StorageSource describes the location of the source in an archive file in
1112 * Google Cloud Storage.
1113 */
1114 class StorageSource {
1115 /**
1116 * Google Cloud Storage bucket containing source (see
1117 * [Bucket Name
1118 * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requireme nts)).
1119 */
1120 core.String bucket;
1121 /**
1122 * Google Cloud Storage generation for the object. If the generation is
1123 * omitted, the latest generation will be used.
1124 */
1125 core.String generation;
1126 /**
1127 * Google Cloud Storage object containing source.
1128 *
1129 * This object must be a gzipped archive file (.tar.gz) containing source to
1130 * build.
1131 */
1132 core.String object;
1133
1134 StorageSource();
1135
1136 StorageSource.fromJson(core.Map _json) {
1137 if (_json.containsKey("bucket")) {
1138 bucket = _json["bucket"];
1139 }
1140 if (_json.containsKey("generation")) {
1141 generation = _json["generation"];
1142 }
1143 if (_json.containsKey("object")) {
1144 object = _json["object"];
1145 }
1146 }
1147
1148 core.Map toJson() {
1149 var _json = new core.Map();
1150 if (bucket != null) {
1151 _json["bucket"] = bucket;
1152 }
1153 if (generation != null) {
1154 _json["generation"] = generation;
1155 }
1156 if (object != null) {
1157 _json["object"] = object;
1158 }
1159 return _json;
1160 }
1161 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/civicinfo/v2.dart ('k') | generated/googleapis/lib/compute/v1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698