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; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' |
13 ApiRequestError, DetailedApiRequestError; | 13 show ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client cloudbuild/v1'; | 15 const core.String USER_AGENT = 'dart-api-client cloudbuild/v1'; |
16 | 16 |
17 /** Builds container images in the cloud. */ | 17 /// Builds container images in the cloud. |
18 class CloudbuildApi { | 18 class CloudbuildApi { |
19 /** View and manage your data across Google Cloud Platform services */ | 19 /// View and manage your data across Google Cloud Platform services |
20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 20 static const CloudPlatformScope = |
21 | 21 "https://www.googleapis.com/auth/cloud-platform"; |
22 | 22 |
23 final commons.ApiRequester _requester; | 23 final commons.ApiRequester _requester; |
24 | 24 |
25 OperationsResourceApi get operations => new OperationsResourceApi(_requester); | 25 OperationsResourceApi get operations => new OperationsResourceApi(_requester); |
26 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 26 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
27 | 27 |
28 CloudbuildApi(http.Client client, {core.String rootUrl: "https://cloudbuild.go
ogleapis.com/", core.String servicePath: ""}) : | 28 CloudbuildApi(http.Client client, |
29 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A
GENT); | 29 {core.String rootUrl: "https://cloudbuild.googleapis.com/", |
| 30 core.String servicePath: ""}) |
| 31 : _requester = |
| 32 new commons.ApiRequester(client, rootUrl, servicePath, USER_AGENT); |
30 } | 33 } |
31 | 34 |
32 | |
33 class OperationsResourceApi { | 35 class OperationsResourceApi { |
34 final commons.ApiRequester _requester; | 36 final commons.ApiRequester _requester; |
35 | 37 |
36 OperationsResourceApi(commons.ApiRequester client) : | 38 OperationsResourceApi(commons.ApiRequester client) : _requester = client; |
37 _requester = client; | |
38 | 39 |
39 /** | 40 /// Starts asynchronous cancellation on a long-running operation. The server |
40 * Starts asynchronous cancellation on a long-running operation. The server | 41 /// makes a best effort to cancel the operation, but success is not |
41 * makes a best effort to cancel the operation, but success is not | 42 /// guaranteed. If the server doesn't support this method, it returns |
42 * guaranteed. If the server doesn't support this method, it returns | 43 /// `google.rpc.Code.UNIMPLEMENTED`. Clients can use |
43 * `google.rpc.Code.UNIMPLEMENTED`. Clients can use | 44 /// Operations.GetOperation or |
44 * Operations.GetOperation or | 45 /// other methods to check whether the cancellation succeeded or whether the |
45 * other methods to check whether the cancellation succeeded or whether the | 46 /// operation completed despite cancellation. On successful cancellation, |
46 * operation completed despite cancellation. On successful cancellation, | 47 /// the operation is not deleted; instead, it becomes an operation with |
47 * the operation is not deleted; instead, it becomes an operation with | 48 /// an Operation.error value with a google.rpc.Status.code of 1, |
48 * an Operation.error value with a google.rpc.Status.code of 1, | 49 /// corresponding to `Code.CANCELLED`. |
49 * corresponding to `Code.CANCELLED`. | 50 /// |
50 * | 51 /// [request] - The metadata request object. |
51 * [request] - The metadata request object. | 52 /// |
52 * | 53 /// Request parameters: |
53 * Request parameters: | 54 /// |
54 * | 55 /// [name] - The name of the operation resource to be cancelled. |
55 * [name] - The name of the operation resource to be cancelled. | 56 /// Value must have pattern "^operations/.+$". |
56 * Value must have pattern "^operations/.+$". | 57 /// |
57 * | 58 /// Completes with a [Empty]. |
58 * Completes with a [Empty]. | 59 /// |
59 * | 60 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
60 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 61 /// an error. |
61 * error. | 62 /// |
62 * | 63 /// If the used [http.Client] completes with an error when making a REST |
63 * If the used [http.Client] completes with an error when making a REST call, | 64 /// call, this method will complete with the same error. |
64 * this method will complete with the same error. | |
65 */ | |
66 async.Future<Empty> cancel(CancelOperationRequest request, core.String name) { | 65 async.Future<Empty> cancel(CancelOperationRequest request, core.String name) { |
67 var _url = null; | 66 var _url = null; |
68 var _queryParams = new core.Map(); | 67 var _queryParams = new core.Map(); |
69 var _uploadMedia = null; | 68 var _uploadMedia = null; |
70 var _uploadOptions = null; | 69 var _uploadOptions = null; |
71 var _downloadOptions = commons.DownloadOptions.Metadata; | 70 var _downloadOptions = commons.DownloadOptions.Metadata; |
72 var _body = null; | 71 var _body = null; |
73 | 72 |
74 if (request != null) { | 73 if (request != null) { |
75 _body = convert.JSON.encode((request).toJson()); | 74 _body = convert.JSON.encode((request).toJson()); |
76 } | 75 } |
77 if (name == null) { | 76 if (name == null) { |
78 throw new core.ArgumentError("Parameter name is required."); | 77 throw new core.ArgumentError("Parameter name is required."); |
79 } | 78 } |
80 | 79 |
81 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':cancel'; | 80 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':cancel'; |
82 | 81 |
83 var _response = _requester.request(_url, | 82 var _response = _requester.request(_url, "POST", |
84 "POST", | 83 body: _body, |
85 body: _body, | 84 queryParams: _queryParams, |
86 queryParams: _queryParams, | 85 uploadOptions: _uploadOptions, |
87 uploadOptions: _uploadOptions, | 86 uploadMedia: _uploadMedia, |
88 uploadMedia: _uploadMedia, | 87 downloadOptions: _downloadOptions); |
89 downloadOptions: _downloadOptions); | |
90 return _response.then((data) => new Empty.fromJson(data)); | 88 return _response.then((data) => new Empty.fromJson(data)); |
91 } | 89 } |
92 | 90 |
93 /** | 91 /// Gets the latest state of a long-running operation. Clients can use this |
94 * Gets the latest state of a long-running operation. Clients can use this | 92 /// method to poll the operation result at intervals as recommended by the |
95 * method to poll the operation result at intervals as recommended by the API | 93 /// API |
96 * service. | 94 /// service. |
97 * | 95 /// |
98 * Request parameters: | 96 /// Request parameters: |
99 * | 97 /// |
100 * [name] - The name of the operation resource. | 98 /// [name] - The name of the operation resource. |
101 * Value must have pattern "^operations/.+$". | 99 /// Value must have pattern "^operations/.+$". |
102 * | 100 /// |
103 * Completes with a [Operation]. | 101 /// Completes with a [Operation]. |
104 * | 102 /// |
105 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 103 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
106 * error. | 104 /// an error. |
107 * | 105 /// |
108 * If the used [http.Client] completes with an error when making a REST call, | 106 /// If the used [http.Client] completes with an error when making a REST |
109 * this method will complete with the same error. | 107 /// call, this method will complete with the same error. |
110 */ | |
111 async.Future<Operation> get(core.String name) { | 108 async.Future<Operation> get(core.String name) { |
112 var _url = null; | 109 var _url = null; |
113 var _queryParams = new core.Map(); | 110 var _queryParams = new core.Map(); |
114 var _uploadMedia = null; | 111 var _uploadMedia = null; |
115 var _uploadOptions = null; | 112 var _uploadOptions = null; |
116 var _downloadOptions = commons.DownloadOptions.Metadata; | 113 var _downloadOptions = commons.DownloadOptions.Metadata; |
117 var _body = null; | 114 var _body = null; |
118 | 115 |
119 if (name == null) { | 116 if (name == null) { |
120 throw new core.ArgumentError("Parameter name is required."); | 117 throw new core.ArgumentError("Parameter name is required."); |
121 } | 118 } |
122 | 119 |
123 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 120 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
124 | 121 |
125 var _response = _requester.request(_url, | 122 var _response = _requester.request(_url, "GET", |
126 "GET", | 123 body: _body, |
127 body: _body, | 124 queryParams: _queryParams, |
128 queryParams: _queryParams, | 125 uploadOptions: _uploadOptions, |
129 uploadOptions: _uploadOptions, | 126 uploadMedia: _uploadMedia, |
130 uploadMedia: _uploadMedia, | 127 downloadOptions: _downloadOptions); |
131 downloadOptions: _downloadOptions); | |
132 return _response.then((data) => new Operation.fromJson(data)); | 128 return _response.then((data) => new Operation.fromJson(data)); |
133 } | 129 } |
134 | 130 |
135 /** | 131 /// Lists operations that match the specified filter in the request. If the |
136 * Lists operations that match the specified filter in the request. If the | 132 /// server doesn't support this method, it returns `UNIMPLEMENTED`. |
137 * server doesn't support this method, it returns `UNIMPLEMENTED`. | 133 /// |
138 * | 134 /// NOTE: the `name` binding allows API services to override the binding |
139 * NOTE: the `name` binding allows API services to override the binding | 135 /// to use different resource name schemes, such as `users / * /operations`. |
140 * to use different resource name schemes, such as `users / * /operations`. To | 136 /// To |
141 * override the binding, API services can add a binding such as | 137 /// override the binding, API services can add a binding such as |
142 * `"/v1/{name=users / * }/operations"` to their service configuration. | 138 /// `"/v1/{name=users / * }/operations"` to their service configuration. |
143 * For backwards compatibility, the default name includes the operations | 139 /// For backwards compatibility, the default name includes the operations |
144 * collection id, however overriding users must ensure the name binding | 140 /// collection id, however overriding users must ensure the name binding |
145 * is the parent resource, without the operations collection id. | 141 /// is the parent resource, without the operations collection id. |
146 * | 142 /// |
147 * Request parameters: | 143 /// Request parameters: |
148 * | 144 /// |
149 * [name] - The name of the operation's parent resource. | 145 /// [name] - The name of the operation's parent resource. |
150 * Value must have pattern "^operations$". | 146 /// Value must have pattern "^operations$". |
151 * | 147 /// |
152 * [filter] - The standard list filter. | 148 /// [pageToken] - The standard list page token. |
153 * | 149 /// |
154 * [pageToken] - The standard list page token. | 150 /// [pageSize] - The standard list page size. |
155 * | 151 /// |
156 * [pageSize] - The standard list page size. | 152 /// [filter] - The standard list filter. |
157 * | 153 /// |
158 * Completes with a [ListOperationsResponse]. | 154 /// Completes with a [ListOperationsResponse]. |
159 * | 155 /// |
160 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 156 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
161 * error. | 157 /// an error. |
162 * | 158 /// |
163 * If the used [http.Client] completes with an error when making a REST call, | 159 /// If the used [http.Client] completes with an error when making a REST |
164 * this method will complete with the same error. | 160 /// call, this method will complete with the same error. |
165 */ | 161 async.Future<ListOperationsResponse> list(core.String name, |
166 async.Future<ListOperationsResponse> list(core.String name, {core.String filte
r, core.String pageToken, core.int pageSize}) { | 162 {core.String pageToken, core.int pageSize, core.String filter}) { |
167 var _url = null; | 163 var _url = null; |
168 var _queryParams = new core.Map(); | 164 var _queryParams = new core.Map(); |
169 var _uploadMedia = null; | 165 var _uploadMedia = null; |
170 var _uploadOptions = null; | 166 var _uploadOptions = null; |
171 var _downloadOptions = commons.DownloadOptions.Metadata; | 167 var _downloadOptions = commons.DownloadOptions.Metadata; |
172 var _body = null; | 168 var _body = null; |
173 | 169 |
174 if (name == null) { | 170 if (name == null) { |
175 throw new core.ArgumentError("Parameter name is required."); | 171 throw new core.ArgumentError("Parameter name is required."); |
176 } | 172 } |
177 if (filter != null) { | |
178 _queryParams["filter"] = [filter]; | |
179 } | |
180 if (pageToken != null) { | 173 if (pageToken != null) { |
181 _queryParams["pageToken"] = [pageToken]; | 174 _queryParams["pageToken"] = [pageToken]; |
182 } | 175 } |
183 if (pageSize != null) { | 176 if (pageSize != null) { |
184 _queryParams["pageSize"] = ["${pageSize}"]; | 177 _queryParams["pageSize"] = ["${pageSize}"]; |
185 } | 178 } |
| 179 if (filter != null) { |
| 180 _queryParams["filter"] = [filter]; |
| 181 } |
186 | 182 |
187 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 183 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
188 | 184 |
189 var _response = _requester.request(_url, | 185 var _response = _requester.request(_url, "GET", |
190 "GET", | 186 body: _body, |
191 body: _body, | 187 queryParams: _queryParams, |
192 queryParams: _queryParams, | 188 uploadOptions: _uploadOptions, |
193 uploadOptions: _uploadOptions, | 189 uploadMedia: _uploadMedia, |
194 uploadMedia: _uploadMedia, | 190 downloadOptions: _downloadOptions); |
195 downloadOptions: _downloadOptions); | |
196 return _response.then((data) => new ListOperationsResponse.fromJson(data)); | 191 return _response.then((data) => new ListOperationsResponse.fromJson(data)); |
197 } | 192 } |
198 | |
199 } | 193 } |
200 | 194 |
201 | |
202 class ProjectsResourceApi { | 195 class ProjectsResourceApi { |
203 final commons.ApiRequester _requester; | 196 final commons.ApiRequester _requester; |
204 | 197 |
205 ProjectsBuildsResourceApi get builds => new ProjectsBuildsResourceApi(_request
er); | 198 ProjectsBuildsResourceApi get builds => |
206 ProjectsTriggersResourceApi get triggers => new ProjectsTriggersResourceApi(_r
equester); | 199 new ProjectsBuildsResourceApi(_requester); |
| 200 ProjectsTriggersResourceApi get triggers => |
| 201 new ProjectsTriggersResourceApi(_requester); |
207 | 202 |
208 ProjectsResourceApi(commons.ApiRequester client) : | 203 ProjectsResourceApi(commons.ApiRequester client) : _requester = client; |
209 _requester = client; | |
210 } | 204 } |
211 | 205 |
212 | |
213 class ProjectsBuildsResourceApi { | 206 class ProjectsBuildsResourceApi { |
214 final commons.ApiRequester _requester; | 207 final commons.ApiRequester _requester; |
215 | 208 |
216 ProjectsBuildsResourceApi(commons.ApiRequester client) : | 209 ProjectsBuildsResourceApi(commons.ApiRequester client) : _requester = client; |
217 _requester = client; | |
218 | 210 |
219 /** | 211 /// Cancels a requested build in progress. |
220 * Cancels a requested build in progress. | 212 /// |
221 * | 213 /// [request] - The metadata request object. |
222 * [request] - The metadata request object. | 214 /// |
223 * | 215 /// Request parameters: |
224 * Request parameters: | 216 /// |
225 * | 217 /// [projectId] - ID of the project. |
226 * [projectId] - ID of the project. | 218 /// |
227 * | 219 /// [id] - ID of the build. |
228 * [id] - ID of the build. | 220 /// |
229 * | 221 /// Completes with a [Build]. |
230 * Completes with a [Build]. | 222 /// |
231 * | 223 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
232 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 224 /// an error. |
233 * error. | 225 /// |
234 * | 226 /// If the used [http.Client] completes with an error when making a REST |
235 * If the used [http.Client] completes with an error when making a REST call, | 227 /// call, this method will complete with the same error. |
236 * this method will complete with the same error. | 228 async.Future<Build> cancel( |
237 */ | 229 CancelBuildRequest request, core.String projectId, core.String id) { |
238 async.Future<Build> cancel(CancelBuildRequest request, core.String projectId,
core.String id) { | |
239 var _url = null; | 230 var _url = null; |
240 var _queryParams = new core.Map(); | 231 var _queryParams = new core.Map(); |
241 var _uploadMedia = null; | 232 var _uploadMedia = null; |
242 var _uploadOptions = null; | 233 var _uploadOptions = null; |
243 var _downloadOptions = commons.DownloadOptions.Metadata; | 234 var _downloadOptions = commons.DownloadOptions.Metadata; |
244 var _body = null; | 235 var _body = null; |
245 | 236 |
246 if (request != null) { | 237 if (request != null) { |
247 _body = convert.JSON.encode((request).toJson()); | 238 _body = convert.JSON.encode((request).toJson()); |
248 } | 239 } |
249 if (projectId == null) { | 240 if (projectId == null) { |
250 throw new core.ArgumentError("Parameter projectId is required."); | 241 throw new core.ArgumentError("Parameter projectId is required."); |
251 } | 242 } |
252 if (id == null) { | 243 if (id == null) { |
253 throw new core.ArgumentError("Parameter id is required."); | 244 throw new core.ArgumentError("Parameter id is required."); |
254 } | 245 } |
255 | 246 |
256 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/buil
ds/' + commons.Escaper.ecapeVariable('$id') + ':cancel'; | 247 _url = 'v1/projects/' + |
| 248 commons.Escaper.ecapeVariable('$projectId') + |
| 249 '/builds/' + |
| 250 commons.Escaper.ecapeVariable('$id') + |
| 251 ':cancel'; |
257 | 252 |
258 var _response = _requester.request(_url, | 253 var _response = _requester.request(_url, "POST", |
259 "POST", | 254 body: _body, |
260 body: _body, | 255 queryParams: _queryParams, |
261 queryParams: _queryParams, | 256 uploadOptions: _uploadOptions, |
262 uploadOptions: _uploadOptions, | 257 uploadMedia: _uploadMedia, |
263 uploadMedia: _uploadMedia, | 258 downloadOptions: _downloadOptions); |
264 downloadOptions: _downloadOptions); | |
265 return _response.then((data) => new Build.fromJson(data)); | 259 return _response.then((data) => new Build.fromJson(data)); |
266 } | 260 } |
267 | 261 |
268 /** | 262 /// Starts a build with the specified configuration. |
269 * Starts a build with the specified configuration. | 263 /// |
270 * | 264 /// The long-running Operation returned by this method will include the ID of |
271 * The long-running Operation returned by this method will include the ID of | 265 /// the build, which can be passed to GetBuild to determine its status (e.g., |
272 * the build, which can be passed to GetBuild to determine its status (e.g., | 266 /// success or failure). |
273 * success or failure). | 267 /// |
274 * | 268 /// [request] - The metadata request object. |
275 * [request] - The metadata request object. | 269 /// |
276 * | 270 /// Request parameters: |
277 * Request parameters: | 271 /// |
278 * | 272 /// [projectId] - ID of the project. |
279 * [projectId] - ID of the project. | 273 /// |
280 * | 274 /// Completes with a [Operation]. |
281 * Completes with a [Operation]. | 275 /// |
282 * | 276 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
283 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 277 /// an error. |
284 * error. | 278 /// |
285 * | 279 /// If the used [http.Client] completes with an error when making a REST |
286 * If the used [http.Client] completes with an error when making a REST call, | 280 /// call, this method will complete with the same error. |
287 * this method will complete with the same error. | |
288 */ | |
289 async.Future<Operation> create(Build request, core.String projectId) { | 281 async.Future<Operation> create(Build request, core.String projectId) { |
290 var _url = null; | 282 var _url = null; |
291 var _queryParams = new core.Map(); | 283 var _queryParams = new core.Map(); |
292 var _uploadMedia = null; | 284 var _uploadMedia = null; |
293 var _uploadOptions = null; | 285 var _uploadOptions = null; |
294 var _downloadOptions = commons.DownloadOptions.Metadata; | 286 var _downloadOptions = commons.DownloadOptions.Metadata; |
295 var _body = null; | 287 var _body = null; |
296 | 288 |
297 if (request != null) { | 289 if (request != null) { |
298 _body = convert.JSON.encode((request).toJson()); | 290 _body = convert.JSON.encode((request).toJson()); |
299 } | 291 } |
300 if (projectId == null) { | 292 if (projectId == null) { |
301 throw new core.ArgumentError("Parameter projectId is required."); | 293 throw new core.ArgumentError("Parameter projectId is required."); |
302 } | 294 } |
303 | 295 |
304 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/buil
ds'; | 296 _url = 'v1/projects/' + |
| 297 commons.Escaper.ecapeVariable('$projectId') + |
| 298 '/builds'; |
305 | 299 |
306 var _response = _requester.request(_url, | 300 var _response = _requester.request(_url, "POST", |
307 "POST", | 301 body: _body, |
308 body: _body, | 302 queryParams: _queryParams, |
309 queryParams: _queryParams, | 303 uploadOptions: _uploadOptions, |
310 uploadOptions: _uploadOptions, | 304 uploadMedia: _uploadMedia, |
311 uploadMedia: _uploadMedia, | 305 downloadOptions: _downloadOptions); |
312 downloadOptions: _downloadOptions); | |
313 return _response.then((data) => new Operation.fromJson(data)); | 306 return _response.then((data) => new Operation.fromJson(data)); |
314 } | 307 } |
315 | 308 |
316 /** | 309 /// Returns information about a previously requested build. |
317 * Returns information about a previously requested build. | 310 /// |
318 * | 311 /// The Build that is returned includes its status (e.g., success or failure, |
319 * The Build that is returned includes its status (e.g., success or failure, | 312 /// or in-progress), and timing information. |
320 * or in-progress), and timing information. | 313 /// |
321 * | 314 /// Request parameters: |
322 * Request parameters: | 315 /// |
323 * | 316 /// [projectId] - ID of the project. |
324 * [projectId] - ID of the project. | 317 /// |
325 * | 318 /// [id] - ID of the build. |
326 * [id] - ID of the build. | 319 /// |
327 * | 320 /// Completes with a [Build]. |
328 * Completes with a [Build]. | 321 /// |
329 * | 322 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
330 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 323 /// an error. |
331 * error. | 324 /// |
332 * | 325 /// If the used [http.Client] completes with an error when making a REST |
333 * If the used [http.Client] completes with an error when making a REST call, | 326 /// call, this method will complete with the same error. |
334 * this method will complete with the same error. | |
335 */ | |
336 async.Future<Build> get(core.String projectId, core.String id) { | 327 async.Future<Build> get(core.String projectId, core.String id) { |
337 var _url = null; | 328 var _url = null; |
338 var _queryParams = new core.Map(); | 329 var _queryParams = new core.Map(); |
339 var _uploadMedia = null; | 330 var _uploadMedia = null; |
340 var _uploadOptions = null; | 331 var _uploadOptions = null; |
341 var _downloadOptions = commons.DownloadOptions.Metadata; | 332 var _downloadOptions = commons.DownloadOptions.Metadata; |
342 var _body = null; | 333 var _body = null; |
343 | 334 |
344 if (projectId == null) { | 335 if (projectId == null) { |
345 throw new core.ArgumentError("Parameter projectId is required."); | 336 throw new core.ArgumentError("Parameter projectId is required."); |
346 } | 337 } |
347 if (id == null) { | 338 if (id == null) { |
348 throw new core.ArgumentError("Parameter id is required."); | 339 throw new core.ArgumentError("Parameter id is required."); |
349 } | 340 } |
350 | 341 |
351 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/buil
ds/' + commons.Escaper.ecapeVariable('$id'); | 342 _url = 'v1/projects/' + |
| 343 commons.Escaper.ecapeVariable('$projectId') + |
| 344 '/builds/' + |
| 345 commons.Escaper.ecapeVariable('$id'); |
352 | 346 |
353 var _response = _requester.request(_url, | 347 var _response = _requester.request(_url, "GET", |
354 "GET", | 348 body: _body, |
355 body: _body, | 349 queryParams: _queryParams, |
356 queryParams: _queryParams, | 350 uploadOptions: _uploadOptions, |
357 uploadOptions: _uploadOptions, | 351 uploadMedia: _uploadMedia, |
358 uploadMedia: _uploadMedia, | 352 downloadOptions: _downloadOptions); |
359 downloadOptions: _downloadOptions); | |
360 return _response.then((data) => new Build.fromJson(data)); | 353 return _response.then((data) => new Build.fromJson(data)); |
361 } | 354 } |
362 | 355 |
363 /** | 356 /// Lists previously requested builds. |
364 * Lists previously requested builds. | 357 /// |
365 * | 358 /// Previously requested builds may still be in-progress, or may have |
366 * Previously requested builds may still be in-progress, or may have finished | 359 /// finished |
367 * successfully or unsuccessfully. | 360 /// successfully or unsuccessfully. |
368 * | 361 /// |
369 * Request parameters: | 362 /// Request parameters: |
370 * | 363 /// |
371 * [projectId] - ID of the project. | 364 /// [projectId] - ID of the project. |
372 * | 365 /// |
373 * [pageToken] - Token to provide to skip to a particular spot in the list. | 366 /// [pageToken] - Token to provide to skip to a particular spot in the list. |
374 * | 367 /// |
375 * [pageSize] - Number of results to return in the list. | 368 /// [pageSize] - Number of results to return in the list. |
376 * | 369 /// |
377 * [filter] - The raw filter text to constrain the results. | 370 /// [filter] - The raw filter text to constrain the results. |
378 * | 371 /// |
379 * Completes with a [ListBuildsResponse]. | 372 /// Completes with a [ListBuildsResponse]. |
380 * | 373 /// |
381 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 374 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
382 * error. | 375 /// an error. |
383 * | 376 /// |
384 * If the used [http.Client] completes with an error when making a REST call, | 377 /// If the used [http.Client] completes with an error when making a REST |
385 * this method will complete with the same error. | 378 /// call, this method will complete with the same error. |
386 */ | 379 async.Future<ListBuildsResponse> list(core.String projectId, |
387 async.Future<ListBuildsResponse> list(core.String projectId, {core.String page
Token, core.int pageSize, core.String filter}) { | 380 {core.String pageToken, core.int pageSize, core.String filter}) { |
388 var _url = null; | 381 var _url = null; |
389 var _queryParams = new core.Map(); | 382 var _queryParams = new core.Map(); |
390 var _uploadMedia = null; | 383 var _uploadMedia = null; |
391 var _uploadOptions = null; | 384 var _uploadOptions = null; |
392 var _downloadOptions = commons.DownloadOptions.Metadata; | 385 var _downloadOptions = commons.DownloadOptions.Metadata; |
393 var _body = null; | 386 var _body = null; |
394 | 387 |
395 if (projectId == null) { | 388 if (projectId == null) { |
396 throw new core.ArgumentError("Parameter projectId is required."); | 389 throw new core.ArgumentError("Parameter projectId is required."); |
397 } | 390 } |
398 if (pageToken != null) { | 391 if (pageToken != null) { |
399 _queryParams["pageToken"] = [pageToken]; | 392 _queryParams["pageToken"] = [pageToken]; |
400 } | 393 } |
401 if (pageSize != null) { | 394 if (pageSize != null) { |
402 _queryParams["pageSize"] = ["${pageSize}"]; | 395 _queryParams["pageSize"] = ["${pageSize}"]; |
403 } | 396 } |
404 if (filter != null) { | 397 if (filter != null) { |
405 _queryParams["filter"] = [filter]; | 398 _queryParams["filter"] = [filter]; |
406 } | 399 } |
407 | 400 |
408 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/buil
ds'; | 401 _url = 'v1/projects/' + |
| 402 commons.Escaper.ecapeVariable('$projectId') + |
| 403 '/builds'; |
409 | 404 |
410 var _response = _requester.request(_url, | 405 var _response = _requester.request(_url, "GET", |
411 "GET", | 406 body: _body, |
412 body: _body, | 407 queryParams: _queryParams, |
413 queryParams: _queryParams, | 408 uploadOptions: _uploadOptions, |
414 uploadOptions: _uploadOptions, | 409 uploadMedia: _uploadMedia, |
415 uploadMedia: _uploadMedia, | 410 downloadOptions: _downloadOptions); |
416 downloadOptions: _downloadOptions); | |
417 return _response.then((data) => new ListBuildsResponse.fromJson(data)); | 411 return _response.then((data) => new ListBuildsResponse.fromJson(data)); |
418 } | 412 } |
419 | |
420 } | 413 } |
421 | 414 |
422 | |
423 class ProjectsTriggersResourceApi { | 415 class ProjectsTriggersResourceApi { |
424 final commons.ApiRequester _requester; | 416 final commons.ApiRequester _requester; |
425 | 417 |
426 ProjectsTriggersResourceApi(commons.ApiRequester client) : | 418 ProjectsTriggersResourceApi(commons.ApiRequester client) |
427 _requester = client; | 419 : _requester = client; |
428 | 420 |
429 /** | 421 /// Creates a new BuildTrigger. |
430 * Creates a new BuildTrigger. | 422 /// |
431 * | 423 /// This API is experimental. |
432 * This API is experimental. | 424 /// |
433 * | 425 /// [request] - The metadata request object. |
434 * [request] - The metadata request object. | 426 /// |
435 * | 427 /// Request parameters: |
436 * Request parameters: | 428 /// |
437 * | 429 /// [projectId] - ID of the project for which to configure automatic builds. |
438 * [projectId] - ID of the project for which to configure automatic builds. | 430 /// |
439 * | 431 /// Completes with a [BuildTrigger]. |
440 * Completes with a [BuildTrigger]. | 432 /// |
441 * | 433 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
442 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 434 /// an error. |
443 * error. | 435 /// |
444 * | 436 /// If the used [http.Client] completes with an error when making a REST |
445 * If the used [http.Client] completes with an error when making a REST call, | 437 /// call, this method will complete with the same error. |
446 * this method will complete with the same error. | 438 async.Future<BuildTrigger> create( |
447 */ | 439 BuildTrigger request, core.String projectId) { |
448 async.Future<BuildTrigger> create(BuildTrigger request, core.String projectId)
{ | |
449 var _url = null; | 440 var _url = null; |
450 var _queryParams = new core.Map(); | 441 var _queryParams = new core.Map(); |
451 var _uploadMedia = null; | 442 var _uploadMedia = null; |
452 var _uploadOptions = null; | 443 var _uploadOptions = null; |
453 var _downloadOptions = commons.DownloadOptions.Metadata; | 444 var _downloadOptions = commons.DownloadOptions.Metadata; |
454 var _body = null; | 445 var _body = null; |
455 | 446 |
456 if (request != null) { | 447 if (request != null) { |
457 _body = convert.JSON.encode((request).toJson()); | 448 _body = convert.JSON.encode((request).toJson()); |
458 } | 449 } |
459 if (projectId == null) { | 450 if (projectId == null) { |
460 throw new core.ArgumentError("Parameter projectId is required."); | 451 throw new core.ArgumentError("Parameter projectId is required."); |
461 } | 452 } |
462 | 453 |
463 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trig
gers'; | 454 _url = 'v1/projects/' + |
| 455 commons.Escaper.ecapeVariable('$projectId') + |
| 456 '/triggers'; |
464 | 457 |
465 var _response = _requester.request(_url, | 458 var _response = _requester.request(_url, "POST", |
466 "POST", | 459 body: _body, |
467 body: _body, | 460 queryParams: _queryParams, |
468 queryParams: _queryParams, | 461 uploadOptions: _uploadOptions, |
469 uploadOptions: _uploadOptions, | 462 uploadMedia: _uploadMedia, |
470 uploadMedia: _uploadMedia, | 463 downloadOptions: _downloadOptions); |
471 downloadOptions: _downloadOptions); | |
472 return _response.then((data) => new BuildTrigger.fromJson(data)); | 464 return _response.then((data) => new BuildTrigger.fromJson(data)); |
473 } | 465 } |
474 | 466 |
475 /** | 467 /// Deletes an BuildTrigger by its project ID and trigger ID. |
476 * Deletes an BuildTrigger by its project ID and trigger ID. | 468 /// |
477 * | 469 /// This API is experimental. |
478 * This API is experimental. | 470 /// |
479 * | 471 /// Request parameters: |
480 * Request parameters: | 472 /// |
481 * | 473 /// [projectId] - ID of the project that owns the trigger. |
482 * [projectId] - ID of the project that owns the trigger. | 474 /// |
483 * | 475 /// [triggerId] - ID of the BuildTrigger to delete. |
484 * [triggerId] - ID of the BuildTrigger to delete. | 476 /// |
485 * | 477 /// Completes with a [Empty]. |
486 * Completes with a [Empty]. | 478 /// |
487 * | 479 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
488 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 480 /// an error. |
489 * error. | 481 /// |
490 * | 482 /// If the used [http.Client] completes with an error when making a REST |
491 * If the used [http.Client] completes with an error when making a REST call, | 483 /// call, this method will complete with the same error. |
492 * this method will complete with the same error. | |
493 */ | |
494 async.Future<Empty> delete(core.String projectId, core.String triggerId) { | 484 async.Future<Empty> delete(core.String projectId, core.String triggerId) { |
495 var _url = null; | 485 var _url = null; |
496 var _queryParams = new core.Map(); | 486 var _queryParams = new core.Map(); |
497 var _uploadMedia = null; | 487 var _uploadMedia = null; |
498 var _uploadOptions = null; | 488 var _uploadOptions = null; |
499 var _downloadOptions = commons.DownloadOptions.Metadata; | 489 var _downloadOptions = commons.DownloadOptions.Metadata; |
500 var _body = null; | 490 var _body = null; |
501 | 491 |
502 if (projectId == null) { | 492 if (projectId == null) { |
503 throw new core.ArgumentError("Parameter projectId is required."); | 493 throw new core.ArgumentError("Parameter projectId is required."); |
504 } | 494 } |
505 if (triggerId == null) { | 495 if (triggerId == null) { |
506 throw new core.ArgumentError("Parameter triggerId is required."); | 496 throw new core.ArgumentError("Parameter triggerId is required."); |
507 } | 497 } |
508 | 498 |
509 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trig
gers/' + commons.Escaper.ecapeVariable('$triggerId'); | 499 _url = 'v1/projects/' + |
| 500 commons.Escaper.ecapeVariable('$projectId') + |
| 501 '/triggers/' + |
| 502 commons.Escaper.ecapeVariable('$triggerId'); |
510 | 503 |
511 var _response = _requester.request(_url, | 504 var _response = _requester.request(_url, "DELETE", |
512 "DELETE", | 505 body: _body, |
513 body: _body, | 506 queryParams: _queryParams, |
514 queryParams: _queryParams, | 507 uploadOptions: _uploadOptions, |
515 uploadOptions: _uploadOptions, | 508 uploadMedia: _uploadMedia, |
516 uploadMedia: _uploadMedia, | 509 downloadOptions: _downloadOptions); |
517 downloadOptions: _downloadOptions); | |
518 return _response.then((data) => new Empty.fromJson(data)); | 510 return _response.then((data) => new Empty.fromJson(data)); |
519 } | 511 } |
520 | 512 |
521 /** | 513 /// Gets information about a BuildTrigger. |
522 * Gets information about a BuildTrigger. | 514 /// |
523 * | 515 /// This API is experimental. |
524 * This API is experimental. | 516 /// |
525 * | 517 /// Request parameters: |
526 * Request parameters: | 518 /// |
527 * | 519 /// [projectId] - ID of the project that owns the trigger. |
528 * [projectId] - ID of the project that owns the trigger. | 520 /// |
529 * | 521 /// [triggerId] - ID of the BuildTrigger to get. |
530 * [triggerId] - ID of the BuildTrigger to get. | 522 /// |
531 * | 523 /// Completes with a [BuildTrigger]. |
532 * Completes with a [BuildTrigger]. | 524 /// |
533 * | 525 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
534 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 526 /// an error. |
535 * error. | 527 /// |
536 * | 528 /// If the used [http.Client] completes with an error when making a REST |
537 * If the used [http.Client] completes with an error when making a REST call, | 529 /// call, this method will complete with the same error. |
538 * this method will complete with the same error. | |
539 */ | |
540 async.Future<BuildTrigger> get(core.String projectId, core.String triggerId) { | 530 async.Future<BuildTrigger> get(core.String projectId, core.String triggerId) { |
541 var _url = null; | 531 var _url = null; |
542 var _queryParams = new core.Map(); | 532 var _queryParams = new core.Map(); |
543 var _uploadMedia = null; | 533 var _uploadMedia = null; |
544 var _uploadOptions = null; | 534 var _uploadOptions = null; |
545 var _downloadOptions = commons.DownloadOptions.Metadata; | 535 var _downloadOptions = commons.DownloadOptions.Metadata; |
546 var _body = null; | 536 var _body = null; |
547 | 537 |
548 if (projectId == null) { | 538 if (projectId == null) { |
549 throw new core.ArgumentError("Parameter projectId is required."); | 539 throw new core.ArgumentError("Parameter projectId is required."); |
550 } | 540 } |
551 if (triggerId == null) { | 541 if (triggerId == null) { |
552 throw new core.ArgumentError("Parameter triggerId is required."); | 542 throw new core.ArgumentError("Parameter triggerId is required."); |
553 } | 543 } |
554 | 544 |
555 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trig
gers/' + commons.Escaper.ecapeVariable('$triggerId'); | 545 _url = 'v1/projects/' + |
| 546 commons.Escaper.ecapeVariable('$projectId') + |
| 547 '/triggers/' + |
| 548 commons.Escaper.ecapeVariable('$triggerId'); |
556 | 549 |
557 var _response = _requester.request(_url, | 550 var _response = _requester.request(_url, "GET", |
558 "GET", | 551 body: _body, |
559 body: _body, | 552 queryParams: _queryParams, |
560 queryParams: _queryParams, | 553 uploadOptions: _uploadOptions, |
561 uploadOptions: _uploadOptions, | 554 uploadMedia: _uploadMedia, |
562 uploadMedia: _uploadMedia, | 555 downloadOptions: _downloadOptions); |
563 downloadOptions: _downloadOptions); | |
564 return _response.then((data) => new BuildTrigger.fromJson(data)); | 556 return _response.then((data) => new BuildTrigger.fromJson(data)); |
565 } | 557 } |
566 | 558 |
567 /** | 559 /// Lists existing BuildTrigger. |
568 * Lists existing BuildTrigger. | 560 /// |
569 * | 561 /// This API is experimental. |
570 * This API is experimental. | 562 /// |
571 * | 563 /// Request parameters: |
572 * Request parameters: | 564 /// |
573 * | 565 /// [projectId] - ID of the project for which to list BuildTriggers. |
574 * [projectId] - ID of the project for which to list BuildTriggers. | 566 /// |
575 * | 567 /// Completes with a [ListBuildTriggersResponse]. |
576 * Completes with a [ListBuildTriggersResponse]. | 568 /// |
577 * | 569 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
578 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 570 /// an error. |
579 * error. | 571 /// |
580 * | 572 /// If the used [http.Client] completes with an error when making a REST |
581 * If the used [http.Client] completes with an error when making a REST call, | 573 /// call, this method will complete with the same error. |
582 * this method will complete with the same error. | |
583 */ | |
584 async.Future<ListBuildTriggersResponse> list(core.String projectId) { | 574 async.Future<ListBuildTriggersResponse> list(core.String projectId) { |
585 var _url = null; | 575 var _url = null; |
586 var _queryParams = new core.Map(); | 576 var _queryParams = new core.Map(); |
587 var _uploadMedia = null; | 577 var _uploadMedia = null; |
588 var _uploadOptions = null; | 578 var _uploadOptions = null; |
589 var _downloadOptions = commons.DownloadOptions.Metadata; | 579 var _downloadOptions = commons.DownloadOptions.Metadata; |
590 var _body = null; | 580 var _body = null; |
591 | 581 |
592 if (projectId == null) { | 582 if (projectId == null) { |
593 throw new core.ArgumentError("Parameter projectId is required."); | 583 throw new core.ArgumentError("Parameter projectId is required."); |
594 } | 584 } |
595 | 585 |
596 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trig
gers'; | 586 _url = 'v1/projects/' + |
| 587 commons.Escaper.ecapeVariable('$projectId') + |
| 588 '/triggers'; |
597 | 589 |
598 var _response = _requester.request(_url, | 590 var _response = _requester.request(_url, "GET", |
599 "GET", | 591 body: _body, |
600 body: _body, | 592 queryParams: _queryParams, |
601 queryParams: _queryParams, | 593 uploadOptions: _uploadOptions, |
602 uploadOptions: _uploadOptions, | 594 uploadMedia: _uploadMedia, |
603 uploadMedia: _uploadMedia, | 595 downloadOptions: _downloadOptions); |
604 downloadOptions: _downloadOptions); | 596 return _response |
605 return _response.then((data) => new ListBuildTriggersResponse.fromJson(data)
); | 597 .then((data) => new ListBuildTriggersResponse.fromJson(data)); |
606 } | 598 } |
607 | 599 |
608 /** | 600 /// Updates an BuildTrigger by its project ID and trigger ID. |
609 * Updates an BuildTrigger by its project ID and trigger ID. | 601 /// |
610 * | 602 /// This API is experimental. |
611 * This API is experimental. | 603 /// |
612 * | 604 /// [request] - The metadata request object. |
613 * [request] - The metadata request object. | 605 /// |
614 * | 606 /// Request parameters: |
615 * Request parameters: | 607 /// |
616 * | 608 /// [projectId] - ID of the project that owns the trigger. |
617 * [projectId] - ID of the project that owns the trigger. | 609 /// |
618 * | 610 /// [triggerId] - ID of the BuildTrigger to update. |
619 * [triggerId] - ID of the BuildTrigger to update. | 611 /// |
620 * | 612 /// Completes with a [BuildTrigger]. |
621 * Completes with a [BuildTrigger]. | 613 /// |
622 * | 614 /// Completes with a [commons.ApiRequestError] if the API endpoint returned |
623 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 615 /// an error. |
624 * error. | 616 /// |
625 * | 617 /// If the used [http.Client] completes with an error when making a REST |
626 * If the used [http.Client] completes with an error when making a REST call, | 618 /// call, this method will complete with the same error. |
627 * this method will complete with the same error. | 619 async.Future<BuildTrigger> patch( |
628 */ | 620 BuildTrigger request, core.String projectId, core.String triggerId) { |
629 async.Future<BuildTrigger> patch(BuildTrigger request, core.String projectId,
core.String triggerId) { | |
630 var _url = null; | 621 var _url = null; |
631 var _queryParams = new core.Map(); | 622 var _queryParams = new core.Map(); |
632 var _uploadMedia = null; | 623 var _uploadMedia = null; |
633 var _uploadOptions = null; | 624 var _uploadOptions = null; |
634 var _downloadOptions = commons.DownloadOptions.Metadata; | 625 var _downloadOptions = commons.DownloadOptions.Metadata; |
635 var _body = null; | 626 var _body = null; |
636 | 627 |
637 if (request != null) { | 628 if (request != null) { |
638 _body = convert.JSON.encode((request).toJson()); | 629 _body = convert.JSON.encode((request).toJson()); |
639 } | 630 } |
640 if (projectId == null) { | 631 if (projectId == null) { |
641 throw new core.ArgumentError("Parameter projectId is required."); | 632 throw new core.ArgumentError("Parameter projectId is required."); |
642 } | 633 } |
643 if (triggerId == null) { | 634 if (triggerId == null) { |
644 throw new core.ArgumentError("Parameter triggerId is required."); | 635 throw new core.ArgumentError("Parameter triggerId is required."); |
645 } | 636 } |
646 | 637 |
647 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/trig
gers/' + commons.Escaper.ecapeVariable('$triggerId'); | 638 _url = 'v1/projects/' + |
| 639 commons.Escaper.ecapeVariable('$projectId') + |
| 640 '/triggers/' + |
| 641 commons.Escaper.ecapeVariable('$triggerId'); |
648 | 642 |
649 var _response = _requester.request(_url, | 643 var _response = _requester.request(_url, "PATCH", |
650 "PATCH", | 644 body: _body, |
651 body: _body, | 645 queryParams: _queryParams, |
652 queryParams: _queryParams, | 646 uploadOptions: _uploadOptions, |
653 uploadOptions: _uploadOptions, | 647 uploadMedia: _uploadMedia, |
654 uploadMedia: _uploadMedia, | 648 downloadOptions: _downloadOptions); |
655 downloadOptions: _downloadOptions); | |
656 return _response.then((data) => new BuildTrigger.fromJson(data)); | 649 return _response.then((data) => new BuildTrigger.fromJson(data)); |
657 } | 650 } |
658 | |
659 } | 651 } |
660 | 652 |
| 653 /// A build resource in the Container Builder API. |
| 654 /// |
| 655 /// At a high level, a Build describes where to find source code, how to build |
| 656 /// it (for example, the builder image to run on the source), and what tag to |
| 657 /// apply to the built image when it is pushed to Google Container Registry. |
| 658 /// |
| 659 /// Fields can include the following variables which will be expanded when the |
| 660 /// build is created: |
| 661 /// |
| 662 /// - $PROJECT_ID: the project ID of the build. |
| 663 /// - $BUILD_ID: the autogenerated ID of the build. |
| 664 /// - $REPO_NAME: the source repository name specified by RepoSource. |
| 665 /// - $BRANCH_NAME: the branch name specified by RepoSource. |
| 666 /// - $TAG_NAME: the tag name specified by RepoSource. |
| 667 /// - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or |
| 668 /// resolved from the specified branch or tag. |
| 669 class Build { |
| 670 /// The ID of the BuildTrigger that triggered this build, if it was |
| 671 /// triggered automatically. |
| 672 /// @OutputOnly |
| 673 core.String buildTriggerId; |
661 | 674 |
| 675 /// Time at which the request to create the build was received. |
| 676 /// @OutputOnly |
| 677 core.String createTime; |
662 | 678 |
663 /** | 679 /// Time at which execution of the build was finished. |
664 * A build resource in the Container Builder API. | 680 /// |
665 * | 681 /// The difference between finish_time and start_time is the duration of the |
666 * At a high level, a Build describes where to find source code, how to build | 682 /// build's execution. |
667 * it (for example, the builder image to run on the source), and what tag to | 683 /// @OutputOnly |
668 * apply to the built image when it is pushed to Google Container Registry. | |
669 * | |
670 * Fields can include the following variables which will be expanded when the | |
671 * build is created: | |
672 * | |
673 * - $PROJECT_ID: the project ID of the build. | |
674 * - $BUILD_ID: the autogenerated ID of the build. | |
675 * - $REPO_NAME: the source repository name specified by RepoSource. | |
676 * - $BRANCH_NAME: the branch name specified by RepoSource. | |
677 * - $TAG_NAME: the tag name specified by RepoSource. | |
678 * - $REVISION_ID or $COMMIT_SHA: the commit SHA specified by RepoSource or | |
679 * resolved from the specified branch or tag. | |
680 */ | |
681 class Build { | |
682 /** | |
683 * The ID of the BuildTrigger that triggered this build, if it was | |
684 * triggered automatically. | |
685 * @OutputOnly | |
686 */ | |
687 core.String buildTriggerId; | |
688 /** | |
689 * Time at which the request to create the build was received. | |
690 * @OutputOnly | |
691 */ | |
692 core.String createTime; | |
693 /** | |
694 * Time at which execution of the build was finished. | |
695 * | |
696 * The difference between finish_time and start_time is the duration of the | |
697 * build's execution. | |
698 * @OutputOnly | |
699 */ | |
700 core.String finishTime; | 684 core.String finishTime; |
701 /** | 685 |
702 * Unique identifier of the build. | 686 /// Unique identifier of the build. |
703 * @OutputOnly | 687 /// @OutputOnly |
704 */ | |
705 core.String id; | 688 core.String id; |
706 /** | 689 |
707 * A list of images to be pushed upon the successful completion of all build | 690 /// A list of images to be pushed upon the successful completion of all build |
708 * steps. | 691 /// steps. |
709 * | 692 /// |
710 * The images will be pushed using the builder service account's credentials. | 693 /// The images will be pushed using the builder service account's |
711 * | 694 /// credentials. |
712 * The digests of the pushed images will be stored in the Build resource's | 695 /// |
713 * results field. | 696 /// The digests of the pushed images will be stored in the Build resource's |
714 * | 697 /// results field. |
715 * If any of the images fail to be pushed, the build is marked FAILURE. | 698 /// |
716 */ | 699 /// If any of the images fail to be pushed, the build is marked FAILURE. |
717 core.List<core.String> images; | 700 core.List<core.String> images; |
718 /** | 701 |
719 * URL to logs for this build in Google Cloud Logging. | 702 /// URL to logs for this build in Google Cloud Logging. |
720 * @OutputOnly | 703 /// @OutputOnly |
721 */ | |
722 core.String logUrl; | 704 core.String logUrl; |
723 /** | 705 |
724 * Google Cloud Storage bucket where logs should be written (see | 706 /// Google Cloud Storage bucket where logs should be written (see |
725 * [Bucket Name | 707 /// [Bucket Name |
726 * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requireme
nts)). | 708 /// Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirem
ents)). |
727 * Logs file names will be of the format `${logs_bucket}/log-${build_id}.txt`. | 709 /// Logs file names will be of the format |
728 */ | 710 /// `${logs_bucket}/log-${build_id}.txt`. |
729 core.String logsBucket; | 711 core.String logsBucket; |
730 /** Special options for this build. */ | 712 |
| 713 /// Special options for this build. |
731 BuildOptions options; | 714 BuildOptions options; |
732 /** | 715 |
733 * ID of the project. | 716 /// ID of the project. |
734 * @OutputOnly. | 717 /// @OutputOnly. |
735 */ | |
736 core.String projectId; | 718 core.String projectId; |
737 /** | 719 |
738 * Results of the build. | 720 /// Results of the build. |
739 * @OutputOnly | 721 /// @OutputOnly |
740 */ | |
741 Results results; | 722 Results results; |
742 /** Secrets to decrypt using Cloud KMS. */ | 723 |
| 724 /// Secrets to decrypt using Cloud KMS. |
743 core.List<Secret> secrets; | 725 core.List<Secret> secrets; |
744 /** Describes where to find the source files to build. */ | 726 |
| 727 /// Describes where to find the source files to build. |
745 Source source; | 728 Source source; |
746 /** | 729 |
747 * A permanent fixed identifier for source. | 730 /// A permanent fixed identifier for source. |
748 * @OutputOnly | 731 /// @OutputOnly |
749 */ | |
750 SourceProvenance sourceProvenance; | 732 SourceProvenance sourceProvenance; |
751 /** | 733 |
752 * Time at which execution of the build was started. | 734 /// Time at which execution of the build was started. |
753 * @OutputOnly | 735 /// @OutputOnly |
754 */ | |
755 core.String startTime; | 736 core.String startTime; |
756 /** | 737 |
757 * Status of the build. | 738 /// Status of the build. |
758 * @OutputOnly | 739 /// @OutputOnly |
759 * Possible string values are: | 740 /// Possible string values are: |
760 * - "STATUS_UNKNOWN" : Status of the build is unknown. | 741 /// - "STATUS_UNKNOWN" : Status of the build is unknown. |
761 * - "QUEUED" : Build is queued; work has not yet begun. | 742 /// - "QUEUED" : Build is queued; work has not yet begun. |
762 * - "WORKING" : Build is being executed. | 743 /// - "WORKING" : Build is being executed. |
763 * - "SUCCESS" : Build finished successfully. | 744 /// - "SUCCESS" : Build finished successfully. |
764 * - "FAILURE" : Build failed to complete successfully. | 745 /// - "FAILURE" : Build failed to complete successfully. |
765 * - "INTERNAL_ERROR" : Build failed due to an internal cause. | 746 /// - "INTERNAL_ERROR" : Build failed due to an internal cause. |
766 * - "TIMEOUT" : Build took longer than was allowed. | 747 /// - "TIMEOUT" : Build took longer than was allowed. |
767 * - "CANCELLED" : Build was canceled by a user. | 748 /// - "CANCELLED" : Build was canceled by a user. |
768 */ | |
769 core.String status; | 749 core.String status; |
770 /** | 750 |
771 * Customer-readable message about the current status. | 751 /// Customer-readable message about the current status. |
772 * @OutputOnly | 752 /// @OutputOnly |
773 */ | |
774 core.String statusDetail; | 753 core.String statusDetail; |
775 /** Describes the operations to be performed on the workspace. */ | 754 |
| 755 /// Describes the operations to be performed on the workspace. |
776 core.List<BuildStep> steps; | 756 core.List<BuildStep> steps; |
777 /** Substitutions data for Build resource. */ | 757 |
| 758 /// Substitutions data for Build resource. |
778 core.Map<core.String, core.String> substitutions; | 759 core.Map<core.String, core.String> substitutions; |
779 /** Tags for annotation of a Build. These are not docker tags. */ | 760 |
| 761 /// Tags for annotation of a Build. These are not docker tags. |
780 core.List<core.String> tags; | 762 core.List<core.String> tags; |
781 /** | 763 |
782 * Amount of time that this build should be allowed to run, to second | 764 /// Amount of time that this build should be allowed to run, to second |
783 * granularity. If this amount of time elapses, work on the build will cease | 765 /// granularity. If this amount of time elapses, work on the build will cease |
784 * and the build status will be TIMEOUT. | 766 /// and the build status will be TIMEOUT. |
785 * | 767 /// |
786 * Default time is ten minutes. | 768 /// Default time is ten minutes. |
787 */ | |
788 core.String timeout; | 769 core.String timeout; |
789 | 770 |
790 Build(); | 771 Build(); |
791 | 772 |
792 Build.fromJson(core.Map _json) { | 773 Build.fromJson(core.Map _json) { |
793 if (_json.containsKey("buildTriggerId")) { | 774 if (_json.containsKey("buildTriggerId")) { |
794 buildTriggerId = _json["buildTriggerId"]; | 775 buildTriggerId = _json["buildTriggerId"]; |
795 } | 776 } |
796 if (_json.containsKey("createTime")) { | 777 if (_json.containsKey("createTime")) { |
797 createTime = _json["createTime"]; | 778 createTime = _json["createTime"]; |
(...skipping 16 matching lines...) Expand all Loading... |
814 if (_json.containsKey("options")) { | 795 if (_json.containsKey("options")) { |
815 options = new BuildOptions.fromJson(_json["options"]); | 796 options = new BuildOptions.fromJson(_json["options"]); |
816 } | 797 } |
817 if (_json.containsKey("projectId")) { | 798 if (_json.containsKey("projectId")) { |
818 projectId = _json["projectId"]; | 799 projectId = _json["projectId"]; |
819 } | 800 } |
820 if (_json.containsKey("results")) { | 801 if (_json.containsKey("results")) { |
821 results = new Results.fromJson(_json["results"]); | 802 results = new Results.fromJson(_json["results"]); |
822 } | 803 } |
823 if (_json.containsKey("secrets")) { | 804 if (_json.containsKey("secrets")) { |
824 secrets = _json["secrets"].map((value) => new Secret.fromJson(value)).toLi
st(); | 805 secrets = |
| 806 _json["secrets"].map((value) => new Secret.fromJson(value)).toList(); |
825 } | 807 } |
826 if (_json.containsKey("source")) { | 808 if (_json.containsKey("source")) { |
827 source = new Source.fromJson(_json["source"]); | 809 source = new Source.fromJson(_json["source"]); |
828 } | 810 } |
829 if (_json.containsKey("sourceProvenance")) { | 811 if (_json.containsKey("sourceProvenance")) { |
830 sourceProvenance = new SourceProvenance.fromJson(_json["sourceProvenance"]
); | 812 sourceProvenance = |
| 813 new SourceProvenance.fromJson(_json["sourceProvenance"]); |
831 } | 814 } |
832 if (_json.containsKey("startTime")) { | 815 if (_json.containsKey("startTime")) { |
833 startTime = _json["startTime"]; | 816 startTime = _json["startTime"]; |
834 } | 817 } |
835 if (_json.containsKey("status")) { | 818 if (_json.containsKey("status")) { |
836 status = _json["status"]; | 819 status = _json["status"]; |
837 } | 820 } |
838 if (_json.containsKey("statusDetail")) { | 821 if (_json.containsKey("statusDetail")) { |
839 statusDetail = _json["statusDetail"]; | 822 statusDetail = _json["statusDetail"]; |
840 } | 823 } |
841 if (_json.containsKey("steps")) { | 824 if (_json.containsKey("steps")) { |
842 steps = _json["steps"].map((value) => new BuildStep.fromJson(value)).toLis
t(); | 825 steps = |
| 826 _json["steps"].map((value) => new BuildStep.fromJson(value)).toList(); |
843 } | 827 } |
844 if (_json.containsKey("substitutions")) { | 828 if (_json.containsKey("substitutions")) { |
845 substitutions = _json["substitutions"]; | 829 substitutions = _json["substitutions"]; |
846 } | 830 } |
847 if (_json.containsKey("tags")) { | 831 if (_json.containsKey("tags")) { |
848 tags = _json["tags"]; | 832 tags = _json["tags"]; |
849 } | 833 } |
850 if (_json.containsKey("timeout")) { | 834 if (_json.containsKey("timeout")) { |
851 timeout = _json["timeout"]; | 835 timeout = _json["timeout"]; |
852 } | 836 } |
853 } | 837 } |
854 | 838 |
855 core.Map<core.String, core.Object> toJson() { | 839 core.Map<core.String, core.Object> toJson() { |
856 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 840 final core.Map<core.String, core.Object> _json = |
| 841 new core.Map<core.String, core.Object>(); |
857 if (buildTriggerId != null) { | 842 if (buildTriggerId != null) { |
858 _json["buildTriggerId"] = buildTriggerId; | 843 _json["buildTriggerId"] = buildTriggerId; |
859 } | 844 } |
860 if (createTime != null) { | 845 if (createTime != null) { |
861 _json["createTime"] = createTime; | 846 _json["createTime"] = createTime; |
862 } | 847 } |
863 if (finishTime != null) { | 848 if (finishTime != null) { |
864 _json["finishTime"] = finishTime; | 849 _json["finishTime"] = finishTime; |
865 } | 850 } |
866 if (id != null) { | 851 if (id != null) { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 if (tags != null) { | 896 if (tags != null) { |
912 _json["tags"] = tags; | 897 _json["tags"] = tags; |
913 } | 898 } |
914 if (timeout != null) { | 899 if (timeout != null) { |
915 _json["timeout"] = timeout; | 900 _json["timeout"] = timeout; |
916 } | 901 } |
917 return _json; | 902 return _json; |
918 } | 903 } |
919 } | 904 } |
920 | 905 |
921 /** Metadata for build operations. */ | 906 /// Metadata for build operations. |
922 class BuildOperationMetadata { | 907 class BuildOperationMetadata { |
923 /** The build that the operation is tracking. */ | 908 /// The build that the operation is tracking. |
924 Build build; | 909 Build build; |
925 | 910 |
926 BuildOperationMetadata(); | 911 BuildOperationMetadata(); |
927 | 912 |
928 BuildOperationMetadata.fromJson(core.Map _json) { | 913 BuildOperationMetadata.fromJson(core.Map _json) { |
929 if (_json.containsKey("build")) { | 914 if (_json.containsKey("build")) { |
930 build = new Build.fromJson(_json["build"]); | 915 build = new Build.fromJson(_json["build"]); |
931 } | 916 } |
932 } | 917 } |
933 | 918 |
934 core.Map<core.String, core.Object> toJson() { | 919 core.Map<core.String, core.Object> toJson() { |
935 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 920 final core.Map<core.String, core.Object> _json = |
| 921 new core.Map<core.String, core.Object>(); |
936 if (build != null) { | 922 if (build != null) { |
937 _json["build"] = (build).toJson(); | 923 _json["build"] = (build).toJson(); |
938 } | 924 } |
939 return _json; | 925 return _json; |
940 } | 926 } |
941 } | 927 } |
942 | 928 |
943 /** Optional arguments to enable specific features of builds. */ | 929 /// Optional arguments to enable specific features of builds. |
944 class BuildOptions { | 930 class BuildOptions { |
945 /** | 931 /// Requested verifiability options. |
946 * Requested verifiability options. | 932 /// Possible string values are: |
947 * Possible string values are: | 933 /// - "NOT_VERIFIED" : Not a verifiable build. (default) |
948 * - "NOT_VERIFIED" : Not a verifiable build. (default) | 934 /// - "VERIFIED" : Verified build. |
949 * - "VERIFIED" : Verified build. | |
950 */ | |
951 core.String requestedVerifyOption; | 935 core.String requestedVerifyOption; |
952 /** Requested hash for SourceProvenance. */ | 936 |
| 937 /// Requested hash for SourceProvenance. |
953 core.List<core.String> sourceProvenanceHash; | 938 core.List<core.String> sourceProvenanceHash; |
954 /** | 939 |
955 * SubstitutionOption to allow unmatch substitutions. | 940 /// SubstitutionOption to allow unmatch substitutions. |
956 * Possible string values are: | 941 /// Possible string values are: |
957 * - "MUST_MATCH" : Fails the build if error in substitutions checks, like | 942 /// - "MUST_MATCH" : Fails the build if error in substitutions checks, like |
958 * missing | 943 /// missing |
959 * a substitution in the template or in the map. | 944 /// a substitution in the template or in the map. |
960 * - "ALLOW_LOOSE" : Do not fail the build if error in substitutions checks. | 945 /// - "ALLOW_LOOSE" : Do not fail the build if error in substitutions checks. |
961 */ | |
962 core.String substitutionOption; | 946 core.String substitutionOption; |
963 | 947 |
964 BuildOptions(); | 948 BuildOptions(); |
965 | 949 |
966 BuildOptions.fromJson(core.Map _json) { | 950 BuildOptions.fromJson(core.Map _json) { |
967 if (_json.containsKey("requestedVerifyOption")) { | 951 if (_json.containsKey("requestedVerifyOption")) { |
968 requestedVerifyOption = _json["requestedVerifyOption"]; | 952 requestedVerifyOption = _json["requestedVerifyOption"]; |
969 } | 953 } |
970 if (_json.containsKey("sourceProvenanceHash")) { | 954 if (_json.containsKey("sourceProvenanceHash")) { |
971 sourceProvenanceHash = _json["sourceProvenanceHash"]; | 955 sourceProvenanceHash = _json["sourceProvenanceHash"]; |
972 } | 956 } |
973 if (_json.containsKey("substitutionOption")) { | 957 if (_json.containsKey("substitutionOption")) { |
974 substitutionOption = _json["substitutionOption"]; | 958 substitutionOption = _json["substitutionOption"]; |
975 } | 959 } |
976 } | 960 } |
977 | 961 |
978 core.Map<core.String, core.Object> toJson() { | 962 core.Map<core.String, core.Object> toJson() { |
979 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 963 final core.Map<core.String, core.Object> _json = |
| 964 new core.Map<core.String, core.Object>(); |
980 if (requestedVerifyOption != null) { | 965 if (requestedVerifyOption != null) { |
981 _json["requestedVerifyOption"] = requestedVerifyOption; | 966 _json["requestedVerifyOption"] = requestedVerifyOption; |
982 } | 967 } |
983 if (sourceProvenanceHash != null) { | 968 if (sourceProvenanceHash != null) { |
984 _json["sourceProvenanceHash"] = sourceProvenanceHash; | 969 _json["sourceProvenanceHash"] = sourceProvenanceHash; |
985 } | 970 } |
986 if (substitutionOption != null) { | 971 if (substitutionOption != null) { |
987 _json["substitutionOption"] = substitutionOption; | 972 _json["substitutionOption"] = substitutionOption; |
988 } | 973 } |
989 return _json; | 974 return _json; |
990 } | 975 } |
991 } | 976 } |
992 | 977 |
993 /** BuildStep describes a step to perform in the build pipeline. */ | 978 /// BuildStep describes a step to perform in the build pipeline. |
994 class BuildStep { | 979 class BuildStep { |
995 /** | 980 /// A list of arguments that will be presented to the step when it is |
996 * A list of arguments that will be presented to the step when it is started. | 981 /// started. |
997 * | 982 /// |
998 * If the image used to run the step's container has an entrypoint, these args | 983 /// If the image used to run the step's container has an entrypoint, these |
999 * will be used as arguments to that entrypoint. If the image does not define | 984 /// args |
1000 * an entrypoint, the first element in args will be used as the entrypoint, | 985 /// will be used as arguments to that entrypoint. If the image does not |
1001 * and the remainder will be used as arguments. | 986 /// define |
1002 */ | 987 /// an entrypoint, the first element in args will be used as the entrypoint, |
| 988 /// and the remainder will be used as arguments. |
1003 core.List<core.String> args; | 989 core.List<core.String> args; |
1004 /** | 990 |
1005 * Working directory (relative to project source root) to use when running | 991 /// Working directory (relative to project source root) to use when running |
1006 * this operation's container. | 992 /// this operation's container. |
1007 */ | |
1008 core.String dir; | 993 core.String dir; |
1009 /** | 994 |
1010 * Optional entrypoint to be used instead of the build step image's default | 995 /// Optional entrypoint to be used instead of the build step image's default |
1011 * If unset, the image's default will be used. | 996 /// If unset, the image's default will be used. |
1012 */ | |
1013 core.String entrypoint; | 997 core.String entrypoint; |
1014 /** | 998 |
1015 * A list of environment variable definitions to be used when running a step. | 999 /// A list of environment variable definitions to be used when running a |
1016 * | 1000 /// step. |
1017 * The elements are of the form "KEY=VALUE" for the environment variable "KEY" | 1001 /// |
1018 * being given the value "VALUE". | 1002 /// The elements are of the form "KEY=VALUE" for the environment variable |
1019 */ | 1003 /// "KEY" |
| 1004 /// being given the value "VALUE". |
1020 core.List<core.String> env; | 1005 core.List<core.String> env; |
1021 /** | 1006 |
1022 * Optional unique identifier for this build step, used in wait_for to | 1007 /// Optional unique identifier for this build step, used in wait_for to |
1023 * reference this build step as a dependency. | 1008 /// reference this build step as a dependency. |
1024 */ | |
1025 core.String id; | 1009 core.String id; |
1026 /** | 1010 |
1027 * The name of the container image that will run this particular build step. | 1011 /// The name of the container image that will run this particular build step. |
1028 * | 1012 /// |
1029 * If the image is already available in the host's Docker daemon's cache, it | 1013 /// If the image is already available in the host's Docker daemon's cache, it |
1030 * will be run directly. If not, the host will attempt to pull the image | 1014 /// will be run directly. If not, the host will attempt to pull the image |
1031 * first, using the builder service account's credentials if necessary. | 1015 /// first, using the builder service account's credentials if necessary. |
1032 * | 1016 /// |
1033 * The Docker daemon's cache will already have the latest versions of all of | 1017 /// The Docker daemon's cache will already have the latest versions of all of |
1034 * the officially supported build steps | 1018 /// the officially supported build steps |
1035 * ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.com
/GoogleCloudPlatform/cloud-builders)). | 1019 /// ([https://github.com/GoogleCloudPlatform/cloud-builders](https://github.co
m/GoogleCloudPlatform/cloud-builders)). |
1036 * The Docker daemon will also have cached many of the layers for some popular | 1020 /// The Docker daemon will also have cached many of the layers for some |
1037 * images, like "ubuntu", "debian", but they will be refreshed at the time you | 1021 /// popular |
1038 * attempt to use them. | 1022 /// images, like "ubuntu", "debian", but they will be refreshed at the time |
1039 * | 1023 /// you |
1040 * If you built an image in a previous build step, it will be stored in the | 1024 /// attempt to use them. |
1041 * host's Docker daemon's cache and is available to use as the name for a | 1025 /// |
1042 * later build step. | 1026 /// If you built an image in a previous build step, it will be stored in the |
1043 */ | 1027 /// host's Docker daemon's cache and is available to use as the name for a |
| 1028 /// later build step. |
1044 core.String name; | 1029 core.String name; |
1045 /** | 1030 |
1046 * A list of environment variables which are encrypted using a Cloud KMS | 1031 /// 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. | 1032 /// crypto key. These values must be specified in the build's secrets. |
1048 */ | |
1049 core.List<core.String> secretEnv; | 1033 core.List<core.String> secretEnv; |
1050 /** | 1034 |
1051 * List of volumes to mount into the build step. | 1035 /// List of volumes to mount into the build step. |
1052 * | 1036 /// |
1053 * Each volume will be created as an empty volume prior to execution of the | 1037 /// 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 | 1038 /// build step. Upon completion of the build, volumes and their contents will |
1055 * be discarded. | 1039 /// be discarded. |
1056 * | 1040 /// |
1057 * Using a named volume in only one step is not valid as it is indicative | 1041 /// Using a named volume in only one step is not valid as it is indicative |
1058 * of a mis-configured build request. | 1042 /// of a mis-configured build request. |
1059 */ | |
1060 core.List<Volume> volumes; | 1043 core.List<Volume> volumes; |
1061 /** | 1044 |
1062 * The ID(s) of the step(s) that this build step depends on. | 1045 /// The ID(s) of the step(s) that this build step depends on. |
1063 * This build step will not start until all the build steps in wait_for | 1046 /// This build step will not start until all the build steps in wait_for |
1064 * have completed successfully. If wait_for is empty, this build step will | 1047 /// have completed successfully. If wait_for is empty, this build step will |
1065 * start when all previous build steps in the Build.Steps list have completed | 1048 /// start when all previous build steps in the Build.Steps list have |
1066 * successfully. | 1049 /// completed |
1067 */ | 1050 /// successfully. |
1068 core.List<core.String> waitFor; | 1051 core.List<core.String> waitFor; |
1069 | 1052 |
1070 BuildStep(); | 1053 BuildStep(); |
1071 | 1054 |
1072 BuildStep.fromJson(core.Map _json) { | 1055 BuildStep.fromJson(core.Map _json) { |
1073 if (_json.containsKey("args")) { | 1056 if (_json.containsKey("args")) { |
1074 args = _json["args"]; | 1057 args = _json["args"]; |
1075 } | 1058 } |
1076 if (_json.containsKey("dir")) { | 1059 if (_json.containsKey("dir")) { |
1077 dir = _json["dir"]; | 1060 dir = _json["dir"]; |
1078 } | 1061 } |
1079 if (_json.containsKey("entrypoint")) { | 1062 if (_json.containsKey("entrypoint")) { |
1080 entrypoint = _json["entrypoint"]; | 1063 entrypoint = _json["entrypoint"]; |
1081 } | 1064 } |
1082 if (_json.containsKey("env")) { | 1065 if (_json.containsKey("env")) { |
1083 env = _json["env"]; | 1066 env = _json["env"]; |
1084 } | 1067 } |
1085 if (_json.containsKey("id")) { | 1068 if (_json.containsKey("id")) { |
1086 id = _json["id"]; | 1069 id = _json["id"]; |
1087 } | 1070 } |
1088 if (_json.containsKey("name")) { | 1071 if (_json.containsKey("name")) { |
1089 name = _json["name"]; | 1072 name = _json["name"]; |
1090 } | 1073 } |
1091 if (_json.containsKey("secretEnv")) { | 1074 if (_json.containsKey("secretEnv")) { |
1092 secretEnv = _json["secretEnv"]; | 1075 secretEnv = _json["secretEnv"]; |
1093 } | 1076 } |
1094 if (_json.containsKey("volumes")) { | 1077 if (_json.containsKey("volumes")) { |
1095 volumes = _json["volumes"].map((value) => new Volume.fromJson(value)).toLi
st(); | 1078 volumes = |
| 1079 _json["volumes"].map((value) => new Volume.fromJson(value)).toList(); |
1096 } | 1080 } |
1097 if (_json.containsKey("waitFor")) { | 1081 if (_json.containsKey("waitFor")) { |
1098 waitFor = _json["waitFor"]; | 1082 waitFor = _json["waitFor"]; |
1099 } | 1083 } |
1100 } | 1084 } |
1101 | 1085 |
1102 core.Map<core.String, core.Object> toJson() { | 1086 core.Map<core.String, core.Object> toJson() { |
1103 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1087 final core.Map<core.String, core.Object> _json = |
| 1088 new core.Map<core.String, core.Object>(); |
1104 if (args != null) { | 1089 if (args != null) { |
1105 _json["args"] = args; | 1090 _json["args"] = args; |
1106 } | 1091 } |
1107 if (dir != null) { | 1092 if (dir != null) { |
1108 _json["dir"] = dir; | 1093 _json["dir"] = dir; |
1109 } | 1094 } |
1110 if (entrypoint != null) { | 1095 if (entrypoint != null) { |
1111 _json["entrypoint"] = entrypoint; | 1096 _json["entrypoint"] = entrypoint; |
1112 } | 1097 } |
1113 if (env != null) { | 1098 if (env != null) { |
(...skipping 11 matching lines...) Expand all Loading... |
1125 if (volumes != null) { | 1110 if (volumes != null) { |
1126 _json["volumes"] = volumes.map((value) => (value).toJson()).toList(); | 1111 _json["volumes"] = volumes.map((value) => (value).toJson()).toList(); |
1127 } | 1112 } |
1128 if (waitFor != null) { | 1113 if (waitFor != null) { |
1129 _json["waitFor"] = waitFor; | 1114 _json["waitFor"] = waitFor; |
1130 } | 1115 } |
1131 return _json; | 1116 return _json; |
1132 } | 1117 } |
1133 } | 1118 } |
1134 | 1119 |
1135 /** | 1120 /// Configuration for an automated build in response to source repository |
1136 * Configuration for an automated build in response to source repository | 1121 /// changes. |
1137 * changes. | |
1138 */ | |
1139 class BuildTrigger { | 1122 class BuildTrigger { |
1140 /** Contents of the build template. */ | 1123 /// Contents of the build template. |
1141 Build build; | 1124 Build build; |
1142 /** | 1125 |
1143 * Time when the trigger was created. | 1126 /// Time when the trigger was created. |
1144 * | 1127 /// |
1145 * @OutputOnly | 1128 /// @OutputOnly |
1146 */ | |
1147 core.String createTime; | 1129 core.String createTime; |
1148 /** Human-readable description of this trigger. */ | 1130 |
| 1131 /// Human-readable description of this trigger. |
1149 core.String description; | 1132 core.String description; |
1150 /** If true, the trigger will never result in a build. */ | 1133 |
| 1134 /// If true, the trigger will never result in a build. |
1151 core.bool disabled; | 1135 core.bool disabled; |
1152 /** | 1136 |
1153 * Path, from the source root, to a file whose contents is used for the | 1137 /// Path, from the source root, to a file whose contents is used for the |
1154 * template. | 1138 /// template. |
1155 */ | |
1156 core.String filename; | 1139 core.String filename; |
1157 /** | 1140 |
1158 * Unique identifier of the trigger. | 1141 /// Unique identifier of the trigger. |
1159 * | 1142 /// |
1160 * @OutputOnly | 1143 /// @OutputOnly |
1161 */ | |
1162 core.String id; | 1144 core.String id; |
1163 /** Substitutions data for Build resource. */ | 1145 |
| 1146 /// Substitutions data for Build resource. |
1164 core.Map<core.String, core.String> substitutions; | 1147 core.Map<core.String, core.String> substitutions; |
1165 /** | 1148 |
1166 * Template describing the types of source changes to trigger a build. | 1149 /// Template describing the types of source changes to trigger a build. |
1167 * | 1150 /// |
1168 * Branch and tag names in trigger templates are interpreted as regular | 1151 /// Branch and tag names in trigger templates are interpreted as regular |
1169 * expressions. Any branch or tag change that matches that regular expression | 1152 /// expressions. Any branch or tag change that matches that regular |
1170 * will trigger a build. | 1153 /// expression |
1171 */ | 1154 /// will trigger a build. |
1172 RepoSource triggerTemplate; | 1155 RepoSource triggerTemplate; |
1173 | 1156 |
1174 BuildTrigger(); | 1157 BuildTrigger(); |
1175 | 1158 |
1176 BuildTrigger.fromJson(core.Map _json) { | 1159 BuildTrigger.fromJson(core.Map _json) { |
1177 if (_json.containsKey("build")) { | 1160 if (_json.containsKey("build")) { |
1178 build = new Build.fromJson(_json["build"]); | 1161 build = new Build.fromJson(_json["build"]); |
1179 } | 1162 } |
1180 if (_json.containsKey("createTime")) { | 1163 if (_json.containsKey("createTime")) { |
1181 createTime = _json["createTime"]; | 1164 createTime = _json["createTime"]; |
(...skipping 12 matching lines...) Expand all Loading... |
1194 } | 1177 } |
1195 if (_json.containsKey("substitutions")) { | 1178 if (_json.containsKey("substitutions")) { |
1196 substitutions = _json["substitutions"]; | 1179 substitutions = _json["substitutions"]; |
1197 } | 1180 } |
1198 if (_json.containsKey("triggerTemplate")) { | 1181 if (_json.containsKey("triggerTemplate")) { |
1199 triggerTemplate = new RepoSource.fromJson(_json["triggerTemplate"]); | 1182 triggerTemplate = new RepoSource.fromJson(_json["triggerTemplate"]); |
1200 } | 1183 } |
1201 } | 1184 } |
1202 | 1185 |
1203 core.Map<core.String, core.Object> toJson() { | 1186 core.Map<core.String, core.Object> toJson() { |
1204 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1187 final core.Map<core.String, core.Object> _json = |
| 1188 new core.Map<core.String, core.Object>(); |
1205 if (build != null) { | 1189 if (build != null) { |
1206 _json["build"] = (build).toJson(); | 1190 _json["build"] = (build).toJson(); |
1207 } | 1191 } |
1208 if (createTime != null) { | 1192 if (createTime != null) { |
1209 _json["createTime"] = createTime; | 1193 _json["createTime"] = createTime; |
1210 } | 1194 } |
1211 if (description != null) { | 1195 if (description != null) { |
1212 _json["description"] = description; | 1196 _json["description"] = description; |
1213 } | 1197 } |
1214 if (disabled != null) { | 1198 if (disabled != null) { |
1215 _json["disabled"] = disabled; | 1199 _json["disabled"] = disabled; |
1216 } | 1200 } |
1217 if (filename != null) { | 1201 if (filename != null) { |
1218 _json["filename"] = filename; | 1202 _json["filename"] = filename; |
1219 } | 1203 } |
1220 if (id != null) { | 1204 if (id != null) { |
1221 _json["id"] = id; | 1205 _json["id"] = id; |
1222 } | 1206 } |
1223 if (substitutions != null) { | 1207 if (substitutions != null) { |
1224 _json["substitutions"] = substitutions; | 1208 _json["substitutions"] = substitutions; |
1225 } | 1209 } |
1226 if (triggerTemplate != null) { | 1210 if (triggerTemplate != null) { |
1227 _json["triggerTemplate"] = (triggerTemplate).toJson(); | 1211 _json["triggerTemplate"] = (triggerTemplate).toJson(); |
1228 } | 1212 } |
1229 return _json; | 1213 return _json; |
1230 } | 1214 } |
1231 } | 1215 } |
1232 | 1216 |
1233 /** BuiltImage describes an image built by the pipeline. */ | 1217 /// BuiltImage describes an image built by the pipeline. |
1234 class BuiltImage { | 1218 class BuiltImage { |
1235 /** Docker Registry 2.0 digest. */ | 1219 /// Docker Registry 2.0 digest. |
1236 core.String digest; | 1220 core.String digest; |
1237 /** | 1221 |
1238 * Name used to push the container image to Google Container Registry, as | 1222 /// Name used to push the container image to Google Container Registry, as |
1239 * presented to `docker push`. | 1223 /// presented to `docker push`. |
1240 */ | |
1241 core.String name; | 1224 core.String name; |
1242 | 1225 |
1243 BuiltImage(); | 1226 BuiltImage(); |
1244 | 1227 |
1245 BuiltImage.fromJson(core.Map _json) { | 1228 BuiltImage.fromJson(core.Map _json) { |
1246 if (_json.containsKey("digest")) { | 1229 if (_json.containsKey("digest")) { |
1247 digest = _json["digest"]; | 1230 digest = _json["digest"]; |
1248 } | 1231 } |
1249 if (_json.containsKey("name")) { | 1232 if (_json.containsKey("name")) { |
1250 name = _json["name"]; | 1233 name = _json["name"]; |
1251 } | 1234 } |
1252 } | 1235 } |
1253 | 1236 |
1254 core.Map<core.String, core.Object> toJson() { | 1237 core.Map<core.String, core.Object> toJson() { |
1255 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1238 final core.Map<core.String, core.Object> _json = |
| 1239 new core.Map<core.String, core.Object>(); |
1256 if (digest != null) { | 1240 if (digest != null) { |
1257 _json["digest"] = digest; | 1241 _json["digest"] = digest; |
1258 } | 1242 } |
1259 if (name != null) { | 1243 if (name != null) { |
1260 _json["name"] = name; | 1244 _json["name"] = name; |
1261 } | 1245 } |
1262 return _json; | 1246 return _json; |
1263 } | 1247 } |
1264 } | 1248 } |
1265 | 1249 |
1266 /** Request to cancel an ongoing build. */ | 1250 /// Request to cancel an ongoing build. |
1267 class CancelBuildRequest { | 1251 class CancelBuildRequest { |
1268 | |
1269 CancelBuildRequest(); | 1252 CancelBuildRequest(); |
1270 | 1253 |
1271 CancelBuildRequest.fromJson(core.Map _json) { | 1254 CancelBuildRequest.fromJson(core.Map _json) {} |
1272 } | |
1273 | 1255 |
1274 core.Map<core.String, core.Object> toJson() { | 1256 core.Map<core.String, core.Object> toJson() { |
1275 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1257 final core.Map<core.String, core.Object> _json = |
| 1258 new core.Map<core.String, core.Object>(); |
1276 return _json; | 1259 return _json; |
1277 } | 1260 } |
1278 } | 1261 } |
1279 | 1262 |
1280 /** The request message for Operations.CancelOperation. */ | 1263 /// The request message for Operations.CancelOperation. |
1281 class CancelOperationRequest { | 1264 class CancelOperationRequest { |
1282 | |
1283 CancelOperationRequest(); | 1265 CancelOperationRequest(); |
1284 | 1266 |
1285 CancelOperationRequest.fromJson(core.Map _json) { | 1267 CancelOperationRequest.fromJson(core.Map _json) {} |
1286 } | |
1287 | 1268 |
1288 core.Map<core.String, core.Object> toJson() { | 1269 core.Map<core.String, core.Object> toJson() { |
1289 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1270 final core.Map<core.String, core.Object> _json = |
| 1271 new core.Map<core.String, core.Object>(); |
1290 return _json; | 1272 return _json; |
1291 } | 1273 } |
1292 } | 1274 } |
1293 | 1275 |
1294 /** | 1276 /// A generic empty message that you can re-use to avoid defining duplicated |
1295 * A generic empty message that you can re-use to avoid defining duplicated | 1277 /// empty messages in your APIs. A typical example is to use it as the request |
1296 * empty messages in your APIs. A typical example is to use it as the request | 1278 /// or the response type of an API method. For instance: |
1297 * or the response type of an API method. For instance: | 1279 /// |
1298 * | 1280 /// service Foo { |
1299 * service Foo { | 1281 /// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); |
1300 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | 1282 /// } |
1301 * } | 1283 /// |
1302 * | 1284 /// The JSON representation for `Empty` is empty JSON object `{}`. |
1303 * The JSON representation for `Empty` is empty JSON object `{}`. | |
1304 */ | |
1305 class Empty { | 1285 class Empty { |
1306 | |
1307 Empty(); | 1286 Empty(); |
1308 | 1287 |
1309 Empty.fromJson(core.Map _json) { | 1288 Empty.fromJson(core.Map _json) {} |
1310 } | |
1311 | 1289 |
1312 core.Map<core.String, core.Object> toJson() { | 1290 core.Map<core.String, core.Object> toJson() { |
1313 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1291 final core.Map<core.String, core.Object> _json = |
| 1292 new core.Map<core.String, core.Object>(); |
1314 return _json; | 1293 return _json; |
1315 } | 1294 } |
1316 } | 1295 } |
1317 | 1296 |
1318 /** | 1297 /// Container message for hashes of byte content of files, used in |
1319 * Container message for hashes of byte content of files, used in | 1298 /// SourceProvenance messages to verify integrity of source input to the build. |
1320 * SourceProvenance messages to verify integrity of source input to the build. | |
1321 */ | |
1322 class FileHashes { | 1299 class FileHashes { |
1323 /** Collection of file hashes. */ | 1300 /// Collection of file hashes. |
1324 core.List<Hash> fileHash; | 1301 core.List<Hash> fileHash; |
1325 | 1302 |
1326 FileHashes(); | 1303 FileHashes(); |
1327 | 1304 |
1328 FileHashes.fromJson(core.Map _json) { | 1305 FileHashes.fromJson(core.Map _json) { |
1329 if (_json.containsKey("fileHash")) { | 1306 if (_json.containsKey("fileHash")) { |
1330 fileHash = _json["fileHash"].map((value) => new Hash.fromJson(value)).toLi
st(); | 1307 fileHash = |
| 1308 _json["fileHash"].map((value) => new Hash.fromJson(value)).toList(); |
1331 } | 1309 } |
1332 } | 1310 } |
1333 | 1311 |
1334 core.Map<core.String, core.Object> toJson() { | 1312 core.Map<core.String, core.Object> toJson() { |
1335 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1313 final core.Map<core.String, core.Object> _json = |
| 1314 new core.Map<core.String, core.Object>(); |
1336 if (fileHash != null) { | 1315 if (fileHash != null) { |
1337 _json["fileHash"] = fileHash.map((value) => (value).toJson()).toList(); | 1316 _json["fileHash"] = fileHash.map((value) => (value).toJson()).toList(); |
1338 } | 1317 } |
1339 return _json; | 1318 return _json; |
1340 } | 1319 } |
1341 } | 1320 } |
1342 | 1321 |
1343 /** Container message for hash values. */ | 1322 /// Container message for hash values. |
1344 class Hash { | 1323 class Hash { |
1345 /** | 1324 /// The type of hash that was performed. |
1346 * The type of hash that was performed. | 1325 /// Possible string values are: |
1347 * Possible string values are: | 1326 /// - "NONE" : No hash requested. |
1348 * - "NONE" : No hash requested. | 1327 /// - "SHA256" : Use a sha256 hash. |
1349 * - "SHA256" : Use a sha256 hash. | |
1350 */ | |
1351 core.String type; | 1328 core.String type; |
1352 /** The hash value. */ | 1329 |
| 1330 /// The hash value. |
1353 core.String value; | 1331 core.String value; |
1354 core.List<core.int> get valueAsBytes { | 1332 core.List<core.int> get valueAsBytes { |
1355 return convert.BASE64.decode(value); | 1333 return convert.BASE64.decode(value); |
1356 } | 1334 } |
1357 | 1335 |
1358 void set valueAsBytes(core.List<core.int> _bytes) { | 1336 void set valueAsBytes(core.List<core.int> _bytes) { |
1359 value = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "
-"); | 1337 value = |
| 1338 convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-"); |
1360 } | 1339 } |
1361 | 1340 |
1362 Hash(); | 1341 Hash(); |
1363 | 1342 |
1364 Hash.fromJson(core.Map _json) { | 1343 Hash.fromJson(core.Map _json) { |
1365 if (_json.containsKey("type")) { | 1344 if (_json.containsKey("type")) { |
1366 type = _json["type"]; | 1345 type = _json["type"]; |
1367 } | 1346 } |
1368 if (_json.containsKey("value")) { | 1347 if (_json.containsKey("value")) { |
1369 value = _json["value"]; | 1348 value = _json["value"]; |
1370 } | 1349 } |
1371 } | 1350 } |
1372 | 1351 |
1373 core.Map<core.String, core.Object> toJson() { | 1352 core.Map<core.String, core.Object> toJson() { |
1374 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1353 final core.Map<core.String, core.Object> _json = |
| 1354 new core.Map<core.String, core.Object>(); |
1375 if (type != null) { | 1355 if (type != null) { |
1376 _json["type"] = type; | 1356 _json["type"] = type; |
1377 } | 1357 } |
1378 if (value != null) { | 1358 if (value != null) { |
1379 _json["value"] = value; | 1359 _json["value"] = value; |
1380 } | 1360 } |
1381 return _json; | 1361 return _json; |
1382 } | 1362 } |
1383 } | 1363 } |
1384 | 1364 |
1385 /** Response containing existing BuildTriggers. */ | 1365 /// Response containing existing BuildTriggers. |
1386 class ListBuildTriggersResponse { | 1366 class ListBuildTriggersResponse { |
1387 /** BuildTriggers for the project, sorted by create_time descending. */ | 1367 /// BuildTriggers for the project, sorted by create_time descending. |
1388 core.List<BuildTrigger> triggers; | 1368 core.List<BuildTrigger> triggers; |
1389 | 1369 |
1390 ListBuildTriggersResponse(); | 1370 ListBuildTriggersResponse(); |
1391 | 1371 |
1392 ListBuildTriggersResponse.fromJson(core.Map _json) { | 1372 ListBuildTriggersResponse.fromJson(core.Map _json) { |
1393 if (_json.containsKey("triggers")) { | 1373 if (_json.containsKey("triggers")) { |
1394 triggers = _json["triggers"].map((value) => new BuildTrigger.fromJson(valu
e)).toList(); | 1374 triggers = _json["triggers"] |
| 1375 .map((value) => new BuildTrigger.fromJson(value)) |
| 1376 .toList(); |
1395 } | 1377 } |
1396 } | 1378 } |
1397 | 1379 |
1398 core.Map<core.String, core.Object> toJson() { | 1380 core.Map<core.String, core.Object> toJson() { |
1399 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1381 final core.Map<core.String, core.Object> _json = |
| 1382 new core.Map<core.String, core.Object>(); |
1400 if (triggers != null) { | 1383 if (triggers != null) { |
1401 _json["triggers"] = triggers.map((value) => (value).toJson()).toList(); | 1384 _json["triggers"] = triggers.map((value) => (value).toJson()).toList(); |
1402 } | 1385 } |
1403 return _json; | 1386 return _json; |
1404 } | 1387 } |
1405 } | 1388 } |
1406 | 1389 |
1407 /** Response including listed builds. */ | 1390 /// Response including listed builds. |
1408 class ListBuildsResponse { | 1391 class ListBuildsResponse { |
1409 /** Builds will be sorted by create_time, descending. */ | 1392 /// Builds will be sorted by create_time, descending. |
1410 core.List<Build> builds; | 1393 core.List<Build> builds; |
1411 /** Token to receive the next page of results. */ | 1394 |
| 1395 /// Token to receive the next page of results. |
1412 core.String nextPageToken; | 1396 core.String nextPageToken; |
1413 | 1397 |
1414 ListBuildsResponse(); | 1398 ListBuildsResponse(); |
1415 | 1399 |
1416 ListBuildsResponse.fromJson(core.Map _json) { | 1400 ListBuildsResponse.fromJson(core.Map _json) { |
1417 if (_json.containsKey("builds")) { | 1401 if (_json.containsKey("builds")) { |
1418 builds = _json["builds"].map((value) => new Build.fromJson(value)).toList(
); | 1402 builds = |
| 1403 _json["builds"].map((value) => new Build.fromJson(value)).toList(); |
1419 } | 1404 } |
1420 if (_json.containsKey("nextPageToken")) { | 1405 if (_json.containsKey("nextPageToken")) { |
1421 nextPageToken = _json["nextPageToken"]; | 1406 nextPageToken = _json["nextPageToken"]; |
1422 } | 1407 } |
1423 } | 1408 } |
1424 | 1409 |
1425 core.Map<core.String, core.Object> toJson() { | 1410 core.Map<core.String, core.Object> toJson() { |
1426 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1411 final core.Map<core.String, core.Object> _json = |
| 1412 new core.Map<core.String, core.Object>(); |
1427 if (builds != null) { | 1413 if (builds != null) { |
1428 _json["builds"] = builds.map((value) => (value).toJson()).toList(); | 1414 _json["builds"] = builds.map((value) => (value).toJson()).toList(); |
1429 } | 1415 } |
1430 if (nextPageToken != null) { | 1416 if (nextPageToken != null) { |
1431 _json["nextPageToken"] = nextPageToken; | 1417 _json["nextPageToken"] = nextPageToken; |
1432 } | 1418 } |
1433 return _json; | 1419 return _json; |
1434 } | 1420 } |
1435 } | 1421 } |
1436 | 1422 |
1437 /** The response message for Operations.ListOperations. */ | 1423 /// The response message for Operations.ListOperations. |
1438 class ListOperationsResponse { | 1424 class ListOperationsResponse { |
1439 /** The standard List next-page token. */ | 1425 /// The standard List next-page token. |
1440 core.String nextPageToken; | 1426 core.String nextPageToken; |
1441 /** A list of operations that matches the specified filter in the request. */ | 1427 |
| 1428 /// A list of operations that matches the specified filter in the request. |
1442 core.List<Operation> operations; | 1429 core.List<Operation> operations; |
1443 | 1430 |
1444 ListOperationsResponse(); | 1431 ListOperationsResponse(); |
1445 | 1432 |
1446 ListOperationsResponse.fromJson(core.Map _json) { | 1433 ListOperationsResponse.fromJson(core.Map _json) { |
1447 if (_json.containsKey("nextPageToken")) { | 1434 if (_json.containsKey("nextPageToken")) { |
1448 nextPageToken = _json["nextPageToken"]; | 1435 nextPageToken = _json["nextPageToken"]; |
1449 } | 1436 } |
1450 if (_json.containsKey("operations")) { | 1437 if (_json.containsKey("operations")) { |
1451 operations = _json["operations"].map((value) => new Operation.fromJson(val
ue)).toList(); | 1438 operations = _json["operations"] |
| 1439 .map((value) => new Operation.fromJson(value)) |
| 1440 .toList(); |
1452 } | 1441 } |
1453 } | 1442 } |
1454 | 1443 |
1455 core.Map<core.String, core.Object> toJson() { | 1444 core.Map<core.String, core.Object> toJson() { |
1456 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1445 final core.Map<core.String, core.Object> _json = |
| 1446 new core.Map<core.String, core.Object>(); |
1457 if (nextPageToken != null) { | 1447 if (nextPageToken != null) { |
1458 _json["nextPageToken"] = nextPageToken; | 1448 _json["nextPageToken"] = nextPageToken; |
1459 } | 1449 } |
1460 if (operations != null) { | 1450 if (operations != null) { |
1461 _json["operations"] = operations.map((value) => (value).toJson()).toList()
; | 1451 _json["operations"] = |
| 1452 operations.map((value) => (value).toJson()).toList(); |
1462 } | 1453 } |
1463 return _json; | 1454 return _json; |
1464 } | 1455 } |
1465 } | 1456 } |
1466 | 1457 |
1467 /** | 1458 /// This resource represents a long-running operation that is the result of a |
1468 * This resource represents a long-running operation that is the result of a | 1459 /// network API call. |
1469 * network API call. | |
1470 */ | |
1471 class Operation { | 1460 class Operation { |
1472 /** | 1461 /// If the value is `false`, it means the operation is still in progress. |
1473 * If the value is `false`, it means the operation is still in progress. | 1462 /// If `true`, the operation is completed, and either `error` or `response` |
1474 * If true, the operation is completed, and either `error` or `response` is | 1463 /// is |
1475 * available. | 1464 /// available. |
1476 */ | |
1477 core.bool done; | 1465 core.bool done; |
1478 /** The error result of the operation in case of failure or cancellation. */ | 1466 |
| 1467 /// The error result of the operation in case of failure or cancellation. |
1479 Status error; | 1468 Status error; |
1480 /** | 1469 |
1481 * Service-specific metadata associated with the operation. It typically | 1470 /// Service-specific metadata associated with the operation. It typically |
1482 * contains progress information and common metadata such as create time. | 1471 /// contains progress information and common metadata such as create time. |
1483 * Some services might not provide such metadata. Any method that returns a | 1472 /// Some services might not provide such metadata. Any method that returns a |
1484 * long-running operation should document the metadata type, if any. | 1473 /// long-running operation should document the metadata type, if any. |
1485 * | 1474 /// |
1486 * The values for Object must be JSON objects. It can consist of `num`, | 1475 /// The values for Object must be JSON objects. It can consist of `num`, |
1487 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1476 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1488 */ | |
1489 core.Map<core.String, core.Object> metadata; | 1477 core.Map<core.String, core.Object> metadata; |
1490 /** | 1478 |
1491 * The server-assigned name, which is only unique within the same service that | 1479 /// The server-assigned name, which is only unique within the same service |
1492 * originally returns it. If you use the default HTTP mapping, the | 1480 /// that |
1493 * `name` should have the format of `operations/some/unique/name`. | 1481 /// originally returns it. If you use the default HTTP mapping, the |
1494 */ | 1482 /// `name` should have the format of `operations/some/unique/name`. |
1495 core.String name; | 1483 core.String name; |
1496 /** | 1484 |
1497 * The normal response of the operation in case of success. If the original | 1485 /// The normal response of the operation in case of success. If the original |
1498 * method returns no data on success, such as `Delete`, the response is | 1486 /// method returns no data on success, such as `Delete`, the response is |
1499 * `google.protobuf.Empty`. If the original method is standard | 1487 /// `google.protobuf.Empty`. If the original method is standard |
1500 * `Get`/`Create`/`Update`, the response should be the resource. For other | 1488 /// `Get`/`Create`/`Update`, the response should be the resource. For other |
1501 * methods, the response should have the type `XxxResponse`, where `Xxx` | 1489 /// methods, the response should have the type `XxxResponse`, where `Xxx` |
1502 * is the original method name. For example, if the original method name | 1490 /// is the original method name. For example, if the original method name |
1503 * is `TakeSnapshot()`, the inferred response type is | 1491 /// is `TakeSnapshot()`, the inferred response type is |
1504 * `TakeSnapshotResponse`. | 1492 /// `TakeSnapshotResponse`. |
1505 * | 1493 /// |
1506 * The values for Object must be JSON objects. It can consist of `num`, | 1494 /// The values for Object must be JSON objects. It can consist of `num`, |
1507 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1495 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1508 */ | |
1509 core.Map<core.String, core.Object> response; | 1496 core.Map<core.String, core.Object> response; |
1510 | 1497 |
1511 Operation(); | 1498 Operation(); |
1512 | 1499 |
1513 Operation.fromJson(core.Map _json) { | 1500 Operation.fromJson(core.Map _json) { |
1514 if (_json.containsKey("done")) { | 1501 if (_json.containsKey("done")) { |
1515 done = _json["done"]; | 1502 done = _json["done"]; |
1516 } | 1503 } |
1517 if (_json.containsKey("error")) { | 1504 if (_json.containsKey("error")) { |
1518 error = new Status.fromJson(_json["error"]); | 1505 error = new Status.fromJson(_json["error"]); |
1519 } | 1506 } |
1520 if (_json.containsKey("metadata")) { | 1507 if (_json.containsKey("metadata")) { |
1521 metadata = _json["metadata"]; | 1508 metadata = _json["metadata"]; |
1522 } | 1509 } |
1523 if (_json.containsKey("name")) { | 1510 if (_json.containsKey("name")) { |
1524 name = _json["name"]; | 1511 name = _json["name"]; |
1525 } | 1512 } |
1526 if (_json.containsKey("response")) { | 1513 if (_json.containsKey("response")) { |
1527 response = _json["response"]; | 1514 response = _json["response"]; |
1528 } | 1515 } |
1529 } | 1516 } |
1530 | 1517 |
1531 core.Map<core.String, core.Object> toJson() { | 1518 core.Map<core.String, core.Object> toJson() { |
1532 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1519 final core.Map<core.String, core.Object> _json = |
| 1520 new core.Map<core.String, core.Object>(); |
1533 if (done != null) { | 1521 if (done != null) { |
1534 _json["done"] = done; | 1522 _json["done"] = done; |
1535 } | 1523 } |
1536 if (error != null) { | 1524 if (error != null) { |
1537 _json["error"] = (error).toJson(); | 1525 _json["error"] = (error).toJson(); |
1538 } | 1526 } |
1539 if (metadata != null) { | 1527 if (metadata != null) { |
1540 _json["metadata"] = metadata; | 1528 _json["metadata"] = metadata; |
1541 } | 1529 } |
1542 if (name != null) { | 1530 if (name != null) { |
1543 _json["name"] = name; | 1531 _json["name"] = name; |
1544 } | 1532 } |
1545 if (response != null) { | 1533 if (response != null) { |
1546 _json["response"] = response; | 1534 _json["response"] = response; |
1547 } | 1535 } |
1548 return _json; | 1536 return _json; |
1549 } | 1537 } |
1550 } | 1538 } |
1551 | 1539 |
1552 /** | 1540 /// RepoSource describes the location of the source in a Google Cloud Source |
1553 * RepoSource describes the location of the source in a Google Cloud Source | 1541 /// Repository. |
1554 * Repository. | |
1555 */ | |
1556 class RepoSource { | 1542 class RepoSource { |
1557 /** Name of the branch to build. */ | 1543 /// Name of the branch to build. |
1558 core.String branchName; | 1544 core.String branchName; |
1559 /** Explicit commit SHA to build. */ | 1545 |
| 1546 /// Explicit commit SHA to build. |
1560 core.String commitSha; | 1547 core.String commitSha; |
1561 /** | 1548 |
1562 * ID of the project that owns the repo. If omitted, the project ID requesting | 1549 /// ID of the project that owns the repo. If omitted, the project ID |
1563 * the build is assumed. | 1550 /// requesting |
1564 */ | 1551 /// the build is assumed. |
1565 core.String projectId; | 1552 core.String projectId; |
1566 /** Name of the repo. If omitted, the name "default" is assumed. */ | 1553 |
| 1554 /// Name of the repo. If omitted, the name "default" is assumed. |
1567 core.String repoName; | 1555 core.String repoName; |
1568 /** Name of the tag to build. */ | 1556 |
| 1557 /// Name of the tag to build. |
1569 core.String tagName; | 1558 core.String tagName; |
1570 | 1559 |
1571 RepoSource(); | 1560 RepoSource(); |
1572 | 1561 |
1573 RepoSource.fromJson(core.Map _json) { | 1562 RepoSource.fromJson(core.Map _json) { |
1574 if (_json.containsKey("branchName")) { | 1563 if (_json.containsKey("branchName")) { |
1575 branchName = _json["branchName"]; | 1564 branchName = _json["branchName"]; |
1576 } | 1565 } |
1577 if (_json.containsKey("commitSha")) { | 1566 if (_json.containsKey("commitSha")) { |
1578 commitSha = _json["commitSha"]; | 1567 commitSha = _json["commitSha"]; |
1579 } | 1568 } |
1580 if (_json.containsKey("projectId")) { | 1569 if (_json.containsKey("projectId")) { |
1581 projectId = _json["projectId"]; | 1570 projectId = _json["projectId"]; |
1582 } | 1571 } |
1583 if (_json.containsKey("repoName")) { | 1572 if (_json.containsKey("repoName")) { |
1584 repoName = _json["repoName"]; | 1573 repoName = _json["repoName"]; |
1585 } | 1574 } |
1586 if (_json.containsKey("tagName")) { | 1575 if (_json.containsKey("tagName")) { |
1587 tagName = _json["tagName"]; | 1576 tagName = _json["tagName"]; |
1588 } | 1577 } |
1589 } | 1578 } |
1590 | 1579 |
1591 core.Map<core.String, core.Object> toJson() { | 1580 core.Map<core.String, core.Object> toJson() { |
1592 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1581 final core.Map<core.String, core.Object> _json = |
| 1582 new core.Map<core.String, core.Object>(); |
1593 if (branchName != null) { | 1583 if (branchName != null) { |
1594 _json["branchName"] = branchName; | 1584 _json["branchName"] = branchName; |
1595 } | 1585 } |
1596 if (commitSha != null) { | 1586 if (commitSha != null) { |
1597 _json["commitSha"] = commitSha; | 1587 _json["commitSha"] = commitSha; |
1598 } | 1588 } |
1599 if (projectId != null) { | 1589 if (projectId != null) { |
1600 _json["projectId"] = projectId; | 1590 _json["projectId"] = projectId; |
1601 } | 1591 } |
1602 if (repoName != null) { | 1592 if (repoName != null) { |
1603 _json["repoName"] = repoName; | 1593 _json["repoName"] = repoName; |
1604 } | 1594 } |
1605 if (tagName != null) { | 1595 if (tagName != null) { |
1606 _json["tagName"] = tagName; | 1596 _json["tagName"] = tagName; |
1607 } | 1597 } |
1608 return _json; | 1598 return _json; |
1609 } | 1599 } |
1610 } | 1600 } |
1611 | 1601 |
1612 /** Results describes the artifacts created by the build pipeline. */ | 1602 /// Results describes the artifacts created by the build pipeline. |
1613 class Results { | 1603 class Results { |
1614 /** | 1604 /// List of build step digests, in order corresponding to build step indices. |
1615 * List of build step digests, in order corresponding to build step indices. | |
1616 */ | |
1617 core.List<core.String> buildStepImages; | 1605 core.List<core.String> buildStepImages; |
1618 /** Images that were built as a part of the build. */ | 1606 |
| 1607 /// Images that were built as a part of the build. |
1619 core.List<BuiltImage> images; | 1608 core.List<BuiltImage> images; |
1620 | 1609 |
1621 Results(); | 1610 Results(); |
1622 | 1611 |
1623 Results.fromJson(core.Map _json) { | 1612 Results.fromJson(core.Map _json) { |
1624 if (_json.containsKey("buildStepImages")) { | 1613 if (_json.containsKey("buildStepImages")) { |
1625 buildStepImages = _json["buildStepImages"]; | 1614 buildStepImages = _json["buildStepImages"]; |
1626 } | 1615 } |
1627 if (_json.containsKey("images")) { | 1616 if (_json.containsKey("images")) { |
1628 images = _json["images"].map((value) => new BuiltImage.fromJson(value)).to
List(); | 1617 images = _json["images"] |
| 1618 .map((value) => new BuiltImage.fromJson(value)) |
| 1619 .toList(); |
1629 } | 1620 } |
1630 } | 1621 } |
1631 | 1622 |
1632 core.Map<core.String, core.Object> toJson() { | 1623 core.Map<core.String, core.Object> toJson() { |
1633 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1624 final core.Map<core.String, core.Object> _json = |
| 1625 new core.Map<core.String, core.Object>(); |
1634 if (buildStepImages != null) { | 1626 if (buildStepImages != null) { |
1635 _json["buildStepImages"] = buildStepImages; | 1627 _json["buildStepImages"] = buildStepImages; |
1636 } | 1628 } |
1637 if (images != null) { | 1629 if (images != null) { |
1638 _json["images"] = images.map((value) => (value).toJson()).toList(); | 1630 _json["images"] = images.map((value) => (value).toJson()).toList(); |
1639 } | 1631 } |
1640 return _json; | 1632 return _json; |
1641 } | 1633 } |
1642 } | 1634 } |
1643 | 1635 |
1644 /** | 1636 /// Secret pairs a set of secret environment variables containing encrypted |
1645 * Secret pairs a set of secret environment variables containing encrypted | 1637 /// values with the Cloud KMS key to use to decrypt the value. |
1646 * values with the Cloud KMS key to use to decrypt the value. | |
1647 */ | |
1648 class Secret { | 1638 class Secret { |
1649 /** Cloud KMS key name to use to decrypt these envs. */ | 1639 /// Cloud KMS key name to use to decrypt these envs. |
1650 core.String kmsKeyName; | 1640 core.String kmsKeyName; |
1651 /** | 1641 |
1652 * Map of environment variable name to its encrypted value. | 1642 /// Map of environment variable name to its encrypted value. |
1653 * | 1643 /// |
1654 * Secret environment variables must be unique across all of a build's | 1644 /// 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 | 1645 /// secrets, and must be used by at least one build step. Values can be at |
1656 * 1 KB in size. There can be at most ten secret values across all of a | 1646 /// most |
1657 * build's secrets. | 1647 /// 1 KB in size. There can be at most ten secret values across all of a |
1658 */ | 1648 /// build's secrets. |
1659 core.Map<core.String, core.String> secretEnv; | 1649 core.Map<core.String, core.String> secretEnv; |
1660 | 1650 |
1661 Secret(); | 1651 Secret(); |
1662 | 1652 |
1663 Secret.fromJson(core.Map _json) { | 1653 Secret.fromJson(core.Map _json) { |
1664 if (_json.containsKey("kmsKeyName")) { | 1654 if (_json.containsKey("kmsKeyName")) { |
1665 kmsKeyName = _json["kmsKeyName"]; | 1655 kmsKeyName = _json["kmsKeyName"]; |
1666 } | 1656 } |
1667 if (_json.containsKey("secretEnv")) { | 1657 if (_json.containsKey("secretEnv")) { |
1668 secretEnv = _json["secretEnv"]; | 1658 secretEnv = _json["secretEnv"]; |
1669 } | 1659 } |
1670 } | 1660 } |
1671 | 1661 |
1672 core.Map<core.String, core.Object> toJson() { | 1662 core.Map<core.String, core.Object> toJson() { |
1673 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1663 final core.Map<core.String, core.Object> _json = |
| 1664 new core.Map<core.String, core.Object>(); |
1674 if (kmsKeyName != null) { | 1665 if (kmsKeyName != null) { |
1675 _json["kmsKeyName"] = kmsKeyName; | 1666 _json["kmsKeyName"] = kmsKeyName; |
1676 } | 1667 } |
1677 if (secretEnv != null) { | 1668 if (secretEnv != null) { |
1678 _json["secretEnv"] = secretEnv; | 1669 _json["secretEnv"] = secretEnv; |
1679 } | 1670 } |
1680 return _json; | 1671 return _json; |
1681 } | 1672 } |
1682 } | 1673 } |
1683 | 1674 |
1684 /** | 1675 /// Source describes the location of the source in a supported storage |
1685 * Source describes the location of the source in a supported storage | 1676 /// service. |
1686 * service. | |
1687 */ | |
1688 class Source { | 1677 class Source { |
1689 /** If provided, get source from this location in a Cloud Repo. */ | 1678 /// If provided, get source from this location in a Cloud Repo. |
1690 RepoSource repoSource; | 1679 RepoSource repoSource; |
1691 /** | 1680 |
1692 * If provided, get the source from this location in in Google Cloud | 1681 /// If provided, get the source from this location in in Google Cloud |
1693 * Storage. | 1682 /// Storage. |
1694 */ | |
1695 StorageSource storageSource; | 1683 StorageSource storageSource; |
1696 | 1684 |
1697 Source(); | 1685 Source(); |
1698 | 1686 |
1699 Source.fromJson(core.Map _json) { | 1687 Source.fromJson(core.Map _json) { |
1700 if (_json.containsKey("repoSource")) { | 1688 if (_json.containsKey("repoSource")) { |
1701 repoSource = new RepoSource.fromJson(_json["repoSource"]); | 1689 repoSource = new RepoSource.fromJson(_json["repoSource"]); |
1702 } | 1690 } |
1703 if (_json.containsKey("storageSource")) { | 1691 if (_json.containsKey("storageSource")) { |
1704 storageSource = new StorageSource.fromJson(_json["storageSource"]); | 1692 storageSource = new StorageSource.fromJson(_json["storageSource"]); |
1705 } | 1693 } |
1706 } | 1694 } |
1707 | 1695 |
1708 core.Map<core.String, core.Object> toJson() { | 1696 core.Map<core.String, core.Object> toJson() { |
1709 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1697 final core.Map<core.String, core.Object> _json = |
| 1698 new core.Map<core.String, core.Object>(); |
1710 if (repoSource != null) { | 1699 if (repoSource != null) { |
1711 _json["repoSource"] = (repoSource).toJson(); | 1700 _json["repoSource"] = (repoSource).toJson(); |
1712 } | 1701 } |
1713 if (storageSource != null) { | 1702 if (storageSource != null) { |
1714 _json["storageSource"] = (storageSource).toJson(); | 1703 _json["storageSource"] = (storageSource).toJson(); |
1715 } | 1704 } |
1716 return _json; | 1705 return _json; |
1717 } | 1706 } |
1718 } | 1707 } |
1719 | 1708 |
1720 /** | 1709 /// Provenance of the source. Ways to find the original source, or verify that |
1721 * Provenance of the source. Ways to find the original source, or verify that | 1710 /// some source was used for this build. |
1722 * some source was used for this build. | |
1723 */ | |
1724 class SourceProvenance { | 1711 class SourceProvenance { |
1725 /** | 1712 /// Hash(es) of the build source, which can be used to verify that the |
1726 * Hash(es) of the build source, which can be used to verify that the original | 1713 /// original |
1727 * source integrity was maintained in the build. Note that FileHashes will | 1714 /// source integrity was maintained in the build. Note that FileHashes will |
1728 * only be populated if BuildOptions has requested a SourceProvenanceHash. | 1715 /// only be populated if BuildOptions has requested a SourceProvenanceHash. |
1729 * | 1716 /// |
1730 * The keys to this map are file paths used as build source and the values | 1717 /// The keys to this map are file paths used as build source and the values |
1731 * contain the hash values for those files. | 1718 /// contain the hash values for those files. |
1732 * | 1719 /// |
1733 * If the build source came in a single package such as a gzipped tarfile | 1720 /// If the build source came in a single package such as a gzipped tarfile |
1734 * (.tar.gz), the FileHash will be for the single path to that file. | 1721 /// (.tar.gz), the FileHash will be for the single path to that file. |
1735 * @OutputOnly | 1722 /// @OutputOnly |
1736 */ | |
1737 core.Map<core.String, FileHashes> fileHashes; | 1723 core.Map<core.String, FileHashes> fileHashes; |
1738 /** | 1724 |
1739 * A copy of the build's source.repo_source, if exists, with any | 1725 /// A copy of the build's source.repo_source, if exists, with any |
1740 * revisions resolved. | 1726 /// revisions resolved. |
1741 */ | |
1742 RepoSource resolvedRepoSource; | 1727 RepoSource resolvedRepoSource; |
1743 /** | 1728 |
1744 * A copy of the build's source.storage_source, if exists, with any | 1729 /// A copy of the build's source.storage_source, if exists, with any |
1745 * generations resolved. | 1730 /// generations resolved. |
1746 */ | |
1747 StorageSource resolvedStorageSource; | 1731 StorageSource resolvedStorageSource; |
1748 | 1732 |
1749 SourceProvenance(); | 1733 SourceProvenance(); |
1750 | 1734 |
1751 SourceProvenance.fromJson(core.Map _json) { | 1735 SourceProvenance.fromJson(core.Map _json) { |
1752 if (_json.containsKey("fileHashes")) { | 1736 if (_json.containsKey("fileHashes")) { |
1753 fileHashes = commons.mapMap<core.Map<core.String, core.Object>, FileHashes
>(_json["fileHashes"], (core.Map<core.String, core.Object> item) => new FileHash
es.fromJson(item)); | 1737 fileHashes = |
| 1738 commons.mapMap<core.Map<core.String, core.Object>, FileHashes>( |
| 1739 _json["fileHashes"], |
| 1740 (core.Map<core.String, core.Object> item) => |
| 1741 new FileHashes.fromJson(item)); |
1754 } | 1742 } |
1755 if (_json.containsKey("resolvedRepoSource")) { | 1743 if (_json.containsKey("resolvedRepoSource")) { |
1756 resolvedRepoSource = new RepoSource.fromJson(_json["resolvedRepoSource"]); | 1744 resolvedRepoSource = new RepoSource.fromJson(_json["resolvedRepoSource"]); |
1757 } | 1745 } |
1758 if (_json.containsKey("resolvedStorageSource")) { | 1746 if (_json.containsKey("resolvedStorageSource")) { |
1759 resolvedStorageSource = new StorageSource.fromJson(_json["resolvedStorageS
ource"]); | 1747 resolvedStorageSource = |
| 1748 new StorageSource.fromJson(_json["resolvedStorageSource"]); |
1760 } | 1749 } |
1761 } | 1750 } |
1762 | 1751 |
1763 core.Map<core.String, core.Object> toJson() { | 1752 core.Map<core.String, core.Object> toJson() { |
1764 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1753 final core.Map<core.String, core.Object> _json = |
| 1754 new core.Map<core.String, core.Object>(); |
1765 if (fileHashes != null) { | 1755 if (fileHashes != null) { |
1766 _json["fileHashes"] = commons.mapMap<FileHashes, core.Map<core.String, cor
e.Object>>(fileHashes, (FileHashes item) => (item).toJson()); | 1756 _json["fileHashes"] = |
| 1757 commons.mapMap<FileHashes, core.Map<core.String, core.Object>>( |
| 1758 fileHashes, (FileHashes item) => (item).toJson()); |
1767 } | 1759 } |
1768 if (resolvedRepoSource != null) { | 1760 if (resolvedRepoSource != null) { |
1769 _json["resolvedRepoSource"] = (resolvedRepoSource).toJson(); | 1761 _json["resolvedRepoSource"] = (resolvedRepoSource).toJson(); |
1770 } | 1762 } |
1771 if (resolvedStorageSource != null) { | 1763 if (resolvedStorageSource != null) { |
1772 _json["resolvedStorageSource"] = (resolvedStorageSource).toJson(); | 1764 _json["resolvedStorageSource"] = (resolvedStorageSource).toJson(); |
1773 } | 1765 } |
1774 return _json; | 1766 return _json; |
1775 } | 1767 } |
1776 } | 1768 } |
1777 | 1769 |
1778 /** | 1770 /// The `Status` type defines a logical error model that is suitable for |
1779 * The `Status` type defines a logical error model that is suitable for | 1771 /// different |
1780 * different | 1772 /// programming environments, including REST APIs and RPC APIs. It is used by |
1781 * programming environments, including REST APIs and RPC APIs. It is used by | 1773 /// [gRPC](https://github.com/grpc). The error model is designed to be: |
1782 * [gRPC](https://github.com/grpc). The error model is designed to be: | 1774 /// |
1783 * | 1775 /// - Simple to use and understand for most users |
1784 * - Simple to use and understand for most users | 1776 /// - Flexible enough to meet unexpected needs |
1785 * - Flexible enough to meet unexpected needs | 1777 /// |
1786 * | 1778 /// # Overview |
1787 * # Overview | 1779 /// |
1788 * | 1780 /// The `Status` message contains three pieces of data: error code, error |
1789 * The `Status` message contains three pieces of data: error code, error | 1781 /// message, |
1790 * message, | 1782 /// and error details. The error code should be an enum value of |
1791 * and error details. The error code should be an enum value of | 1783 /// google.rpc.Code, but it may accept additional error codes if needed. The |
1792 * google.rpc.Code, but it may accept additional error codes if needed. The | 1784 /// error message should be a developer-facing English message that helps |
1793 * error message should be a developer-facing English message that helps | 1785 /// developers *understand* and *resolve* the error. If a localized user-facing |
1794 * developers *understand* and *resolve* the error. If a localized user-facing | 1786 /// error message is needed, put the localized message in the error details or |
1795 * error message is needed, put the localized message in the error details or | 1787 /// localize it in the client. The optional error details may contain arbitrary |
1796 * localize it in the client. The optional error details may contain arbitrary | 1788 /// information about the error. There is a predefined set of error detail |
1797 * information about the error. There is a predefined set of error detail types | 1789 /// types |
1798 * in the package `google.rpc` that can be used for common error conditions. | 1790 /// in the package `google.rpc` that can be used for common error conditions. |
1799 * | 1791 /// |
1800 * # Language mapping | 1792 /// # Language mapping |
1801 * | 1793 /// |
1802 * The `Status` message is the logical representation of the error model, but it | 1794 /// The `Status` message is the logical representation of the error model, but |
1803 * is not necessarily the actual wire format. When the `Status` message is | 1795 /// it |
1804 * exposed in different client libraries and different wire protocols, it can be | 1796 /// is not necessarily the actual wire format. When the `Status` message is |
1805 * mapped differently. For example, it will likely be mapped to some exceptions | 1797 /// exposed in different client libraries and different wire protocols, it can |
1806 * in Java, but more likely mapped to some error codes in C. | 1798 /// be |
1807 * | 1799 /// mapped differently. For example, it will likely be mapped to some |
1808 * # Other uses | 1800 /// exceptions |
1809 * | 1801 /// in Java, but more likely mapped to some error codes in C. |
1810 * The error model and the `Status` message can be used in a variety of | 1802 /// |
1811 * environments, either with or without APIs, to provide a | 1803 /// # Other uses |
1812 * consistent developer experience across different environments. | 1804 /// |
1813 * | 1805 /// The error model and the `Status` message can be used in a variety of |
1814 * Example uses of this error model include: | 1806 /// environments, either with or without APIs, to provide a |
1815 * | 1807 /// consistent developer experience across different environments. |
1816 * - Partial errors. If a service needs to return partial errors to the client, | 1808 /// |
1817 * it may embed the `Status` in the normal response to indicate the partial | 1809 /// Example uses of this error model include: |
1818 * errors. | 1810 /// |
1819 * | 1811 /// - Partial errors. If a service needs to return partial errors to the |
1820 * - Workflow errors. A typical workflow has multiple steps. Each step may | 1812 /// client, |
1821 * have a `Status` message for error reporting. | 1813 /// it may embed the `Status` in the normal response to indicate the partial |
1822 * | 1814 /// errors. |
1823 * - Batch operations. If a client uses batch request and batch response, the | 1815 /// |
1824 * `Status` message should be used directly inside batch response, one for | 1816 /// - Workflow errors. A typical workflow has multiple steps. Each step may |
1825 * each error sub-response. | 1817 /// have a `Status` message for error reporting. |
1826 * | 1818 /// |
1827 * - Asynchronous operations. If an API call embeds asynchronous operation | 1819 /// - Batch operations. If a client uses batch request and batch response, the |
1828 * results in its response, the status of those operations should be | 1820 /// `Status` message should be used directly inside batch response, one for |
1829 * represented directly using the `Status` message. | 1821 /// each error sub-response. |
1830 * | 1822 /// |
1831 * - Logging. If some API errors are stored in logs, the message `Status` could | 1823 /// - Asynchronous operations. If an API call embeds asynchronous operation |
1832 * be used directly after any stripping needed for security/privacy reasons. | 1824 /// results in its response, the status of those operations should be |
1833 */ | 1825 /// represented directly using the `Status` message. |
| 1826 /// |
| 1827 /// - Logging. If some API errors are stored in logs, the message `Status` |
| 1828 /// could |
| 1829 /// be used directly after any stripping needed for security/privacy reasons. |
1834 class Status { | 1830 class Status { |
1835 /** The status code, which should be an enum value of google.rpc.Code. */ | 1831 /// The status code, which should be an enum value of google.rpc.Code. |
1836 core.int code; | 1832 core.int code; |
1837 /** | 1833 |
1838 * A list of messages that carry the error details. There is a common set of | 1834 /// A list of messages that carry the error details. There is a common set |
1839 * message types for APIs to use. | 1835 /// of |
1840 * | 1836 /// message types for APIs to use. |
1841 * The values for Object must be JSON objects. It can consist of `num`, | 1837 /// |
1842 * `String`, `bool` and `null` as well as `Map` and `List` values. | 1838 /// The values for Object must be JSON objects. It can consist of `num`, |
1843 */ | 1839 /// `String`, `bool` and `null` as well as `Map` and `List` values. |
1844 core.List<core.Map<core.String, core.Object>> details; | 1840 core.List<core.Map<core.String, core.Object>> details; |
1845 /** | 1841 |
1846 * A developer-facing error message, which should be in English. Any | 1842 /// A developer-facing error message, which should be in English. Any |
1847 * user-facing error message should be localized and sent in the | 1843 /// user-facing error message should be localized and sent in the |
1848 * google.rpc.Status.details field, or localized by the client. | 1844 /// google.rpc.Status.details field, or localized by the client. |
1849 */ | |
1850 core.String message; | 1845 core.String message; |
1851 | 1846 |
1852 Status(); | 1847 Status(); |
1853 | 1848 |
1854 Status.fromJson(core.Map _json) { | 1849 Status.fromJson(core.Map _json) { |
1855 if (_json.containsKey("code")) { | 1850 if (_json.containsKey("code")) { |
1856 code = _json["code"]; | 1851 code = _json["code"]; |
1857 } | 1852 } |
1858 if (_json.containsKey("details")) { | 1853 if (_json.containsKey("details")) { |
1859 details = _json["details"]; | 1854 details = _json["details"]; |
1860 } | 1855 } |
1861 if (_json.containsKey("message")) { | 1856 if (_json.containsKey("message")) { |
1862 message = _json["message"]; | 1857 message = _json["message"]; |
1863 } | 1858 } |
1864 } | 1859 } |
1865 | 1860 |
1866 core.Map<core.String, core.Object> toJson() { | 1861 core.Map<core.String, core.Object> toJson() { |
1867 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1862 final core.Map<core.String, core.Object> _json = |
| 1863 new core.Map<core.String, core.Object>(); |
1868 if (code != null) { | 1864 if (code != null) { |
1869 _json["code"] = code; | 1865 _json["code"] = code; |
1870 } | 1866 } |
1871 if (details != null) { | 1867 if (details != null) { |
1872 _json["details"] = details; | 1868 _json["details"] = details; |
1873 } | 1869 } |
1874 if (message != null) { | 1870 if (message != null) { |
1875 _json["message"] = message; | 1871 _json["message"] = message; |
1876 } | 1872 } |
1877 return _json; | 1873 return _json; |
1878 } | 1874 } |
1879 } | 1875 } |
1880 | 1876 |
1881 /** | 1877 /// StorageSource describes the location of the source in an archive file in |
1882 * StorageSource describes the location of the source in an archive file in | 1878 /// Google Cloud Storage. |
1883 * Google Cloud Storage. | |
1884 */ | |
1885 class StorageSource { | 1879 class StorageSource { |
1886 /** | 1880 /// Google Cloud Storage bucket containing source (see |
1887 * Google Cloud Storage bucket containing source (see | 1881 /// [Bucket Name |
1888 * [Bucket Name | 1882 /// Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirem
ents)). |
1889 * Requirements](https://cloud.google.com/storage/docs/bucket-naming#requireme
nts)). | |
1890 */ | |
1891 core.String bucket; | 1883 core.String bucket; |
1892 /** | 1884 |
1893 * Google Cloud Storage generation for the object. If the generation is | 1885 /// Google Cloud Storage generation for the object. If the generation is |
1894 * omitted, the latest generation will be used. | 1886 /// omitted, the latest generation will be used. |
1895 */ | |
1896 core.String generation; | 1887 core.String generation; |
1897 /** | 1888 |
1898 * Google Cloud Storage object containing source. | 1889 /// Google Cloud Storage object containing source. |
1899 * | 1890 /// |
1900 * This object must be a gzipped archive file (.tar.gz) containing source to | 1891 /// This object must be a gzipped archive file (.tar.gz) containing source to |
1901 * build. | 1892 /// build. |
1902 */ | |
1903 core.String object; | 1893 core.String object; |
1904 | 1894 |
1905 StorageSource(); | 1895 StorageSource(); |
1906 | 1896 |
1907 StorageSource.fromJson(core.Map _json) { | 1897 StorageSource.fromJson(core.Map _json) { |
1908 if (_json.containsKey("bucket")) { | 1898 if (_json.containsKey("bucket")) { |
1909 bucket = _json["bucket"]; | 1899 bucket = _json["bucket"]; |
1910 } | 1900 } |
1911 if (_json.containsKey("generation")) { | 1901 if (_json.containsKey("generation")) { |
1912 generation = _json["generation"]; | 1902 generation = _json["generation"]; |
1913 } | 1903 } |
1914 if (_json.containsKey("object")) { | 1904 if (_json.containsKey("object")) { |
1915 object = _json["object"]; | 1905 object = _json["object"]; |
1916 } | 1906 } |
1917 } | 1907 } |
1918 | 1908 |
1919 core.Map<core.String, core.Object> toJson() { | 1909 core.Map<core.String, core.Object> toJson() { |
1920 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1910 final core.Map<core.String, core.Object> _json = |
| 1911 new core.Map<core.String, core.Object>(); |
1921 if (bucket != null) { | 1912 if (bucket != null) { |
1922 _json["bucket"] = bucket; | 1913 _json["bucket"] = bucket; |
1923 } | 1914 } |
1924 if (generation != null) { | 1915 if (generation != null) { |
1925 _json["generation"] = generation; | 1916 _json["generation"] = generation; |
1926 } | 1917 } |
1927 if (object != null) { | 1918 if (object != null) { |
1928 _json["object"] = object; | 1919 _json["object"] = object; |
1929 } | 1920 } |
1930 return _json; | 1921 return _json; |
1931 } | 1922 } |
1932 } | 1923 } |
1933 | 1924 |
1934 /** | 1925 /// Volume describes a Docker container volume which is mounted into build |
1935 * Volume describes a Docker container volume which is mounted into build steps | 1926 /// steps |
1936 * in order to persist files across build step execution. | 1927 /// in order to persist files across build step execution. |
1937 */ | |
1938 class Volume { | 1928 class Volume { |
1939 /** | 1929 /// Name of the volume to mount. |
1940 * Name of the volume to mount. | 1930 /// |
1941 * | 1931 /// Volume names must be unique per build step and must be valid names for |
1942 * Volume names must be unique per build step and must be valid names for | 1932 /// Docker volumes. Each named volume must be used by at least two build |
1943 * Docker volumes. Each named volume must be used by at least two build steps. | 1933 /// steps. |
1944 */ | |
1945 core.String name; | 1934 core.String name; |
1946 /** | 1935 |
1947 * Path at which to mount the volume. | 1936 /// Path at which to mount the volume. |
1948 * | 1937 /// |
1949 * Paths must be absolute and cannot conflict with other volume paths on the | 1938 /// Paths must be absolute and cannot conflict with other volume paths on the |
1950 * same build step or with certain reserved volume paths. | 1939 /// same build step or with certain reserved volume paths. |
1951 */ | |
1952 core.String path; | 1940 core.String path; |
1953 | 1941 |
1954 Volume(); | 1942 Volume(); |
1955 | 1943 |
1956 Volume.fromJson(core.Map _json) { | 1944 Volume.fromJson(core.Map _json) { |
1957 if (_json.containsKey("name")) { | 1945 if (_json.containsKey("name")) { |
1958 name = _json["name"]; | 1946 name = _json["name"]; |
1959 } | 1947 } |
1960 if (_json.containsKey("path")) { | 1948 if (_json.containsKey("path")) { |
1961 path = _json["path"]; | 1949 path = _json["path"]; |
1962 } | 1950 } |
1963 } | 1951 } |
1964 | 1952 |
1965 core.Map<core.String, core.Object> toJson() { | 1953 core.Map<core.String, core.Object> toJson() { |
1966 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 1954 final core.Map<core.String, core.Object> _json = |
| 1955 new core.Map<core.String, core.Object>(); |
1967 if (name != null) { | 1956 if (name != null) { |
1968 _json["name"] = name; | 1957 _json["name"] = name; |
1969 } | 1958 } |
1970 if (path != null) { | 1959 if (path != null) { |
1971 _json["path"] = path; | 1960 _json["path"] = path; |
1972 } | 1961 } |
1973 return _json; | 1962 return _json; |
1974 } | 1963 } |
1975 } | 1964 } |
OLD | NEW |