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. |
| 284 * |
281 * [filter] - Optional A filter constraining the clusters to list. Filters are | 285 * [filter] - Optional A filter constraining the clusters to list. Filters are |
282 * case-sensitive and have the following syntax:field = value AND field = | 286 * case-sensitive and have the following syntax:field = value AND field = |
283 * value ...where field is one of status.state, clusterName, or labels.[KEY], | 287 * value ...where field is one of status.state, clusterName, or labels.[KEY], |
284 * and [KEY] is a label key. value can be * to match all values. status.state | 288 * and [KEY] is a label key. value can be * to match all values. status.state |
285 * can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, | 289 * can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, |
286 * DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING | 290 * DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING |
287 * states. INACTIVE contains the DELETING and ERROR states. clusterName is the | 291 * states. INACTIVE contains the DELETING and ERROR states. clusterName is the |
288 * name of the cluster provided at creation time. Only the logical AND | 292 * name of the cluster provided at creation time. Only the logical AND |
289 * operator is supported; space-separated items are treated as having an | 293 * operator is supported; space-separated items are treated as having an |
290 * implicit AND operator.Example filter:status.state = ACTIVE AND clusterName | 294 * implicit AND operator.Example filter:status.state = ACTIVE AND clusterName |
291 * = mycluster AND labels.env = staging AND labels.starred = * | 295 * = mycluster AND labels.env = staging AND labels.starred = * |
292 * | 296 * |
293 * [pageToken] - Optional The standard List page token. | |
294 * | |
295 * [pageSize] - Optional The standard List page size. | |
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 filter, core.String pageToken, core.int pageSize}) { | 305 async.Future<ListClustersResponse> list(core.String projectId, core.String reg
ion, {core.String pageToken, core.int pageSize, core.String filter}) { |
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 (filter != null) { | |
320 _queryParams["filter"] = [filter]; | |
321 } | |
322 if (pageToken != null) { | 319 if (pageToken != null) { |
323 _queryParams["pageToken"] = [pageToken]; | 320 _queryParams["pageToken"] = [pageToken]; |
324 } | 321 } |
325 if (pageSize != null) { | 322 if (pageSize != null) { |
326 _queryParams["pageSize"] = ["${pageSize}"]; | 323 _queryParams["pageSize"] = ["${pageSize}"]; |
327 } | 324 } |
| 325 if (filter != null) { |
| 326 _queryParams["filter"] = [filter]; |
| 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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
942 * Lists operations that match the specified filter in the request. If the | 942 * Lists operations that match the specified filter in the request. If the |
943 * server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name | 943 * server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name |
944 * binding below allows API services to override the binding to use different | 944 * binding below allows API services to override the binding to use different |
945 * resource name schemes, such as users / * /operations. | 945 * resource name schemes, such as users / * /operations. |
946 * | 946 * |
947 * Request parameters: | 947 * Request parameters: |
948 * | 948 * |
949 * [name] - The name of the operation collection. | 949 * [name] - The name of the operation collection. |
950 * Value must have pattern "^projects/[^/]+/regions/[^/]+/operations$". | 950 * Value must have pattern "^projects/[^/]+/regions/[^/]+/operations$". |
951 * | 951 * |
952 * [pageSize] - The standard list page size. | |
953 * | |
954 * [filter] - The standard list filter. | 952 * [filter] - The standard list filter. |
955 * | 953 * |
956 * [pageToken] - The standard list page token. | 954 * [pageToken] - The standard list page token. |
957 * | 955 * |
| 956 * [pageSize] - The standard list page size. |
| 957 * |
958 * Completes with a [ListOperationsResponse]. | 958 * Completes with a [ListOperationsResponse]. |
959 * | 959 * |
960 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 960 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
961 * error. | 961 * error. |
962 * | 962 * |
963 * If the used [http.Client] completes with an error when making a REST call, | 963 * If the used [http.Client] completes with an error when making a REST call, |
964 * this method will complete with the same error. | 964 * this method will complete with the same error. |
965 */ | 965 */ |
966 async.Future<ListOperationsResponse> list(core.String name, {core.int pageSize
, core.String filter, core.String pageToken}) { | 966 async.Future<ListOperationsResponse> list(core.String name, {core.String filte
r, core.String pageToken, core.int pageSize}) { |
967 var _url = null; | 967 var _url = null; |
968 var _queryParams = new core.Map(); | 968 var _queryParams = new core.Map(); |
969 var _uploadMedia = null; | 969 var _uploadMedia = null; |
970 var _uploadOptions = null; | 970 var _uploadOptions = null; |
971 var _downloadOptions = commons.DownloadOptions.Metadata; | 971 var _downloadOptions = commons.DownloadOptions.Metadata; |
972 var _body = null; | 972 var _body = null; |
973 | 973 |
974 if (name == null) { | 974 if (name == null) { |
975 throw new core.ArgumentError("Parameter name is required."); | 975 throw new core.ArgumentError("Parameter name is required."); |
976 } | 976 } |
977 if (pageSize != null) { | |
978 _queryParams["pageSize"] = ["${pageSize}"]; | |
979 } | |
980 if (filter != null) { | 977 if (filter != null) { |
981 _queryParams["filter"] = [filter]; | 978 _queryParams["filter"] = [filter]; |
982 } | 979 } |
983 if (pageToken != null) { | 980 if (pageToken != null) { |
984 _queryParams["pageToken"] = [pageToken]; | 981 _queryParams["pageToken"] = [pageToken]; |
985 } | 982 } |
| 983 if (pageSize != null) { |
| 984 _queryParams["pageSize"] = ["${pageSize}"]; |
| 985 } |
986 | 986 |
987 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); | 987 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name'); |
988 | 988 |
989 var _response = _requester.request(_url, | 989 var _response = _requester.request(_url, |
990 "GET", | 990 "GET", |
991 body: _body, | 991 body: _body, |
992 queryParams: _queryParams, | 992 queryParams: _queryParams, |
993 uploadOptions: _uploadOptions, | 993 uploadOptions: _uploadOptions, |
994 uploadMedia: _uploadMedia, | 994 uploadMedia: _uploadMedia, |
995 downloadOptions: _downloadOptions); | 995 downloadOptions: _downloadOptions); |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1435 * - "RUNNING" : The cluster is currently running and healthy. It is ready for | 1435 * - "RUNNING" : The cluster is currently running and healthy. It is ready for |
1436 * use. | 1436 * use. |
1437 * - "ERROR" : The cluster encountered an error. It is not ready for use. | 1437 * - "ERROR" : The cluster encountered an error. It is not ready for use. |
1438 * - "DELETING" : The cluster is being deleted. It cannot be used. | 1438 * - "DELETING" : The cluster is being deleted. It cannot be used. |
1439 * - "UPDATING" : The cluster is being updated. It continues to accept and | 1439 * - "UPDATING" : The cluster is being updated. It continues to accept and |
1440 * process jobs. | 1440 * process jobs. |
1441 */ | 1441 */ |
1442 core.String state; | 1442 core.String state; |
1443 /** Output-only Time when this state was entered. */ | 1443 /** Output-only Time when this state was entered. */ |
1444 core.String stateStartTime; | 1444 core.String stateStartTime; |
| 1445 /** |
| 1446 * Output-only Additional state information that includes status reported by |
| 1447 * the agent. |
| 1448 * Possible string values are: |
| 1449 * - "UNSPECIFIED" |
| 1450 * - "UNHEALTHY" : The cluster is known to be in an unhealthy state (for |
| 1451 * example, critical daemons are not running or HDFS capacity is |
| 1452 * exhausted).Applies to RUNNING state. |
| 1453 * - "STALE_STATUS" : The agent-reported status is out of date (may occur if |
| 1454 * Cloud Dataproc loses communication with Agent).Applies to RUNNING state. |
| 1455 */ |
| 1456 core.String substate; |
1445 | 1457 |
1446 ClusterStatus(); | 1458 ClusterStatus(); |
1447 | 1459 |
1448 ClusterStatus.fromJson(core.Map _json) { | 1460 ClusterStatus.fromJson(core.Map _json) { |
1449 if (_json.containsKey("detail")) { | 1461 if (_json.containsKey("detail")) { |
1450 detail = _json["detail"]; | 1462 detail = _json["detail"]; |
1451 } | 1463 } |
1452 if (_json.containsKey("state")) { | 1464 if (_json.containsKey("state")) { |
1453 state = _json["state"]; | 1465 state = _json["state"]; |
1454 } | 1466 } |
1455 if (_json.containsKey("stateStartTime")) { | 1467 if (_json.containsKey("stateStartTime")) { |
1456 stateStartTime = _json["stateStartTime"]; | 1468 stateStartTime = _json["stateStartTime"]; |
1457 } | 1469 } |
| 1470 if (_json.containsKey("substate")) { |
| 1471 substate = _json["substate"]; |
| 1472 } |
1458 } | 1473 } |
1459 | 1474 |
1460 core.Map toJson() { | 1475 core.Map toJson() { |
1461 var _json = new core.Map(); | 1476 var _json = new core.Map(); |
1462 if (detail != null) { | 1477 if (detail != null) { |
1463 _json["detail"] = detail; | 1478 _json["detail"] = detail; |
1464 } | 1479 } |
1465 if (state != null) { | 1480 if (state != null) { |
1466 _json["state"] = state; | 1481 _json["state"] = state; |
1467 } | 1482 } |
1468 if (stateStartTime != null) { | 1483 if (stateStartTime != null) { |
1469 _json["stateStartTime"] = stateStartTime; | 1484 _json["stateStartTime"] = stateStartTime; |
1470 } | 1485 } |
| 1486 if (substate != null) { |
| 1487 _json["substate"] = substate; |
| 1488 } |
1471 return _json; | 1489 return _json; |
1472 } | 1490 } |
1473 } | 1491 } |
1474 | 1492 |
1475 /** The location where output from diagnostic command can be found. */ | 1493 /** The location where output from diagnostic command can be found. */ |
1476 class DiagnoseClusterOutputLocation { | 1494 class DiagnoseClusterOutputLocation { |
1477 /** | 1495 /** |
1478 * Output-only The Google Cloud Storage URI of the diagnostic output. This | 1496 * Output-only The Google Cloud Storage URI of the diagnostic output. This |
1479 * will be a plain text file with summary of collected diagnostics. | 1497 * will be a plain text file with summary of collected diagnostics. |
1480 */ | 1498 */ |
(...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2306 * the request to cancel the running job has been issued to the cluster. | 2324 * the request to cancel the running job has been issued to the cluster. |
2307 * - "CANCELLED" : The job cancellation was successful. | 2325 * - "CANCELLED" : The job cancellation was successful. |
2308 * - "DONE" : The job has completed successfully. | 2326 * - "DONE" : The job has completed successfully. |
2309 * - "ERROR" : The job has completed, but encountered an error. | 2327 * - "ERROR" : The job has completed, but encountered an error. |
2310 * - "ATTEMPT_FAILURE" : Job attempt has failed. The detail field contains | 2328 * - "ATTEMPT_FAILURE" : Job attempt has failed. The detail field contains |
2311 * failure details for this attempt.Applies to restartable jobs only. | 2329 * failure details for this attempt.Applies to restartable jobs only. |
2312 */ | 2330 */ |
2313 core.String state; | 2331 core.String state; |
2314 /** Output-only The time when this state was entered. */ | 2332 /** Output-only The time when this state was entered. */ |
2315 core.String stateStartTime; | 2333 core.String stateStartTime; |
| 2334 /** |
| 2335 * Output-only Additional state information, which includes status reported by |
| 2336 * the agent. |
| 2337 * Possible string values are: |
| 2338 * - "UNSPECIFIED" |
| 2339 * - "SUBMITTED" : The Job is submitted to the agent.Applies to RUNNING state. |
| 2340 * - "QUEUED" : The Job has been received and is awaiting execution (it may be |
| 2341 * waiting for a condition to be met). See the "details" field for the reason |
| 2342 * for the delay.Applies to RUNNING state. |
| 2343 * - "STALE_STATUS" : The agent-reported status is out of date, which may be |
| 2344 * caused by a loss of communication between the agent and Cloud Dataproc. If |
| 2345 * the agent does not send a timely update, the job will fail.Applies to |
| 2346 * RUNNING state. |
| 2347 */ |
| 2348 core.String substate; |
2316 | 2349 |
2317 JobStatus(); | 2350 JobStatus(); |
2318 | 2351 |
2319 JobStatus.fromJson(core.Map _json) { | 2352 JobStatus.fromJson(core.Map _json) { |
2320 if (_json.containsKey("details")) { | 2353 if (_json.containsKey("details")) { |
2321 details = _json["details"]; | 2354 details = _json["details"]; |
2322 } | 2355 } |
2323 if (_json.containsKey("state")) { | 2356 if (_json.containsKey("state")) { |
2324 state = _json["state"]; | 2357 state = _json["state"]; |
2325 } | 2358 } |
2326 if (_json.containsKey("stateStartTime")) { | 2359 if (_json.containsKey("stateStartTime")) { |
2327 stateStartTime = _json["stateStartTime"]; | 2360 stateStartTime = _json["stateStartTime"]; |
2328 } | 2361 } |
| 2362 if (_json.containsKey("substate")) { |
| 2363 substate = _json["substate"]; |
| 2364 } |
2329 } | 2365 } |
2330 | 2366 |
2331 core.Map toJson() { | 2367 core.Map toJson() { |
2332 var _json = new core.Map(); | 2368 var _json = new core.Map(); |
2333 if (details != null) { | 2369 if (details != null) { |
2334 _json["details"] = details; | 2370 _json["details"] = details; |
2335 } | 2371 } |
2336 if (state != null) { | 2372 if (state != null) { |
2337 _json["state"] = state; | 2373 _json["state"] = state; |
2338 } | 2374 } |
2339 if (stateStartTime != null) { | 2375 if (stateStartTime != null) { |
2340 _json["stateStartTime"] = stateStartTime; | 2376 _json["stateStartTime"] = stateStartTime; |
2341 } | 2377 } |
| 2378 if (substate != null) { |
| 2379 _json["substate"] = substate; |
| 2380 } |
2342 return _json; | 2381 return _json; |
2343 } | 2382 } |
2344 } | 2383 } |
2345 | 2384 |
2346 /** The list of all clusters in a project. */ | 2385 /** The list of all clusters in a project. */ |
2347 class ListClustersResponse { | 2386 class ListClustersResponse { |
2348 /** Output-only The clusters in the project. */ | 2387 /** Output-only The clusters in the project. */ |
2349 core.List<Cluster> clusters; | 2388 core.List<Cluster> clusters; |
2350 /** | 2389 /** |
2351 * Output-only This token is included in the response if there are more | 2390 * Output-only This token is included in the response if there are more |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3415 } | 3454 } |
3416 if (state != null) { | 3455 if (state != null) { |
3417 _json["state"] = state; | 3456 _json["state"] = state; |
3418 } | 3457 } |
3419 if (trackingUrl != null) { | 3458 if (trackingUrl != null) { |
3420 _json["trackingUrl"] = trackingUrl; | 3459 _json["trackingUrl"] = trackingUrl; |
3421 } | 3460 } |
3422 return _json; | 3461 return _json; |
3423 } | 3462 } |
3424 } | 3463 } |
OLD | NEW |