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.dataproc.v1beta1; | 3 library googleapis_beta.dataproc.v1beta1; |
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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 } | 436 } |
437 | 437 |
438 /** | 438 /** |
439 * Lists all clusters in a project. | 439 * Lists all clusters in a project. |
440 * | 440 * |
441 * Request parameters: | 441 * Request parameters: |
442 * | 442 * |
443 * [projectId] - Required The ID of the Google Cloud Platform project that the | 443 * [projectId] - Required The ID of the Google Cloud Platform project that the |
444 * cluster belongs to. | 444 * cluster belongs to. |
445 * | 445 * |
| 446 * [pageToken] - The standard List page token. |
| 447 * |
| 448 * [pageSize] - The standard List page size. |
| 449 * |
446 * [filter] - Optional A filter constraining which clusters to list. Valid | 450 * [filter] - Optional A filter constraining which clusters to list. Valid |
447 * filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = | 451 * filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = |
448 * val2 OR labels.k3 = val3) | 452 * val2 OR labels.k3 = val3) |
449 * | 453 * |
450 * [pageToken] - The standard List page token. | |
451 * | |
452 * [pageSize] - The standard List page size. | |
453 * | |
454 * Completes with a [ListClustersResponse]. | 454 * Completes with a [ListClustersResponse]. |
455 * | 455 * |
456 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 456 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
457 * error. | 457 * error. |
458 * | 458 * |
459 * If the used [http.Client] completes with an error when making a REST call, | 459 * If the used [http.Client] completes with an error when making a REST call, |
460 * this method will complete with the same error. | 460 * this method will complete with the same error. |
461 */ | 461 */ |
462 async.Future<ListClustersResponse> list(core.String projectId, {core.String fi
lter, core.String pageToken, core.int pageSize}) { | 462 async.Future<ListClustersResponse> list(core.String projectId, {core.String pa
geToken, core.int pageSize, core.String filter}) { |
463 var _url = null; | 463 var _url = null; |
464 var _queryParams = new core.Map(); | 464 var _queryParams = new core.Map(); |
465 var _uploadMedia = null; | 465 var _uploadMedia = null; |
466 var _uploadOptions = null; | 466 var _uploadOptions = null; |
467 var _downloadOptions = commons.DownloadOptions.Metadata; | 467 var _downloadOptions = commons.DownloadOptions.Metadata; |
468 var _body = null; | 468 var _body = null; |
469 | 469 |
470 if (projectId == null) { | 470 if (projectId == null) { |
471 throw new core.ArgumentError("Parameter projectId is required."); | 471 throw new core.ArgumentError("Parameter projectId is required."); |
472 } | 472 } |
473 if (filter != null) { | |
474 _queryParams["filter"] = [filter]; | |
475 } | |
476 if (pageToken != null) { | 473 if (pageToken != null) { |
477 _queryParams["pageToken"] = [pageToken]; | 474 _queryParams["pageToken"] = [pageToken]; |
478 } | 475 } |
479 if (pageSize != null) { | 476 if (pageSize != null) { |
480 _queryParams["pageSize"] = ["${pageSize}"]; | 477 _queryParams["pageSize"] = ["${pageSize}"]; |
481 } | 478 } |
| 479 if (filter != null) { |
| 480 _queryParams["filter"] = [filter]; |
| 481 } |
482 | 482 |
483 _url = 'v1beta1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '
/clusters'; | 483 _url = 'v1beta1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '
/clusters'; |
484 | 484 |
485 var _response = _requester.request(_url, | 485 var _response = _requester.request(_url, |
486 "GET", | 486 "GET", |
487 body: _body, | 487 body: _body, |
488 queryParams: _queryParams, | 488 queryParams: _queryParams, |
489 uploadOptions: _uploadOptions, | 489 uploadOptions: _uploadOptions, |
490 uploadMedia: _uploadMedia, | 490 uploadMedia: _uploadMedia, |
491 downloadOptions: _downloadOptions); | 491 downloadOptions: _downloadOptions); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 } | 726 } |
727 | 727 |
728 /** | 728 /** |
729 * Lists jobs in a project. | 729 * Lists jobs in a project. |
730 * | 730 * |
731 * Request parameters: | 731 * Request parameters: |
732 * | 732 * |
733 * [projectId] - Required The ID of the Google Cloud Platform project that the | 733 * [projectId] - Required The ID of the Google Cloud Platform project that the |
734 * job belongs to. | 734 * job belongs to. |
735 * | 735 * |
| 736 * [pageToken] - Optional The page token, returned by a previous call, to |
| 737 * request the next page of results. |
| 738 * |
| 739 * [pageSize] - Optional The number of results to return in each response. |
| 740 * |
| 741 * [clusterName] - Optional If set, the returned jobs list includes only jobs |
| 742 * that were submitted to the named cluster. |
| 743 * |
736 * [filter] - Optional A filter constraining which jobs to list. Valid filters | 744 * [filter] - Optional A filter constraining which jobs to list. Valid filters |
737 * contain job state and label terms such as: labels.key1 = val1 AND | 745 * contain job state and label terms such as: labels.key1 = val1 AND |
738 * (labels.k2 = val2 OR labels.k3 = val3) | 746 * (labels.k2 = val2 OR labels.k3 = val3) |
739 * | 747 * |
740 * [jobStateMatcher] - Optional Specifies enumerated categories of jobs to | 748 * [jobStateMatcher] - Optional Specifies enumerated categories of jobs to |
741 * list. | 749 * list. |
742 * Possible string values are: | 750 * Possible string values are: |
743 * - "ALL" : A ALL. | 751 * - "ALL" : A ALL. |
744 * - "ACTIVE" : A ACTIVE. | 752 * - "ACTIVE" : A ACTIVE. |
745 * - "NON_ACTIVE" : A NON_ACTIVE. | 753 * - "NON_ACTIVE" : A NON_ACTIVE. |
746 * | 754 * |
747 * [pageToken] - Optional The page token, returned by a previous call, to | |
748 * request the next page of results. | |
749 * | |
750 * [pageSize] - Optional The number of results to return in each response. | |
751 * | |
752 * [clusterName] - Optional If set, the returned jobs list includes only jobs | |
753 * that were submitted to the named cluster. | |
754 * | |
755 * Completes with a [ListJobsResponse]. | 755 * Completes with a [ListJobsResponse]. |
756 * | 756 * |
757 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 757 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
758 * error. | 758 * error. |
759 * | 759 * |
760 * If the used [http.Client] completes with an error when making a REST call, | 760 * If the used [http.Client] completes with an error when making a REST call, |
761 * this method will complete with the same error. | 761 * this method will complete with the same error. |
762 */ | 762 */ |
763 async.Future<ListJobsResponse> list(core.String projectId, {core.String filter
, core.String jobStateMatcher, core.String pageToken, core.int pageSize, core.St
ring clusterName}) { | 763 async.Future<ListJobsResponse> list(core.String projectId, {core.String pageTo
ken, core.int pageSize, core.String clusterName, core.String filter, core.String
jobStateMatcher}) { |
764 var _url = null; | 764 var _url = null; |
765 var _queryParams = new core.Map(); | 765 var _queryParams = new core.Map(); |
766 var _uploadMedia = null; | 766 var _uploadMedia = null; |
767 var _uploadOptions = null; | 767 var _uploadOptions = null; |
768 var _downloadOptions = commons.DownloadOptions.Metadata; | 768 var _downloadOptions = commons.DownloadOptions.Metadata; |
769 var _body = null; | 769 var _body = null; |
770 | 770 |
771 if (projectId == null) { | 771 if (projectId == null) { |
772 throw new core.ArgumentError("Parameter projectId is required."); | 772 throw new core.ArgumentError("Parameter projectId is required."); |
773 } | 773 } |
774 if (filter != null) { | |
775 _queryParams["filter"] = [filter]; | |
776 } | |
777 if (jobStateMatcher != null) { | |
778 _queryParams["jobStateMatcher"] = [jobStateMatcher]; | |
779 } | |
780 if (pageToken != null) { | 774 if (pageToken != null) { |
781 _queryParams["pageToken"] = [pageToken]; | 775 _queryParams["pageToken"] = [pageToken]; |
782 } | 776 } |
783 if (pageSize != null) { | 777 if (pageSize != null) { |
784 _queryParams["pageSize"] = ["${pageSize}"]; | 778 _queryParams["pageSize"] = ["${pageSize}"]; |
785 } | 779 } |
786 if (clusterName != null) { | 780 if (clusterName != null) { |
787 _queryParams["clusterName"] = [clusterName]; | 781 _queryParams["clusterName"] = [clusterName]; |
788 } | 782 } |
| 783 if (filter != null) { |
| 784 _queryParams["filter"] = [filter]; |
| 785 } |
| 786 if (jobStateMatcher != null) { |
| 787 _queryParams["jobStateMatcher"] = [jobStateMatcher]; |
| 788 } |
789 | 789 |
790 _url = 'v1beta1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '
/jobs'; | 790 _url = 'v1beta1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '
/jobs'; |
791 | 791 |
792 var _response = _requester.request(_url, | 792 var _response = _requester.request(_url, |
793 "GET", | 793 "GET", |
794 body: _body, | 794 body: _body, |
795 queryParams: _queryParams, | 795 queryParams: _queryParams, |
796 uploadOptions: _uploadOptions, | 796 uploadOptions: _uploadOptions, |
797 uploadMedia: _uploadMedia, | 797 uploadMedia: _uploadMedia, |
798 downloadOptions: _downloadOptions); | 798 downloadOptions: _downloadOptions); |
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1348 * - "RUNNING" : The cluster is currently running and healthy. It is ready for | 1348 * - "RUNNING" : The cluster is currently running and healthy. It is ready for |
1349 * use. | 1349 * use. |
1350 * - "ERROR" : The cluster encountered an error. It is not ready for use. | 1350 * - "ERROR" : The cluster encountered an error. It is not ready for use. |
1351 * - "DELETING" : The cluster is being deleted. It cannot be used. | 1351 * - "DELETING" : The cluster is being deleted. It cannot be used. |
1352 * - "UPDATING" : The cluster is being updated. It continues to accept and | 1352 * - "UPDATING" : The cluster is being updated. It continues to accept and |
1353 * process jobs. | 1353 * process jobs. |
1354 */ | 1354 */ |
1355 core.String state; | 1355 core.String state; |
1356 /** Time when this state was entered. */ | 1356 /** Time when this state was entered. */ |
1357 core.String stateStartTime; | 1357 core.String stateStartTime; |
| 1358 /** |
| 1359 * Output-only Additional state information that includes status reported by |
| 1360 * the agent. |
| 1361 * Possible string values are: |
| 1362 * - "UNSPECIFIED" |
| 1363 * - "UNHEALTHY" : The cluster is known to be in an unhealthy state (for |
| 1364 * example, critical daemons are not running or HDFS capacity is |
| 1365 * exhausted).Applies to RUNNING state. |
| 1366 * - "STALE_STATUS" : The agent-reported status is out of date (may occur if |
| 1367 * Cloud Dataproc loses communication with Agent).Applies to RUNNING state. |
| 1368 */ |
| 1369 core.String substate; |
1358 | 1370 |
1359 ClusterStatus(); | 1371 ClusterStatus(); |
1360 | 1372 |
1361 ClusterStatus.fromJson(core.Map _json) { | 1373 ClusterStatus.fromJson(core.Map _json) { |
1362 if (_json.containsKey("detail")) { | 1374 if (_json.containsKey("detail")) { |
1363 detail = _json["detail"]; | 1375 detail = _json["detail"]; |
1364 } | 1376 } |
1365 if (_json.containsKey("state")) { | 1377 if (_json.containsKey("state")) { |
1366 state = _json["state"]; | 1378 state = _json["state"]; |
1367 } | 1379 } |
1368 if (_json.containsKey("stateStartTime")) { | 1380 if (_json.containsKey("stateStartTime")) { |
1369 stateStartTime = _json["stateStartTime"]; | 1381 stateStartTime = _json["stateStartTime"]; |
1370 } | 1382 } |
| 1383 if (_json.containsKey("substate")) { |
| 1384 substate = _json["substate"]; |
| 1385 } |
1371 } | 1386 } |
1372 | 1387 |
1373 core.Map toJson() { | 1388 core.Map toJson() { |
1374 var _json = new core.Map(); | 1389 var _json = new core.Map(); |
1375 if (detail != null) { | 1390 if (detail != null) { |
1376 _json["detail"] = detail; | 1391 _json["detail"] = detail; |
1377 } | 1392 } |
1378 if (state != null) { | 1393 if (state != null) { |
1379 _json["state"] = state; | 1394 _json["state"] = state; |
1380 } | 1395 } |
1381 if (stateStartTime != null) { | 1396 if (stateStartTime != null) { |
1382 _json["stateStartTime"] = stateStartTime; | 1397 _json["stateStartTime"] = stateStartTime; |
1383 } | 1398 } |
| 1399 if (substate != null) { |
| 1400 _json["substate"] = substate; |
| 1401 } |
1384 return _json; | 1402 return _json; |
1385 } | 1403 } |
1386 } | 1404 } |
1387 | 1405 |
1388 /** The location of diagnostic output. */ | 1406 /** The location of diagnostic output. */ |
1389 class DiagnoseClusterOutputLocation { | 1407 class DiagnoseClusterOutputLocation { |
1390 /** | 1408 /** |
1391 * Output-only The Google Cloud Storage URI of the diagnostic output. This is | 1409 * Output-only The Google Cloud Storage URI of the diagnostic output. This is |
1392 * a plain text file with a summary of collected diagnostics. | 1410 * a plain text file with a summary of collected diagnostics. |
1393 */ | 1411 */ |
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2231 * the request to cancel the running job has been issued to the cluster. | 2249 * the request to cancel the running job has been issued to the cluster. |
2232 * - "CANCELLED" : The job cancelation was successful. | 2250 * - "CANCELLED" : The job cancelation was successful. |
2233 * - "DONE" : The job has completed successfully. | 2251 * - "DONE" : The job has completed successfully. |
2234 * - "ERROR" : The job has completed, but encountered an error. | 2252 * - "ERROR" : The job has completed, but encountered an error. |
2235 * - "ATTEMPT_FAILURE" : Job attempt has failed. The detail field contains | 2253 * - "ATTEMPT_FAILURE" : Job attempt has failed. The detail field contains |
2236 * failure details for this attempt.Applies to restartable jobs only. | 2254 * failure details for this attempt.Applies to restartable jobs only. |
2237 */ | 2255 */ |
2238 core.String state; | 2256 core.String state; |
2239 /** Output-only The time when this state was entered. */ | 2257 /** Output-only The time when this state was entered. */ |
2240 core.String stateStartTime; | 2258 core.String stateStartTime; |
| 2259 /** |
| 2260 * Output-only Additional state information, which includes status reported by |
| 2261 * the agent. |
| 2262 * Possible string values are: |
| 2263 * - "UNSPECIFIED" |
| 2264 * - "SUBMITTED" : The Job is submitted to the agent.Applies to RUNNING state. |
| 2265 * - "QUEUED" : The Job has been received and is awaiting execution (it may be |
| 2266 * waiting for a condition to be met). See the "details" field for the reason |
| 2267 * for the delay.Applies to RUNNING state. |
| 2268 * - "STALE_STATUS" : The agent-reported status is out of date, which may be |
| 2269 * caused by a loss of communication between the agent and Cloud Dataproc. If |
| 2270 * the agent does not send a timely update, the job will fail.Applies to |
| 2271 * RUNNING state. |
| 2272 */ |
| 2273 core.String substate; |
2241 | 2274 |
2242 JobStatus(); | 2275 JobStatus(); |
2243 | 2276 |
2244 JobStatus.fromJson(core.Map _json) { | 2277 JobStatus.fromJson(core.Map _json) { |
2245 if (_json.containsKey("details")) { | 2278 if (_json.containsKey("details")) { |
2246 details = _json["details"]; | 2279 details = _json["details"]; |
2247 } | 2280 } |
2248 if (_json.containsKey("state")) { | 2281 if (_json.containsKey("state")) { |
2249 state = _json["state"]; | 2282 state = _json["state"]; |
2250 } | 2283 } |
2251 if (_json.containsKey("stateStartTime")) { | 2284 if (_json.containsKey("stateStartTime")) { |
2252 stateStartTime = _json["stateStartTime"]; | 2285 stateStartTime = _json["stateStartTime"]; |
2253 } | 2286 } |
| 2287 if (_json.containsKey("substate")) { |
| 2288 substate = _json["substate"]; |
| 2289 } |
2254 } | 2290 } |
2255 | 2291 |
2256 core.Map toJson() { | 2292 core.Map toJson() { |
2257 var _json = new core.Map(); | 2293 var _json = new core.Map(); |
2258 if (details != null) { | 2294 if (details != null) { |
2259 _json["details"] = details; | 2295 _json["details"] = details; |
2260 } | 2296 } |
2261 if (state != null) { | 2297 if (state != null) { |
2262 _json["state"] = state; | 2298 _json["state"] = state; |
2263 } | 2299 } |
2264 if (stateStartTime != null) { | 2300 if (stateStartTime != null) { |
2265 _json["stateStartTime"] = stateStartTime; | 2301 _json["stateStartTime"] = stateStartTime; |
2266 } | 2302 } |
| 2303 if (substate != null) { |
| 2304 _json["substate"] = substate; |
| 2305 } |
2267 return _json; | 2306 return _json; |
2268 } | 2307 } |
2269 } | 2308 } |
2270 | 2309 |
2271 /** The list of all clusters in a project. */ | 2310 /** The list of all clusters in a project. */ |
2272 class ListClustersResponse { | 2311 class ListClustersResponse { |
2273 /** Output-only The clusters in the project. */ | 2312 /** Output-only The clusters in the project. */ |
2274 core.List<Cluster> clusters; | 2313 core.List<Cluster> clusters; |
2275 /** The standard List next-page token. */ | 2314 /** The standard List next-page token. */ |
2276 core.String nextPageToken; | 2315 core.String nextPageToken; |
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3266 } | 3305 } |
3267 if (state != null) { | 3306 if (state != null) { |
3268 _json["state"] = state; | 3307 _json["state"] = state; |
3269 } | 3308 } |
3270 if (trackingUrl != null) { | 3309 if (trackingUrl != null) { |
3271 _json["trackingUrl"] = trackingUrl; | 3310 _json["trackingUrl"] = trackingUrl; |
3272 } | 3311 } |
3273 return _json; | 3312 return _json; |
3274 } | 3313 } |
3275 } | 3314 } |
OLD | NEW |