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

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

Issue 2281923002: Api-roll 41: 2016-08-26 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 4 years, 3 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
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis.cloudbuild.v1; 3 library googleapis.cloudbuild.v1;
4 4
5 import 'dart:core' as core; 5 import 'dart:core' as core;
6 import 'dart:async' as async; 6 import 'dart:async' as async;
7 import 'dart:convert' as convert; 7 import 'dart:convert' as convert;
8 8
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons;
10 import 'package:http/http.dart' as http; 10 import 'package:http/http.dart' as http;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 return _response.then((data) => new ListOperationsResponse.fromJson(data)); 137 return _response.then((data) => new ListOperationsResponse.fromJson(data));
138 } 138 }
139 139
140 } 140 }
141 141
142 142
143 class ProjectsResourceApi { 143 class ProjectsResourceApi {
144 final commons.ApiRequester _requester; 144 final commons.ApiRequester _requester;
145 145
146 ProjectsBuildsResourceApi get builds => new ProjectsBuildsResourceApi(_request er); 146 ProjectsBuildsResourceApi get builds => new ProjectsBuildsResourceApi(_request er);
147 ProjectsTriggersResourceApi get triggers => new ProjectsTriggersResourceApi(_r equester);
147 148
148 ProjectsResourceApi(commons.ApiRequester client) : 149 ProjectsResourceApi(commons.ApiRequester client) :
149 _requester = client; 150 _requester = client;
150 } 151 }
151 152
152 153
153 class ProjectsBuildsResourceApi { 154 class ProjectsBuildsResourceApi {
154 final commons.ApiRequester _requester; 155 final commons.ApiRequester _requester;
155 156
156 ProjectsBuildsResourceApi(commons.ApiRequester client) : 157 ProjectsBuildsResourceApi(commons.ApiRequester client) :
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 queryParams: _queryParams, 349 queryParams: _queryParams,
349 uploadOptions: _uploadOptions, 350 uploadOptions: _uploadOptions,
350 uploadMedia: _uploadMedia, 351 uploadMedia: _uploadMedia,
351 downloadOptions: _downloadOptions); 352 downloadOptions: _downloadOptions);
352 return _response.then((data) => new ListBuildsResponse.fromJson(data)); 353 return _response.then((data) => new ListBuildsResponse.fromJson(data));
353 } 354 }
354 355
355 } 356 }
356 357
357 358
359 class ProjectsTriggersResourceApi {
360 final commons.ApiRequester _requester;
361
362 ProjectsTriggersResourceApi(commons.ApiRequester client) :
363 _requester = client;
364
365 /**
366 * Creates a new BuildTrigger.
367 *
368 * This API is experimental.
369 *
370 * [request] - The metadata request object.
371 *
372 * Request parameters:
373 *
374 * [projectId] - ID of the project for which to configure automatic builds.
375 *
376 * Completes with a [BuildTrigger].
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<BuildTrigger> create(BuildTrigger request, core.String projectId) {
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 (request != null) {
393 _body = convert.JSON.encode((request).toJson());
394 }
395 if (projectId == null) {
396 throw new core.ArgumentError("Parameter projectId is required.");
397 }
398
399 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trig gers';
400
401 var _response = _requester.request(_url,
402 "POST",
403 body: _body,
404 queryParams: _queryParams,
405 uploadOptions: _uploadOptions,
406 uploadMedia: _uploadMedia,
407 downloadOptions: _downloadOptions);
408 return _response.then((data) => new BuildTrigger.fromJson(data));
409 }
410
411 /**
412 * Deletes an BuildTrigger by its project ID and trigger ID.
413 *
414 * This API is experimental.
415 *
416 * Request parameters:
417 *
418 * [projectId] - ID of the project that owns the trigger.
419 *
420 * [triggerId] - ID of the BuildTrigger to delete.
421 *
422 * Completes with a [Empty].
423 *
424 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
425 * error.
426 *
427 * If the used [http.Client] completes with an error when making a REST call,
428 * this method will complete with the same error.
429 */
430 async.Future<Empty> delete(core.String projectId, core.String triggerId) {
431 var _url = null;
432 var _queryParams = new core.Map();
433 var _uploadMedia = null;
434 var _uploadOptions = null;
435 var _downloadOptions = commons.DownloadOptions.Metadata;
436 var _body = null;
437
438 if (projectId == null) {
439 throw new core.ArgumentError("Parameter projectId is required.");
440 }
441 if (triggerId == null) {
442 throw new core.ArgumentError("Parameter triggerId is required.");
443 }
444
445 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trig gers/' + commons.Escaper.ecapeVariable('$triggerId');
446
447 var _response = _requester.request(_url,
448 "DELETE",
449 body: _body,
450 queryParams: _queryParams,
451 uploadOptions: _uploadOptions,
452 uploadMedia: _uploadMedia,
453 downloadOptions: _downloadOptions);
454 return _response.then((data) => new Empty.fromJson(data));
455 }
456
457 /**
458 * Gets information about a BuildTrigger.
459 *
460 * This API is experimental.
461 *
462 * Request parameters:
463 *
464 * [projectId] - ID of the project that owns the trigger.
465 *
466 * [triggerId] - ID of the BuildTrigger to get.
467 *
468 * Completes with a [BuildTrigger].
469 *
470 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
471 * error.
472 *
473 * If the used [http.Client] completes with an error when making a REST call,
474 * this method will complete with the same error.
475 */
476 async.Future<BuildTrigger> get(core.String projectId, core.String triggerId) {
477 var _url = null;
478 var _queryParams = new core.Map();
479 var _uploadMedia = null;
480 var _uploadOptions = null;
481 var _downloadOptions = commons.DownloadOptions.Metadata;
482 var _body = null;
483
484 if (projectId == null) {
485 throw new core.ArgumentError("Parameter projectId is required.");
486 }
487 if (triggerId == null) {
488 throw new core.ArgumentError("Parameter triggerId is required.");
489 }
490
491 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trig gers/' + commons.Escaper.ecapeVariable('$triggerId');
492
493 var _response = _requester.request(_url,
494 "GET",
495 body: _body,
496 queryParams: _queryParams,
497 uploadOptions: _uploadOptions,
498 uploadMedia: _uploadMedia,
499 downloadOptions: _downloadOptions);
500 return _response.then((data) => new BuildTrigger.fromJson(data));
501 }
502
503 /**
504 * Lists existing BuildTrigger.
505 *
506 * This API is experimental.
507 *
508 * Request parameters:
509 *
510 * [projectId] - ID of the project for which to list BuildTriggers.
511 *
512 * Completes with a [ListBuildTriggersResponse].
513 *
514 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
515 * error.
516 *
517 * If the used [http.Client] completes with an error when making a REST call,
518 * this method will complete with the same error.
519 */
520 async.Future<ListBuildTriggersResponse> list(core.String projectId) {
521 var _url = null;
522 var _queryParams = new core.Map();
523 var _uploadMedia = null;
524 var _uploadOptions = null;
525 var _downloadOptions = commons.DownloadOptions.Metadata;
526 var _body = null;
527
528 if (projectId == null) {
529 throw new core.ArgumentError("Parameter projectId is required.");
530 }
531
532 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trig gers';
533
534 var _response = _requester.request(_url,
535 "GET",
536 body: _body,
537 queryParams: _queryParams,
538 uploadOptions: _uploadOptions,
539 uploadMedia: _uploadMedia,
540 downloadOptions: _downloadOptions);
541 return _response.then((data) => new ListBuildTriggersResponse.fromJson(data) );
542 }
543
544 /**
545 * Updates an BuildTrigger by its project ID and trigger ID.
546 *
547 * This API is experimental.
548 *
549 * [request] - The metadata request object.
550 *
551 * Request parameters:
552 *
553 * [projectId] - ID of the project that owns the trigger.
554 *
555 * [triggerId] - ID of the BuildTrigger to update.
556 *
557 * Completes with a [BuildTrigger].
558 *
559 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
560 * error.
561 *
562 * If the used [http.Client] completes with an error when making a REST call,
563 * this method will complete with the same error.
564 */
565 async.Future<BuildTrigger> patch(BuildTrigger request, core.String projectId, core.String triggerId) {
566 var _url = null;
567 var _queryParams = new core.Map();
568 var _uploadMedia = null;
569 var _uploadOptions = null;
570 var _downloadOptions = commons.DownloadOptions.Metadata;
571 var _body = null;
572
573 if (request != null) {
574 _body = convert.JSON.encode((request).toJson());
575 }
576 if (projectId == null) {
577 throw new core.ArgumentError("Parameter projectId is required.");
578 }
579 if (triggerId == null) {
580 throw new core.ArgumentError("Parameter triggerId is required.");
581 }
582
583 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trig gers/' + commons.Escaper.ecapeVariable('$triggerId');
584
585 var _response = _requester.request(_url,
586 "PATCH",
587 body: _body,
588 queryParams: _queryParams,
589 uploadOptions: _uploadOptions,
590 uploadMedia: _uploadMedia,
591 downloadOptions: _downloadOptions);
592 return _response.then((data) => new BuildTrigger.fromJson(data));
593 }
594
595 }
596
597
358 598
359 /** 599 /**
360 * A build resource in the Container Builder API. 600 * A build resource in the Container Builder API.
361 * 601 *
362 * At a high level, a Build describes where to find source code, how to build 602 * 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 603 * 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. 604 * apply to the built image when it is pushed to Google Container Registry.
365 */ 605 */
366 class Build { 606 class Build {
367 /** 607 /**
(...skipping 12 matching lines...) Expand all
380 */ 620 */
381 core.String id; 621 core.String id;
382 /** 622 /**
383 * List of images expected to be built and pushed to Google Container 623 * 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 624 * 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 625 * 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. 626 * the build steps are complete will be pushed to Container Registry.
387 */ 627 */
388 core.List<core.String> images; 628 core.List<core.String> images;
389 /** 629 /**
630 * URL to logs for this build in Google Cloud Logging.
631 * @OutputOnly
632 */
633 core.String logUrl;
634 /**
390 * Google Cloud Storage bucket where logs should be written (see 635 * Google Cloud Storage bucket where logs should be written (see
391 * [Bucket Name 636 * [Bucket Name
392 * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requireme nts)). 637 * 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`. 638 * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`.
394 */ 639 */
395 core.String logsBucket; 640 core.String logsBucket;
396 /** Special options for this build. */ 641 /** Special options for this build. */
397 BuildOptions options; 642 BuildOptions options;
398 /** 643 /**
399 * ID of the project. 644 * ID of the project.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 } 701 }
457 if (_json.containsKey("finishTime")) { 702 if (_json.containsKey("finishTime")) {
458 finishTime = _json["finishTime"]; 703 finishTime = _json["finishTime"];
459 } 704 }
460 if (_json.containsKey("id")) { 705 if (_json.containsKey("id")) {
461 id = _json["id"]; 706 id = _json["id"];
462 } 707 }
463 if (_json.containsKey("images")) { 708 if (_json.containsKey("images")) {
464 images = _json["images"]; 709 images = _json["images"];
465 } 710 }
711 if (_json.containsKey("logUrl")) {
712 logUrl = _json["logUrl"];
713 }
466 if (_json.containsKey("logsBucket")) { 714 if (_json.containsKey("logsBucket")) {
467 logsBucket = _json["logsBucket"]; 715 logsBucket = _json["logsBucket"];
468 } 716 }
469 if (_json.containsKey("options")) { 717 if (_json.containsKey("options")) {
470 options = new BuildOptions.fromJson(_json["options"]); 718 options = new BuildOptions.fromJson(_json["options"]);
471 } 719 }
472 if (_json.containsKey("projectId")) { 720 if (_json.containsKey("projectId")) {
473 projectId = _json["projectId"]; 721 projectId = _json["projectId"];
474 } 722 }
475 if (_json.containsKey("results")) { 723 if (_json.containsKey("results")) {
(...skipping 29 matching lines...) Expand all
505 } 753 }
506 if (finishTime != null) { 754 if (finishTime != null) {
507 _json["finishTime"] = finishTime; 755 _json["finishTime"] = finishTime;
508 } 756 }
509 if (id != null) { 757 if (id != null) {
510 _json["id"] = id; 758 _json["id"] = id;
511 } 759 }
512 if (images != null) { 760 if (images != null) {
513 _json["images"] = images; 761 _json["images"] = images;
514 } 762 }
763 if (logUrl != null) {
764 _json["logUrl"] = logUrl;
765 }
515 if (logsBucket != null) { 766 if (logsBucket != null) {
516 _json["logsBucket"] = logsBucket; 767 _json["logsBucket"] = logsBucket;
517 } 768 }
518 if (options != null) { 769 if (options != null) {
519 _json["options"] = (options).toJson(); 770 _json["options"] = (options).toJson();
520 } 771 }
521 if (projectId != null) { 772 if (projectId != null) {
522 _json["projectId"] = projectId; 773 _json["projectId"] = projectId;
523 } 774 }
524 if (results != null) { 775 if (results != null) {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
676 if (name != null) { 927 if (name != null) {
677 _json["name"] = name; 928 _json["name"] = name;
678 } 929 }
679 if (waitFor != null) { 930 if (waitFor != null) {
680 _json["waitFor"] = waitFor; 931 _json["waitFor"] = waitFor;
681 } 932 }
682 return _json; 933 return _json;
683 } 934 }
684 } 935 }
685 936
937 /**
938 * Configuration for an automated build in response to source repository
939 * changes.
940 */
941 class BuildTrigger {
942 /** Contents of the build template. */
943 Build build;
944 /**
945 * Time when the trigger was created.
946 *
947 * @OutputOnly
948 */
949 core.String createTime;
950 /**
951 * Path, from the source root, to a file whose contents is used for the
952 * template.
953 */
954 core.String filename;
955 /**
956 * Unique identifier of the trigger.
957 *
958 * @OutputOnly
959 */
960 core.String id;
961 /**
962 * Template describing the types of source changes to trigger a build.
963 *
964 * Branch and tag names in trigger templates are interpreted as regular
965 * expressions. Any branch or tag change that matches that regular expression
966 * will trigger a build.
967 */
968 RepoSource triggerTemplate;
969
970 BuildTrigger();
971
972 BuildTrigger.fromJson(core.Map _json) {
973 if (_json.containsKey("build")) {
974 build = new Build.fromJson(_json["build"]);
975 }
976 if (_json.containsKey("createTime")) {
977 createTime = _json["createTime"];
978 }
979 if (_json.containsKey("filename")) {
980 filename = _json["filename"];
981 }
982 if (_json.containsKey("id")) {
983 id = _json["id"];
984 }
985 if (_json.containsKey("triggerTemplate")) {
986 triggerTemplate = new RepoSource.fromJson(_json["triggerTemplate"]);
987 }
988 }
989
990 core.Map toJson() {
991 var _json = new core.Map();
992 if (build != null) {
993 _json["build"] = (build).toJson();
994 }
995 if (createTime != null) {
996 _json["createTime"] = createTime;
997 }
998 if (filename != null) {
999 _json["filename"] = filename;
1000 }
1001 if (id != null) {
1002 _json["id"] = id;
1003 }
1004 if (triggerTemplate != null) {
1005 _json["triggerTemplate"] = (triggerTemplate).toJson();
1006 }
1007 return _json;
1008 }
1009 }
1010
686 /** BuiltImage describes an image built by the pipeline. */ 1011 /** BuiltImage describes an image built by the pipeline. */
687 class BuiltImage { 1012 class BuiltImage {
688 /** Docker Registry 2.0 digest. */ 1013 /** Docker Registry 2.0 digest. */
689 core.String digest; 1014 core.String digest;
690 /** 1015 /**
691 * Name used to push the container image to Google Container Registry, as 1016 * Name used to push the container image to Google Container Registry, as
692 * presented to `docker push`. 1017 * presented to `docker push`.
693 */ 1018 */
694 core.String name; 1019 core.String name;
695 1020
(...skipping 28 matching lines...) Expand all
724 CancelBuildRequest.fromJson(core.Map _json) { 1049 CancelBuildRequest.fromJson(core.Map _json) {
725 } 1050 }
726 1051
727 core.Map toJson() { 1052 core.Map toJson() {
728 var _json = new core.Map(); 1053 var _json = new core.Map();
729 return _json; 1054 return _json;
730 } 1055 }
731 } 1056 }
732 1057
733 /** 1058 /**
1059 * A generic empty message that you can re-use to avoid defining duplicated
1060 * empty messages in your APIs. A typical example is to use it as the request
1061 * or the response type of an API method. For instance:
1062 *
1063 * service Foo {
1064 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1065 * }
1066 *
1067 * The JSON representation for `Empty` is empty JSON object `{}`.
1068 */
1069 class Empty {
1070
1071 Empty();
1072
1073 Empty.fromJson(core.Map _json) {
1074 }
1075
1076 core.Map toJson() {
1077 var _json = new core.Map();
1078 return _json;
1079 }
1080 }
1081
1082 /**
734 * Container message for hashes of byte content of files, used in 1083 * Container message for hashes of byte content of files, used in
735 * SourceProvenance messages to verify integrity of source input to the build. 1084 * SourceProvenance messages to verify integrity of source input to the build.
736 */ 1085 */
737 class FileHashes { 1086 class FileHashes {
738 /** Collection of file hashes. */ 1087 /** Collection of file hashes. */
739 core.List<Hash> fileHash; 1088 core.List<Hash> fileHash;
740 1089
741 FileHashes(); 1090 FileHashes();
742 1091
743 FileHashes.fromJson(core.Map _json) { 1092 FileHashes.fromJson(core.Map _json) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 if (type != null) { 1139 if (type != null) {
791 _json["type"] = type; 1140 _json["type"] = type;
792 } 1141 }
793 if (value != null) { 1142 if (value != null) {
794 _json["value"] = value; 1143 _json["value"] = value;
795 } 1144 }
796 return _json; 1145 return _json;
797 } 1146 }
798 } 1147 }
799 1148
1149 /** Response containing existing BuildTriggers. */
1150 class ListBuildTriggersResponse {
1151 /** BuildTriggers for the project, sorted by create_time descending. */
1152 core.List<BuildTrigger> triggers;
1153
1154 ListBuildTriggersResponse();
1155
1156 ListBuildTriggersResponse.fromJson(core.Map _json) {
1157 if (_json.containsKey("triggers")) {
1158 triggers = _json["triggers"].map((value) => new BuildTrigger.fromJson(valu e)).toList();
1159 }
1160 }
1161
1162 core.Map toJson() {
1163 var _json = new core.Map();
1164 if (triggers != null) {
1165 _json["triggers"] = triggers.map((value) => (value).toJson()).toList();
1166 }
1167 return _json;
1168 }
1169 }
1170
800 /** Response including listed builds. */ 1171 /** Response including listed builds. */
801 class ListBuildsResponse { 1172 class ListBuildsResponse {
802 /** Builds will be sorted by create_time, descending. */ 1173 /** Builds will be sorted by create_time, descending. */
803 core.List<Build> builds; 1174 core.List<Build> builds;
804 /** Token to receive the next page of results. */ 1175 /** Token to receive the next page of results. */
805 core.String nextPageToken; 1176 core.String nextPageToken;
806 1177
807 ListBuildsResponse(); 1178 ListBuildsResponse();
808 1179
809 ListBuildsResponse.fromJson(core.Map _json) { 1180 ListBuildsResponse.fromJson(core.Map _json) {
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 _json["tagName"] = tagName; 1370 _json["tagName"] = tagName;
1000 } 1371 }
1001 return _json; 1372 return _json;
1002 } 1373 }
1003 } 1374 }
1004 1375
1005 /** Results describes the artifacts created by the build pipeline. */ 1376 /** Results describes the artifacts created by the build pipeline. */
1006 class Results { 1377 class Results {
1007 /** 1378 /**
1008 * List of build step digests, in order corresponding to build step indices. 1379 * List of build step digests, in order corresponding to build step indices.
1009 * next id = 4
1010 */ 1380 */
1011 core.List<core.String> buildStepImages; 1381 core.List<core.String> buildStepImages;
1012 /** Images that were built as a part of the build. */ 1382 /** Images that were built as a part of the build. */
1013 core.List<BuiltImage> images; 1383 core.List<BuiltImage> images;
1014 1384
1015 Results(); 1385 Results();
1016 1386
1017 Results.fromJson(core.Map _json) { 1387 Results.fromJson(core.Map _json) {
1018 if (_json.containsKey("buildStepImages")) { 1388 if (_json.containsKey("buildStepImages")) {
1019 buildStepImages = _json["buildStepImages"]; 1389 buildStepImages = _json["buildStepImages"];
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 } 1647 }
1278 if (generation != null) { 1648 if (generation != null) {
1279 _json["generation"] = generation; 1649 _json["generation"] = generation;
1280 } 1650 }
1281 if (object != null) { 1651 if (object != null) {
1282 _json["object"] = object; 1652 _json["object"] = object;
1283 } 1653 }
1284 return _json; 1654 return _json;
1285 } 1655 }
1286 } 1656 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/classroom/v1.dart ('k') | generated/googleapis/lib/clouddebugger/v2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698