| 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 the | 275 * [projectId] - Required The ID of the Google Cloud Platform project that the |
| 276 * cluster belongs to. | 276 * 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 are | 283 * [filter] - Optional A filter constraining the clusters to list. Filters are |
| 286 * case-sensitive and have the following syntax:field = value AND field = | 284 * 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 * Lists regions/{region}/jobs in a project. | 598 * Lists regions/{region}/jobs in a project. |
| 599 * | 599 * |
| 600 * Request parameters: | 600 * Request parameters: |
| 601 * | 601 * |
| 602 * [projectId] - Required The ID of the Google Cloud Platform project that the | 602 * [projectId] - Required The ID of the Google Cloud Platform project that the |
| 603 * job belongs to. | 603 * job belongs to. |
| 604 * | 604 * |
| 605 * [region] - Required The Cloud Dataproc region in which to handle the | 605 * [region] - Required The Cloud Dataproc region in which to handle the |
| 606 * request. | 606 * request. |
| 607 * | 607 * |
| 608 * [pageToken] - Optional The page token, returned by a previous call, to | |
| 609 * request the next page of results. | |
| 610 * | |
| 611 * [pageSize] - Optional The number of results to return in each response. | |
| 612 * | |
| 613 * [clusterName] - Optional If set, the returned jobs list includes only jobs | |
| 614 * that were submitted to the named cluster. | |
| 615 * | |
| 616 * [filter] - Optional A filter constraining the jobs to list. Filters are | 608 * [filter] - Optional A filter constraining the jobs to list. Filters are |
| 617 * case-sensitive and have the following syntax:field = value AND field = | 609 * case-sensitive and have the following syntax:field = value AND field = |
| 618 * value ...where field is status.state or labels.[KEY], and [KEY] is a label | 610 * value ...where field is status.state or labels.[KEY], and [KEY] is a label |
| 619 * key. value can be * to match all values. status.state can be either ACTIVE | 611 * key. value can be * to match all values. status.state can be either ACTIVE |
| 620 * or INACTIVE. Only the logical AND operator is supported; space-separated | 612 * or INACTIVE. Only the logical AND operator is supported; space-separated |
| 621 * items are treated as having an implicit AND operator.Example | 613 * items are treated as having an implicit AND operator.Example |
| 622 * filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = | 614 * filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = |
| 623 * * | 615 * * |
| 624 * | 616 * |
| 625 * [jobStateMatcher] - Optional Specifies enumerated categories of jobs to | 617 * [jobStateMatcher] - Optional Specifies enumerated categories of jobs to |
| 626 * list (default = match ALL jobs). | 618 * list (default = match ALL jobs). |
| 627 * Possible string values are: | 619 * Possible string values are: |
| 628 * - "ALL" : A ALL. | 620 * - "ALL" : A ALL. |
| 629 * - "ACTIVE" : A ACTIVE. | 621 * - "ACTIVE" : A ACTIVE. |
| 630 * - "NON_ACTIVE" : A NON_ACTIVE. | 622 * - "NON_ACTIVE" : A NON_ACTIVE. |
| 631 * | 623 * |
| 624 * [pageToken] - Optional The page token, returned by a previous call, to |
| 625 * request the next page of results. |
| 626 * |
| 627 * [pageSize] - Optional The number of results to return in each response. |
| 628 * |
| 629 * [clusterName] - Optional If set, the returned jobs list includes only jobs |
| 630 * that were submitted to the named cluster. |
| 631 * |
| 632 * Completes with a [ListJobsResponse]. | 632 * Completes with a [ListJobsResponse]. |
| 633 * | 633 * |
| 634 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 634 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 635 * error. | 635 * error. |
| 636 * | 636 * |
| 637 * If the used [http.Client] completes with an error when making a REST call, | 637 * If the used [http.Client] completes with an error when making a REST call, |
| 638 * this method will complete with the same error. | 638 * this method will complete with the same error. |
| 639 */ | 639 */ |
| 640 async.Future<ListJobsResponse> list(core.String projectId, core.String region,
{core.String pageToken, core.int pageSize, core.String clusterName, core.String
filter, core.String jobStateMatcher}) { | 640 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}) { |
| 641 var _url = null; | 641 var _url = null; |
| 642 var _queryParams = new core.Map(); | 642 var _queryParams = new core.Map(); |
| 643 var _uploadMedia = null; | 643 var _uploadMedia = null; |
| 644 var _uploadOptions = null; | 644 var _uploadOptions = null; |
| 645 var _downloadOptions = commons.DownloadOptions.Metadata; | 645 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 646 var _body = null; | 646 var _body = null; |
| 647 | 647 |
| 648 if (projectId == null) { | 648 if (projectId == null) { |
| 649 throw new core.ArgumentError("Parameter projectId is required."); | 649 throw new core.ArgumentError("Parameter projectId is required."); |
| 650 } | 650 } |
| 651 if (region == null) { | 651 if (region == null) { |
| 652 throw new core.ArgumentError("Parameter region is required."); | 652 throw new core.ArgumentError("Parameter region is required."); |
| 653 } | 653 } |
| 654 if (filter != null) { |
| 655 _queryParams["filter"] = [filter]; |
| 656 } |
| 657 if (jobStateMatcher != null) { |
| 658 _queryParams["jobStateMatcher"] = [jobStateMatcher]; |
| 659 } |
| 654 if (pageToken != null) { | 660 if (pageToken != null) { |
| 655 _queryParams["pageToken"] = [pageToken]; | 661 _queryParams["pageToken"] = [pageToken]; |
| 656 } | 662 } |
| 657 if (pageSize != null) { | 663 if (pageSize != null) { |
| 658 _queryParams["pageSize"] = ["${pageSize}"]; | 664 _queryParams["pageSize"] = ["${pageSize}"]; |
| 659 } | 665 } |
| 660 if (clusterName != null) { | 666 if (clusterName != null) { |
| 661 _queryParams["clusterName"] = [clusterName]; | 667 _queryParams["clusterName"] = [clusterName]; |
| 662 } | 668 } |
| 663 if (filter != null) { | |
| 664 _queryParams["filter"] = [filter]; | |
| 665 } | |
| 666 if (jobStateMatcher != null) { | |
| 667 _queryParams["jobStateMatcher"] = [jobStateMatcher]; | |
| 668 } | |
| 669 | 669 |
| 670 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi
ons/' + commons.Escaper.ecapeVariable('$region') + '/jobs'; | 670 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi
ons/' + commons.Escaper.ecapeVariable('$region') + '/jobs'; |
| 671 | 671 |
| 672 var _response = _requester.request(_url, | 672 var _response = _requester.request(_url, |
| 673 "GET", | 673 "GET", |
| 674 body: _body, | 674 body: _body, |
| 675 queryParams: _queryParams, | 675 queryParams: _queryParams, |
| 676 uploadOptions: _uploadOptions, | 676 uploadOptions: _uploadOptions, |
| 677 uploadMedia: _uploadMedia, | 677 uploadMedia: _uploadMedia, |
| 678 downloadOptions: _downloadOptions); | 678 downloadOptions: _downloadOptions); |
| (...skipping 2775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3454 } | 3454 } |
| 3455 if (state != null) { | 3455 if (state != null) { |
| 3456 _json["state"] = state; | 3456 _json["state"] = state; |
| 3457 } | 3457 } |
| 3458 if (trackingUrl != null) { | 3458 if (trackingUrl != null) { |
| 3459 _json["trackingUrl"] = trackingUrl; | 3459 _json["trackingUrl"] = trackingUrl; |
| 3460 } | 3460 } |
| 3461 return _json; | 3461 return _json; |
| 3462 } | 3462 } |
| 3463 } | 3463 } |
| OLD | NEW |