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; |
11 | 11 |
12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 12 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
13 ApiRequestError, DetailedApiRequestError; | 13 ApiRequestError, DetailedApiRequestError; |
14 | 14 |
15 const core.String USER_AGENT = 'dart-api-client dataproc/v1beta1'; | 15 const core.String USER_AGENT = 'dart-api-client dataproc/v1beta1'; |
16 | 16 |
17 /** Manages Hadoop-based clusters and jobs on Google Cloud Platform. */ | 17 /** |
| 18 * An API for managing Hadoop-based clusters and jobs on Google Cloud Platform. |
| 19 */ |
18 class DataprocApi { | 20 class DataprocApi { |
19 /** View and manage your data across Google Cloud Platform services */ | 21 /** View and manage your data across Google Cloud Platform services */ |
20 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; | 22 static const CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platf
orm"; |
21 | 23 |
22 | 24 |
23 final commons.ApiRequester _requester; | 25 final commons.ApiRequester _requester; |
24 | 26 |
25 OperationsResourceApi get operations => new OperationsResourceApi(_requester); | 27 OperationsResourceApi get operations => new OperationsResourceApi(_requester); |
26 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); | 28 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester); |
27 | 29 |
(...skipping 15 matching lines...) Expand all Loading... |
43 * `google.rpc.Code.UNIMPLEMENTED`. Clients can use | 45 * `google.rpc.Code.UNIMPLEMENTED`. Clients can use |
44 * [operations.get](/dataproc/reference/rest/v1beta1/operations/get) or other | 46 * [operations.get](/dataproc/reference/rest/v1beta1/operations/get) or other |
45 * methods to check whether the cancellation succeeded or whether the | 47 * methods to check whether the cancellation succeeded or whether the |
46 * operation completed despite cancellation. | 48 * operation completed despite cancellation. |
47 * | 49 * |
48 * [request] - The metadata request object. | 50 * [request] - The metadata request object. |
49 * | 51 * |
50 * Request parameters: | 52 * Request parameters: |
51 * | 53 * |
52 * [name] - The name of the operation resource to be cancelled. | 54 * [name] - The name of the operation resource to be cancelled. |
53 * Value must have pattern "^operations/.*$". | 55 * Value must have pattern "^operations/.+$". |
54 * | 56 * |
55 * Completes with a [Empty]. | 57 * Completes with a [Empty]. |
56 * | 58 * |
57 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 59 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
58 * error. | 60 * error. |
59 * | 61 * |
60 * If the used [http.Client] completes with an error when making a REST call, | 62 * If the used [http.Client] completes with an error when making a REST call, |
61 * this method will complete with the same error. | 63 * this method will complete with the same error. |
62 */ | 64 */ |
63 async.Future<Empty> cancel(CancelOperationRequest request, core.String name) { | 65 async.Future<Empty> cancel(CancelOperationRequest request, core.String name) { |
(...skipping 25 matching lines...) Expand all Loading... |
89 | 91 |
90 /** | 92 /** |
91 * Deletes a long-running operation. This method indicates that the client is | 93 * Deletes a long-running operation. This method indicates that the client is |
92 * no longer interested in the operation result. It does not cancel the | 94 * no longer interested in the operation result. It does not cancel the |
93 * operation. If the server doesn't support this method, it returns | 95 * operation. If the server doesn't support this method, it returns |
94 * `google.rpc.Code.UNIMPLEMENTED`. | 96 * `google.rpc.Code.UNIMPLEMENTED`. |
95 * | 97 * |
96 * Request parameters: | 98 * Request parameters: |
97 * | 99 * |
98 * [name] - The name of the operation resource to be deleted. | 100 * [name] - The name of the operation resource to be deleted. |
99 * Value must have pattern "^operations/.*$". | 101 * Value must have pattern "^operations/.+$". |
100 * | 102 * |
101 * Completes with a [Empty]. | 103 * Completes with a [Empty]. |
102 * | 104 * |
103 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 105 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
104 * error. | 106 * error. |
105 * | 107 * |
106 * If the used [http.Client] completes with an error when making a REST call, | 108 * If the used [http.Client] completes with an error when making a REST call, |
107 * this method will complete with the same error. | 109 * this method will complete with the same error. |
108 */ | 110 */ |
109 async.Future<Empty> delete(core.String name) { | 111 async.Future<Empty> delete(core.String name) { |
(...skipping 21 matching lines...) Expand all Loading... |
131 } | 133 } |
132 | 134 |
133 /** | 135 /** |
134 * Gets the latest state of a long-running operation. Clients can use this | 136 * Gets the latest state of a long-running operation. Clients can use this |
135 * method to poll the operation result at intervals as recommended by the API | 137 * method to poll the operation result at intervals as recommended by the API |
136 * service. | 138 * service. |
137 * | 139 * |
138 * Request parameters: | 140 * Request parameters: |
139 * | 141 * |
140 * [name] - The name of the operation resource. | 142 * [name] - The name of the operation resource. |
141 * Value must have pattern "^operations/.*$". | 143 * Value must have pattern "^operations/.+$". |
142 * | 144 * |
143 * Completes with a [Operation]. | 145 * Completes with a [Operation]. |
144 * | 146 * |
145 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 147 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
146 * error. | 148 * error. |
147 * | 149 * |
148 * If the used [http.Client] completes with an error when making a REST call, | 150 * If the used [http.Client] completes with an error when making a REST call, |
149 * this method will complete with the same error. | 151 * this method will complete with the same error. |
150 */ | 152 */ |
151 async.Future<Operation> get(core.String name) { | 153 async.Future<Operation> get(core.String name) { |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 } | 439 } |
438 | 440 |
439 /** | 441 /** |
440 * Lists all clusters in a project. | 442 * Lists all clusters in a project. |
441 * | 443 * |
442 * Request parameters: | 444 * Request parameters: |
443 * | 445 * |
444 * [projectId] - [Required] The ID of the Google Cloud Platform project that | 446 * [projectId] - [Required] The ID of the Google Cloud Platform project that |
445 * the cluster belongs to. | 447 * the cluster belongs to. |
446 * | 448 * |
| 449 * [filter] - [Optional] A filter constraining which clusters to list. Valid |
| 450 * filters contain label terms such as: labels.key1 = val1 AND (-labels.k2 = |
| 451 * val2 OR labels.k3 = val3) |
| 452 * |
447 * [pageSize] - The standard List page size. | 453 * [pageSize] - The standard List page size. |
448 * | 454 * |
449 * [pageToken] - The standard List page token. | 455 * [pageToken] - The standard List page token. |
450 * | 456 * |
451 * Completes with a [ListClustersResponse]. | 457 * Completes with a [ListClustersResponse]. |
452 * | 458 * |
453 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 459 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
454 * error. | 460 * error. |
455 * | 461 * |
456 * If the used [http.Client] completes with an error when making a REST call, | 462 * If the used [http.Client] completes with an error when making a REST call, |
457 * this method will complete with the same error. | 463 * this method will complete with the same error. |
458 */ | 464 */ |
459 async.Future<ListClustersResponse> list(core.String projectId, {core.int pageS
ize, core.String pageToken}) { | 465 async.Future<ListClustersResponse> list(core.String projectId, {core.String fi
lter, core.int pageSize, core.String pageToken}) { |
460 var _url = null; | 466 var _url = null; |
461 var _queryParams = new core.Map(); | 467 var _queryParams = new core.Map(); |
462 var _uploadMedia = null; | 468 var _uploadMedia = null; |
463 var _uploadOptions = null; | 469 var _uploadOptions = null; |
464 var _downloadOptions = commons.DownloadOptions.Metadata; | 470 var _downloadOptions = commons.DownloadOptions.Metadata; |
465 var _body = null; | 471 var _body = null; |
466 | 472 |
467 if (projectId == null) { | 473 if (projectId == null) { |
468 throw new core.ArgumentError("Parameter projectId is required."); | 474 throw new core.ArgumentError("Parameter projectId is required."); |
469 } | 475 } |
| 476 if (filter != null) { |
| 477 _queryParams["filter"] = [filter]; |
| 478 } |
470 if (pageSize != null) { | 479 if (pageSize != null) { |
471 _queryParams["pageSize"] = ["${pageSize}"]; | 480 _queryParams["pageSize"] = ["${pageSize}"]; |
472 } | 481 } |
473 if (pageToken != null) { | 482 if (pageToken != null) { |
474 _queryParams["pageToken"] = [pageToken]; | 483 _queryParams["pageToken"] = [pageToken]; |
475 } | 484 } |
476 | 485 |
477 _url = 'v1beta1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '
/clusters'; | 486 _url = 'v1beta1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '
/clusters'; |
478 | 487 |
479 var _response = _requester.request(_url, | 488 var _response = _requester.request(_url, |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
722 * [clusterName] - [Optional] If set, the returned jobs list includes only | 731 * [clusterName] - [Optional] If set, the returned jobs list includes only |
723 * jobs that were submitted to the named cluster. | 732 * jobs that were submitted to the named cluster. |
724 * | 733 * |
725 * [jobStateMatcher] - [Optional] Specifies enumerated categories of jobs to | 734 * [jobStateMatcher] - [Optional] Specifies enumerated categories of jobs to |
726 * list. | 735 * list. |
727 * Possible string values are: | 736 * Possible string values are: |
728 * - "ALL" : A ALL. | 737 * - "ALL" : A ALL. |
729 * - "ACTIVE" : A ACTIVE. | 738 * - "ACTIVE" : A ACTIVE. |
730 * - "NON_ACTIVE" : A NON_ACTIVE. | 739 * - "NON_ACTIVE" : A NON_ACTIVE. |
731 * | 740 * |
| 741 * [filter] - [Optional] A filter constraining which jobs to list. Valid |
| 742 * filters contain job state and label terms such as: labels.key1 = val1 AND |
| 743 * (labels.k2 = val2 OR labels.k3 = val3) |
| 744 * |
732 * Completes with a [ListJobsResponse]. | 745 * Completes with a [ListJobsResponse]. |
733 * | 746 * |
734 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 747 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
735 * error. | 748 * error. |
736 * | 749 * |
737 * If the used [http.Client] completes with an error when making a REST call, | 750 * If the used [http.Client] completes with an error when making a REST call, |
738 * this method will complete with the same error. | 751 * this method will complete with the same error. |
739 */ | 752 */ |
740 async.Future<ListJobsResponse> list(core.String projectId, {core.int pageSize,
core.String pageToken, core.String clusterName, core.String jobStateMatcher}) { | 753 async.Future<ListJobsResponse> list(core.String projectId, {core.int pageSize,
core.String pageToken, core.String clusterName, core.String jobStateMatcher, co
re.String filter}) { |
741 var _url = null; | 754 var _url = null; |
742 var _queryParams = new core.Map(); | 755 var _queryParams = new core.Map(); |
743 var _uploadMedia = null; | 756 var _uploadMedia = null; |
744 var _uploadOptions = null; | 757 var _uploadOptions = null; |
745 var _downloadOptions = commons.DownloadOptions.Metadata; | 758 var _downloadOptions = commons.DownloadOptions.Metadata; |
746 var _body = null; | 759 var _body = null; |
747 | 760 |
748 if (projectId == null) { | 761 if (projectId == null) { |
749 throw new core.ArgumentError("Parameter projectId is required."); | 762 throw new core.ArgumentError("Parameter projectId is required."); |
750 } | 763 } |
751 if (pageSize != null) { | 764 if (pageSize != null) { |
752 _queryParams["pageSize"] = ["${pageSize}"]; | 765 _queryParams["pageSize"] = ["${pageSize}"]; |
753 } | 766 } |
754 if (pageToken != null) { | 767 if (pageToken != null) { |
755 _queryParams["pageToken"] = [pageToken]; | 768 _queryParams["pageToken"] = [pageToken]; |
756 } | 769 } |
757 if (clusterName != null) { | 770 if (clusterName != null) { |
758 _queryParams["clusterName"] = [clusterName]; | 771 _queryParams["clusterName"] = [clusterName]; |
759 } | 772 } |
760 if (jobStateMatcher != null) { | 773 if (jobStateMatcher != null) { |
761 _queryParams["jobStateMatcher"] = [jobStateMatcher]; | 774 _queryParams["jobStateMatcher"] = [jobStateMatcher]; |
762 } | 775 } |
| 776 if (filter != null) { |
| 777 _queryParams["filter"] = [filter]; |
| 778 } |
763 | 779 |
764 _url = 'v1beta1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '
/jobs'; | 780 _url = 'v1beta1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '
/jobs'; |
765 | 781 |
766 var _response = _requester.request(_url, | 782 var _response = _requester.request(_url, |
767 "GET", | 783 "GET", |
768 body: _body, | 784 body: _body, |
769 queryParams: _queryParams, | 785 queryParams: _queryParams, |
770 uploadOptions: _uploadOptions, | 786 uploadOptions: _uploadOptions, |
771 uploadMedia: _uploadMedia, | 787 uploadMedia: _uploadMedia, |
772 downloadOptions: _downloadOptions); | 788 downloadOptions: _downloadOptions); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 * [Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc | 880 * [Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc |
865 * generates this value when it creates the cluster. | 881 * generates this value when it creates the cluster. |
866 */ | 882 */ |
867 core.String clusterUuid; | 883 core.String clusterUuid; |
868 /** | 884 /** |
869 * [Required] The cluster configuration. Note that Cloud Dataproc may set | 885 * [Required] The cluster configuration. Note that Cloud Dataproc may set |
870 * default values, and values may change when clusters are updated. | 886 * default values, and values may change when clusters are updated. |
871 */ | 887 */ |
872 ClusterConfiguration configuration; | 888 ClusterConfiguration configuration; |
873 /** | 889 /** |
| 890 * [Optional] The labels to associate with this cluster. Label keys must be |
| 891 * between 1 and 63 characters long, and must conform to the following PCRE |
| 892 * regular expression: \p{Ll}\p{Lo}{0,62} Label values must be between 1 and |
| 893 * 63 characters long, and must conform to the following PCRE regular |
| 894 * expression: [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be |
| 895 * associated with a given cluster. |
| 896 */ |
| 897 core.Map<core.String, core.String> labels; |
| 898 /** Contains cluster daemon metrics such as HDFS and YARN stats. */ |
| 899 ClusterMetrics metrics; |
| 900 /** |
874 * [Required] The Google Cloud Platform project ID that the cluster belongs | 901 * [Required] The Google Cloud Platform project ID that the cluster belongs |
875 * to. | 902 * to. |
876 */ | 903 */ |
877 core.String projectId; | 904 core.String projectId; |
878 /** [Output-only] Cluster status. */ | 905 /** [Output-only] Cluster status. */ |
879 ClusterStatus status; | 906 ClusterStatus status; |
880 /** [Output-only] Previous cluster statuses. */ | 907 /** [Output-only] Previous cluster statuses. */ |
881 core.List<ClusterStatus> statusHistory; | 908 core.List<ClusterStatus> statusHistory; |
882 | 909 |
883 Cluster(); | 910 Cluster(); |
884 | 911 |
885 Cluster.fromJson(core.Map _json) { | 912 Cluster.fromJson(core.Map _json) { |
886 if (_json.containsKey("clusterName")) { | 913 if (_json.containsKey("clusterName")) { |
887 clusterName = _json["clusterName"]; | 914 clusterName = _json["clusterName"]; |
888 } | 915 } |
889 if (_json.containsKey("clusterUuid")) { | 916 if (_json.containsKey("clusterUuid")) { |
890 clusterUuid = _json["clusterUuid"]; | 917 clusterUuid = _json["clusterUuid"]; |
891 } | 918 } |
892 if (_json.containsKey("configuration")) { | 919 if (_json.containsKey("configuration")) { |
893 configuration = new ClusterConfiguration.fromJson(_json["configuration"]); | 920 configuration = new ClusterConfiguration.fromJson(_json["configuration"]); |
894 } | 921 } |
| 922 if (_json.containsKey("labels")) { |
| 923 labels = _json["labels"]; |
| 924 } |
| 925 if (_json.containsKey("metrics")) { |
| 926 metrics = new ClusterMetrics.fromJson(_json["metrics"]); |
| 927 } |
895 if (_json.containsKey("projectId")) { | 928 if (_json.containsKey("projectId")) { |
896 projectId = _json["projectId"]; | 929 projectId = _json["projectId"]; |
897 } | 930 } |
898 if (_json.containsKey("status")) { | 931 if (_json.containsKey("status")) { |
899 status = new ClusterStatus.fromJson(_json["status"]); | 932 status = new ClusterStatus.fromJson(_json["status"]); |
900 } | 933 } |
901 if (_json.containsKey("statusHistory")) { | 934 if (_json.containsKey("statusHistory")) { |
902 statusHistory = _json["statusHistory"].map((value) => new ClusterStatus.fr
omJson(value)).toList(); | 935 statusHistory = _json["statusHistory"].map((value) => new ClusterStatus.fr
omJson(value)).toList(); |
903 } | 936 } |
904 } | 937 } |
905 | 938 |
906 core.Map toJson() { | 939 core.Map toJson() { |
907 var _json = new core.Map(); | 940 var _json = new core.Map(); |
908 if (clusterName != null) { | 941 if (clusterName != null) { |
909 _json["clusterName"] = clusterName; | 942 _json["clusterName"] = clusterName; |
910 } | 943 } |
911 if (clusterUuid != null) { | 944 if (clusterUuid != null) { |
912 _json["clusterUuid"] = clusterUuid; | 945 _json["clusterUuid"] = clusterUuid; |
913 } | 946 } |
914 if (configuration != null) { | 947 if (configuration != null) { |
915 _json["configuration"] = (configuration).toJson(); | 948 _json["configuration"] = (configuration).toJson(); |
916 } | 949 } |
| 950 if (labels != null) { |
| 951 _json["labels"] = labels; |
| 952 } |
| 953 if (metrics != null) { |
| 954 _json["metrics"] = (metrics).toJson(); |
| 955 } |
917 if (projectId != null) { | 956 if (projectId != null) { |
918 _json["projectId"] = projectId; | 957 _json["projectId"] = projectId; |
919 } | 958 } |
920 if (status != null) { | 959 if (status != null) { |
921 _json["status"] = (status).toJson(); | 960 _json["status"] = (status).toJson(); |
922 } | 961 } |
923 if (statusHistory != null) { | 962 if (statusHistory != null) { |
924 _json["statusHistory"] = statusHistory.map((value) => (value).toJson()).to
List(); | 963 _json["statusHistory"] = statusHistory.map((value) => (value).toJson()).to
List(); |
925 } | 964 } |
926 return _json; | 965 return _json; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 if (softwareConfiguration != null) { | 1055 if (softwareConfiguration != null) { |
1017 _json["softwareConfiguration"] = (softwareConfiguration).toJson(); | 1056 _json["softwareConfiguration"] = (softwareConfiguration).toJson(); |
1018 } | 1057 } |
1019 if (workerConfiguration != null) { | 1058 if (workerConfiguration != null) { |
1020 _json["workerConfiguration"] = (workerConfiguration).toJson(); | 1059 _json["workerConfiguration"] = (workerConfiguration).toJson(); |
1021 } | 1060 } |
1022 return _json; | 1061 return _json; |
1023 } | 1062 } |
1024 } | 1063 } |
1025 | 1064 |
| 1065 /** Contains cluster daemon metrics, such as HDFS and YARN stats. */ |
| 1066 class ClusterMetrics { |
| 1067 /** The HDFS metrics. */ |
| 1068 core.Map<core.String, core.String> hdfsMetrics; |
| 1069 /** The YARN metrics. */ |
| 1070 core.Map<core.String, core.String> yarnMetrics; |
| 1071 |
| 1072 ClusterMetrics(); |
| 1073 |
| 1074 ClusterMetrics.fromJson(core.Map _json) { |
| 1075 if (_json.containsKey("hdfsMetrics")) { |
| 1076 hdfsMetrics = _json["hdfsMetrics"]; |
| 1077 } |
| 1078 if (_json.containsKey("yarnMetrics")) { |
| 1079 yarnMetrics = _json["yarnMetrics"]; |
| 1080 } |
| 1081 } |
| 1082 |
| 1083 core.Map toJson() { |
| 1084 var _json = new core.Map(); |
| 1085 if (hdfsMetrics != null) { |
| 1086 _json["hdfsMetrics"] = hdfsMetrics; |
| 1087 } |
| 1088 if (yarnMetrics != null) { |
| 1089 _json["yarnMetrics"] = yarnMetrics; |
| 1090 } |
| 1091 return _json; |
| 1092 } |
| 1093 } |
| 1094 |
1026 /** Metadata describing the operation. */ | 1095 /** Metadata describing the operation. */ |
1027 class ClusterOperationMetadata { | 1096 class ClusterOperationMetadata { |
1028 /** Name of the cluster for the operation. */ | 1097 /** [Output-only] Name of the cluster for the operation. */ |
1029 core.String clusterName; | 1098 core.String clusterName; |
1030 /** Cluster UUId for the operation. */ | 1099 /** [Output-only] Cluster UUID for the operation. */ |
1031 core.String clusterUuid; | 1100 core.String clusterUuid; |
1032 /** [Output-only] Short description of operation. */ | 1101 /** [Output-only] Short description of operation. */ |
1033 core.String description; | 1102 core.String description; |
| 1103 /** [Output-only] labels associated with the operation */ |
| 1104 core.Map<core.String, core.String> labels; |
1034 /** [Output-only] The operation type. */ | 1105 /** [Output-only] The operation type. */ |
1035 core.String operationType; | 1106 core.String operationType; |
1036 /** [Output-only] Current operation status. */ | 1107 /** [Output-only] Current operation status. */ |
1037 ClusterOperationStatus status; | 1108 ClusterOperationStatus status; |
1038 /** [Output-only] The previous operation status. */ | 1109 /** [Output-only] The previous operation status. */ |
1039 core.List<ClusterOperationStatus> statusHistory; | 1110 core.List<ClusterOperationStatus> statusHistory; |
1040 | 1111 |
1041 ClusterOperationMetadata(); | 1112 ClusterOperationMetadata(); |
1042 | 1113 |
1043 ClusterOperationMetadata.fromJson(core.Map _json) { | 1114 ClusterOperationMetadata.fromJson(core.Map _json) { |
1044 if (_json.containsKey("clusterName")) { | 1115 if (_json.containsKey("clusterName")) { |
1045 clusterName = _json["clusterName"]; | 1116 clusterName = _json["clusterName"]; |
1046 } | 1117 } |
1047 if (_json.containsKey("clusterUuid")) { | 1118 if (_json.containsKey("clusterUuid")) { |
1048 clusterUuid = _json["clusterUuid"]; | 1119 clusterUuid = _json["clusterUuid"]; |
1049 } | 1120 } |
1050 if (_json.containsKey("description")) { | 1121 if (_json.containsKey("description")) { |
1051 description = _json["description"]; | 1122 description = _json["description"]; |
1052 } | 1123 } |
| 1124 if (_json.containsKey("labels")) { |
| 1125 labels = _json["labels"]; |
| 1126 } |
1053 if (_json.containsKey("operationType")) { | 1127 if (_json.containsKey("operationType")) { |
1054 operationType = _json["operationType"]; | 1128 operationType = _json["operationType"]; |
1055 } | 1129 } |
1056 if (_json.containsKey("status")) { | 1130 if (_json.containsKey("status")) { |
1057 status = new ClusterOperationStatus.fromJson(_json["status"]); | 1131 status = new ClusterOperationStatus.fromJson(_json["status"]); |
1058 } | 1132 } |
1059 if (_json.containsKey("statusHistory")) { | 1133 if (_json.containsKey("statusHistory")) { |
1060 statusHistory = _json["statusHistory"].map((value) => new ClusterOperation
Status.fromJson(value)).toList(); | 1134 statusHistory = _json["statusHistory"].map((value) => new ClusterOperation
Status.fromJson(value)).toList(); |
1061 } | 1135 } |
1062 } | 1136 } |
1063 | 1137 |
1064 core.Map toJson() { | 1138 core.Map toJson() { |
1065 var _json = new core.Map(); | 1139 var _json = new core.Map(); |
1066 if (clusterName != null) { | 1140 if (clusterName != null) { |
1067 _json["clusterName"] = clusterName; | 1141 _json["clusterName"] = clusterName; |
1068 } | 1142 } |
1069 if (clusterUuid != null) { | 1143 if (clusterUuid != null) { |
1070 _json["clusterUuid"] = clusterUuid; | 1144 _json["clusterUuid"] = clusterUuid; |
1071 } | 1145 } |
1072 if (description != null) { | 1146 if (description != null) { |
1073 _json["description"] = description; | 1147 _json["description"] = description; |
1074 } | 1148 } |
| 1149 if (labels != null) { |
| 1150 _json["labels"] = labels; |
| 1151 } |
1075 if (operationType != null) { | 1152 if (operationType != null) { |
1076 _json["operationType"] = operationType; | 1153 _json["operationType"] = operationType; |
1077 } | 1154 } |
1078 if (status != null) { | 1155 if (status != null) { |
1079 _json["status"] = (status).toJson(); | 1156 _json["status"] = (status).toJson(); |
1080 } | 1157 } |
1081 if (statusHistory != null) { | 1158 if (statusHistory != null) { |
1082 _json["statusHistory"] = statusHistory.map((value) => (value).toJson()).to
List(); | 1159 _json["statusHistory"] = statusHistory.map((value) => (value).toJson()).to
List(); |
1083 } | 1160 } |
1084 return _json; | 1161 return _json; |
1085 } | 1162 } |
1086 } | 1163 } |
1087 | 1164 |
1088 /** The status of the operation. */ | 1165 /** The status of the operation. */ |
1089 class ClusterOperationStatus { | 1166 class ClusterOperationStatus { |
1090 /** A message containing any operation metadata details. */ | 1167 /** [Output-only]A message containing any operation metadata details. */ |
1091 core.String details; | 1168 core.String details; |
1092 /** A message containing the detailed operation state. */ | 1169 /** [Output-only] A message containing the detailed operation state. */ |
1093 core.String innerState; | 1170 core.String innerState; |
1094 /** | 1171 /** |
1095 * A message containing the operation state. | 1172 * [Output-only] A message containing the operation state. |
1096 * Possible string values are: | 1173 * Possible string values are: |
1097 * - "UNKNOWN" : A UNKNOWN. | 1174 * - "UNKNOWN" : A UNKNOWN. |
1098 * - "PENDING" : A PENDING. | 1175 * - "PENDING" : A PENDING. |
1099 * - "RUNNING" : A RUNNING. | 1176 * - "RUNNING" : A RUNNING. |
1100 * - "DONE" : A DONE. | 1177 * - "DONE" : A DONE. |
1101 */ | 1178 */ |
1102 core.String state; | 1179 core.String state; |
1103 /** The time this state was entered. */ | 1180 /** [Output-only] The time this state was entered. */ |
1104 core.String stateStartTime; | 1181 core.String stateStartTime; |
1105 | 1182 |
1106 ClusterOperationStatus(); | 1183 ClusterOperationStatus(); |
1107 | 1184 |
1108 ClusterOperationStatus.fromJson(core.Map _json) { | 1185 ClusterOperationStatus.fromJson(core.Map _json) { |
1109 if (_json.containsKey("details")) { | 1186 if (_json.containsKey("details")) { |
1110 details = _json["details"]; | 1187 details = _json["details"]; |
1111 } | 1188 } |
1112 if (_json.containsKey("innerState")) { | 1189 if (_json.containsKey("innerState")) { |
1113 innerState = _json["innerState"]; | 1190 innerState = _json["innerState"]; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1220 | 1297 |
1221 core.Map toJson() { | 1298 core.Map toJson() { |
1222 var _json = new core.Map(); | 1299 var _json = new core.Map(); |
1223 return _json; | 1300 return _json; |
1224 } | 1301 } |
1225 } | 1302 } |
1226 | 1303 |
1227 /** The location of diagnostic output. */ | 1304 /** The location of diagnostic output. */ |
1228 class DiagnoseClusterResults { | 1305 class DiagnoseClusterResults { |
1229 /** | 1306 /** |
1230 * [Output-only] The Google Cloud Storage URI of the diagnostic output. This | 1307 * [Output-only] The Google Cloud Storage URI of the diagnostic output. The |
1231 * is a plain text file with a summary of collected diagnostics. | 1308 * output report is a plain text file with a summary of collected diagnostics. |
1232 */ | 1309 */ |
1233 core.String outputUri; | 1310 core.String outputUri; |
1234 | 1311 |
1235 DiagnoseClusterResults(); | 1312 DiagnoseClusterResults(); |
1236 | 1313 |
1237 DiagnoseClusterResults.fromJson(core.Map _json) { | 1314 DiagnoseClusterResults.fromJson(core.Map _json) { |
1238 if (_json.containsKey("outputUri")) { | 1315 if (_json.containsKey("outputUri")) { |
1239 outputUri = _json["outputUri"]; | 1316 outputUri = _json["outputUri"]; |
1240 } | 1317 } |
1241 } | 1318 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1303 var _json = new core.Map(); | 1380 var _json = new core.Map(); |
1304 return _json; | 1381 return _json; |
1305 } | 1382 } |
1306 } | 1383 } |
1307 | 1384 |
1308 /** | 1385 /** |
1309 * Common configuration settings for resources of Google Compute Engine cluster | 1386 * Common configuration settings for resources of Google Compute Engine cluster |
1310 * instances, applicable to all instances in the cluster. | 1387 * instances, applicable to all instances in the cluster. |
1311 */ | 1388 */ |
1312 class GceClusterConfiguration { | 1389 class GceClusterConfiguration { |
| 1390 /** |
| 1391 * If true, all instances in the cluser will only have internal IP addresses. |
| 1392 * By default, clusters are not restricted to internal IP addresses, and will |
| 1393 * have ephemeral external IP addresses assigned to each instance. This |
| 1394 * restriction can only be enabled for subnetwork enabled networks, and all |
| 1395 * off-cluster dependencies must be configured to be accessible without |
| 1396 * external IP addresses. |
| 1397 */ |
| 1398 core.bool internalIpOnly; |
1313 /** The Google Compute Engine metadata entries to add to all instances. */ | 1399 /** The Google Compute Engine metadata entries to add to all instances. */ |
1314 core.Map<core.String, core.String> metadata; | 1400 core.Map<core.String, core.String> metadata; |
1315 /** | 1401 /** |
1316 * The Google Compute Engine network to be used for machine communications. | 1402 * The Google Compute Engine network to be used for machine communications. |
1317 * Cannot be specified with subnetwork_uri. If neither network_uri nor | 1403 * Cannot be specified with subnetwork_uri. If neither network_uri nor |
1318 * subnetwork_uri is specified, the "default" network of the project is used, | 1404 * subnetwork_uri is specified, the "default" network of the project is used, |
1319 * if it exists. Cannot be a "Custom Subnet Network" (see | 1405 * if it exists. Cannot be a "Custom Subnet Network" (see |
1320 * https://cloud.google.com/compute/docs/subnetworks for more information). | 1406 * https://cloud.google.com/compute/docs/subnetworks for more information). |
1321 * Example: | 1407 * Example: |
1322 * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global
/default`. | 1408 * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global
/default`. |
(...skipping 23 matching lines...) Expand all Loading... |
1346 /** | 1432 /** |
1347 * [Required] The zone where the Google Compute Engine cluster will be | 1433 * [Required] The zone where the Google Compute Engine cluster will be |
1348 * located. Example: | 1434 * located. Example: |
1349 * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`. | 1435 * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`. |
1350 */ | 1436 */ |
1351 core.String zoneUri; | 1437 core.String zoneUri; |
1352 | 1438 |
1353 GceClusterConfiguration(); | 1439 GceClusterConfiguration(); |
1354 | 1440 |
1355 GceClusterConfiguration.fromJson(core.Map _json) { | 1441 GceClusterConfiguration.fromJson(core.Map _json) { |
| 1442 if (_json.containsKey("internalIpOnly")) { |
| 1443 internalIpOnly = _json["internalIpOnly"]; |
| 1444 } |
1356 if (_json.containsKey("metadata")) { | 1445 if (_json.containsKey("metadata")) { |
1357 metadata = _json["metadata"]; | 1446 metadata = _json["metadata"]; |
1358 } | 1447 } |
1359 if (_json.containsKey("networkUri")) { | 1448 if (_json.containsKey("networkUri")) { |
1360 networkUri = _json["networkUri"]; | 1449 networkUri = _json["networkUri"]; |
1361 } | 1450 } |
1362 if (_json.containsKey("serviceAccountScopes")) { | 1451 if (_json.containsKey("serviceAccountScopes")) { |
1363 serviceAccountScopes = _json["serviceAccountScopes"]; | 1452 serviceAccountScopes = _json["serviceAccountScopes"]; |
1364 } | 1453 } |
1365 if (_json.containsKey("subnetworkUri")) { | 1454 if (_json.containsKey("subnetworkUri")) { |
1366 subnetworkUri = _json["subnetworkUri"]; | 1455 subnetworkUri = _json["subnetworkUri"]; |
1367 } | 1456 } |
1368 if (_json.containsKey("tags")) { | 1457 if (_json.containsKey("tags")) { |
1369 tags = _json["tags"]; | 1458 tags = _json["tags"]; |
1370 } | 1459 } |
1371 if (_json.containsKey("zoneUri")) { | 1460 if (_json.containsKey("zoneUri")) { |
1372 zoneUri = _json["zoneUri"]; | 1461 zoneUri = _json["zoneUri"]; |
1373 } | 1462 } |
1374 } | 1463 } |
1375 | 1464 |
1376 core.Map toJson() { | 1465 core.Map toJson() { |
1377 var _json = new core.Map(); | 1466 var _json = new core.Map(); |
| 1467 if (internalIpOnly != null) { |
| 1468 _json["internalIpOnly"] = internalIpOnly; |
| 1469 } |
1378 if (metadata != null) { | 1470 if (metadata != null) { |
1379 _json["metadata"] = metadata; | 1471 _json["metadata"] = metadata; |
1380 } | 1472 } |
1381 if (networkUri != null) { | 1473 if (networkUri != null) { |
1382 _json["networkUri"] = networkUri; | 1474 _json["networkUri"] = networkUri; |
1383 } | 1475 } |
1384 if (serviceAccountScopes != null) { | 1476 if (serviceAccountScopes != null) { |
1385 _json["serviceAccountScopes"] = serviceAccountScopes; | 1477 _json["serviceAccountScopes"] = serviceAccountScopes; |
1386 } | 1478 } |
1387 if (subnetworkUri != null) { | 1479 if (subnetworkUri != null) { |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1691 /** Job is a Hadoop job. */ | 1783 /** Job is a Hadoop job. */ |
1692 HadoopJob hadoopJob; | 1784 HadoopJob hadoopJob; |
1693 /** Job is a Hive job. */ | 1785 /** Job is a Hive job. */ |
1694 HiveJob hiveJob; | 1786 HiveJob hiveJob; |
1695 /** | 1787 /** |
1696 * [Optional] If set to `true`, the driver's stdin will be kept open and | 1788 * [Optional] If set to `true`, the driver's stdin will be kept open and |
1697 * `driver_input_uri` will be set to provide a path at which additional input | 1789 * `driver_input_uri` will be set to provide a path at which additional input |
1698 * can be sent to the driver. | 1790 * can be sent to the driver. |
1699 */ | 1791 */ |
1700 core.bool interactive; | 1792 core.bool interactive; |
| 1793 /** |
| 1794 * [Optional] The labels to associate with this job. Label keys must be |
| 1795 * between 1 and 63 characters long, and must conform to the following regular |
| 1796 * expression: \p{Ll}\p{Lo}{0,62} Label values must be between 1 and 63 |
| 1797 * characters long, and must conform to the following regular expression: |
| 1798 * [\p{Ll}\p{Lo}\p{N}_-]{0,63} No more than 64 labels can be associated with a |
| 1799 * given job. |
| 1800 */ |
| 1801 core.Map<core.String, core.String> labels; |
1701 /** Job is a Pig job. */ | 1802 /** Job is a Pig job. */ |
1702 PigJob pigJob; | 1803 PigJob pigJob; |
1703 /** | 1804 /** |
1704 * [Required] Job information, including how, when, and where to run the job. | 1805 * [Required] Job information, including how, when, and where to run the job. |
1705 */ | 1806 */ |
1706 JobPlacement placement; | 1807 JobPlacement placement; |
1707 /** Job is a Pyspark job. */ | 1808 /** Job is a Pyspark job. */ |
1708 PySparkJob pysparkJob; | 1809 PySparkJob pysparkJob; |
1709 /** | 1810 /** |
1710 * [Optional] The fully qualified reference to the job, which can be used to | 1811 * [Optional] The fully qualified reference to the job, which can be used to |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1745 } | 1846 } |
1746 if (_json.containsKey("hadoopJob")) { | 1847 if (_json.containsKey("hadoopJob")) { |
1747 hadoopJob = new HadoopJob.fromJson(_json["hadoopJob"]); | 1848 hadoopJob = new HadoopJob.fromJson(_json["hadoopJob"]); |
1748 } | 1849 } |
1749 if (_json.containsKey("hiveJob")) { | 1850 if (_json.containsKey("hiveJob")) { |
1750 hiveJob = new HiveJob.fromJson(_json["hiveJob"]); | 1851 hiveJob = new HiveJob.fromJson(_json["hiveJob"]); |
1751 } | 1852 } |
1752 if (_json.containsKey("interactive")) { | 1853 if (_json.containsKey("interactive")) { |
1753 interactive = _json["interactive"]; | 1854 interactive = _json["interactive"]; |
1754 } | 1855 } |
| 1856 if (_json.containsKey("labels")) { |
| 1857 labels = _json["labels"]; |
| 1858 } |
1755 if (_json.containsKey("pigJob")) { | 1859 if (_json.containsKey("pigJob")) { |
1756 pigJob = new PigJob.fromJson(_json["pigJob"]); | 1860 pigJob = new PigJob.fromJson(_json["pigJob"]); |
1757 } | 1861 } |
1758 if (_json.containsKey("placement")) { | 1862 if (_json.containsKey("placement")) { |
1759 placement = new JobPlacement.fromJson(_json["placement"]); | 1863 placement = new JobPlacement.fromJson(_json["placement"]); |
1760 } | 1864 } |
1761 if (_json.containsKey("pysparkJob")) { | 1865 if (_json.containsKey("pysparkJob")) { |
1762 pysparkJob = new PySparkJob.fromJson(_json["pysparkJob"]); | 1866 pysparkJob = new PySparkJob.fromJson(_json["pysparkJob"]); |
1763 } | 1867 } |
1764 if (_json.containsKey("reference")) { | 1868 if (_json.containsKey("reference")) { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1797 } | 1901 } |
1798 if (hadoopJob != null) { | 1902 if (hadoopJob != null) { |
1799 _json["hadoopJob"] = (hadoopJob).toJson(); | 1903 _json["hadoopJob"] = (hadoopJob).toJson(); |
1800 } | 1904 } |
1801 if (hiveJob != null) { | 1905 if (hiveJob != null) { |
1802 _json["hiveJob"] = (hiveJob).toJson(); | 1906 _json["hiveJob"] = (hiveJob).toJson(); |
1803 } | 1907 } |
1804 if (interactive != null) { | 1908 if (interactive != null) { |
1805 _json["interactive"] = interactive; | 1909 _json["interactive"] = interactive; |
1806 } | 1910 } |
| 1911 if (labels != null) { |
| 1912 _json["labels"] = labels; |
| 1913 } |
1807 if (pigJob != null) { | 1914 if (pigJob != null) { |
1808 _json["pigJob"] = (pigJob).toJson(); | 1915 _json["pigJob"] = (pigJob).toJson(); |
1809 } | 1916 } |
1810 if (placement != null) { | 1917 if (placement != null) { |
1811 _json["placement"] = (placement).toJson(); | 1918 _json["placement"] = (placement).toJson(); |
1812 } | 1919 } |
1813 if (pysparkJob != null) { | 1920 if (pysparkJob != null) { |
1814 _json["pysparkJob"] = (pysparkJob).toJson(); | 1921 _json["pysparkJob"] = (pysparkJob).toJson(); |
1815 } | 1922 } |
1816 if (reference != null) { | 1923 if (reference != null) { |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2158 * This resource represents a long-running operation that is the result of a | 2265 * This resource represents a long-running operation that is the result of a |
2159 * network API call. | 2266 * network API call. |
2160 */ | 2267 */ |
2161 class Operation { | 2268 class Operation { |
2162 /** | 2269 /** |
2163 * If the value is `false`, it means the operation is still in progress. If | 2270 * If the value is `false`, it means the operation is still in progress. If |
2164 * true, the operation is completed, and either `error` or `response` is | 2271 * true, the operation is completed, and either `error` or `response` is |
2165 * available. | 2272 * available. |
2166 */ | 2273 */ |
2167 core.bool done; | 2274 core.bool done; |
2168 /** The error result of the operation in case of failure. */ | 2275 /** The error result of the operation in case of failure or cancellation. */ |
2169 Status error; | 2276 Status error; |
2170 /** | 2277 /** |
2171 * Service-specific metadata associated with the operation. It typically | 2278 * Service-specific metadata associated with the operation. It typically |
2172 * contains progress information and common metadata such as create time. Some | 2279 * contains progress information and common metadata such as create time. Some |
2173 * services might not provide such metadata. Any method that returns a | 2280 * services might not provide such metadata. Any method that returns a |
2174 * long-running operation should document the metadata type, if any. | 2281 * long-running operation should document the metadata type, if any. |
2175 * | 2282 * |
2176 * The values for Object must be JSON objects. It can consist of `num`, | 2283 * The values for Object must be JSON objects. It can consist of `num`, |
2177 * `String`, `bool` and `null` as well as `Map` and `List` values. | 2284 * `String`, `bool` and `null` as well as `Map` and `List` values. |
2178 */ | 2285 */ |
(...skipping 821 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3000 } | 3107 } |
3001 if (state != null) { | 3108 if (state != null) { |
3002 _json["state"] = state; | 3109 _json["state"] = state; |
3003 } | 3110 } |
3004 if (trackingUrl != null) { | 3111 if (trackingUrl != null) { |
3005 _json["trackingUrl"] = trackingUrl; | 3112 _json["trackingUrl"] = trackingUrl; |
3006 } | 3113 } |
3007 return _json; | 3114 return _json; |
3008 } | 3115 } |
3009 } | 3116 } |
OLD | NEW |