| OLD | NEW |
| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 /** | 363 /** |
| 364 * Lists previously requested builds. | 364 * Lists previously requested builds. |
| 365 * | 365 * |
| 366 * Previously requested builds may still be in-progress, or may have finished | 366 * Previously requested builds may still be in-progress, or may have finished |
| 367 * successfully or unsuccessfully. | 367 * successfully or unsuccessfully. |
| 368 * | 368 * |
| 369 * Request parameters: | 369 * Request parameters: |
| 370 * | 370 * |
| 371 * [projectId] - ID of the project. | 371 * [projectId] - ID of the project. |
| 372 * | 372 * |
| 373 * [pageToken] - Token to provide to skip to a particular spot in the list. | |
| 374 * | |
| 375 * [pageSize] - Number of results to return in the list. | 373 * [pageSize] - Number of results to return in the list. |
| 376 * | 374 * |
| 377 * [filter] - The raw filter text to constrain the results. | 375 * [filter] - The raw filter text to constrain the results. |
| 378 * | 376 * |
| 377 * [pageToken] - Token to provide to skip to a particular spot in the list. |
| 378 * |
| 379 * Completes with a [ListBuildsResponse]. | 379 * Completes with a [ListBuildsResponse]. |
| 380 * | 380 * |
| 381 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 381 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 382 * error. | 382 * error. |
| 383 * | 383 * |
| 384 * If the used [http.Client] completes with an error when making a REST call, | 384 * If the used [http.Client] completes with an error when making a REST call, |
| 385 * this method will complete with the same error. | 385 * this method will complete with the same error. |
| 386 */ | 386 */ |
| 387 async.Future<ListBuildsResponse> list(core.String projectId, {core.String page
Token, core.int pageSize, core.String filter}) { | 387 async.Future<ListBuildsResponse> list(core.String projectId, {core.int pageSiz
e, core.String filter, core.String pageToken}) { |
| 388 var _url = null; | 388 var _url = null; |
| 389 var _queryParams = new core.Map(); | 389 var _queryParams = new core.Map(); |
| 390 var _uploadMedia = null; | 390 var _uploadMedia = null; |
| 391 var _uploadOptions = null; | 391 var _uploadOptions = null; |
| 392 var _downloadOptions = commons.DownloadOptions.Metadata; | 392 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 393 var _body = null; | 393 var _body = null; |
| 394 | 394 |
| 395 if (projectId == null) { | 395 if (projectId == null) { |
| 396 throw new core.ArgumentError("Parameter projectId is required."); | 396 throw new core.ArgumentError("Parameter projectId is required."); |
| 397 } | 397 } |
| 398 if (pageToken != null) { | |
| 399 _queryParams["pageToken"] = [pageToken]; | |
| 400 } | |
| 401 if (pageSize != null) { | 398 if (pageSize != null) { |
| 402 _queryParams["pageSize"] = ["${pageSize}"]; | 399 _queryParams["pageSize"] = ["${pageSize}"]; |
| 403 } | 400 } |
| 404 if (filter != null) { | 401 if (filter != null) { |
| 405 _queryParams["filter"] = [filter]; | 402 _queryParams["filter"] = [filter]; |
| 406 } | 403 } |
| 404 if (pageToken != null) { |
| 405 _queryParams["pageToken"] = [pageToken]; |
| 406 } |
| 407 | 407 |
| 408 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/buil
ds'; | 408 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/buil
ds'; |
| 409 | 409 |
| 410 var _response = _requester.request(_url, | 410 var _response = _requester.request(_url, |
| 411 "GET", | 411 "GET", |
| 412 body: _body, | 412 body: _body, |
| 413 queryParams: _queryParams, | 413 queryParams: _queryParams, |
| 414 uploadOptions: _uploadOptions, | 414 uploadOptions: _uploadOptions, |
| 415 uploadMedia: _uploadMedia, | 415 uploadMedia: _uploadMedia, |
| 416 downloadOptions: _downloadOptions); | 416 downloadOptions: _downloadOptions); |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 /** | 732 /** |
| 733 * ID of the project. | 733 * ID of the project. |
| 734 * @OutputOnly. | 734 * @OutputOnly. |
| 735 */ | 735 */ |
| 736 core.String projectId; | 736 core.String projectId; |
| 737 /** | 737 /** |
| 738 * Results of the build. | 738 * Results of the build. |
| 739 * @OutputOnly | 739 * @OutputOnly |
| 740 */ | 740 */ |
| 741 Results results; | 741 Results results; |
| 742 /** Secrets to decrypt using Cloud KMS. */ |
| 743 core.List<Secret> secrets; |
| 742 /** Describes where to find the source files to build. */ | 744 /** Describes where to find the source files to build. */ |
| 743 Source source; | 745 Source source; |
| 744 /** | 746 /** |
| 745 * A permanent fixed identifier for source. | 747 * A permanent fixed identifier for source. |
| 746 * @OutputOnly | 748 * @OutputOnly |
| 747 */ | 749 */ |
| 748 SourceProvenance sourceProvenance; | 750 SourceProvenance sourceProvenance; |
| 749 /** | 751 /** |
| 750 * Time at which execution of the build was started. | 752 * Time at which execution of the build was started. |
| 751 * @OutputOnly | 753 * @OutputOnly |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 } | 813 } |
| 812 if (_json.containsKey("options")) { | 814 if (_json.containsKey("options")) { |
| 813 options = new BuildOptions.fromJson(_json["options"]); | 815 options = new BuildOptions.fromJson(_json["options"]); |
| 814 } | 816 } |
| 815 if (_json.containsKey("projectId")) { | 817 if (_json.containsKey("projectId")) { |
| 816 projectId = _json["projectId"]; | 818 projectId = _json["projectId"]; |
| 817 } | 819 } |
| 818 if (_json.containsKey("results")) { | 820 if (_json.containsKey("results")) { |
| 819 results = new Results.fromJson(_json["results"]); | 821 results = new Results.fromJson(_json["results"]); |
| 820 } | 822 } |
| 823 if (_json.containsKey("secrets")) { |
| 824 secrets = _json["secrets"].map((value) => new Secret.fromJson(value)).toLi
st(); |
| 825 } |
| 821 if (_json.containsKey("source")) { | 826 if (_json.containsKey("source")) { |
| 822 source = new Source.fromJson(_json["source"]); | 827 source = new Source.fromJson(_json["source"]); |
| 823 } | 828 } |
| 824 if (_json.containsKey("sourceProvenance")) { | 829 if (_json.containsKey("sourceProvenance")) { |
| 825 sourceProvenance = new SourceProvenance.fromJson(_json["sourceProvenance"]
); | 830 sourceProvenance = new SourceProvenance.fromJson(_json["sourceProvenance"]
); |
| 826 } | 831 } |
| 827 if (_json.containsKey("startTime")) { | 832 if (_json.containsKey("startTime")) { |
| 828 startTime = _json["startTime"]; | 833 startTime = _json["startTime"]; |
| 829 } | 834 } |
| 830 if (_json.containsKey("status")) { | 835 if (_json.containsKey("status")) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 872 } | 877 } |
| 873 if (options != null) { | 878 if (options != null) { |
| 874 _json["options"] = (options).toJson(); | 879 _json["options"] = (options).toJson(); |
| 875 } | 880 } |
| 876 if (projectId != null) { | 881 if (projectId != null) { |
| 877 _json["projectId"] = projectId; | 882 _json["projectId"] = projectId; |
| 878 } | 883 } |
| 879 if (results != null) { | 884 if (results != null) { |
| 880 _json["results"] = (results).toJson(); | 885 _json["results"] = (results).toJson(); |
| 881 } | 886 } |
| 887 if (secrets != null) { |
| 888 _json["secrets"] = secrets.map((value) => (value).toJson()).toList(); |
| 889 } |
| 882 if (source != null) { | 890 if (source != null) { |
| 883 _json["source"] = (source).toJson(); | 891 _json["source"] = (source).toJson(); |
| 884 } | 892 } |
| 885 if (sourceProvenance != null) { | 893 if (sourceProvenance != null) { |
| 886 _json["sourceProvenance"] = (sourceProvenance).toJson(); | 894 _json["sourceProvenance"] = (sourceProvenance).toJson(); |
| 887 } | 895 } |
| 888 if (startTime != null) { | 896 if (startTime != null) { |
| 889 _json["startTime"] = startTime; | 897 _json["startTime"] = startTime; |
| 890 } | 898 } |
| 891 if (status != null) { | 899 if (status != null) { |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 * The Docker daemon will also have cached many of the layers for some popular | 1036 * The Docker daemon will also have cached many of the layers for some popular |
| 1029 * images, like "ubuntu", "debian", but they will be refreshed at the time you | 1037 * images, like "ubuntu", "debian", but they will be refreshed at the time you |
| 1030 * attempt to use them. | 1038 * attempt to use them. |
| 1031 * | 1039 * |
| 1032 * If you built an image in a previous build step, it will be stored in the | 1040 * If you built an image in a previous build step, it will be stored in the |
| 1033 * host's Docker daemon's cache and is available to use as the name for a | 1041 * host's Docker daemon's cache and is available to use as the name for a |
| 1034 * later build step. | 1042 * later build step. |
| 1035 */ | 1043 */ |
| 1036 core.String name; | 1044 core.String name; |
| 1037 /** | 1045 /** |
| 1046 * A list of environment variables which are encrypted using a Cloud KMS |
| 1047 * crypto key. These values must be specified in the build's secrets. |
| 1048 */ |
| 1049 core.List<core.String> secretEnv; |
| 1050 /** |
| 1051 * List of volumes to mount into the build step. |
| 1052 * |
| 1053 * Each volume will be created as an empty volume prior to execution of the |
| 1054 * build step. Upon completion of the build, volumes and their contents will |
| 1055 * be discarded. |
| 1056 * |
| 1057 * Using a named volume in only one step is not valid as it is indicative |
| 1058 * of a mis-configured build request. |
| 1059 */ |
| 1060 core.List<Volume> volumes; |
| 1061 /** |
| 1038 * The ID(s) of the step(s) that this build step depends on. | 1062 * The ID(s) of the step(s) that this build step depends on. |
| 1039 * This build step will not start until all the build steps in wait_for | 1063 * This build step will not start until all the build steps in wait_for |
| 1040 * have completed successfully. If wait_for is empty, this build step will | 1064 * have completed successfully. If wait_for is empty, this build step will |
| 1041 * start when all previous build steps in the Build.Steps list have completed | 1065 * start when all previous build steps in the Build.Steps list have completed |
| 1042 * successfully. | 1066 * successfully. |
| 1043 */ | 1067 */ |
| 1044 core.List<core.String> waitFor; | 1068 core.List<core.String> waitFor; |
| 1045 | 1069 |
| 1046 BuildStep(); | 1070 BuildStep(); |
| 1047 | 1071 |
| 1048 BuildStep.fromJson(core.Map _json) { | 1072 BuildStep.fromJson(core.Map _json) { |
| 1049 if (_json.containsKey("args")) { | 1073 if (_json.containsKey("args")) { |
| 1050 args = _json["args"]; | 1074 args = _json["args"]; |
| 1051 } | 1075 } |
| 1052 if (_json.containsKey("dir")) { | 1076 if (_json.containsKey("dir")) { |
| 1053 dir = _json["dir"]; | 1077 dir = _json["dir"]; |
| 1054 } | 1078 } |
| 1055 if (_json.containsKey("entrypoint")) { | 1079 if (_json.containsKey("entrypoint")) { |
| 1056 entrypoint = _json["entrypoint"]; | 1080 entrypoint = _json["entrypoint"]; |
| 1057 } | 1081 } |
| 1058 if (_json.containsKey("env")) { | 1082 if (_json.containsKey("env")) { |
| 1059 env = _json["env"]; | 1083 env = _json["env"]; |
| 1060 } | 1084 } |
| 1061 if (_json.containsKey("id")) { | 1085 if (_json.containsKey("id")) { |
| 1062 id = _json["id"]; | 1086 id = _json["id"]; |
| 1063 } | 1087 } |
| 1064 if (_json.containsKey("name")) { | 1088 if (_json.containsKey("name")) { |
| 1065 name = _json["name"]; | 1089 name = _json["name"]; |
| 1066 } | 1090 } |
| 1091 if (_json.containsKey("secretEnv")) { |
| 1092 secretEnv = _json["secretEnv"]; |
| 1093 } |
| 1094 if (_json.containsKey("volumes")) { |
| 1095 volumes = _json["volumes"].map((value) => new Volume.fromJson(value)).toLi
st(); |
| 1096 } |
| 1067 if (_json.containsKey("waitFor")) { | 1097 if (_json.containsKey("waitFor")) { |
| 1068 waitFor = _json["waitFor"]; | 1098 waitFor = _json["waitFor"]; |
| 1069 } | 1099 } |
| 1070 } | 1100 } |
| 1071 | 1101 |
| 1072 core.Map<core.String, core.Object> toJson() { | 1102 core.Map<core.String, core.Object> toJson() { |
| 1073 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1103 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1074 if (args != null) { | 1104 if (args != null) { |
| 1075 _json["args"] = args; | 1105 _json["args"] = args; |
| 1076 } | 1106 } |
| 1077 if (dir != null) { | 1107 if (dir != null) { |
| 1078 _json["dir"] = dir; | 1108 _json["dir"] = dir; |
| 1079 } | 1109 } |
| 1080 if (entrypoint != null) { | 1110 if (entrypoint != null) { |
| 1081 _json["entrypoint"] = entrypoint; | 1111 _json["entrypoint"] = entrypoint; |
| 1082 } | 1112 } |
| 1083 if (env != null) { | 1113 if (env != null) { |
| 1084 _json["env"] = env; | 1114 _json["env"] = env; |
| 1085 } | 1115 } |
| 1086 if (id != null) { | 1116 if (id != null) { |
| 1087 _json["id"] = id; | 1117 _json["id"] = id; |
| 1088 } | 1118 } |
| 1089 if (name != null) { | 1119 if (name != null) { |
| 1090 _json["name"] = name; | 1120 _json["name"] = name; |
| 1091 } | 1121 } |
| 1122 if (secretEnv != null) { |
| 1123 _json["secretEnv"] = secretEnv; |
| 1124 } |
| 1125 if (volumes != null) { |
| 1126 _json["volumes"] = volumes.map((value) => (value).toJson()).toList(); |
| 1127 } |
| 1092 if (waitFor != null) { | 1128 if (waitFor != null) { |
| 1093 _json["waitFor"] = waitFor; | 1129 _json["waitFor"] = waitFor; |
| 1094 } | 1130 } |
| 1095 return _json; | 1131 return _json; |
| 1096 } | 1132 } |
| 1097 } | 1133 } |
| 1098 | 1134 |
| 1099 /** | 1135 /** |
| 1100 * Configuration for an automated build in response to source repository | 1136 * Configuration for an automated build in response to source repository |
| 1101 * changes. | 1137 * changes. |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1599 _json["buildStepImages"] = buildStepImages; | 1635 _json["buildStepImages"] = buildStepImages; |
| 1600 } | 1636 } |
| 1601 if (images != null) { | 1637 if (images != null) { |
| 1602 _json["images"] = images.map((value) => (value).toJson()).toList(); | 1638 _json["images"] = images.map((value) => (value).toJson()).toList(); |
| 1603 } | 1639 } |
| 1604 return _json; | 1640 return _json; |
| 1605 } | 1641 } |
| 1606 } | 1642 } |
| 1607 | 1643 |
| 1608 /** | 1644 /** |
| 1645 * Secret pairs a set of secret environment variables containing encrypted |
| 1646 * values with the Cloud KMS key to use to decrypt the value. |
| 1647 */ |
| 1648 class Secret { |
| 1649 /** Cloud KMS key name to use to decrypt these envs. */ |
| 1650 core.String kmsKeyName; |
| 1651 /** |
| 1652 * Map of environment variable name to its encrypted value. |
| 1653 * |
| 1654 * Secret environment variables must be unique across all of a build's |
| 1655 * secrets, and must be used by at least one build step. Values can be at most |
| 1656 * 1 KB in size. There can be at most ten secret values across all of a |
| 1657 * build's secrets. |
| 1658 */ |
| 1659 core.Map<core.String, core.String> secretEnv; |
| 1660 |
| 1661 Secret(); |
| 1662 |
| 1663 Secret.fromJson(core.Map _json) { |
| 1664 if (_json.containsKey("kmsKeyName")) { |
| 1665 kmsKeyName = _json["kmsKeyName"]; |
| 1666 } |
| 1667 if (_json.containsKey("secretEnv")) { |
| 1668 secretEnv = _json["secretEnv"]; |
| 1669 } |
| 1670 } |
| 1671 |
| 1672 core.Map<core.String, core.Object> toJson() { |
| 1673 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1674 if (kmsKeyName != null) { |
| 1675 _json["kmsKeyName"] = kmsKeyName; |
| 1676 } |
| 1677 if (secretEnv != null) { |
| 1678 _json["secretEnv"] = secretEnv; |
| 1679 } |
| 1680 return _json; |
| 1681 } |
| 1682 } |
| 1683 |
| 1684 /** |
| 1609 * Source describes the location of the source in a supported storage | 1685 * Source describes the location of the source in a supported storage |
| 1610 * service. | 1686 * service. |
| 1611 */ | 1687 */ |
| 1612 class Source { | 1688 class Source { |
| 1613 /** If provided, get source from this location in a Cloud Repo. */ | 1689 /** If provided, get source from this location in a Cloud Repo. */ |
| 1614 RepoSource repoSource; | 1690 RepoSource repoSource; |
| 1615 /** | 1691 /** |
| 1616 * If provided, get the source from this location in in Google Cloud | 1692 * If provided, get the source from this location in in Google Cloud |
| 1617 * Storage. | 1693 * Storage. |
| 1618 */ | 1694 */ |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1847 } | 1923 } |
| 1848 if (generation != null) { | 1924 if (generation != null) { |
| 1849 _json["generation"] = generation; | 1925 _json["generation"] = generation; |
| 1850 } | 1926 } |
| 1851 if (object != null) { | 1927 if (object != null) { |
| 1852 _json["object"] = object; | 1928 _json["object"] = object; |
| 1853 } | 1929 } |
| 1854 return _json; | 1930 return _json; |
| 1855 } | 1931 } |
| 1856 } | 1932 } |
| 1933 |
| 1934 /** |
| 1935 * Volume describes a Docker container volume which is mounted into build steps |
| 1936 * in order to persist files across build step execution. |
| 1937 */ |
| 1938 class Volume { |
| 1939 /** |
| 1940 * Name of the volume to mount. |
| 1941 * |
| 1942 * Volume names must be unique per build step and must be valid names for |
| 1943 * Docker volumes. Each named volume must be used by at least two build steps. |
| 1944 */ |
| 1945 core.String name; |
| 1946 /** |
| 1947 * Path at which to mount the volume. |
| 1948 * |
| 1949 * Paths must be absolute and cannot conflict with other volume paths on the |
| 1950 * same build step or with certain reserved volume paths. |
| 1951 */ |
| 1952 core.String path; |
| 1953 |
| 1954 Volume(); |
| 1955 |
| 1956 Volume.fromJson(core.Map _json) { |
| 1957 if (_json.containsKey("name")) { |
| 1958 name = _json["name"]; |
| 1959 } |
| 1960 if (_json.containsKey("path")) { |
| 1961 path = _json["path"]; |
| 1962 } |
| 1963 } |
| 1964 |
| 1965 core.Map<core.String, core.Object> toJson() { |
| 1966 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
| 1967 if (name != null) { |
| 1968 _json["name"] = name; |
| 1969 } |
| 1970 if (path != null) { |
| 1971 _json["path"] = path; |
| 1972 } |
| 1973 return _json; |
| 1974 } |
| 1975 } |
| OLD | NEW |