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_beta.dataflow.v1b3; | 3 library googleapis_beta.dataflow.v1b3; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 | 107 |
108 /** | 108 /** |
109 * Creates a Cloud Dataflow job. | 109 * Creates a Cloud Dataflow job. |
110 * | 110 * |
111 * [request] - The metadata request object. | 111 * [request] - The metadata request object. |
112 * | 112 * |
113 * Request parameters: | 113 * Request parameters: |
114 * | 114 * |
115 * [projectId] - The ID of the Cloud Platform project that the job belongs to. | 115 * [projectId] - The ID of the Cloud Platform project that the job belongs to. |
116 * | 116 * |
| 117 * [location] - The location that contains this job. |
| 118 * |
| 119 * [replaceJobId] - Deprecated. This field is now in the Job message. |
| 120 * |
117 * [view] - The level of information requested in response. | 121 * [view] - The level of information requested in response. |
118 * Possible string values are: | 122 * Possible string values are: |
119 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. | 123 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. |
120 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. | 124 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. |
121 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. | 125 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. |
122 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. | 126 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. |
123 * | 127 * |
124 * [location] - The location that contains this job. | |
125 * | |
126 * [replaceJobId] - Deprecated. This field is now in the Job message. | |
127 * | |
128 * Completes with a [Job]. | 128 * Completes with a [Job]. |
129 * | 129 * |
130 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 130 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
131 * error. | 131 * error. |
132 * | 132 * |
133 * If the used [http.Client] completes with an error when making a REST call, | 133 * If the used [http.Client] completes with an error when making a REST call, |
134 * this method will complete with the same error. | 134 * this method will complete with the same error. |
135 */ | 135 */ |
136 async.Future<Job> create(Job request, core.String projectId, {core.String view
, core.String location, core.String replaceJobId}) { | 136 async.Future<Job> create(Job request, core.String projectId, {core.String loca
tion, core.String replaceJobId, core.String view}) { |
137 var _url = null; | 137 var _url = null; |
138 var _queryParams = new core.Map(); | 138 var _queryParams = new core.Map(); |
139 var _uploadMedia = null; | 139 var _uploadMedia = null; |
140 var _uploadOptions = null; | 140 var _uploadOptions = null; |
141 var _downloadOptions = commons.DownloadOptions.Metadata; | 141 var _downloadOptions = commons.DownloadOptions.Metadata; |
142 var _body = null; | 142 var _body = null; |
143 | 143 |
144 if (request != null) { | 144 if (request != null) { |
145 _body = convert.JSON.encode((request).toJson()); | 145 _body = convert.JSON.encode((request).toJson()); |
146 } | 146 } |
147 if (projectId == null) { | 147 if (projectId == null) { |
148 throw new core.ArgumentError("Parameter projectId is required."); | 148 throw new core.ArgumentError("Parameter projectId is required."); |
149 } | 149 } |
150 if (view != null) { | |
151 _queryParams["view"] = [view]; | |
152 } | |
153 if (location != null) { | 150 if (location != null) { |
154 _queryParams["location"] = [location]; | 151 _queryParams["location"] = [location]; |
155 } | 152 } |
156 if (replaceJobId != null) { | 153 if (replaceJobId != null) { |
157 _queryParams["replaceJobId"] = [replaceJobId]; | 154 _queryParams["replaceJobId"] = [replaceJobId]; |
158 } | 155 } |
| 156 if (view != null) { |
| 157 _queryParams["view"] = [view]; |
| 158 } |
159 | 159 |
160 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs'; | 160 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs'; |
161 | 161 |
162 var _response = _requester.request(_url, | 162 var _response = _requester.request(_url, |
163 "POST", | 163 "POST", |
164 body: _body, | 164 body: _body, |
165 queryParams: _queryParams, | 165 queryParams: _queryParams, |
166 uploadOptions: _uploadOptions, | 166 uploadOptions: _uploadOptions, |
167 uploadMedia: _uploadMedia, | 167 uploadMedia: _uploadMedia, |
168 downloadOptions: _downloadOptions); | 168 downloadOptions: _downloadOptions); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 /** | 231 /** |
232 * Request the job status. | 232 * Request the job status. |
233 * | 233 * |
234 * Request parameters: | 234 * Request parameters: |
235 * | 235 * |
236 * [projectId] - A project id. | 236 * [projectId] - A project id. |
237 * | 237 * |
238 * [jobId] - The job to get messages for. | 238 * [jobId] - The job to get messages for. |
239 * | 239 * |
| 240 * [location] - The location which contains the job specified by job_id. |
| 241 * |
240 * [startTime] - Return only metric data that has changed since this time. | 242 * [startTime] - Return only metric data that has changed since this time. |
241 * Default is to return all information about all metrics for the job. | 243 * Default is to return all information about all metrics for the job. |
242 * | 244 * |
243 * [location] - The location which contains the job specified by job_id. | |
244 * | |
245 * Completes with a [JobMetrics]. | 245 * Completes with a [JobMetrics]. |
246 * | 246 * |
247 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 247 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
248 * error. | 248 * error. |
249 * | 249 * |
250 * If the used [http.Client] completes with an error when making a REST call, | 250 * If the used [http.Client] completes with an error when making a REST call, |
251 * this method will complete with the same error. | 251 * this method will complete with the same error. |
252 */ | 252 */ |
253 async.Future<JobMetrics> getMetrics(core.String projectId, core.String jobId,
{core.String startTime, core.String location}) { | 253 async.Future<JobMetrics> getMetrics(core.String projectId, core.String jobId,
{core.String location, core.String startTime}) { |
254 var _url = null; | 254 var _url = null; |
255 var _queryParams = new core.Map(); | 255 var _queryParams = new core.Map(); |
256 var _uploadMedia = null; | 256 var _uploadMedia = null; |
257 var _uploadOptions = null; | 257 var _uploadOptions = null; |
258 var _downloadOptions = commons.DownloadOptions.Metadata; | 258 var _downloadOptions = commons.DownloadOptions.Metadata; |
259 var _body = null; | 259 var _body = null; |
260 | 260 |
261 if (projectId == null) { | 261 if (projectId == null) { |
262 throw new core.ArgumentError("Parameter projectId is required."); | 262 throw new core.ArgumentError("Parameter projectId is required."); |
263 } | 263 } |
264 if (jobId == null) { | 264 if (jobId == null) { |
265 throw new core.ArgumentError("Parameter jobId is required."); | 265 throw new core.ArgumentError("Parameter jobId is required."); |
266 } | 266 } |
| 267 if (location != null) { |
| 268 _queryParams["location"] = [location]; |
| 269 } |
267 if (startTime != null) { | 270 if (startTime != null) { |
268 _queryParams["startTime"] = [startTime]; | 271 _queryParams["startTime"] = [startTime]; |
269 } | 272 } |
270 if (location != null) { | |
271 _queryParams["location"] = [location]; | |
272 } | |
273 | 273 |
274 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId') + '/metrics'; | 274 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId') + '/metrics'; |
275 | 275 |
276 var _response = _requester.request(_url, | 276 var _response = _requester.request(_url, |
277 "GET", | 277 "GET", |
278 body: _body, | 278 body: _body, |
279 queryParams: _queryParams, | 279 queryParams: _queryParams, |
280 uploadOptions: _uploadOptions, | 280 uploadOptions: _uploadOptions, |
281 uploadMedia: _uploadMedia, | 281 uploadMedia: _uploadMedia, |
282 downloadOptions: _downloadOptions); | 282 downloadOptions: _downloadOptions); |
283 return _response.then((data) => new JobMetrics.fromJson(data)); | 283 return _response.then((data) => new JobMetrics.fromJson(data)); |
284 } | 284 } |
285 | 285 |
286 /** | 286 /** |
287 * List the jobs of a project. | 287 * List the jobs of a project. |
288 * | 288 * |
289 * Request parameters: | 289 * Request parameters: |
290 * | 290 * |
291 * [projectId] - The project which owns the jobs. | 291 * [projectId] - The project which owns the jobs. |
292 * | 292 * |
293 * [location] - The location that contains this job. | |
294 * | |
295 * [pageToken] - Set this to the 'next_page_token' field of a previous | |
296 * response | |
297 * to request additional results in a long list. | |
298 * | |
299 * [pageSize] - If there are many jobs, limit response to at most this many. | 293 * [pageSize] - If there are many jobs, limit response to at most this many. |
300 * The actual number of jobs returned will be the lesser of max_responses | 294 * The actual number of jobs returned will be the lesser of max_responses |
301 * and an unspecified server-defined limit. | 295 * and an unspecified server-defined limit. |
302 * | 296 * |
303 * [view] - Level of information requested in response. Default is | 297 * [view] - Level of information requested in response. Default is |
304 * `JOB_VIEW_SUMMARY`. | 298 * `JOB_VIEW_SUMMARY`. |
305 * Possible string values are: | 299 * Possible string values are: |
306 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. | 300 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. |
307 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. | 301 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. |
308 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. | 302 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. |
309 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. | 303 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. |
310 * | 304 * |
311 * [filter] - The kind of filter to use. | 305 * [filter] - The kind of filter to use. |
312 * Possible string values are: | 306 * Possible string values are: |
313 * - "UNKNOWN" : A UNKNOWN. | 307 * - "UNKNOWN" : A UNKNOWN. |
314 * - "ALL" : A ALL. | 308 * - "ALL" : A ALL. |
315 * - "TERMINATED" : A TERMINATED. | 309 * - "TERMINATED" : A TERMINATED. |
316 * - "ACTIVE" : A ACTIVE. | 310 * - "ACTIVE" : A ACTIVE. |
317 * | 311 * |
| 312 * [location] - The location that contains this job. |
| 313 * |
| 314 * [pageToken] - Set this to the 'next_page_token' field of a previous |
| 315 * response |
| 316 * to request additional results in a long list. |
| 317 * |
318 * Completes with a [ListJobsResponse]. | 318 * Completes with a [ListJobsResponse]. |
319 * | 319 * |
320 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 320 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
321 * error. | 321 * error. |
322 * | 322 * |
323 * If the used [http.Client] completes with an error when making a REST call, | 323 * If the used [http.Client] completes with an error when making a REST call, |
324 * this method will complete with the same error. | 324 * this method will complete with the same error. |
325 */ | 325 */ |
326 async.Future<ListJobsResponse> list(core.String projectId, {core.String locati
on, core.String pageToken, core.int pageSize, core.String view, core.String filt
er}) { | 326 async.Future<ListJobsResponse> list(core.String projectId, {core.int pageSize,
core.String view, core.String filter, core.String location, core.String pageTok
en}) { |
327 var _url = null; | 327 var _url = null; |
328 var _queryParams = new core.Map(); | 328 var _queryParams = new core.Map(); |
329 var _uploadMedia = null; | 329 var _uploadMedia = null; |
330 var _uploadOptions = null; | 330 var _uploadOptions = null; |
331 var _downloadOptions = commons.DownloadOptions.Metadata; | 331 var _downloadOptions = commons.DownloadOptions.Metadata; |
332 var _body = null; | 332 var _body = null; |
333 | 333 |
334 if (projectId == null) { | 334 if (projectId == null) { |
335 throw new core.ArgumentError("Parameter projectId is required."); | 335 throw new core.ArgumentError("Parameter projectId is required."); |
336 } | 336 } |
337 if (location != null) { | |
338 _queryParams["location"] = [location]; | |
339 } | |
340 if (pageToken != null) { | |
341 _queryParams["pageToken"] = [pageToken]; | |
342 } | |
343 if (pageSize != null) { | 337 if (pageSize != null) { |
344 _queryParams["pageSize"] = ["${pageSize}"]; | 338 _queryParams["pageSize"] = ["${pageSize}"]; |
345 } | 339 } |
346 if (view != null) { | 340 if (view != null) { |
347 _queryParams["view"] = [view]; | 341 _queryParams["view"] = [view]; |
348 } | 342 } |
349 if (filter != null) { | 343 if (filter != null) { |
350 _queryParams["filter"] = [filter]; | 344 _queryParams["filter"] = [filter]; |
351 } | 345 } |
| 346 if (location != null) { |
| 347 _queryParams["location"] = [location]; |
| 348 } |
| 349 if (pageToken != null) { |
| 350 _queryParams["pageToken"] = [pageToken]; |
| 351 } |
352 | 352 |
353 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs'; | 353 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs'; |
354 | 354 |
355 var _response = _requester.request(_url, | 355 var _response = _requester.request(_url, |
356 "GET", | 356 "GET", |
357 body: _body, | 357 body: _body, |
358 queryParams: _queryParams, | 358 queryParams: _queryParams, |
359 uploadOptions: _uploadOptions, | 359 uploadOptions: _uploadOptions, |
360 uploadMedia: _uploadMedia, | 360 uploadMedia: _uploadMedia, |
361 downloadOptions: _downloadOptions); | 361 downloadOptions: _downloadOptions); |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 | 534 |
535 /** | 535 /** |
536 * Request the job status. | 536 * Request the job status. |
537 * | 537 * |
538 * Request parameters: | 538 * Request parameters: |
539 * | 539 * |
540 * [projectId] - A project id. | 540 * [projectId] - A project id. |
541 * | 541 * |
542 * [jobId] - The job to get messages about. | 542 * [jobId] - The job to get messages about. |
543 * | 543 * |
544 * [pageSize] - If specified, determines the maximum number of messages to | |
545 * return. If unspecified, the service may choose an appropriate | |
546 * default, or may return an arbitrarily large number of results. | |
547 * | |
548 * [minimumImportance] - Filter to only get messages with importance >= level | |
549 * Possible string values are: | |
550 * - "JOB_MESSAGE_IMPORTANCE_UNKNOWN" : A JOB_MESSAGE_IMPORTANCE_UNKNOWN. | |
551 * - "JOB_MESSAGE_DEBUG" : A JOB_MESSAGE_DEBUG. | |
552 * - "JOB_MESSAGE_DETAILED" : A JOB_MESSAGE_DETAILED. | |
553 * - "JOB_MESSAGE_BASIC" : A JOB_MESSAGE_BASIC. | |
554 * - "JOB_MESSAGE_WARNING" : A JOB_MESSAGE_WARNING. | |
555 * - "JOB_MESSAGE_ERROR" : A JOB_MESSAGE_ERROR. | |
556 * | |
557 * [location] - The location which contains the job specified by job_id. | 544 * [location] - The location which contains the job specified by job_id. |
558 * | 545 * |
559 * [endTime] - Return only messages with timestamps < end_time. The default is | 546 * [endTime] - Return only messages with timestamps < end_time. The default is |
560 * now | 547 * now |
561 * (i.e. return up to the latest messages available). | 548 * (i.e. return up to the latest messages available). |
562 * | 549 * |
563 * [startTime] - If specified, return only messages with timestamps >= | 550 * [startTime] - If specified, return only messages with timestamps >= |
564 * start_time. | 551 * start_time. |
565 * The default is the job creation time (i.e. beginning of messages). | 552 * The default is the job creation time (i.e. beginning of messages). |
566 * | 553 * |
567 * [pageToken] - If supplied, this should be the value of next_page_token | 554 * [pageToken] - If supplied, this should be the value of next_page_token |
568 * returned | 555 * returned |
569 * by an earlier call. This will cause the next page of results to | 556 * by an earlier call. This will cause the next page of results to |
570 * be returned. | 557 * be returned. |
571 * | 558 * |
| 559 * [pageSize] - If specified, determines the maximum number of messages to |
| 560 * return. If unspecified, the service may choose an appropriate |
| 561 * default, or may return an arbitrarily large number of results. |
| 562 * |
| 563 * [minimumImportance] - Filter to only get messages with importance >= level |
| 564 * Possible string values are: |
| 565 * - "JOB_MESSAGE_IMPORTANCE_UNKNOWN" : A JOB_MESSAGE_IMPORTANCE_UNKNOWN. |
| 566 * - "JOB_MESSAGE_DEBUG" : A JOB_MESSAGE_DEBUG. |
| 567 * - "JOB_MESSAGE_DETAILED" : A JOB_MESSAGE_DETAILED. |
| 568 * - "JOB_MESSAGE_BASIC" : A JOB_MESSAGE_BASIC. |
| 569 * - "JOB_MESSAGE_WARNING" : A JOB_MESSAGE_WARNING. |
| 570 * - "JOB_MESSAGE_ERROR" : A JOB_MESSAGE_ERROR. |
| 571 * |
572 * Completes with a [ListJobMessagesResponse]. | 572 * Completes with a [ListJobMessagesResponse]. |
573 * | 573 * |
574 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 574 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
575 * error. | 575 * error. |
576 * | 576 * |
577 * If the used [http.Client] completes with an error when making a REST call, | 577 * If the used [http.Client] completes with an error when making a REST call, |
578 * this method will complete with the same error. | 578 * this method will complete with the same error. |
579 */ | 579 */ |
580 async.Future<ListJobMessagesResponse> list(core.String projectId, core.String
jobId, {core.int pageSize, core.String minimumImportance, core.String location,
core.String endTime, core.String startTime, core.String pageToken}) { | 580 async.Future<ListJobMessagesResponse> list(core.String projectId, core.String
jobId, {core.String location, core.String endTime, core.String startTime, core.S
tring pageToken, core.int pageSize, core.String minimumImportance}) { |
581 var _url = null; | 581 var _url = null; |
582 var _queryParams = new core.Map(); | 582 var _queryParams = new core.Map(); |
583 var _uploadMedia = null; | 583 var _uploadMedia = null; |
584 var _uploadOptions = null; | 584 var _uploadOptions = null; |
585 var _downloadOptions = commons.DownloadOptions.Metadata; | 585 var _downloadOptions = commons.DownloadOptions.Metadata; |
586 var _body = null; | 586 var _body = null; |
587 | 587 |
588 if (projectId == null) { | 588 if (projectId == null) { |
589 throw new core.ArgumentError("Parameter projectId is required."); | 589 throw new core.ArgumentError("Parameter projectId is required."); |
590 } | 590 } |
591 if (jobId == null) { | 591 if (jobId == null) { |
592 throw new core.ArgumentError("Parameter jobId is required."); | 592 throw new core.ArgumentError("Parameter jobId is required."); |
593 } | 593 } |
594 if (pageSize != null) { | |
595 _queryParams["pageSize"] = ["${pageSize}"]; | |
596 } | |
597 if (minimumImportance != null) { | |
598 _queryParams["minimumImportance"] = [minimumImportance]; | |
599 } | |
600 if (location != null) { | 594 if (location != null) { |
601 _queryParams["location"] = [location]; | 595 _queryParams["location"] = [location]; |
602 } | 596 } |
603 if (endTime != null) { | 597 if (endTime != null) { |
604 _queryParams["endTime"] = [endTime]; | 598 _queryParams["endTime"] = [endTime]; |
605 } | 599 } |
606 if (startTime != null) { | 600 if (startTime != null) { |
607 _queryParams["startTime"] = [startTime]; | 601 _queryParams["startTime"] = [startTime]; |
608 } | 602 } |
609 if (pageToken != null) { | 603 if (pageToken != null) { |
610 _queryParams["pageToken"] = [pageToken]; | 604 _queryParams["pageToken"] = [pageToken]; |
611 } | 605 } |
| 606 if (pageSize != null) { |
| 607 _queryParams["pageSize"] = ["${pageSize}"]; |
| 608 } |
| 609 if (minimumImportance != null) { |
| 610 _queryParams["minimumImportance"] = [minimumImportance]; |
| 611 } |
612 | 612 |
613 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId') + '/messages'; | 613 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/jo
bs/' + commons.Escaper.ecapeVariable('$jobId') + '/messages'; |
614 | 614 |
615 var _response = _requester.request(_url, | 615 var _response = _requester.request(_url, |
616 "GET", | 616 "GET", |
617 body: _body, | 617 body: _body, |
618 queryParams: _queryParams, | 618 queryParams: _queryParams, |
619 uploadOptions: _uploadOptions, | 619 uploadOptions: _uploadOptions, |
620 uploadMedia: _uploadMedia, | 620 uploadMedia: _uploadMedia, |
621 downloadOptions: _downloadOptions); | 621 downloadOptions: _downloadOptions); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
807 * Creates a Cloud Dataflow job. | 807 * Creates a Cloud Dataflow job. |
808 * | 808 * |
809 * [request] - The metadata request object. | 809 * [request] - The metadata request object. |
810 * | 810 * |
811 * Request parameters: | 811 * Request parameters: |
812 * | 812 * |
813 * [projectId] - The ID of the Cloud Platform project that the job belongs to. | 813 * [projectId] - The ID of the Cloud Platform project that the job belongs to. |
814 * | 814 * |
815 * [location] - The location that contains this job. | 815 * [location] - The location that contains this job. |
816 * | 816 * |
| 817 * [replaceJobId] - Deprecated. This field is now in the Job message. |
| 818 * |
817 * [view] - The level of information requested in response. | 819 * [view] - The level of information requested in response. |
818 * Possible string values are: | 820 * Possible string values are: |
819 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. | 821 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. |
820 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. | 822 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. |
821 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. | 823 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. |
822 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. | 824 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. |
823 * | 825 * |
824 * [replaceJobId] - Deprecated. This field is now in the Job message. | |
825 * | |
826 * Completes with a [Job]. | 826 * Completes with a [Job]. |
827 * | 827 * |
828 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 828 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
829 * error. | 829 * error. |
830 * | 830 * |
831 * If the used [http.Client] completes with an error when making a REST call, | 831 * If the used [http.Client] completes with an error when making a REST call, |
832 * this method will complete with the same error. | 832 * this method will complete with the same error. |
833 */ | 833 */ |
834 async.Future<Job> create(Job request, core.String projectId, core.String locat
ion, {core.String view, core.String replaceJobId}) { | 834 async.Future<Job> create(Job request, core.String projectId, core.String locat
ion, {core.String replaceJobId, core.String view}) { |
835 var _url = null; | 835 var _url = null; |
836 var _queryParams = new core.Map(); | 836 var _queryParams = new core.Map(); |
837 var _uploadMedia = null; | 837 var _uploadMedia = null; |
838 var _uploadOptions = null; | 838 var _uploadOptions = null; |
839 var _downloadOptions = commons.DownloadOptions.Metadata; | 839 var _downloadOptions = commons.DownloadOptions.Metadata; |
840 var _body = null; | 840 var _body = null; |
841 | 841 |
842 if (request != null) { | 842 if (request != null) { |
843 _body = convert.JSON.encode((request).toJson()); | 843 _body = convert.JSON.encode((request).toJson()); |
844 } | 844 } |
845 if (projectId == null) { | 845 if (projectId == null) { |
846 throw new core.ArgumentError("Parameter projectId is required."); | 846 throw new core.ArgumentError("Parameter projectId is required."); |
847 } | 847 } |
848 if (location == null) { | 848 if (location == null) { |
849 throw new core.ArgumentError("Parameter location is required."); | 849 throw new core.ArgumentError("Parameter location is required."); |
850 } | 850 } |
| 851 if (replaceJobId != null) { |
| 852 _queryParams["replaceJobId"] = [replaceJobId]; |
| 853 } |
851 if (view != null) { | 854 if (view != null) { |
852 _queryParams["view"] = [view]; | 855 _queryParams["view"] = [view]; |
853 } | 856 } |
854 if (replaceJobId != null) { | |
855 _queryParams["replaceJobId"] = [replaceJobId]; | |
856 } | |
857 | 857 |
858 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs'; | 858 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs'; |
859 | 859 |
860 var _response = _requester.request(_url, | 860 var _response = _requester.request(_url, |
861 "POST", | 861 "POST", |
862 body: _body, | 862 body: _body, |
863 queryParams: _queryParams, | 863 queryParams: _queryParams, |
864 uploadOptions: _uploadOptions, | 864 uploadOptions: _uploadOptions, |
865 uploadMedia: _uploadMedia, | 865 uploadMedia: _uploadMedia, |
866 downloadOptions: _downloadOptions); | 866 downloadOptions: _downloadOptions); |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 | 983 |
984 /** | 984 /** |
985 * List the jobs of a project. | 985 * List the jobs of a project. |
986 * | 986 * |
987 * Request parameters: | 987 * Request parameters: |
988 * | 988 * |
989 * [projectId] - The project which owns the jobs. | 989 * [projectId] - The project which owns the jobs. |
990 * | 990 * |
991 * [location] - The location that contains this job. | 991 * [location] - The location that contains this job. |
992 * | 992 * |
| 993 * [filter] - The kind of filter to use. |
| 994 * Possible string values are: |
| 995 * - "UNKNOWN" : A UNKNOWN. |
| 996 * - "ALL" : A ALL. |
| 997 * - "TERMINATED" : A TERMINATED. |
| 998 * - "ACTIVE" : A ACTIVE. |
| 999 * |
993 * [pageToken] - Set this to the 'next_page_token' field of a previous | 1000 * [pageToken] - Set this to the 'next_page_token' field of a previous |
994 * response | 1001 * response |
995 * to request additional results in a long list. | 1002 * to request additional results in a long list. |
996 * | 1003 * |
997 * [pageSize] - If there are many jobs, limit response to at most this many. | 1004 * [pageSize] - If there are many jobs, limit response to at most this many. |
998 * The actual number of jobs returned will be the lesser of max_responses | 1005 * The actual number of jobs returned will be the lesser of max_responses |
999 * and an unspecified server-defined limit. | 1006 * and an unspecified server-defined limit. |
1000 * | 1007 * |
1001 * [view] - Level of information requested in response. Default is | 1008 * [view] - Level of information requested in response. Default is |
1002 * `JOB_VIEW_SUMMARY`. | 1009 * `JOB_VIEW_SUMMARY`. |
1003 * Possible string values are: | 1010 * Possible string values are: |
1004 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. | 1011 * - "JOB_VIEW_UNKNOWN" : A JOB_VIEW_UNKNOWN. |
1005 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. | 1012 * - "JOB_VIEW_SUMMARY" : A JOB_VIEW_SUMMARY. |
1006 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. | 1013 * - "JOB_VIEW_ALL" : A JOB_VIEW_ALL. |
1007 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. | 1014 * - "JOB_VIEW_DESCRIPTION" : A JOB_VIEW_DESCRIPTION. |
1008 * | 1015 * |
1009 * [filter] - The kind of filter to use. | |
1010 * Possible string values are: | |
1011 * - "UNKNOWN" : A UNKNOWN. | |
1012 * - "ALL" : A ALL. | |
1013 * - "TERMINATED" : A TERMINATED. | |
1014 * - "ACTIVE" : A ACTIVE. | |
1015 * | |
1016 * Completes with a [ListJobsResponse]. | 1016 * Completes with a [ListJobsResponse]. |
1017 * | 1017 * |
1018 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1018 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1019 * error. | 1019 * error. |
1020 * | 1020 * |
1021 * If the used [http.Client] completes with an error when making a REST call, | 1021 * If the used [http.Client] completes with an error when making a REST call, |
1022 * this method will complete with the same error. | 1022 * this method will complete with the same error. |
1023 */ | 1023 */ |
1024 async.Future<ListJobsResponse> list(core.String projectId, core.String locatio
n, {core.String pageToken, core.int pageSize, core.String view, core.String filt
er}) { | 1024 async.Future<ListJobsResponse> list(core.String projectId, core.String locatio
n, {core.String filter, core.String pageToken, core.int pageSize, core.String vi
ew}) { |
1025 var _url = null; | 1025 var _url = null; |
1026 var _queryParams = new core.Map(); | 1026 var _queryParams = new core.Map(); |
1027 var _uploadMedia = null; | 1027 var _uploadMedia = null; |
1028 var _uploadOptions = null; | 1028 var _uploadOptions = null; |
1029 var _downloadOptions = commons.DownloadOptions.Metadata; | 1029 var _downloadOptions = commons.DownloadOptions.Metadata; |
1030 var _body = null; | 1030 var _body = null; |
1031 | 1031 |
1032 if (projectId == null) { | 1032 if (projectId == null) { |
1033 throw new core.ArgumentError("Parameter projectId is required."); | 1033 throw new core.ArgumentError("Parameter projectId is required."); |
1034 } | 1034 } |
1035 if (location == null) { | 1035 if (location == null) { |
1036 throw new core.ArgumentError("Parameter location is required."); | 1036 throw new core.ArgumentError("Parameter location is required."); |
1037 } | 1037 } |
| 1038 if (filter != null) { |
| 1039 _queryParams["filter"] = [filter]; |
| 1040 } |
1038 if (pageToken != null) { | 1041 if (pageToken != null) { |
1039 _queryParams["pageToken"] = [pageToken]; | 1042 _queryParams["pageToken"] = [pageToken]; |
1040 } | 1043 } |
1041 if (pageSize != null) { | 1044 if (pageSize != null) { |
1042 _queryParams["pageSize"] = ["${pageSize}"]; | 1045 _queryParams["pageSize"] = ["${pageSize}"]; |
1043 } | 1046 } |
1044 if (view != null) { | 1047 if (view != null) { |
1045 _queryParams["view"] = [view]; | 1048 _queryParams["view"] = [view]; |
1046 } | 1049 } |
1047 if (filter != null) { | |
1048 _queryParams["filter"] = [filter]; | |
1049 } | |
1050 | 1050 |
1051 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs'; | 1051 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs'; |
1052 | 1052 |
1053 var _response = _requester.request(_url, | 1053 var _response = _requester.request(_url, |
1054 "GET", | 1054 "GET", |
1055 body: _body, | 1055 body: _body, |
1056 queryParams: _queryParams, | 1056 queryParams: _queryParams, |
1057 uploadOptions: _uploadOptions, | 1057 uploadOptions: _uploadOptions, |
1058 uploadMedia: _uploadMedia, | 1058 uploadMedia: _uploadMedia, |
1059 downloadOptions: _downloadOptions); | 1059 downloadOptions: _downloadOptions); |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 * Request the job status. | 1244 * Request the job status. |
1245 * | 1245 * |
1246 * Request parameters: | 1246 * Request parameters: |
1247 * | 1247 * |
1248 * [projectId] - A project id. | 1248 * [projectId] - A project id. |
1249 * | 1249 * |
1250 * [location] - The location which contains the job specified by job_id. | 1250 * [location] - The location which contains the job specified by job_id. |
1251 * | 1251 * |
1252 * [jobId] - The job to get messages about. | 1252 * [jobId] - The job to get messages about. |
1253 * | 1253 * |
| 1254 * [endTime] - Return only messages with timestamps < end_time. The default is |
| 1255 * now |
| 1256 * (i.e. return up to the latest messages available). |
| 1257 * |
1254 * [startTime] - If specified, return only messages with timestamps >= | 1258 * [startTime] - If specified, return only messages with timestamps >= |
1255 * start_time. | 1259 * start_time. |
1256 * The default is the job creation time (i.e. beginning of messages). | 1260 * The default is the job creation time (i.e. beginning of messages). |
1257 * | 1261 * |
1258 * [pageToken] - If supplied, this should be the value of next_page_token | 1262 * [pageToken] - If supplied, this should be the value of next_page_token |
1259 * returned | 1263 * returned |
1260 * by an earlier call. This will cause the next page of results to | 1264 * by an earlier call. This will cause the next page of results to |
1261 * be returned. | 1265 * be returned. |
1262 * | 1266 * |
1263 * [pageSize] - If specified, determines the maximum number of messages to | 1267 * [pageSize] - If specified, determines the maximum number of messages to |
1264 * return. If unspecified, the service may choose an appropriate | 1268 * return. If unspecified, the service may choose an appropriate |
1265 * default, or may return an arbitrarily large number of results. | 1269 * default, or may return an arbitrarily large number of results. |
1266 * | 1270 * |
1267 * [minimumImportance] - Filter to only get messages with importance >= level | 1271 * [minimumImportance] - Filter to only get messages with importance >= level |
1268 * Possible string values are: | 1272 * Possible string values are: |
1269 * - "JOB_MESSAGE_IMPORTANCE_UNKNOWN" : A JOB_MESSAGE_IMPORTANCE_UNKNOWN. | 1273 * - "JOB_MESSAGE_IMPORTANCE_UNKNOWN" : A JOB_MESSAGE_IMPORTANCE_UNKNOWN. |
1270 * - "JOB_MESSAGE_DEBUG" : A JOB_MESSAGE_DEBUG. | 1274 * - "JOB_MESSAGE_DEBUG" : A JOB_MESSAGE_DEBUG. |
1271 * - "JOB_MESSAGE_DETAILED" : A JOB_MESSAGE_DETAILED. | 1275 * - "JOB_MESSAGE_DETAILED" : A JOB_MESSAGE_DETAILED. |
1272 * - "JOB_MESSAGE_BASIC" : A JOB_MESSAGE_BASIC. | 1276 * - "JOB_MESSAGE_BASIC" : A JOB_MESSAGE_BASIC. |
1273 * - "JOB_MESSAGE_WARNING" : A JOB_MESSAGE_WARNING. | 1277 * - "JOB_MESSAGE_WARNING" : A JOB_MESSAGE_WARNING. |
1274 * - "JOB_MESSAGE_ERROR" : A JOB_MESSAGE_ERROR. | 1278 * - "JOB_MESSAGE_ERROR" : A JOB_MESSAGE_ERROR. |
1275 * | 1279 * |
1276 * [endTime] - Return only messages with timestamps < end_time. The default is | |
1277 * now | |
1278 * (i.e. return up to the latest messages available). | |
1279 * | |
1280 * Completes with a [ListJobMessagesResponse]. | 1280 * Completes with a [ListJobMessagesResponse]. |
1281 * | 1281 * |
1282 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1282 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1283 * error. | 1283 * error. |
1284 * | 1284 * |
1285 * If the used [http.Client] completes with an error when making a REST call, | 1285 * If the used [http.Client] completes with an error when making a REST call, |
1286 * this method will complete with the same error. | 1286 * this method will complete with the same error. |
1287 */ | 1287 */ |
1288 async.Future<ListJobMessagesResponse> list(core.String projectId, core.String
location, core.String jobId, {core.String startTime, core.String pageToken, core
.int pageSize, core.String minimumImportance, core.String endTime}) { | 1288 async.Future<ListJobMessagesResponse> list(core.String projectId, core.String
location, core.String jobId, {core.String endTime, core.String startTime, core.S
tring pageToken, core.int pageSize, core.String minimumImportance}) { |
1289 var _url = null; | 1289 var _url = null; |
1290 var _queryParams = new core.Map(); | 1290 var _queryParams = new core.Map(); |
1291 var _uploadMedia = null; | 1291 var _uploadMedia = null; |
1292 var _uploadOptions = null; | 1292 var _uploadOptions = null; |
1293 var _downloadOptions = commons.DownloadOptions.Metadata; | 1293 var _downloadOptions = commons.DownloadOptions.Metadata; |
1294 var _body = null; | 1294 var _body = null; |
1295 | 1295 |
1296 if (projectId == null) { | 1296 if (projectId == null) { |
1297 throw new core.ArgumentError("Parameter projectId is required."); | 1297 throw new core.ArgumentError("Parameter projectId is required."); |
1298 } | 1298 } |
1299 if (location == null) { | 1299 if (location == null) { |
1300 throw new core.ArgumentError("Parameter location is required."); | 1300 throw new core.ArgumentError("Parameter location is required."); |
1301 } | 1301 } |
1302 if (jobId == null) { | 1302 if (jobId == null) { |
1303 throw new core.ArgumentError("Parameter jobId is required."); | 1303 throw new core.ArgumentError("Parameter jobId is required."); |
1304 } | 1304 } |
| 1305 if (endTime != null) { |
| 1306 _queryParams["endTime"] = [endTime]; |
| 1307 } |
1305 if (startTime != null) { | 1308 if (startTime != null) { |
1306 _queryParams["startTime"] = [startTime]; | 1309 _queryParams["startTime"] = [startTime]; |
1307 } | 1310 } |
1308 if (pageToken != null) { | 1311 if (pageToken != null) { |
1309 _queryParams["pageToken"] = [pageToken]; | 1312 _queryParams["pageToken"] = [pageToken]; |
1310 } | 1313 } |
1311 if (pageSize != null) { | 1314 if (pageSize != null) { |
1312 _queryParams["pageSize"] = ["${pageSize}"]; | 1315 _queryParams["pageSize"] = ["${pageSize}"]; |
1313 } | 1316 } |
1314 if (minimumImportance != null) { | 1317 if (minimumImportance != null) { |
1315 _queryParams["minimumImportance"] = [minimumImportance]; | 1318 _queryParams["minimumImportance"] = [minimumImportance]; |
1316 } | 1319 } |
1317 if (endTime != null) { | |
1318 _queryParams["endTime"] = [endTime]; | |
1319 } | |
1320 | 1320 |
1321 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs/' + commons.Esca
per.ecapeVariable('$jobId') + '/messages'; | 1321 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/lo
cations/' + commons.Escaper.ecapeVariable('$location') + '/jobs/' + commons.Esca
per.ecapeVariable('$jobId') + '/messages'; |
1322 | 1322 |
1323 var _response = _requester.request(_url, | 1323 var _response = _requester.request(_url, |
1324 "GET", | 1324 "GET", |
1325 body: _body, | 1325 body: _body, |
1326 queryParams: _queryParams, | 1326 queryParams: _queryParams, |
1327 uploadOptions: _uploadOptions, | 1327 uploadOptions: _uploadOptions, |
1328 uploadMedia: _uploadMedia, | 1328 uploadMedia: _uploadMedia, |
1329 downloadOptions: _downloadOptions); | 1329 downloadOptions: _downloadOptions); |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1685 } | 1685 } |
1686 | 1686 |
1687 /** | 1687 /** |
1688 * Get the template associated with a template. | 1688 * Get the template associated with a template. |
1689 * | 1689 * |
1690 * Request parameters: | 1690 * Request parameters: |
1691 * | 1691 * |
1692 * [projectId] - Required. The ID of the Cloud Platform project that the job | 1692 * [projectId] - Required. The ID of the Cloud Platform project that the job |
1693 * belongs to. | 1693 * belongs to. |
1694 * | 1694 * |
1695 * [location] - The location to which to direct the request. | |
1696 * | |
1697 * [view] - The view to retrieve. Defaults to METADATA_ONLY. | 1695 * [view] - The view to retrieve. Defaults to METADATA_ONLY. |
1698 * Possible string values are: | 1696 * Possible string values are: |
1699 * - "METADATA_ONLY" : A METADATA_ONLY. | 1697 * - "METADATA_ONLY" : A METADATA_ONLY. |
1700 * | 1698 * |
1701 * [gcsPath] - Required. A Cloud Storage path to the template from which to | 1699 * [gcsPath] - Required. A Cloud Storage path to the template from which to |
1702 * create the job. | 1700 * create the job. |
1703 * Must be a valid Cloud Storage URL, beginning with `gs://`. | 1701 * Must be a valid Cloud Storage URL, beginning with `gs://`. |
1704 * | 1702 * |
| 1703 * [location] - The location to which to direct the request. |
| 1704 * |
1705 * Completes with a [GetTemplateResponse]. | 1705 * Completes with a [GetTemplateResponse]. |
1706 * | 1706 * |
1707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1707 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1708 * error. | 1708 * error. |
1709 * | 1709 * |
1710 * If the used [http.Client] completes with an error when making a REST call, | 1710 * If the used [http.Client] completes with an error when making a REST call, |
1711 * this method will complete with the same error. | 1711 * this method will complete with the same error. |
1712 */ | 1712 */ |
1713 async.Future<GetTemplateResponse> get(core.String projectId, {core.String loca
tion, core.String view, core.String gcsPath}) { | 1713 async.Future<GetTemplateResponse> get(core.String projectId, {core.String view
, core.String gcsPath, core.String location}) { |
1714 var _url = null; | 1714 var _url = null; |
1715 var _queryParams = new core.Map(); | 1715 var _queryParams = new core.Map(); |
1716 var _uploadMedia = null; | 1716 var _uploadMedia = null; |
1717 var _uploadOptions = null; | 1717 var _uploadOptions = null; |
1718 var _downloadOptions = commons.DownloadOptions.Metadata; | 1718 var _downloadOptions = commons.DownloadOptions.Metadata; |
1719 var _body = null; | 1719 var _body = null; |
1720 | 1720 |
1721 if (projectId == null) { | 1721 if (projectId == null) { |
1722 throw new core.ArgumentError("Parameter projectId is required."); | 1722 throw new core.ArgumentError("Parameter projectId is required."); |
1723 } | 1723 } |
1724 if (location != null) { | |
1725 _queryParams["location"] = [location]; | |
1726 } | |
1727 if (view != null) { | 1724 if (view != null) { |
1728 _queryParams["view"] = [view]; | 1725 _queryParams["view"] = [view]; |
1729 } | 1726 } |
1730 if (gcsPath != null) { | 1727 if (gcsPath != null) { |
1731 _queryParams["gcsPath"] = [gcsPath]; | 1728 _queryParams["gcsPath"] = [gcsPath]; |
1732 } | 1729 } |
| 1730 if (location != null) { |
| 1731 _queryParams["location"] = [location]; |
| 1732 } |
1733 | 1733 |
1734 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/te
mplates:get'; | 1734 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/te
mplates:get'; |
1735 | 1735 |
1736 var _response = _requester.request(_url, | 1736 var _response = _requester.request(_url, |
1737 "GET", | 1737 "GET", |
1738 body: _body, | 1738 body: _body, |
1739 queryParams: _queryParams, | 1739 queryParams: _queryParams, |
1740 uploadOptions: _uploadOptions, | 1740 uploadOptions: _uploadOptions, |
1741 uploadMedia: _uploadMedia, | 1741 uploadMedia: _uploadMedia, |
1742 downloadOptions: _downloadOptions); | 1742 downloadOptions: _downloadOptions); |
1743 return _response.then((data) => new GetTemplateResponse.fromJson(data)); | 1743 return _response.then((data) => new GetTemplateResponse.fromJson(data)); |
1744 } | 1744 } |
1745 | 1745 |
1746 /** | 1746 /** |
1747 * Launch a template. | 1747 * Launch a template. |
1748 * | 1748 * |
1749 * [request] - The metadata request object. | 1749 * [request] - The metadata request object. |
1750 * | 1750 * |
1751 * Request parameters: | 1751 * Request parameters: |
1752 * | 1752 * |
1753 * [projectId] - Required. The ID of the Cloud Platform project that the job | 1753 * [projectId] - Required. The ID of the Cloud Platform project that the job |
1754 * belongs to. | 1754 * belongs to. |
1755 * | 1755 * |
| 1756 * [gcsPath] - Required. A Cloud Storage path to the template from which to |
| 1757 * create |
| 1758 * the job. |
| 1759 * Must be valid Cloud Storage URL, beginning with 'gs://'. |
| 1760 * |
1756 * [location] - The location to which to direct the request. | 1761 * [location] - The location to which to direct the request. |
1757 * | 1762 * |
1758 * [validateOnly] - If true, the request is validated but not actually | 1763 * [validateOnly] - If true, the request is validated but not actually |
1759 * executed. | 1764 * executed. |
1760 * Defaults to false. | 1765 * Defaults to false. |
1761 * | 1766 * |
1762 * [gcsPath] - Required. A Cloud Storage path to the template from which to | |
1763 * create | |
1764 * the job. | |
1765 * Must be valid Cloud Storage URL, beginning with 'gs://'. | |
1766 * | |
1767 * Completes with a [LaunchTemplateResponse]. | 1767 * Completes with a [LaunchTemplateResponse]. |
1768 * | 1768 * |
1769 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 1769 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
1770 * error. | 1770 * error. |
1771 * | 1771 * |
1772 * If the used [http.Client] completes with an error when making a REST call, | 1772 * If the used [http.Client] completes with an error when making a REST call, |
1773 * this method will complete with the same error. | 1773 * this method will complete with the same error. |
1774 */ | 1774 */ |
1775 async.Future<LaunchTemplateResponse> launch(LaunchTemplateParameters request,
core.String projectId, {core.String location, core.bool validateOnly, core.Strin
g gcsPath}) { | 1775 async.Future<LaunchTemplateResponse> launch(LaunchTemplateParameters request,
core.String projectId, {core.String gcsPath, core.String location, core.bool val
idateOnly}) { |
1776 var _url = null; | 1776 var _url = null; |
1777 var _queryParams = new core.Map(); | 1777 var _queryParams = new core.Map(); |
1778 var _uploadMedia = null; | 1778 var _uploadMedia = null; |
1779 var _uploadOptions = null; | 1779 var _uploadOptions = null; |
1780 var _downloadOptions = commons.DownloadOptions.Metadata; | 1780 var _downloadOptions = commons.DownloadOptions.Metadata; |
1781 var _body = null; | 1781 var _body = null; |
1782 | 1782 |
1783 if (request != null) { | 1783 if (request != null) { |
1784 _body = convert.JSON.encode((request).toJson()); | 1784 _body = convert.JSON.encode((request).toJson()); |
1785 } | 1785 } |
1786 if (projectId == null) { | 1786 if (projectId == null) { |
1787 throw new core.ArgumentError("Parameter projectId is required."); | 1787 throw new core.ArgumentError("Parameter projectId is required."); |
1788 } | 1788 } |
| 1789 if (gcsPath != null) { |
| 1790 _queryParams["gcsPath"] = [gcsPath]; |
| 1791 } |
1789 if (location != null) { | 1792 if (location != null) { |
1790 _queryParams["location"] = [location]; | 1793 _queryParams["location"] = [location]; |
1791 } | 1794 } |
1792 if (validateOnly != null) { | 1795 if (validateOnly != null) { |
1793 _queryParams["validateOnly"] = ["${validateOnly}"]; | 1796 _queryParams["validateOnly"] = ["${validateOnly}"]; |
1794 } | 1797 } |
1795 if (gcsPath != null) { | |
1796 _queryParams["gcsPath"] = [gcsPath]; | |
1797 } | |
1798 | 1798 |
1799 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/te
mplates:launch'; | 1799 _url = 'v1b3/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/te
mplates:launch'; |
1800 | 1800 |
1801 var _response = _requester.request(_url, | 1801 var _response = _requester.request(_url, |
1802 "POST", | 1802 "POST", |
1803 body: _body, | 1803 body: _body, |
1804 queryParams: _queryParams, | 1804 queryParams: _queryParams, |
1805 uploadOptions: _uploadOptions, | 1805 uploadOptions: _uploadOptions, |
1806 uploadMedia: _uploadMedia, | 1806 uploadMedia: _uploadMedia, |
1807 downloadOptions: _downloadOptions); | 1807 downloadOptions: _downloadOptions); |
(...skipping 7145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8953 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); | 8953 final core.Map<core.String, core.Object> _json = new core.Map<core.String, c
ore.Object>(); |
8954 if (input != null) { | 8954 if (input != null) { |
8955 _json["input"] = (input).toJson(); | 8955 _json["input"] = (input).toJson(); |
8956 } | 8956 } |
8957 if (sink != null) { | 8957 if (sink != null) { |
8958 _json["sink"] = (sink).toJson(); | 8958 _json["sink"] = (sink).toJson(); |
8959 } | 8959 } |
8960 return _json; | 8960 return _json; |
8961 } | 8961 } |
8962 } | 8962 } |
OLD | NEW |