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.dataproc.v1; | 3 library googleapis.dataproc.v1; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:async' as async; | 6 import 'dart:async' as async; |
7 import 'dart:convert' as convert; | 7 import 'dart:convert' as convert; |
8 | 8 |
9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 9 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
10 import 'package:http/http.dart' as http; | 10 import 'package:http/http.dart' as http; |
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 * Lists all regions/{region}/clusters in a project. | 271 * Lists all regions/{region}/clusters in a project. |
272 * | 272 * |
273 * Request parameters: | 273 * Request parameters: |
274 * | 274 * |
275 * [projectId] - Required. The ID of the Google Cloud Platform project that | 275 * [projectId] - Required. The ID of the Google Cloud Platform project that |
276 * the cluster belongs to. | 276 * the cluster belongs to. |
277 * | 277 * |
278 * [region] - Required. The Cloud Dataproc region in which to handle the | 278 * [region] - Required. The Cloud Dataproc region in which to handle the |
279 * request. | 279 * request. |
280 * | 280 * |
281 * [pageToken] - Optional. The standard List page token. | |
282 * | |
283 * [pageSize] - Optional. The standard List page size. | 281 * [pageSize] - Optional. The standard List page size. |
284 * | 282 * |
285 * [filter] - Optional. A filter constraining the clusters to list. Filters | 283 * [filter] - Optional. A filter constraining the clusters to list. Filters |
286 * are case-sensitive and have the following syntax:field = value AND field = | 284 * are case-sensitive and have the following syntax:field = value AND field = |
287 * value ...where field is one of status.state, clusterName, or labels.[KEY], | 285 * value ...where field is one of status.state, clusterName, or labels.[KEY], |
288 * and [KEY] is a label key. value can be * to match all values. status.state | 286 * and [KEY] is a label key. value can be * to match all values. status.state |
289 * can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, | 287 * can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, |
290 * DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING | 288 * DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING |
291 * states. INACTIVE contains the DELETING and ERROR states. clusterName is the | 289 * states. INACTIVE contains the DELETING and ERROR states. clusterName is the |
292 * name of the cluster provided at creation time. Only the logical AND | 290 * name of the cluster provided at creation time. Only the logical AND |
293 * operator is supported; space-separated items are treated as having an | 291 * operator is supported; space-separated items are treated as having an |
294 * implicit AND operator.Example filter:status.state = ACTIVE AND clusterName | 292 * implicit AND operator.Example filter:status.state = ACTIVE AND clusterName |
295 * = mycluster AND labels.env = staging AND labels.starred = * | 293 * = mycluster AND labels.env = staging AND labels.starred = * |
296 * | 294 * |
| 295 * [pageToken] - Optional. The standard List page token. |
| 296 * |
297 * Completes with a [ListClustersResponse]. | 297 * Completes with a [ListClustersResponse]. |
298 * | 298 * |
299 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 299 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
300 * error. | 300 * error. |
301 * | 301 * |
302 * If the used [http.Client] completes with an error when making a REST call, | 302 * If the used [http.Client] completes with an error when making a REST call, |
303 * this method will complete with the same error. | 303 * this method will complete with the same error. |
304 */ | 304 */ |
305 async.Future<ListClustersResponse> list(core.String projectId, core.String reg
ion, {core.String pageToken, core.int pageSize, core.String filter}) { | 305 async.Future<ListClustersResponse> list(core.String projectId, core.String reg
ion, {core.int pageSize, core.String filter, core.String pageToken}) { |
306 var _url = null; | 306 var _url = null; |
307 var _queryParams = new core.Map(); | 307 var _queryParams = new core.Map(); |
308 var _uploadMedia = null; | 308 var _uploadMedia = null; |
309 var _uploadOptions = null; | 309 var _uploadOptions = null; |
310 var _downloadOptions = commons.DownloadOptions.Metadata; | 310 var _downloadOptions = commons.DownloadOptions.Metadata; |
311 var _body = null; | 311 var _body = null; |
312 | 312 |
313 if (projectId == null) { | 313 if (projectId == null) { |
314 throw new core.ArgumentError("Parameter projectId is required."); | 314 throw new core.ArgumentError("Parameter projectId is required."); |
315 } | 315 } |
316 if (region == null) { | 316 if (region == null) { |
317 throw new core.ArgumentError("Parameter region is required."); | 317 throw new core.ArgumentError("Parameter region is required."); |
318 } | 318 } |
319 if (pageToken != null) { | |
320 _queryParams["pageToken"] = [pageToken]; | |
321 } | |
322 if (pageSize != null) { | 319 if (pageSize != null) { |
323 _queryParams["pageSize"] = ["${pageSize}"]; | 320 _queryParams["pageSize"] = ["${pageSize}"]; |
324 } | 321 } |
325 if (filter != null) { | 322 if (filter != null) { |
326 _queryParams["filter"] = [filter]; | 323 _queryParams["filter"] = [filter]; |
327 } | 324 } |
| 325 if (pageToken != null) { |
| 326 _queryParams["pageToken"] = [pageToken]; |
| 327 } |
328 | 328 |
329 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi
ons/' + commons.Escaper.ecapeVariable('$region') + '/clusters'; | 329 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi
ons/' + commons.Escaper.ecapeVariable('$region') + '/clusters'; |
330 | 330 |
331 var _response = _requester.request(_url, | 331 var _response = _requester.request(_url, |
332 "GET", | 332 "GET", |
333 body: _body, | 333 body: _body, |
334 queryParams: _queryParams, | 334 queryParams: _queryParams, |
335 uploadOptions: _uploadOptions, | 335 uploadOptions: _uploadOptions, |
336 uploadMedia: _uploadMedia, | 336 uploadMedia: _uploadMedia, |
337 downloadOptions: _downloadOptions); | 337 downloadOptions: _downloadOptions); |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 * Lists regions/{region}/jobs in a project. | 602 * Lists regions/{region}/jobs in a project. |
603 * | 603 * |
604 * Request parameters: | 604 * Request parameters: |
605 * | 605 * |
606 * [projectId] - Required. The ID of the Google Cloud Platform project that | 606 * [projectId] - Required. The ID of the Google Cloud Platform project that |
607 * the job belongs to. | 607 * the job belongs to. |
608 * | 608 * |
609 * [region] - Required. The Cloud Dataproc region in which to handle the | 609 * [region] - Required. The Cloud Dataproc region in which to handle the |
610 * request. | 610 * request. |
611 * | 611 * |
612 * [pageSize] - Optional. The number of results to return in each response. | |
613 * | |
614 * [clusterName] - Optional. If set, the returned jobs list includes only jobs | |
615 * that were submitted to the named cluster. | |
616 * | |
617 * [filter] - Optional. A filter constraining the jobs to list. Filters are | 612 * [filter] - Optional. A filter constraining the jobs to list. Filters are |
618 * case-sensitive and have the following syntax:field = value AND field = | 613 * case-sensitive and have the following syntax:field = value AND field = |
619 * value ...where field is status.state or labels.[KEY], and [KEY] is a label | 614 * value ...where field is status.state or labels.[KEY], and [KEY] is a label |
620 * key. value can be * to match all values. status.state can be either ACTIVE | 615 * key. value can be * to match all values. status.state can be either ACTIVE |
621 * or INACTIVE. Only the logical AND operator is supported; space-separated | 616 * or INACTIVE. Only the logical AND operator is supported; space-separated |
622 * items are treated as having an implicit AND operator.Example | 617 * items are treated as having an implicit AND operator.Example |
623 * filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = | 618 * filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = |
624 * * | 619 * * |
625 * | 620 * |
626 * [jobStateMatcher] - Optional. Specifies enumerated categories of jobs to | 621 * [jobStateMatcher] - Optional. Specifies enumerated categories of jobs to |
627 * list (default = match ALL jobs). | 622 * list (default = match ALL jobs). |
628 * Possible string values are: | 623 * Possible string values are: |
629 * - "ALL" : A ALL. | 624 * - "ALL" : A ALL. |
630 * - "ACTIVE" : A ACTIVE. | 625 * - "ACTIVE" : A ACTIVE. |
631 * - "NON_ACTIVE" : A NON_ACTIVE. | 626 * - "NON_ACTIVE" : A NON_ACTIVE. |
632 * | 627 * |
633 * [pageToken] - Optional. The page token, returned by a previous call, to | 628 * [pageToken] - Optional. The page token, returned by a previous call, to |
634 * request the next page of results. | 629 * request the next page of results. |
635 * | 630 * |
| 631 * [pageSize] - Optional. The number of results to return in each response. |
| 632 * |
| 633 * [clusterName] - Optional. If set, the returned jobs list includes only jobs |
| 634 * that were submitted to the named cluster. |
| 635 * |
636 * Completes with a [ListJobsResponse]. | 636 * Completes with a [ListJobsResponse]. |
637 * | 637 * |
638 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 638 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
639 * error. | 639 * error. |
640 * | 640 * |
641 * If the used [http.Client] completes with an error when making a REST call, | 641 * If the used [http.Client] completes with an error when making a REST call, |
642 * this method will complete with the same error. | 642 * this method will complete with the same error. |
643 */ | 643 */ |
644 async.Future<ListJobsResponse> list(core.String projectId, core.String region,
{core.int pageSize, core.String clusterName, core.String filter, core.String jo
bStateMatcher, core.String pageToken}) { | 644 async.Future<ListJobsResponse> list(core.String projectId, core.String region,
{core.String filter, core.String jobStateMatcher, core.String pageToken, core.i
nt pageSize, core.String clusterName}) { |
645 var _url = null; | 645 var _url = null; |
646 var _queryParams = new core.Map(); | 646 var _queryParams = new core.Map(); |
647 var _uploadMedia = null; | 647 var _uploadMedia = null; |
648 var _uploadOptions = null; | 648 var _uploadOptions = null; |
649 var _downloadOptions = commons.DownloadOptions.Metadata; | 649 var _downloadOptions = commons.DownloadOptions.Metadata; |
650 var _body = null; | 650 var _body = null; |
651 | 651 |
652 if (projectId == null) { | 652 if (projectId == null) { |
653 throw new core.ArgumentError("Parameter projectId is required."); | 653 throw new core.ArgumentError("Parameter projectId is required."); |
654 } | 654 } |
655 if (region == null) { | 655 if (region == null) { |
656 throw new core.ArgumentError("Parameter region is required."); | 656 throw new core.ArgumentError("Parameter region is required."); |
657 } | 657 } |
658 if (pageSize != null) { | |
659 _queryParams["pageSize"] = ["${pageSize}"]; | |
660 } | |
661 if (clusterName != null) { | |
662 _queryParams["clusterName"] = [clusterName]; | |
663 } | |
664 if (filter != null) { | 658 if (filter != null) { |
665 _queryParams["filter"] = [filter]; | 659 _queryParams["filter"] = [filter]; |
666 } | 660 } |
667 if (jobStateMatcher != null) { | 661 if (jobStateMatcher != null) { |
668 _queryParams["jobStateMatcher"] = [jobStateMatcher]; | 662 _queryParams["jobStateMatcher"] = [jobStateMatcher]; |
669 } | 663 } |
670 if (pageToken != null) { | 664 if (pageToken != null) { |
671 _queryParams["pageToken"] = [pageToken]; | 665 _queryParams["pageToken"] = [pageToken]; |
672 } | 666 } |
| 667 if (pageSize != null) { |
| 668 _queryParams["pageSize"] = ["${pageSize}"]; |
| 669 } |
| 670 if (clusterName != null) { |
| 671 _queryParams["clusterName"] = [clusterName]; |
| 672 } |
673 | 673 |
674 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi
ons/' + commons.Escaper.ecapeVariable('$region') + '/jobs'; | 674 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi
ons/' + commons.Escaper.ecapeVariable('$region') + '/jobs'; |
675 | 675 |
676 var _response = _requester.request(_url, | 676 var _response = _requester.request(_url, |
677 "GET", | 677 "GET", |
678 body: _body, | 678 body: _body, |
679 queryParams: _queryParams, | 679 queryParams: _queryParams, |
680 uploadOptions: _uploadOptions, | 680 uploadOptions: _uploadOptions, |
681 uploadMedia: _uploadMedia, | 681 uploadMedia: _uploadMedia, |
682 downloadOptions: _downloadOptions); | 682 downloadOptions: _downloadOptions); |
(...skipping 2596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3279 } | 3279 } |
3280 if (state != null) { | 3280 if (state != null) { |
3281 _json["state"] = state; | 3281 _json["state"] = state; |
3282 } | 3282 } |
3283 if (trackingUrl != null) { | 3283 if (trackingUrl != null) { |
3284 _json["trackingUrl"] = trackingUrl; | 3284 _json["trackingUrl"] = trackingUrl; |
3285 } | 3285 } |
3286 return _json; | 3286 return _json; |
3287 } | 3287 } |
3288 } | 3288 } |
OLD | NEW |