| 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 * | |
| 285 * [filter] - Optional A filter constraining the clusters to list. Filters are | 281 * [filter] - Optional A filter constraining the clusters to list. Filters are |
| 286 * case-sensitive and have the following syntax:field = value AND field = | 282 * case-sensitive and have the following syntax:field = value AND field = |
| 287 * value ...where field is one of status.state, clusterName, or labels.[KEY], | 283 * 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 | 284 * 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, | 285 * can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, |
| 290 * DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING | 286 * DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING |
| 291 * states. INACTIVE contains the DELETING and ERROR states. clusterName is the | 287 * states. INACTIVE contains the DELETING and ERROR states. clusterName is the |
| 292 * name of the cluster provided at creation time. Only the logical AND | 288 * name of the cluster provided at creation time. Only the logical AND |
| 293 * operator is supported; space-separated items are treated as having an | 289 * operator is supported; space-separated items are treated as having an |
| 294 * implicit AND operator.Example filter:status.state = ACTIVE AND clusterName | 290 * implicit AND operator.Example filter:status.state = ACTIVE AND clusterName |
| 295 * = mycluster AND labels.env = staging AND labels.starred = * | 291 * = mycluster AND labels.env = staging AND labels.starred = * |
| 296 * | 292 * |
| 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 pageToken, core.int pageSize, core.String filter}) { | 305 async.Future<ListClustersResponse> list(core.String projectId, core.String reg
ion, {core.String filter, core.String pageToken, core.int pageSize}) { |
| 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 } |
| 319 if (pageToken != null) { | 322 if (pageToken != null) { |
| 320 _queryParams["pageToken"] = [pageToken]; | 323 _queryParams["pageToken"] = [pageToken]; |
| 321 } | 324 } |
| 322 if (pageSize != null) { | 325 if (pageSize != null) { |
| 323 _queryParams["pageSize"] = ["${pageSize}"]; | 326 _queryParams["pageSize"] = ["${pageSize}"]; |
| 324 } | 327 } |
| 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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 993 uploadOptions: _uploadOptions, | 993 uploadOptions: _uploadOptions, |
| 994 uploadMedia: _uploadMedia, | 994 uploadMedia: _uploadMedia, |
| 995 downloadOptions: _downloadOptions); | 995 downloadOptions: _downloadOptions); |
| 996 return _response.then((data) => new ListOperationsResponse.fromJson(data)); | 996 return _response.then((data) => new ListOperationsResponse.fromJson(data)); |
| 997 } | 997 } |
| 998 | 998 |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 | 1001 |
| 1002 | 1002 |
| 1003 /** |
| 1004 * Specifies the type and number of accelerator cards attached to the instances |
| 1005 * of an instance group (see GPUs on Compute Engine). |
| 1006 */ |
| 1007 class AcceleratorConfig { |
| 1008 /** |
| 1009 * The number of the accelerator cards of this type exposed to this instance. |
| 1010 */ |
| 1011 core.int acceleratorCount; |
| 1012 /** |
| 1013 * Full or partial URI of the accelerator type resource to expose to this |
| 1014 * instance. See Google Compute Engine AcceleratorTypes( |
| 1015 * /compute/docs/reference/beta/acceleratorTypes) |
| 1016 */ |
| 1017 core.String acceleratorTypeUri; |
| 1018 |
| 1019 AcceleratorConfig(); |
| 1020 |
| 1021 AcceleratorConfig.fromJson(core.Map _json) { |
| 1022 if (_json.containsKey("acceleratorCount")) { |
| 1023 acceleratorCount = _json["acceleratorCount"]; |
| 1024 } |
| 1025 if (_json.containsKey("acceleratorTypeUri")) { |
| 1026 acceleratorTypeUri = _json["acceleratorTypeUri"]; |
| 1027 } |
| 1028 } |
| 1029 |
| 1030 core.Map toJson() { |
| 1031 var _json = new core.Map(); |
| 1032 if (acceleratorCount != null) { |
| 1033 _json["acceleratorCount"] = acceleratorCount; |
| 1034 } |
| 1035 if (acceleratorTypeUri != null) { |
| 1036 _json["acceleratorTypeUri"] = acceleratorTypeUri; |
| 1037 } |
| 1038 return _json; |
| 1039 } |
| 1040 } |
| 1041 |
| 1003 /** A request to cancel a job. */ | 1042 /** A request to cancel a job. */ |
| 1004 class CancelJobRequest { | 1043 class CancelJobRequest { |
| 1005 | 1044 |
| 1006 CancelJobRequest(); | 1045 CancelJobRequest(); |
| 1007 | 1046 |
| 1008 CancelJobRequest.fromJson(core.Map _json) { | 1047 CancelJobRequest.fromJson(core.Map _json) { |
| 1009 } | 1048 } |
| 1010 | 1049 |
| 1011 core.Map toJson() { | 1050 core.Map toJson() { |
| 1012 var _json = new core.Map(); | 1051 var _json = new core.Map(); |
| (...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1875 } | 1914 } |
| 1876 return _json; | 1915 return _json; |
| 1877 } | 1916 } |
| 1878 } | 1917 } |
| 1879 | 1918 |
| 1880 /** | 1919 /** |
| 1881 * Optional The config settings for Google Compute Engine resources in an | 1920 * Optional The config settings for Google Compute Engine resources in an |
| 1882 * instance group, such as a master or worker group. | 1921 * instance group, such as a master or worker group. |
| 1883 */ | 1922 */ |
| 1884 class InstanceGroupConfig { | 1923 class InstanceGroupConfig { |
| 1924 /** |
| 1925 * Optional The Google Compute Engine accelerator configuration for these |
| 1926 * instances.Beta Feature: This feature is still under development. It may be |
| 1927 * changed before final release. |
| 1928 */ |
| 1929 core.List<AcceleratorConfig> accelerators; |
| 1885 /** Optional Disk option config settings. */ | 1930 /** Optional Disk option config settings. */ |
| 1886 DiskConfig diskConfig; | 1931 DiskConfig diskConfig; |
| 1887 /** | 1932 /** |
| 1888 * Output-only The Google Compute Engine image resource used for cluster | 1933 * Output-only The Google Compute Engine image resource used for cluster |
| 1889 * instances. Inferred from SoftwareConfig.image_version. | 1934 * instances. Inferred from SoftwareConfig.image_version. |
| 1890 */ | 1935 */ |
| 1891 core.String imageUri; | 1936 core.String imageUri; |
| 1892 /** | 1937 /** |
| 1893 * Optional The list of instance names. Cloud Dataproc derives the names from | 1938 * Optional The list of instance names. Cloud Dataproc derives the names from |
| 1894 * cluster_name, num_instances, and the instance group if not set by user | 1939 * cluster_name, num_instances, and the instance group if not set by user |
| (...skipping 17 matching lines...) Expand all Loading... |
| 1912 ManagedGroupConfig managedGroupConfig; | 1957 ManagedGroupConfig managedGroupConfig; |
| 1913 /** | 1958 /** |
| 1914 * Required The number of VM instances in the instance group. For master | 1959 * Required The number of VM instances in the instance group. For master |
| 1915 * instance groups, must be set to 1. | 1960 * instance groups, must be set to 1. |
| 1916 */ | 1961 */ |
| 1917 core.int numInstances; | 1962 core.int numInstances; |
| 1918 | 1963 |
| 1919 InstanceGroupConfig(); | 1964 InstanceGroupConfig(); |
| 1920 | 1965 |
| 1921 InstanceGroupConfig.fromJson(core.Map _json) { | 1966 InstanceGroupConfig.fromJson(core.Map _json) { |
| 1967 if (_json.containsKey("accelerators")) { |
| 1968 accelerators = _json["accelerators"].map((value) => new AcceleratorConfig.
fromJson(value)).toList(); |
| 1969 } |
| 1922 if (_json.containsKey("diskConfig")) { | 1970 if (_json.containsKey("diskConfig")) { |
| 1923 diskConfig = new DiskConfig.fromJson(_json["diskConfig"]); | 1971 diskConfig = new DiskConfig.fromJson(_json["diskConfig"]); |
| 1924 } | 1972 } |
| 1925 if (_json.containsKey("imageUri")) { | 1973 if (_json.containsKey("imageUri")) { |
| 1926 imageUri = _json["imageUri"]; | 1974 imageUri = _json["imageUri"]; |
| 1927 } | 1975 } |
| 1928 if (_json.containsKey("instanceNames")) { | 1976 if (_json.containsKey("instanceNames")) { |
| 1929 instanceNames = _json["instanceNames"]; | 1977 instanceNames = _json["instanceNames"]; |
| 1930 } | 1978 } |
| 1931 if (_json.containsKey("isPreemptible")) { | 1979 if (_json.containsKey("isPreemptible")) { |
| 1932 isPreemptible = _json["isPreemptible"]; | 1980 isPreemptible = _json["isPreemptible"]; |
| 1933 } | 1981 } |
| 1934 if (_json.containsKey("machineTypeUri")) { | 1982 if (_json.containsKey("machineTypeUri")) { |
| 1935 machineTypeUri = _json["machineTypeUri"]; | 1983 machineTypeUri = _json["machineTypeUri"]; |
| 1936 } | 1984 } |
| 1937 if (_json.containsKey("managedGroupConfig")) { | 1985 if (_json.containsKey("managedGroupConfig")) { |
| 1938 managedGroupConfig = new ManagedGroupConfig.fromJson(_json["managedGroupCo
nfig"]); | 1986 managedGroupConfig = new ManagedGroupConfig.fromJson(_json["managedGroupCo
nfig"]); |
| 1939 } | 1987 } |
| 1940 if (_json.containsKey("numInstances")) { | 1988 if (_json.containsKey("numInstances")) { |
| 1941 numInstances = _json["numInstances"]; | 1989 numInstances = _json["numInstances"]; |
| 1942 } | 1990 } |
| 1943 } | 1991 } |
| 1944 | 1992 |
| 1945 core.Map toJson() { | 1993 core.Map toJson() { |
| 1946 var _json = new core.Map(); | 1994 var _json = new core.Map(); |
| 1995 if (accelerators != null) { |
| 1996 _json["accelerators"] = accelerators.map((value) => (value).toJson()).toLi
st(); |
| 1997 } |
| 1947 if (diskConfig != null) { | 1998 if (diskConfig != null) { |
| 1948 _json["diskConfig"] = (diskConfig).toJson(); | 1999 _json["diskConfig"] = (diskConfig).toJson(); |
| 1949 } | 2000 } |
| 1950 if (imageUri != null) { | 2001 if (imageUri != null) { |
| 1951 _json["imageUri"] = imageUri; | 2002 _json["imageUri"] = imageUri; |
| 1952 } | 2003 } |
| 1953 if (instanceNames != null) { | 2004 if (instanceNames != null) { |
| 1954 _json["instanceNames"] = instanceNames; | 2005 _json["instanceNames"] = instanceNames; |
| 1955 } | 2006 } |
| 1956 if (isPreemptible != null) { | 2007 if (isPreemptible != null) { |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2165 } | 2216 } |
| 2166 } | 2217 } |
| 2167 | 2218 |
| 2168 /** Encapsulates the full scoping used to reference a job. */ | 2219 /** Encapsulates the full scoping used to reference a job. */ |
| 2169 class JobReference { | 2220 class JobReference { |
| 2170 /** | 2221 /** |
| 2171 * Optional The job ID, which must be unique within the project. The job ID is | 2222 * Optional The job ID, which must be unique within the project. The job ID is |
| 2172 * generated by the server upon job submission or provided by the user as a | 2223 * generated by the server upon job submission or provided by the user as a |
| 2173 * means to perform retries without creating duplicate jobs. The ID must | 2224 * means to perform retries without creating duplicate jobs. The ID must |
| 2174 * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens | 2225 * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens |
| 2175 * (-). The maximum length is 512 characters. | 2226 * (-). The maximum length is 100 characters. |
| 2176 */ | 2227 */ |
| 2177 core.String jobId; | 2228 core.String jobId; |
| 2178 /** | 2229 /** |
| 2179 * Required The ID of the Google Cloud Platform project that the job belongs | 2230 * Required The ID of the Google Cloud Platform project that the job belongs |
| 2180 * to. | 2231 * to. |
| 2181 */ | 2232 */ |
| 2182 core.String projectId; | 2233 core.String projectId; |
| 2183 | 2234 |
| 2184 JobReference(); | 2235 JobReference(); |
| 2185 | 2236 |
| (...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3364 } | 3415 } |
| 3365 if (state != null) { | 3416 if (state != null) { |
| 3366 _json["state"] = state; | 3417 _json["state"] = state; |
| 3367 } | 3418 } |
| 3368 if (trackingUrl != null) { | 3419 if (trackingUrl != null) { |
| 3369 _json["trackingUrl"] = trackingUrl; | 3420 _json["trackingUrl"] = trackingUrl; |
| 3370 } | 3421 } |
| 3371 return _json; | 3422 return _json; |
| 3372 } | 3423 } |
| 3373 } | 3424 } |
| OLD | NEW |