Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: generated/googleapis/lib/dataproc/v1.dart

Issue 1797933002: Api-roll 33: 2016-03-14 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Added resources/*/CHANGELOG.md, addresssed comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 18 matching lines...) Expand all
29 /** View log data for your projects */ 29 /** View log data for your projects */
30 static const LoggingReadScope = "https://www.googleapis.com/auth/logging.read" ; 30 static const LoggingReadScope = "https://www.googleapis.com/auth/logging.read" ;
31 31
32 /** Submit log data for your projects */ 32 /** Submit log data for your projects */
33 static const LoggingWriteScope = "https://www.googleapis.com/auth/logging.writ e"; 33 static const LoggingWriteScope = "https://www.googleapis.com/auth/logging.writ e";
34 34
35 35
36 final commons.ApiRequester _requester; 36 final commons.ApiRequester _requester;
37 37
38 MediaResourceApi get media => new MediaResourceApi(_requester); 38 MediaResourceApi get media => new MediaResourceApi(_requester);
39 ProjectsResourceApi get projects => new ProjectsResourceApi(_requester);
39 40
40 DataprocApi(http.Client client, {core.String rootUrl: "https://dataproc.google apis.com/", core.String servicePath: ""}) : 41 DataprocApi(http.Client client, {core.String rootUrl: "https://dataproc.google apis.com/", core.String servicePath: ""}) :
41 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT); 42 _requester = new commons.ApiRequester(client, rootUrl, servicePath, USER_A GENT);
42 } 43 }
43 44
44 45
45 class MediaResourceApi { 46 class MediaResourceApi {
46 final commons.ApiRequester _requester; 47 final commons.ApiRequester _requester;
47 48
48 MediaResourceApi(commons.ApiRequester client) : 49 MediaResourceApi(commons.ApiRequester client) :
49 _requester = client; 50 _requester = client;
50 51
51 /** 52 /**
52 * Method for media download. Download is supported on the URI 53 * Method for media download. Download is supported on the URI
53 * `/v1/media/{+name}?alt=media`. 54 * `/v1/media/{+name}?alt=media`.
54 * 55 *
55 * Request parameters: 56 * Request parameters:
56 * 57 *
57 * [resourceName] - Name of the media that is being downloaded. See 58 * [resourceName] - Name of the media that is being downloaded. See
58 * [][ByteStream.ReadRequest.resource_name]. 59 * ByteStream.ReadRequest.resource_name.
59 * Value must have pattern "^.*$". 60 * Value must have pattern "^.*$".
60 * 61 *
61 * [downloadOptions] - Options for downloading. A download can be either a 62 * [downloadOptions] - Options for downloading. A download can be either a
62 * Metadata (default) or Media download. Partial Media downloads are possible 63 * Metadata (default) or Media download. Partial Media downloads are possible
63 * as well. 64 * as well.
64 * 65 *
65 * Completes with a 66 * Completes with a
66 * 67 *
67 * - [Media] for Metadata downloads (see [downloadOptions]). 68 * - [Media] for Metadata downloads (see [downloadOptions]).
68 * 69 *
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 108
108 /** 109 /**
109 * Method for media upload. Upload is supported on the URI 110 * Method for media upload. Upload is supported on the URI
110 * `/upload/v1/media/{+name}`. 111 * `/upload/v1/media/{+name}`.
111 * 112 *
112 * [request] - The metadata request object. 113 * [request] - The metadata request object.
113 * 114 *
114 * Request parameters: 115 * Request parameters:
115 * 116 *
116 * [resourceName] - Name of the media that is being downloaded. See 117 * [resourceName] - Name of the media that is being downloaded. See
117 * [][ByteStream.ReadRequest.resource_name]. 118 * ByteStream.ReadRequest.resource_name.
118 * Value must have pattern "^.*$". 119 * Value must have pattern "^.*$".
119 * 120 *
120 * [uploadMedia] - The media to upload. 121 * [uploadMedia] - The media to upload.
121 * 122 *
122 * [uploadOptions] - Options for the media upload. Streaming Media without the 123 * [uploadOptions] - Options for the media upload. Streaming Media without the
123 * length being known ahead of time is only supported via resumable uploads. 124 * length being known ahead of time is only supported via resumable uploads.
124 * 125 *
125 * Completes with a [Media]. 126 * Completes with a [Media].
126 * 127 *
127 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 128 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 queryParams: _queryParams, 164 queryParams: _queryParams,
164 uploadOptions: _uploadOptions, 165 uploadOptions: _uploadOptions,
165 uploadMedia: _uploadMedia, 166 uploadMedia: _uploadMedia,
166 downloadOptions: _downloadOptions); 167 downloadOptions: _downloadOptions);
167 return _response.then((data) => new Media.fromJson(data)); 168 return _response.then((data) => new Media.fromJson(data));
168 } 169 }
169 170
170 } 171 }
171 172
172 173
174 class ProjectsResourceApi {
175 final commons.ApiRequester _requester;
176
177 ProjectsRegionsResourceApi get regions => new ProjectsRegionsResourceApi(_requ ester);
178
179 ProjectsResourceApi(commons.ApiRequester client) :
180 _requester = client;
181 }
182
183
184 class ProjectsRegionsResourceApi {
185 final commons.ApiRequester _requester;
186
187 ProjectsRegionsClustersResourceApi get clusters => new ProjectsRegionsClusters ResourceApi(_requester);
188 ProjectsRegionsJobsResourceApi get jobs => new ProjectsRegionsJobsResourceApi( _requester);
189 ProjectsRegionsOperationsResourceApi get operations => new ProjectsRegionsOper ationsResourceApi(_requester);
190
191 ProjectsRegionsResourceApi(commons.ApiRequester client) :
192 _requester = client;
193 }
194
195
196 class ProjectsRegionsClustersResourceApi {
197 final commons.ApiRequester _requester;
198
199 ProjectsRegionsClustersResourceApi(commons.ApiRequester client) :
200 _requester = client;
201
202 /**
203 * Creates a cluster in a project.
204 *
205 * [request] - The metadata request object.
206 *
207 * Request parameters:
208 *
209 * [projectId] - [Required] The ID of the Google Cloud Platform project that
210 * the cluster belongs to.
211 *
212 * [region] - [Required] The Cloud Dataproc region in which to handle the
213 * request.
214 *
215 * Completes with a [Operation].
216 *
217 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
218 * error.
219 *
220 * If the used [http.Client] completes with an error when making a REST call,
221 * this method will complete with the same error.
222 */
223 async.Future<Operation> create(Cluster request, core.String projectId, core.St ring region) {
224 var _url = null;
225 var _queryParams = new core.Map();
226 var _uploadMedia = null;
227 var _uploadOptions = null;
228 var _downloadOptions = commons.DownloadOptions.Metadata;
229 var _body = null;
230
231 if (request != null) {
232 _body = convert.JSON.encode((request).toJson());
233 }
234 if (projectId == null) {
235 throw new core.ArgumentError("Parameter projectId is required.");
236 }
237 if (region == null) {
238 throw new core.ArgumentError("Parameter region is required.");
239 }
240
241 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/clusters';
242
243 var _response = _requester.request(_url,
244 "POST",
245 body: _body,
246 queryParams: _queryParams,
247 uploadOptions: _uploadOptions,
248 uploadMedia: _uploadMedia,
249 downloadOptions: _downloadOptions);
250 return _response.then((data) => new Operation.fromJson(data));
251 }
252
253 /**
254 * Deletes a cluster in a project.
255 *
256 * Request parameters:
257 *
258 * [projectId] - [Required] The ID of the Google Cloud Platform project that
259 * the cluster belongs to.
260 *
261 * [region] - [Required] The Cloud Dataproc region in which to handle the
262 * request.
263 *
264 * [clusterName] - [Required] The cluster name.
265 *
266 * Completes with a [Operation].
267 *
268 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
269 * error.
270 *
271 * If the used [http.Client] completes with an error when making a REST call,
272 * this method will complete with the same error.
273 */
274 async.Future<Operation> delete(core.String projectId, core.String region, core .String clusterName) {
275 var _url = null;
276 var _queryParams = new core.Map();
277 var _uploadMedia = null;
278 var _uploadOptions = null;
279 var _downloadOptions = commons.DownloadOptions.Metadata;
280 var _body = null;
281
282 if (projectId == null) {
283 throw new core.ArgumentError("Parameter projectId is required.");
284 }
285 if (region == null) {
286 throw new core.ArgumentError("Parameter region is required.");
287 }
288 if (clusterName == null) {
289 throw new core.ArgumentError("Parameter clusterName is required.");
290 }
291
292 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/clusters/' + commons.Escape r.ecapeVariable('$clusterName');
293
294 var _response = _requester.request(_url,
295 "DELETE",
296 body: _body,
297 queryParams: _queryParams,
298 uploadOptions: _uploadOptions,
299 uploadMedia: _uploadMedia,
300 downloadOptions: _downloadOptions);
301 return _response.then((data) => new Operation.fromJson(data));
302 }
303
304 /**
305 * Gets cluster diagnostic information. After the operation completes, the
306 * Operation.response field contains `DiagnoseClusterOutputLocation`.
307 *
308 * [request] - The metadata request object.
309 *
310 * Request parameters:
311 *
312 * [projectId] - [Required] The ID of the Google Cloud Platform project that
313 * the cluster belongs to.
314 *
315 * [region] - [Required] The Cloud Dataproc region in which to handle the
316 * request.
317 *
318 * [clusterName] - [Required] The cluster name.
319 *
320 * Completes with a [Operation].
321 *
322 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
323 * error.
324 *
325 * If the used [http.Client] completes with an error when making a REST call,
326 * this method will complete with the same error.
327 */
328 async.Future<Operation> diagnose(DiagnoseClusterRequest request, core.String p rojectId, core.String region, core.String clusterName) {
329 var _url = null;
330 var _queryParams = new core.Map();
331 var _uploadMedia = null;
332 var _uploadOptions = null;
333 var _downloadOptions = commons.DownloadOptions.Metadata;
334 var _body = null;
335
336 if (request != null) {
337 _body = convert.JSON.encode((request).toJson());
338 }
339 if (projectId == null) {
340 throw new core.ArgumentError("Parameter projectId is required.");
341 }
342 if (region == null) {
343 throw new core.ArgumentError("Parameter region is required.");
344 }
345 if (clusterName == null) {
346 throw new core.ArgumentError("Parameter clusterName is required.");
347 }
348
349 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/clusters/' + commons.Escape r.ecapeVariable('$clusterName') + ':diagnose';
350
351 var _response = _requester.request(_url,
352 "POST",
353 body: _body,
354 queryParams: _queryParams,
355 uploadOptions: _uploadOptions,
356 uploadMedia: _uploadMedia,
357 downloadOptions: _downloadOptions);
358 return _response.then((data) => new Operation.fromJson(data));
359 }
360
361 /**
362 * Gets the resource representation for a cluster in a project.
363 *
364 * Request parameters:
365 *
366 * [projectId] - [Required] The ID of the Google Cloud Platform project that
367 * the cluster belongs to.
368 *
369 * [region] - [Required] The Cloud Dataproc region in which to handle the
370 * request.
371 *
372 * [clusterName] - [Required] The cluster name.
373 *
374 * Completes with a [Cluster].
375 *
376 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
377 * error.
378 *
379 * If the used [http.Client] completes with an error when making a REST call,
380 * this method will complete with the same error.
381 */
382 async.Future<Cluster> get(core.String projectId, core.String region, core.Stri ng clusterName) {
383 var _url = null;
384 var _queryParams = new core.Map();
385 var _uploadMedia = null;
386 var _uploadOptions = null;
387 var _downloadOptions = commons.DownloadOptions.Metadata;
388 var _body = null;
389
390 if (projectId == null) {
391 throw new core.ArgumentError("Parameter projectId is required.");
392 }
393 if (region == null) {
394 throw new core.ArgumentError("Parameter region is required.");
395 }
396 if (clusterName == null) {
397 throw new core.ArgumentError("Parameter clusterName is required.");
398 }
399
400 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/clusters/' + commons.Escape r.ecapeVariable('$clusterName');
401
402 var _response = _requester.request(_url,
403 "GET",
404 body: _body,
405 queryParams: _queryParams,
406 uploadOptions: _uploadOptions,
407 uploadMedia: _uploadMedia,
408 downloadOptions: _downloadOptions);
409 return _response.then((data) => new Cluster.fromJson(data));
410 }
411
412 /**
413 * Lists all regions/{region}/clusters in a project.
414 *
415 * Request parameters:
416 *
417 * [projectId] - [Required] The ID of the Google Cloud Platform project that
418 * the cluster belongs to.
419 *
420 * [region] - [Required] The Cloud Dataproc region in which to handle the
421 * request.
422 *
423 * [pageSize] - The standard List page size.
424 *
425 * [pageToken] - The standard List page token.
426 *
427 * Completes with a [ListClustersResponse].
428 *
429 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
430 * error.
431 *
432 * If the used [http.Client] completes with an error when making a REST call,
433 * this method will complete with the same error.
434 */
435 async.Future<ListClustersResponse> list(core.String projectId, core.String reg ion, {core.int pageSize, core.String pageToken}) {
436 var _url = null;
437 var _queryParams = new core.Map();
438 var _uploadMedia = null;
439 var _uploadOptions = null;
440 var _downloadOptions = commons.DownloadOptions.Metadata;
441 var _body = null;
442
443 if (projectId == null) {
444 throw new core.ArgumentError("Parameter projectId is required.");
445 }
446 if (region == null) {
447 throw new core.ArgumentError("Parameter region is required.");
448 }
449 if (pageSize != null) {
450 _queryParams["pageSize"] = ["${pageSize}"];
451 }
452 if (pageToken != null) {
453 _queryParams["pageToken"] = [pageToken];
454 }
455
456 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/clusters';
457
458 var _response = _requester.request(_url,
459 "GET",
460 body: _body,
461 queryParams: _queryParams,
462 uploadOptions: _uploadOptions,
463 uploadMedia: _uploadMedia,
464 downloadOptions: _downloadOptions);
465 return _response.then((data) => new ListClustersResponse.fromJson(data));
466 }
467
468 /**
469 * Updates a cluster in a project.
470 *
471 * [request] - The metadata request object.
472 *
473 * Request parameters:
474 *
475 * [projectId] - [Required] The ID of the Google Cloud Platform project the
476 * cluster belongs to.
477 *
478 * [region] - [Required] The Cloud Dataproc region in which to handle the
479 * request.
480 *
481 * [clusterName] - [Required] The cluster name.
482 *
483 * [updateMask] - [Required] Specifies the path, relative to Cluster, of the
484 * field to update. For example, to change the number of workers in a cluster
485 * to 5, the update_mask parameter would be specified as
486 * config.worker_config.num_instances, and the `PATCH` request body would
487 * specify the new value, as follows: { "config":{ "workerConfig":{
488 * "numInstances":"5" } } } Note: Currently,
489 * config.worker_config.num_instances is the only field that can be updated.
490 *
491 * Completes with a [Operation].
492 *
493 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
494 * error.
495 *
496 * If the used [http.Client] completes with an error when making a REST call,
497 * this method will complete with the same error.
498 */
499 async.Future<Operation> patch(Cluster request, core.String projectId, core.Str ing region, core.String clusterName, {core.String updateMask}) {
500 var _url = null;
501 var _queryParams = new core.Map();
502 var _uploadMedia = null;
503 var _uploadOptions = null;
504 var _downloadOptions = commons.DownloadOptions.Metadata;
505 var _body = null;
506
507 if (request != null) {
508 _body = convert.JSON.encode((request).toJson());
509 }
510 if (projectId == null) {
511 throw new core.ArgumentError("Parameter projectId is required.");
512 }
513 if (region == null) {
514 throw new core.ArgumentError("Parameter region is required.");
515 }
516 if (clusterName == null) {
517 throw new core.ArgumentError("Parameter clusterName is required.");
518 }
519 if (updateMask != null) {
520 _queryParams["updateMask"] = [updateMask];
521 }
522
523 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/clusters/' + commons.Escape r.ecapeVariable('$clusterName');
524
525 var _response = _requester.request(_url,
526 "PATCH",
527 body: _body,
528 queryParams: _queryParams,
529 uploadOptions: _uploadOptions,
530 uploadMedia: _uploadMedia,
531 downloadOptions: _downloadOptions);
532 return _response.then((data) => new Operation.fromJson(data));
533 }
534
535 }
536
537
538 class ProjectsRegionsJobsResourceApi {
539 final commons.ApiRequester _requester;
540
541 ProjectsRegionsJobsResourceApi(commons.ApiRequester client) :
542 _requester = client;
543
544 /**
545 * Starts a job cancellation request. To access the job resource after
546 * cancellation, call
547 * [regions/{region}/jobs.list](/dataproc/reference/rest/v1/projects.regions.j obs/list)
548 * or
549 * [regions/{region}/jobs.get](/dataproc/reference/rest/v1/projects.regions.jo bs/get).
550 *
551 * [request] - The metadata request object.
552 *
553 * Request parameters:
554 *
555 * [projectId] - [Required] The ID of the Google Cloud Platform project that
556 * the job belongs to.
557 *
558 * [region] - [Required] The Cloud Dataproc region in which to handle the
559 * request.
560 *
561 * [jobId] - [Required] The job ID.
562 *
563 * Completes with a [Job].
564 *
565 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
566 * error.
567 *
568 * If the used [http.Client] completes with an error when making a REST call,
569 * this method will complete with the same error.
570 */
571 async.Future<Job> cancel(CancelJobRequest request, core.String projectId, core .String region, core.String jobId) {
572 var _url = null;
573 var _queryParams = new core.Map();
574 var _uploadMedia = null;
575 var _uploadOptions = null;
576 var _downloadOptions = commons.DownloadOptions.Metadata;
577 var _body = null;
578
579 if (request != null) {
580 _body = convert.JSON.encode((request).toJson());
581 }
582 if (projectId == null) {
583 throw new core.ArgumentError("Parameter projectId is required.");
584 }
585 if (region == null) {
586 throw new core.ArgumentError("Parameter region is required.");
587 }
588 if (jobId == null) {
589 throw new core.ArgumentError("Parameter jobId is required.");
590 }
591
592 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/jobs/' + commons.Escaper.ec apeVariable('$jobId') + ':cancel';
593
594 var _response = _requester.request(_url,
595 "POST",
596 body: _body,
597 queryParams: _queryParams,
598 uploadOptions: _uploadOptions,
599 uploadMedia: _uploadMedia,
600 downloadOptions: _downloadOptions);
601 return _response.then((data) => new Job.fromJson(data));
602 }
603
604 /**
605 * Deletes the job from the project. If the job is active, the delete fails,
606 * and the response returns `FAILED_PRECONDITION`.
607 *
608 * Request parameters:
609 *
610 * [projectId] - [Required] The ID of the Google Cloud Platform project that
611 * the job belongs to.
612 *
613 * [region] - [Required] The Cloud Dataproc region in which to handle the
614 * request.
615 *
616 * [jobId] - [Required] The job ID.
617 *
618 * Completes with a [Empty].
619 *
620 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
621 * error.
622 *
623 * If the used [http.Client] completes with an error when making a REST call,
624 * this method will complete with the same error.
625 */
626 async.Future<Empty> delete(core.String projectId, core.String region, core.Str ing jobId) {
627 var _url = null;
628 var _queryParams = new core.Map();
629 var _uploadMedia = null;
630 var _uploadOptions = null;
631 var _downloadOptions = commons.DownloadOptions.Metadata;
632 var _body = null;
633
634 if (projectId == null) {
635 throw new core.ArgumentError("Parameter projectId is required.");
636 }
637 if (region == null) {
638 throw new core.ArgumentError("Parameter region is required.");
639 }
640 if (jobId == null) {
641 throw new core.ArgumentError("Parameter jobId is required.");
642 }
643
644 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/jobs/' + commons.Escaper.ec apeVariable('$jobId');
645
646 var _response = _requester.request(_url,
647 "DELETE",
648 body: _body,
649 queryParams: _queryParams,
650 uploadOptions: _uploadOptions,
651 uploadMedia: _uploadMedia,
652 downloadOptions: _downloadOptions);
653 return _response.then((data) => new Empty.fromJson(data));
654 }
655
656 /**
657 * Gets the resource representation for a job in a project.
658 *
659 * Request parameters:
660 *
661 * [projectId] - [Required] The ID of the Google Cloud Platform project that
662 * the job belongs to.
663 *
664 * [region] - [Required] The Cloud Dataproc region in which to handle the
665 * request.
666 *
667 * [jobId] - [Required] The job ID.
668 *
669 * Completes with a [Job].
670 *
671 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
672 * error.
673 *
674 * If the used [http.Client] completes with an error when making a REST call,
675 * this method will complete with the same error.
676 */
677 async.Future<Job> get(core.String projectId, core.String region, core.String j obId) {
678 var _url = null;
679 var _queryParams = new core.Map();
680 var _uploadMedia = null;
681 var _uploadOptions = null;
682 var _downloadOptions = commons.DownloadOptions.Metadata;
683 var _body = null;
684
685 if (projectId == null) {
686 throw new core.ArgumentError("Parameter projectId is required.");
687 }
688 if (region == null) {
689 throw new core.ArgumentError("Parameter region is required.");
690 }
691 if (jobId == null) {
692 throw new core.ArgumentError("Parameter jobId is required.");
693 }
694
695 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/jobs/' + commons.Escaper.ec apeVariable('$jobId');
696
697 var _response = _requester.request(_url,
698 "GET",
699 body: _body,
700 queryParams: _queryParams,
701 uploadOptions: _uploadOptions,
702 uploadMedia: _uploadMedia,
703 downloadOptions: _downloadOptions);
704 return _response.then((data) => new Job.fromJson(data));
705 }
706
707 /**
708 * Lists regions/{region}/jobs in a project.
709 *
710 * Request parameters:
711 *
712 * [projectId] - [Required] The ID of the Google Cloud Platform project that
713 * the job belongs to.
714 *
715 * [region] - [Required] The Cloud Dataproc region in which to handle the
716 * request.
717 *
718 * [pageSize] - [Optional] The number of results to return in each response.
719 *
720 * [pageToken] - [Optional] The page token, returned by a previous call, to
721 * request the next page of results.
722 *
723 * [clusterName] - [Optional] If set, the returned jobs list includes only
724 * jobs that were submitted to the named cluster.
725 *
726 * [jobStateMatcher] - [Optional] Specifies enumerated categories of jobs to
727 * list.
728 * Possible string values are:
729 * - "ALL" : A ALL.
730 * - "ACTIVE" : A ACTIVE.
731 * - "NON_ACTIVE" : A NON_ACTIVE.
732 *
733 * Completes with a [ListJobsResponse].
734 *
735 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
736 * error.
737 *
738 * If the used [http.Client] completes with an error when making a REST call,
739 * this method will complete with the same error.
740 */
741 async.Future<ListJobsResponse> list(core.String projectId, core.String region, {core.int pageSize, core.String pageToken, core.String clusterName, core.String jobStateMatcher}) {
742 var _url = null;
743 var _queryParams = new core.Map();
744 var _uploadMedia = null;
745 var _uploadOptions = null;
746 var _downloadOptions = commons.DownloadOptions.Metadata;
747 var _body = null;
748
749 if (projectId == null) {
750 throw new core.ArgumentError("Parameter projectId is required.");
751 }
752 if (region == null) {
753 throw new core.ArgumentError("Parameter region is required.");
754 }
755 if (pageSize != null) {
756 _queryParams["pageSize"] = ["${pageSize}"];
757 }
758 if (pageToken != null) {
759 _queryParams["pageToken"] = [pageToken];
760 }
761 if (clusterName != null) {
762 _queryParams["clusterName"] = [clusterName];
763 }
764 if (jobStateMatcher != null) {
765 _queryParams["jobStateMatcher"] = [jobStateMatcher];
766 }
767
768 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/jobs';
769
770 var _response = _requester.request(_url,
771 "GET",
772 body: _body,
773 queryParams: _queryParams,
774 uploadOptions: _uploadOptions,
775 uploadMedia: _uploadMedia,
776 downloadOptions: _downloadOptions);
777 return _response.then((data) => new ListJobsResponse.fromJson(data));
778 }
779
780 /**
781 * Submits a job to a cluster.
782 *
783 * [request] - The metadata request object.
784 *
785 * Request parameters:
786 *
787 * [projectId] - [Required] The ID of the Google Cloud Platform project that
788 * the job belongs to.
789 *
790 * [region] - [Required] The Cloud Dataproc region in which to handle the
791 * request.
792 *
793 * Completes with a [Job].
794 *
795 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
796 * error.
797 *
798 * If the used [http.Client] completes with an error when making a REST call,
799 * this method will complete with the same error.
800 */
801 async.Future<Job> submit(SubmitJobRequest request, core.String projectId, core .String region) {
802 var _url = null;
803 var _queryParams = new core.Map();
804 var _uploadMedia = null;
805 var _uploadOptions = null;
806 var _downloadOptions = commons.DownloadOptions.Metadata;
807 var _body = null;
808
809 if (request != null) {
810 _body = convert.JSON.encode((request).toJson());
811 }
812 if (projectId == null) {
813 throw new core.ArgumentError("Parameter projectId is required.");
814 }
815 if (region == null) {
816 throw new core.ArgumentError("Parameter region is required.");
817 }
818
819 _url = 'v1/projects/' + commons.Escaper.ecapeVariable('$projectId') + '/regi ons/' + commons.Escaper.ecapeVariable('$region') + '/jobs:submit';
820
821 var _response = _requester.request(_url,
822 "POST",
823 body: _body,
824 queryParams: _queryParams,
825 uploadOptions: _uploadOptions,
826 uploadMedia: _uploadMedia,
827 downloadOptions: _downloadOptions);
828 return _response.then((data) => new Job.fromJson(data));
829 }
830
831 }
832
833
834 class ProjectsRegionsOperationsResourceApi {
835 final commons.ApiRequester _requester;
836
837 ProjectsRegionsOperationsResourceApi(commons.ApiRequester client) :
838 _requester = client;
839
840 /**
841 * Starts asynchronous cancellation on a long-running operation. The server
842 * makes a best effort to cancel the operation, but success is not guaranteed.
843 * If the server doesn't support this method, it returns
844 * `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or
845 * other methods to check whether the cancellation succeeded or whether the
846 * operation completed despite cancellation.
847 *
848 * Request parameters:
849 *
850 * [name] - The name of the operation resource to be cancelled.
851 * Value must have pattern "^projects/[^/] * / regions/[^/] * /
852 * operations/[^/]*$".
853 *
854 * Completes with a [Empty].
855 *
856 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
857 * error.
858 *
859 * If the used [http.Client] completes with an error when making a REST call,
860 * this method will complete with the same error.
861 */
862 async.Future<Empty> cancel(core.String name) {
863 var _url = null;
864 var _queryParams = new core.Map();
865 var _uploadMedia = null;
866 var _uploadOptions = null;
867 var _downloadOptions = commons.DownloadOptions.Metadata;
868 var _body = null;
869
870 if (name == null) {
871 throw new core.ArgumentError("Parameter name is required.");
872 }
873
874 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name') + ':cancel';
875
876 var _response = _requester.request(_url,
877 "POST",
878 body: _body,
879 queryParams: _queryParams,
880 uploadOptions: _uploadOptions,
881 uploadMedia: _uploadMedia,
882 downloadOptions: _downloadOptions);
883 return _response.then((data) => new Empty.fromJson(data));
884 }
885
886 /**
887 * Deletes a long-running operation. This method indicates that the client is
888 * no longer interested in the operation result. It does not cancel the
889 * operation. If the server doesn't support this method, it returns
890 * `google.rpc.Code.UNIMPLEMENTED`.
891 *
892 * Request parameters:
893 *
894 * [name] - The name of the operation resource to be deleted.
895 * Value must have pattern "^projects/[^/] * / regions/[^/] * /
896 * operations/[^/]*$".
897 *
898 * Completes with a [Empty].
899 *
900 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
901 * error.
902 *
903 * If the used [http.Client] completes with an error when making a REST call,
904 * this method will complete with the same error.
905 */
906 async.Future<Empty> delete(core.String name) {
907 var _url = null;
908 var _queryParams = new core.Map();
909 var _uploadMedia = null;
910 var _uploadOptions = null;
911 var _downloadOptions = commons.DownloadOptions.Metadata;
912 var _body = null;
913
914 if (name == null) {
915 throw new core.ArgumentError("Parameter name is required.");
916 }
917
918 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
919
920 var _response = _requester.request(_url,
921 "DELETE",
922 body: _body,
923 queryParams: _queryParams,
924 uploadOptions: _uploadOptions,
925 uploadMedia: _uploadMedia,
926 downloadOptions: _downloadOptions);
927 return _response.then((data) => new Empty.fromJson(data));
928 }
929
930 /**
931 * Gets the latest state of a long-running operation. Clients can use this
932 * method to poll the operation result at intervals as recommended by the API
933 * service.
934 *
935 * Request parameters:
936 *
937 * [name] - The name of the operation resource.
938 * Value must have pattern "^projects/[^/] * / regions/[^/] * /
939 * operations/[^/]*$".
940 *
941 * Completes with a [Operation].
942 *
943 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
944 * error.
945 *
946 * If the used [http.Client] completes with an error when making a REST call,
947 * this method will complete with the same error.
948 */
949 async.Future<Operation> get(core.String name) {
950 var _url = null;
951 var _queryParams = new core.Map();
952 var _uploadMedia = null;
953 var _uploadOptions = null;
954 var _downloadOptions = commons.DownloadOptions.Metadata;
955 var _body = null;
956
957 if (name == null) {
958 throw new core.ArgumentError("Parameter name is required.");
959 }
960
961 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
962
963 var _response = _requester.request(_url,
964 "GET",
965 body: _body,
966 queryParams: _queryParams,
967 uploadOptions: _uploadOptions,
968 uploadMedia: _uploadMedia,
969 downloadOptions: _downloadOptions);
970 return _response.then((data) => new Operation.fromJson(data));
971 }
972
973 /**
974 * Lists operations that match the specified filter in the request. If the
975 * server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the
976 * `name` binding below allows API services to override the binding to use
977 * different resource name schemes, such as `users / * /operations`.
978 *
979 * Request parameters:
980 *
981 * [name] - The name of the operation collection.
982 * Value must have pattern "^projects/[^/] * / regions/[^/] * / operations$".
983 *
984 * [filter] - The standard list filter.
985 *
986 * [pageSize] - The standard list page size.
987 *
988 * [pageToken] - The standard list page token.
989 *
990 * Completes with a [ListOperationsResponse].
991 *
992 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
993 * error.
994 *
995 * If the used [http.Client] completes with an error when making a REST call,
996 * this method will complete with the same error.
997 */
998 async.Future<ListOperationsResponse> list(core.String name, {core.String filte r, core.int pageSize, core.String pageToken}) {
999 var _url = null;
1000 var _queryParams = new core.Map();
1001 var _uploadMedia = null;
1002 var _uploadOptions = null;
1003 var _downloadOptions = commons.DownloadOptions.Metadata;
1004 var _body = null;
1005
1006 if (name == null) {
1007 throw new core.ArgumentError("Parameter name is required.");
1008 }
1009 if (filter != null) {
1010 _queryParams["filter"] = [filter];
1011 }
1012 if (pageSize != null) {
1013 _queryParams["pageSize"] = ["${pageSize}"];
1014 }
1015 if (pageToken != null) {
1016 _queryParams["pageToken"] = [pageToken];
1017 }
1018
1019 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$name');
1020
1021 var _response = _requester.request(_url,
1022 "GET",
1023 body: _body,
1024 queryParams: _queryParams,
1025 uploadOptions: _uploadOptions,
1026 uploadMedia: _uploadMedia,
1027 downloadOptions: _downloadOptions);
1028 return _response.then((data) => new ListOperationsResponse.fromJson(data));
1029 }
1030
1031 }
1032
1033
1034
1035 /** A request to cancel a job. */
1036 class CancelJobRequest {
1037
1038 CancelJobRequest();
1039
1040 CancelJobRequest.fromJson(core.Map _json) {
1041 }
1042
1043 core.Map toJson() {
1044 var _json = new core.Map();
1045 return _json;
1046 }
1047 }
1048
1049 /**
1050 * Describes the identifying information, config, and status of a cluster of
1051 * Google Compute Engine instances.
1052 */
1053 class Cluster {
1054 /**
1055 * [Required] The cluster name. Cluster names within a project must be unique.
1056 * Names of deleted clusters can be reused.
1057 */
1058 core.String clusterName;
1059 /**
1060 * [Output-only] A cluster UUID (Unique Universal Identifier). Cloud Dataproc
1061 * generates this value when it creates the cluster.
1062 */
1063 core.String clusterUuid;
1064 /**
1065 * [Required] The cluster config. Note that Cloud Dataproc may set default
1066 * values, and values may change when clusters are updated.
1067 */
1068 ClusterConfig config;
1069 /**
1070 * [Required] The Google Cloud Platform project ID that the cluster belongs
1071 * to.
1072 */
1073 core.String projectId;
1074 /** [Output-only] Cluster status. */
1075 ClusterStatus status;
1076 /** [Output-only] The previous cluster status. */
1077 core.List<ClusterStatus> statusHistory;
1078
1079 Cluster();
1080
1081 Cluster.fromJson(core.Map _json) {
1082 if (_json.containsKey("clusterName")) {
1083 clusterName = _json["clusterName"];
1084 }
1085 if (_json.containsKey("clusterUuid")) {
1086 clusterUuid = _json["clusterUuid"];
1087 }
1088 if (_json.containsKey("config")) {
1089 config = new ClusterConfig.fromJson(_json["config"]);
1090 }
1091 if (_json.containsKey("projectId")) {
1092 projectId = _json["projectId"];
1093 }
1094 if (_json.containsKey("status")) {
1095 status = new ClusterStatus.fromJson(_json["status"]);
1096 }
1097 if (_json.containsKey("statusHistory")) {
1098 statusHistory = _json["statusHistory"].map((value) => new ClusterStatus.fr omJson(value)).toList();
1099 }
1100 }
1101
1102 core.Map toJson() {
1103 var _json = new core.Map();
1104 if (clusterName != null) {
1105 _json["clusterName"] = clusterName;
1106 }
1107 if (clusterUuid != null) {
1108 _json["clusterUuid"] = clusterUuid;
1109 }
1110 if (config != null) {
1111 _json["config"] = (config).toJson();
1112 }
1113 if (projectId != null) {
1114 _json["projectId"] = projectId;
1115 }
1116 if (status != null) {
1117 _json["status"] = (status).toJson();
1118 }
1119 if (statusHistory != null) {
1120 _json["statusHistory"] = statusHistory.map((value) => (value).toJson()).to List();
1121 }
1122 return _json;
1123 }
1124 }
1125
1126 /** The cluster config. */
1127 class ClusterConfig {
1128 /**
1129 * [Optional] A Google Cloud Storage staging bucket used for sharing generated
1130 * SSH keys and config. If you do not specify a staging bucket, Cloud Dataproc
1131 * will determine an appropriate Cloud Storage location (US, ASIA, or EU) for
1132 * your cluster's staging bucket according to the Google Compute Engine zone
1133 * where your cluster is deployed, and then it will create and manage this
1134 * project-level, per-location bucket for you.
1135 */
1136 core.String configBucket;
1137 /**
1138 * [Optional] The shared Google Compute Engine config settings for all
1139 * instances in a cluster.
1140 */
1141 GceClusterConfig gceClusterConfig;
1142 /**
1143 * [Optional] Commands to execute on each node after config is completed. By
1144 * default, executables are run on master and all worker nodes. You can test a
1145 * node's role metadata to run an executable on a master or worker node, as
1146 * shown below: ROLE=$(/usr/share/google/get_metadata_value attributes/role)
1147 * if [[ "${ROLE}" == 'Master' ]]; then ... master specific actions ... else
1148 * ... worker specific actions ... fi
1149 */
1150 core.List<NodeInitializationAction> initializationActions;
1151 /**
1152 * [Optional] The Google Compute Engine config settings for the master
1153 * instance in a cluster.
1154 */
1155 InstanceGroupConfig masterConfig;
1156 /**
1157 * [Optional] The Google Compute Engine config settings for additional worker
1158 * instances in a cluster.
1159 */
1160 InstanceGroupConfig secondaryWorkerConfig;
1161 /** [Optional] The config settings for software inside the cluster. */
1162 SoftwareConfig softwareConfig;
1163 /**
1164 * [Optional] The Google Compute Engine config settings for worker instances
1165 * in a cluster.
1166 */
1167 InstanceGroupConfig workerConfig;
1168
1169 ClusterConfig();
1170
1171 ClusterConfig.fromJson(core.Map _json) {
1172 if (_json.containsKey("configBucket")) {
1173 configBucket = _json["configBucket"];
1174 }
1175 if (_json.containsKey("gceClusterConfig")) {
1176 gceClusterConfig = new GceClusterConfig.fromJson(_json["gceClusterConfig"] );
1177 }
1178 if (_json.containsKey("initializationActions")) {
1179 initializationActions = _json["initializationActions"].map((value) => new NodeInitializationAction.fromJson(value)).toList();
1180 }
1181 if (_json.containsKey("masterConfig")) {
1182 masterConfig = new InstanceGroupConfig.fromJson(_json["masterConfig"]);
1183 }
1184 if (_json.containsKey("secondaryWorkerConfig")) {
1185 secondaryWorkerConfig = new InstanceGroupConfig.fromJson(_json["secondaryW orkerConfig"]);
1186 }
1187 if (_json.containsKey("softwareConfig")) {
1188 softwareConfig = new SoftwareConfig.fromJson(_json["softwareConfig"]);
1189 }
1190 if (_json.containsKey("workerConfig")) {
1191 workerConfig = new InstanceGroupConfig.fromJson(_json["workerConfig"]);
1192 }
1193 }
1194
1195 core.Map toJson() {
1196 var _json = new core.Map();
1197 if (configBucket != null) {
1198 _json["configBucket"] = configBucket;
1199 }
1200 if (gceClusterConfig != null) {
1201 _json["gceClusterConfig"] = (gceClusterConfig).toJson();
1202 }
1203 if (initializationActions != null) {
1204 _json["initializationActions"] = initializationActions.map((value) => (val ue).toJson()).toList();
1205 }
1206 if (masterConfig != null) {
1207 _json["masterConfig"] = (masterConfig).toJson();
1208 }
1209 if (secondaryWorkerConfig != null) {
1210 _json["secondaryWorkerConfig"] = (secondaryWorkerConfig).toJson();
1211 }
1212 if (softwareConfig != null) {
1213 _json["softwareConfig"] = (softwareConfig).toJson();
1214 }
1215 if (workerConfig != null) {
1216 _json["workerConfig"] = (workerConfig).toJson();
1217 }
1218 return _json;
1219 }
1220 }
1221
1222 /** Metadata describing the operation. */
1223 class ClusterOperationMetadata {
1224 /** Name of the cluster for the operation. */
1225 core.String clusterName;
1226 /** Cluster UUId for the operation. */
1227 core.String clusterUuid;
1228 /** [Output-only] Short description of operation. */
1229 core.String description;
1230 /** [Output-only] The operation type. */
1231 core.String operationType;
1232 /** [Output-only] Current operation status. */
1233 ClusterOperationStatus status;
1234 /** [Output-only] The previous operation status. */
1235 core.List<ClusterOperationStatus> statusHistory;
1236
1237 ClusterOperationMetadata();
1238
1239 ClusterOperationMetadata.fromJson(core.Map _json) {
1240 if (_json.containsKey("clusterName")) {
1241 clusterName = _json["clusterName"];
1242 }
1243 if (_json.containsKey("clusterUuid")) {
1244 clusterUuid = _json["clusterUuid"];
1245 }
1246 if (_json.containsKey("description")) {
1247 description = _json["description"];
1248 }
1249 if (_json.containsKey("operationType")) {
1250 operationType = _json["operationType"];
1251 }
1252 if (_json.containsKey("status")) {
1253 status = new ClusterOperationStatus.fromJson(_json["status"]);
1254 }
1255 if (_json.containsKey("statusHistory")) {
1256 statusHistory = _json["statusHistory"].map((value) => new ClusterOperation Status.fromJson(value)).toList();
1257 }
1258 }
1259
1260 core.Map toJson() {
1261 var _json = new core.Map();
1262 if (clusterName != null) {
1263 _json["clusterName"] = clusterName;
1264 }
1265 if (clusterUuid != null) {
1266 _json["clusterUuid"] = clusterUuid;
1267 }
1268 if (description != null) {
1269 _json["description"] = description;
1270 }
1271 if (operationType != null) {
1272 _json["operationType"] = operationType;
1273 }
1274 if (status != null) {
1275 _json["status"] = (status).toJson();
1276 }
1277 if (statusHistory != null) {
1278 _json["statusHistory"] = statusHistory.map((value) => (value).toJson()).to List();
1279 }
1280 return _json;
1281 }
1282 }
1283
1284 /** The status of the operation. */
1285 class ClusterOperationStatus {
1286 /** A message containing any operation metadata details. */
1287 core.String details;
1288 /** A message containing the detailed operation state. */
1289 core.String innerState;
1290 /**
1291 * A message containing the operation state.
1292 * Possible string values are:
1293 * - "UNKNOWN" : A UNKNOWN.
1294 * - "PENDING" : A PENDING.
1295 * - "RUNNING" : A RUNNING.
1296 * - "DONE" : A DONE.
1297 */
1298 core.String state;
1299 /** The time this state was entered. */
1300 core.String stateStartTime;
1301
1302 ClusterOperationStatus();
1303
1304 ClusterOperationStatus.fromJson(core.Map _json) {
1305 if (_json.containsKey("details")) {
1306 details = _json["details"];
1307 }
1308 if (_json.containsKey("innerState")) {
1309 innerState = _json["innerState"];
1310 }
1311 if (_json.containsKey("state")) {
1312 state = _json["state"];
1313 }
1314 if (_json.containsKey("stateStartTime")) {
1315 stateStartTime = _json["stateStartTime"];
1316 }
1317 }
1318
1319 core.Map toJson() {
1320 var _json = new core.Map();
1321 if (details != null) {
1322 _json["details"] = details;
1323 }
1324 if (innerState != null) {
1325 _json["innerState"] = innerState;
1326 }
1327 if (state != null) {
1328 _json["state"] = state;
1329 }
1330 if (stateStartTime != null) {
1331 _json["stateStartTime"] = stateStartTime;
1332 }
1333 return _json;
1334 }
1335 }
1336
1337 /** The status of a cluster and its instances. */
1338 class ClusterStatus {
1339 /** Optional details of cluster's state. */
1340 core.String detail;
1341 /**
1342 * The cluster's state.
1343 * Possible string values are:
1344 * - "UNKNOWN" : A UNKNOWN.
1345 * - "CREATING" : A CREATING.
1346 * - "RUNNING" : A RUNNING.
1347 * - "ERROR" : A ERROR.
1348 * - "DELETING" : A DELETING.
1349 * - "UPDATING" : A UPDATING.
1350 */
1351 core.String state;
1352 /** Time when this state was entered. */
1353 core.String stateStartTime;
1354
1355 ClusterStatus();
1356
1357 ClusterStatus.fromJson(core.Map _json) {
1358 if (_json.containsKey("detail")) {
1359 detail = _json["detail"];
1360 }
1361 if (_json.containsKey("state")) {
1362 state = _json["state"];
1363 }
1364 if (_json.containsKey("stateStartTime")) {
1365 stateStartTime = _json["stateStartTime"];
1366 }
1367 }
1368
1369 core.Map toJson() {
1370 var _json = new core.Map();
1371 if (detail != null) {
1372 _json["detail"] = detail;
1373 }
1374 if (state != null) {
1375 _json["state"] = state;
1376 }
1377 if (stateStartTime != null) {
1378 _json["stateStartTime"] = stateStartTime;
1379 }
1380 return _json;
1381 }
1382 }
173 1383
174 /** The location where output from diagnostic command can be found. */ 1384 /** The location where output from diagnostic command can be found. */
175 class DiagnoseClusterOutputLocation { 1385 class DiagnoseClusterOutputLocation {
176 /** 1386 /**
177 * [Output-only] The Google Cloud Storage URI of the diagnostic output. This 1387 * [Output-only] The Google Cloud Storage URI of the diagnostic output. This
178 * will be a plain text file with summary of collected diagnostics. 1388 * will be a plain text file with summary of collected diagnostics.
179 */ 1389 */
180 core.String outputUri; 1390 core.String outputUri;
181 1391
182 DiagnoseClusterOutputLocation(); 1392 DiagnoseClusterOutputLocation();
183 1393
184 DiagnoseClusterOutputLocation.fromJson(core.Map _json) { 1394 DiagnoseClusterOutputLocation.fromJson(core.Map _json) {
185 if (_json.containsKey("outputUri")) { 1395 if (_json.containsKey("outputUri")) {
186 outputUri = _json["outputUri"]; 1396 outputUri = _json["outputUri"];
187 } 1397 }
188 } 1398 }
189 1399
190 core.Map toJson() { 1400 core.Map toJson() {
191 var _json = new core.Map(); 1401 var _json = new core.Map();
192 if (outputUri != null) { 1402 if (outputUri != null) {
193 _json["outputUri"] = outputUri; 1403 _json["outputUri"] = outputUri;
194 } 1404 }
195 return _json; 1405 return _json;
196 } 1406 }
197 } 1407 }
198 1408
1409 /** A request to collect cluster diagnostic information. */
1410 class DiagnoseClusterRequest {
1411
1412 DiagnoseClusterRequest();
1413
1414 DiagnoseClusterRequest.fromJson(core.Map _json) {
1415 }
1416
1417 core.Map toJson() {
1418 var _json = new core.Map();
1419 return _json;
1420 }
1421 }
1422
1423 /** The location of diagnostic output. */
1424 class DiagnoseClusterResults {
1425 /**
1426 * [Output-only] The Google Cloud Storage URI of the diagnostic output. This
1427 * is a plain text file with a summary of collected diagnostics.
1428 */
1429 core.String outputUri;
1430
1431 DiagnoseClusterResults();
1432
1433 DiagnoseClusterResults.fromJson(core.Map _json) {
1434 if (_json.containsKey("outputUri")) {
1435 outputUri = _json["outputUri"];
1436 }
1437 }
1438
1439 core.Map toJson() {
1440 var _json = new core.Map();
1441 if (outputUri != null) {
1442 _json["outputUri"] = outputUri;
1443 }
1444 return _json;
1445 }
1446 }
1447
1448 /** Specifies the config of disk options for a group of VM instances. */
1449 class DiskConfig {
1450 /** [Optional] Size in GB of the boot disk (default is 500GB). */
1451 core.int bootDiskSizeGb;
1452 /**
1453 * [Optional] Number of attached SSDs, from 0 to 4 (default is 0). If SSDs are
1454 * not attached, the boot disk is used to store runtime logs and HDFS data. If
1455 * one or more SSDs are attached, this runtime bulk data is spread across
1456 * them, and the boot disk contains only basic config and installed binaries.
1457 */
1458 core.int numLocalSsds;
1459
1460 DiskConfig();
1461
1462 DiskConfig.fromJson(core.Map _json) {
1463 if (_json.containsKey("bootDiskSizeGb")) {
1464 bootDiskSizeGb = _json["bootDiskSizeGb"];
1465 }
1466 if (_json.containsKey("numLocalSsds")) {
1467 numLocalSsds = _json["numLocalSsds"];
1468 }
1469 }
1470
1471 core.Map toJson() {
1472 var _json = new core.Map();
1473 if (bootDiskSizeGb != null) {
1474 _json["bootDiskSizeGb"] = bootDiskSizeGb;
1475 }
1476 if (numLocalSsds != null) {
1477 _json["numLocalSsds"] = numLocalSsds;
1478 }
1479 return _json;
1480 }
1481 }
1482
1483 /**
1484 * A generic empty message that you can re-use to avoid defining duplicated
1485 * empty messages in your APIs. A typical example is to use it as the request or
1486 * the response type of an API method. For instance: service Foo { rpc
1487 * Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON
1488 * representation for `Empty` is empty JSON object `{}`.
1489 */
1490 class Empty {
1491
1492 Empty();
1493
1494 Empty.fromJson(core.Map _json) {
1495 }
1496
1497 core.Map toJson() {
1498 var _json = new core.Map();
1499 return _json;
1500 }
1501 }
1502
1503 /**
1504 * Common config settings for resources of Google Compute Engine cluster
1505 * instances, applicable to all instances in the cluster.
1506 */
1507 class GceClusterConfig {
1508 /** The Google Compute Engine metadata entries to add to all instances. */
1509 core.Map<core.String, core.String> metadata;
1510 /**
1511 * The Google Compute Engine network to be used for machine communications.
1512 * Cannot be specified with subnetwork_uri. If neither network_uri nor
1513 * subnetwork_uri is specified, the "default" network of the project is used,
1514 * if it exists. Cannot be a "Custom Subnet Network" (see
1515 * https://cloud.google.com/compute/docs/subnetworks for more information).
1516 * Example:
1517 * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global /default`.
1518 */
1519 core.String networkUri;
1520 /**
1521 * The URIs of service account scopes to be included in Google Compute Engine
1522 * instances. The following base set of scopes is always included: *
1523 * https://www.googleapis.com/auth/cloud.useraccounts.readonly *
1524 * https://www.googleapis.com/auth/devstorage.read_write *
1525 * https://www.googleapis.com/auth/logging.write If no scopes are specfied,
1526 * the following defaults are also provided: *
1527 * https://www.googleapis.com/auth/bigquery *
1528 * https://www.googleapis.com/auth/bigtable.admin.table *
1529 * https://www.googleapis.com/auth/bigtable.data *
1530 * https://www.googleapis.com/auth/devstorage.full_control
1531 */
1532 core.List<core.String> serviceAccountScopes;
1533 /**
1534 * The Google Compute Engine subnetwork to be used for machine communications.
1535 * Cannot be specified with network_uri. Example:
1536 * `https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-eas t1/sub0`.
1537 */
1538 core.String subnetworkUri;
1539 /** The Google Compute Engine tags to add to all instances. */
1540 core.List<core.String> tags;
1541 /**
1542 * [Required] The zone where the Google Compute Engine cluster will be
1543 * located. Example:
1544 * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]`.
1545 */
1546 core.String zoneUri;
1547
1548 GceClusterConfig();
1549
1550 GceClusterConfig.fromJson(core.Map _json) {
1551 if (_json.containsKey("metadata")) {
1552 metadata = _json["metadata"];
1553 }
1554 if (_json.containsKey("networkUri")) {
1555 networkUri = _json["networkUri"];
1556 }
1557 if (_json.containsKey("serviceAccountScopes")) {
1558 serviceAccountScopes = _json["serviceAccountScopes"];
1559 }
1560 if (_json.containsKey("subnetworkUri")) {
1561 subnetworkUri = _json["subnetworkUri"];
1562 }
1563 if (_json.containsKey("tags")) {
1564 tags = _json["tags"];
1565 }
1566 if (_json.containsKey("zoneUri")) {
1567 zoneUri = _json["zoneUri"];
1568 }
1569 }
1570
1571 core.Map toJson() {
1572 var _json = new core.Map();
1573 if (metadata != null) {
1574 _json["metadata"] = metadata;
1575 }
1576 if (networkUri != null) {
1577 _json["networkUri"] = networkUri;
1578 }
1579 if (serviceAccountScopes != null) {
1580 _json["serviceAccountScopes"] = serviceAccountScopes;
1581 }
1582 if (subnetworkUri != null) {
1583 _json["subnetworkUri"] = subnetworkUri;
1584 }
1585 if (tags != null) {
1586 _json["tags"] = tags;
1587 }
1588 if (zoneUri != null) {
1589 _json["zoneUri"] = zoneUri;
1590 }
1591 return _json;
1592 }
1593 }
1594
1595 /** A Cloud Dataproc job for running Hadoop MapReduce jobs on YARN. */
1596 class HadoopJob {
1597 /**
1598 * [Optional] HCFS URIs of archives to be extracted in the working directory
1599 * of Hadoop drivers and tasks. Supported file types: .jar, .tar, .tar.gz,
1600 * .tgz, or .zip.
1601 */
1602 core.List<core.String> archiveUris;
1603 /**
1604 * [Optional] The arguments to pass to the driver. Do not include arguments,
1605 * such as `-libjars` or `-Dfoo=bar`, that can be set as job properties, since
1606 * a collision may occur that causes an incorrect job submission.
1607 */
1608 core.List<core.String> args;
1609 /**
1610 * [Optional] HCFS (Hadoop Compatible Filesystem) URIs of files to be copied
1611 * to the working directory of Hadoop drivers and distributed tasks. Useful
1612 * for naively parallel tasks.
1613 */
1614 core.List<core.String> fileUris;
1615 /**
1616 * [Optional] Jar file URIs to add to the CLASSPATHs of the Hadoop driver and
1617 * tasks.
1618 */
1619 core.List<core.String> jarFileUris;
1620 /** [Optional] The runtime log config for job execution. */
1621 LoggingConfig loggingConfig;
1622 /**
1623 * The name of the driver's main class. The jar file containing the class must
1624 * be in the default CLASSPATH or specified in `jar_file_uris`.
1625 */
1626 core.String mainClass;
1627 /**
1628 * The HCFS URI of the jar file containing the main class. Examples:
1629 * 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
1630 * 'hdfs:/tmp/test-samples/custom-wordcount.jar'
1631 * 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
1632 */
1633 core.String mainJarFileUri;
1634 /**
1635 * [Optional] A mapping of property names to values, used to configure Hadoop.
1636 * Properties that conflict with values set by the Cloud Dataproc API may be
1637 * overwritten. Can include properties set in /etc/hadoop/conf / * -site and
1638 * classes in user code.
1639 */
1640 core.Map<core.String, core.String> properties;
1641
1642 HadoopJob();
1643
1644 HadoopJob.fromJson(core.Map _json) {
1645 if (_json.containsKey("archiveUris")) {
1646 archiveUris = _json["archiveUris"];
1647 }
1648 if (_json.containsKey("args")) {
1649 args = _json["args"];
1650 }
1651 if (_json.containsKey("fileUris")) {
1652 fileUris = _json["fileUris"];
1653 }
1654 if (_json.containsKey("jarFileUris")) {
1655 jarFileUris = _json["jarFileUris"];
1656 }
1657 if (_json.containsKey("loggingConfig")) {
1658 loggingConfig = new LoggingConfig.fromJson(_json["loggingConfig"]);
1659 }
1660 if (_json.containsKey("mainClass")) {
1661 mainClass = _json["mainClass"];
1662 }
1663 if (_json.containsKey("mainJarFileUri")) {
1664 mainJarFileUri = _json["mainJarFileUri"];
1665 }
1666 if (_json.containsKey("properties")) {
1667 properties = _json["properties"];
1668 }
1669 }
1670
1671 core.Map toJson() {
1672 var _json = new core.Map();
1673 if (archiveUris != null) {
1674 _json["archiveUris"] = archiveUris;
1675 }
1676 if (args != null) {
1677 _json["args"] = args;
1678 }
1679 if (fileUris != null) {
1680 _json["fileUris"] = fileUris;
1681 }
1682 if (jarFileUris != null) {
1683 _json["jarFileUris"] = jarFileUris;
1684 }
1685 if (loggingConfig != null) {
1686 _json["loggingConfig"] = (loggingConfig).toJson();
1687 }
1688 if (mainClass != null) {
1689 _json["mainClass"] = mainClass;
1690 }
1691 if (mainJarFileUri != null) {
1692 _json["mainJarFileUri"] = mainJarFileUri;
1693 }
1694 if (properties != null) {
1695 _json["properties"] = properties;
1696 }
1697 return _json;
1698 }
1699 }
1700
1701 /** A Cloud Dataproc job for running Hive queries on YARN. */
1702 class HiveJob {
1703 /**
1704 * [Optional] Whether to continue executing queries if a query fails. The
1705 * default value is `false`. Setting to `true` can be useful when executing
1706 * independent parallel queries.
1707 */
1708 core.bool continueOnFailure;
1709 /**
1710 * [Optional] HCFS URIs of jar files to add to the CLASSPATH of the Hive
1711 * server and Hadoop MapReduce (MR) tasks. Can contain Hive SerDes and UDFs.
1712 */
1713 core.List<core.String> jarFileUris;
1714 /**
1715 * [Optional] A mapping of property names and values, used to configure Hive.
1716 * Properties that conflict with values set by the Cloud Dataproc API may be
1717 * overwritten. Can include properties set in /etc/hadoop/conf / * -site.xml,
1718 * /etc/hive/conf/hive-site.xml, and classes in user code.
1719 */
1720 core.Map<core.String, core.String> properties;
1721 /** The HCFS URI of the script that contains Hive queries. */
1722 core.String queryFileUri;
1723 /** A list of queries. */
1724 QueryList queryList;
1725 /**
1726 * [Optional] Mapping of query variable names to values (equivalent to the
1727 * Hive command: `SET name="value";`).
1728 */
1729 core.Map<core.String, core.String> scriptVariables;
1730
1731 HiveJob();
1732
1733 HiveJob.fromJson(core.Map _json) {
1734 if (_json.containsKey("continueOnFailure")) {
1735 continueOnFailure = _json["continueOnFailure"];
1736 }
1737 if (_json.containsKey("jarFileUris")) {
1738 jarFileUris = _json["jarFileUris"];
1739 }
1740 if (_json.containsKey("properties")) {
1741 properties = _json["properties"];
1742 }
1743 if (_json.containsKey("queryFileUri")) {
1744 queryFileUri = _json["queryFileUri"];
1745 }
1746 if (_json.containsKey("queryList")) {
1747 queryList = new QueryList.fromJson(_json["queryList"]);
1748 }
1749 if (_json.containsKey("scriptVariables")) {
1750 scriptVariables = _json["scriptVariables"];
1751 }
1752 }
1753
1754 core.Map toJson() {
1755 var _json = new core.Map();
1756 if (continueOnFailure != null) {
1757 _json["continueOnFailure"] = continueOnFailure;
1758 }
1759 if (jarFileUris != null) {
1760 _json["jarFileUris"] = jarFileUris;
1761 }
1762 if (properties != null) {
1763 _json["properties"] = properties;
1764 }
1765 if (queryFileUri != null) {
1766 _json["queryFileUri"] = queryFileUri;
1767 }
1768 if (queryList != null) {
1769 _json["queryList"] = (queryList).toJson();
1770 }
1771 if (scriptVariables != null) {
1772 _json["scriptVariables"] = scriptVariables;
1773 }
1774 return _json;
1775 }
1776 }
1777
1778 /**
1779 * The config settings for Google Compute Engine resources in an instance group,
1780 * such as a master or worker group.
1781 */
1782 class InstanceGroupConfig {
1783 /** Disk option config settings. */
1784 DiskConfig diskConfig;
1785 /**
1786 * [Output-only] The Google Compute Engine image resource used for cluster
1787 * instances. Inferred from `SoftwareConfig.image_version`.
1788 */
1789 core.String imageUri;
1790 /**
1791 * The list of instance names. Cloud Dataproc derives the names from
1792 * `cluster_name`, `num_instances`, and the instance group if not set by user
1793 * (recommended practice is to let Cloud Dataproc derive the name).
1794 */
1795 core.List<core.String> instanceNames;
1796 /** Specifies that this instance group contains Preemptible Instances. */
1797 core.bool isPreemptible;
1798 /**
1799 * The Google Compute Engine machine type used for cluster instances. Example:
1800 * `https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1 -a/machineTypes/n1-standard-2`.
1801 */
1802 core.String machineTypeUri;
1803 /**
1804 * [Output-only] The config for Google Compute Engine Instance Group Manager
1805 * that manages this group. This is only used for preemptible instance groups.
1806 */
1807 ManagedGroupConfig managedGroupConfig;
1808 /**
1809 * The number of VM instances in the instance group. For master instance
1810 * groups, must be set to 1.
1811 */
1812 core.int numInstances;
1813
1814 InstanceGroupConfig();
1815
1816 InstanceGroupConfig.fromJson(core.Map _json) {
1817 if (_json.containsKey("diskConfig")) {
1818 diskConfig = new DiskConfig.fromJson(_json["diskConfig"]);
1819 }
1820 if (_json.containsKey("imageUri")) {
1821 imageUri = _json["imageUri"];
1822 }
1823 if (_json.containsKey("instanceNames")) {
1824 instanceNames = _json["instanceNames"];
1825 }
1826 if (_json.containsKey("isPreemptible")) {
1827 isPreemptible = _json["isPreemptible"];
1828 }
1829 if (_json.containsKey("machineTypeUri")) {
1830 machineTypeUri = _json["machineTypeUri"];
1831 }
1832 if (_json.containsKey("managedGroupConfig")) {
1833 managedGroupConfig = new ManagedGroupConfig.fromJson(_json["managedGroupCo nfig"]);
1834 }
1835 if (_json.containsKey("numInstances")) {
1836 numInstances = _json["numInstances"];
1837 }
1838 }
1839
1840 core.Map toJson() {
1841 var _json = new core.Map();
1842 if (diskConfig != null) {
1843 _json["diskConfig"] = (diskConfig).toJson();
1844 }
1845 if (imageUri != null) {
1846 _json["imageUri"] = imageUri;
1847 }
1848 if (instanceNames != null) {
1849 _json["instanceNames"] = instanceNames;
1850 }
1851 if (isPreemptible != null) {
1852 _json["isPreemptible"] = isPreemptible;
1853 }
1854 if (machineTypeUri != null) {
1855 _json["machineTypeUri"] = machineTypeUri;
1856 }
1857 if (managedGroupConfig != null) {
1858 _json["managedGroupConfig"] = (managedGroupConfig).toJson();
1859 }
1860 if (numInstances != null) {
1861 _json["numInstances"] = numInstances;
1862 }
1863 return _json;
1864 }
1865 }
1866
1867 /** A Cloud Dataproc job resource. */
1868 class Job {
1869 /**
1870 * [Output-only] If present, the location of miscellaneous control files which
1871 * may be used as part of job setup and handling. If not present, control
1872 * files may be placed in the same location as `driver_output_uri`.
1873 */
1874 core.String driverControlFilesUri;
1875 /**
1876 * [Output-only] A URI pointing to the location of the stdout of the job's
1877 * driver program.
1878 */
1879 core.String driverOutputResourceUri;
1880 /** Job is a Hadoop job. */
1881 HadoopJob hadoopJob;
1882 /** Job is a Hive job. */
1883 HiveJob hiveJob;
1884 /** Job is a Pig job. */
1885 PigJob pigJob;
1886 /**
1887 * [Required] Job information, including how, when, and where to run the job.
1888 */
1889 JobPlacement placement;
1890 /** Job is a Pyspark job. */
1891 PySparkJob pysparkJob;
1892 /**
1893 * [Optional] The fully qualified reference to the job, which can be used to
1894 * obtain the equivalent REST path of the job resource. If this property is
1895 * not specified when a job is created, the server generates a job_id.
1896 */
1897 JobReference reference;
1898 /** Job is a Spark job. */
1899 SparkJob sparkJob;
1900 /** Job is a SparkSql job. */
1901 SparkSqlJob sparkSqlJob;
1902 /**
1903 * [Output-only] The job status. Additional application-specific status
1904 * information may be contained in the type_job and yarn_applications fields.
1905 */
1906 JobStatus status;
1907 /** [Output-only] The previous job status. */
1908 core.List<JobStatus> statusHistory;
1909
1910 Job();
1911
1912 Job.fromJson(core.Map _json) {
1913 if (_json.containsKey("driverControlFilesUri")) {
1914 driverControlFilesUri = _json["driverControlFilesUri"];
1915 }
1916 if (_json.containsKey("driverOutputResourceUri")) {
1917 driverOutputResourceUri = _json["driverOutputResourceUri"];
1918 }
1919 if (_json.containsKey("hadoopJob")) {
1920 hadoopJob = new HadoopJob.fromJson(_json["hadoopJob"]);
1921 }
1922 if (_json.containsKey("hiveJob")) {
1923 hiveJob = new HiveJob.fromJson(_json["hiveJob"]);
1924 }
1925 if (_json.containsKey("pigJob")) {
1926 pigJob = new PigJob.fromJson(_json["pigJob"]);
1927 }
1928 if (_json.containsKey("placement")) {
1929 placement = new JobPlacement.fromJson(_json["placement"]);
1930 }
1931 if (_json.containsKey("pysparkJob")) {
1932 pysparkJob = new PySparkJob.fromJson(_json["pysparkJob"]);
1933 }
1934 if (_json.containsKey("reference")) {
1935 reference = new JobReference.fromJson(_json["reference"]);
1936 }
1937 if (_json.containsKey("sparkJob")) {
1938 sparkJob = new SparkJob.fromJson(_json["sparkJob"]);
1939 }
1940 if (_json.containsKey("sparkSqlJob")) {
1941 sparkSqlJob = new SparkSqlJob.fromJson(_json["sparkSqlJob"]);
1942 }
1943 if (_json.containsKey("status")) {
1944 status = new JobStatus.fromJson(_json["status"]);
1945 }
1946 if (_json.containsKey("statusHistory")) {
1947 statusHistory = _json["statusHistory"].map((value) => new JobStatus.fromJs on(value)).toList();
1948 }
1949 }
1950
1951 core.Map toJson() {
1952 var _json = new core.Map();
1953 if (driverControlFilesUri != null) {
1954 _json["driverControlFilesUri"] = driverControlFilesUri;
1955 }
1956 if (driverOutputResourceUri != null) {
1957 _json["driverOutputResourceUri"] = driverOutputResourceUri;
1958 }
1959 if (hadoopJob != null) {
1960 _json["hadoopJob"] = (hadoopJob).toJson();
1961 }
1962 if (hiveJob != null) {
1963 _json["hiveJob"] = (hiveJob).toJson();
1964 }
1965 if (pigJob != null) {
1966 _json["pigJob"] = (pigJob).toJson();
1967 }
1968 if (placement != null) {
1969 _json["placement"] = (placement).toJson();
1970 }
1971 if (pysparkJob != null) {
1972 _json["pysparkJob"] = (pysparkJob).toJson();
1973 }
1974 if (reference != null) {
1975 _json["reference"] = (reference).toJson();
1976 }
1977 if (sparkJob != null) {
1978 _json["sparkJob"] = (sparkJob).toJson();
1979 }
1980 if (sparkSqlJob != null) {
1981 _json["sparkSqlJob"] = (sparkSqlJob).toJson();
1982 }
1983 if (status != null) {
1984 _json["status"] = (status).toJson();
1985 }
1986 if (statusHistory != null) {
1987 _json["statusHistory"] = statusHistory.map((value) => (value).toJson()).to List();
1988 }
1989 return _json;
1990 }
1991 }
1992
1993 /** Cloud Dataproc job config. */
1994 class JobPlacement {
1995 /** [Required] The name of the cluster where the job will be submitted. */
1996 core.String clusterName;
1997 /**
1998 * [Output-only] A cluster UUID generated by the Cloud Dataproc service when
1999 * the job is submitted.
2000 */
2001 core.String clusterUuid;
2002
2003 JobPlacement();
2004
2005 JobPlacement.fromJson(core.Map _json) {
2006 if (_json.containsKey("clusterName")) {
2007 clusterName = _json["clusterName"];
2008 }
2009 if (_json.containsKey("clusterUuid")) {
2010 clusterUuid = _json["clusterUuid"];
2011 }
2012 }
2013
2014 core.Map toJson() {
2015 var _json = new core.Map();
2016 if (clusterName != null) {
2017 _json["clusterName"] = clusterName;
2018 }
2019 if (clusterUuid != null) {
2020 _json["clusterUuid"] = clusterUuid;
2021 }
2022 return _json;
2023 }
2024 }
2025
2026 /** Encapsulates the full scoping used to reference a job. */
2027 class JobReference {
2028 /**
2029 * [Required] The job ID, which must be unique within the project. The job ID
2030 * is generated by the server upon job submission or provided by the user as a
2031 * means to perform retries without creating duplicate jobs. The ID must
2032 * contain only letters (a-z, A-Z), numbers (0-9), underscores (_), or hyphens
2033 * (-). The maximum length is 512 characters.
2034 */
2035 core.String jobId;
2036 /**
2037 * [Required] The ID of the Google Cloud Platform project that the job belongs
2038 * to.
2039 */
2040 core.String projectId;
2041
2042 JobReference();
2043
2044 JobReference.fromJson(core.Map _json) {
2045 if (_json.containsKey("jobId")) {
2046 jobId = _json["jobId"];
2047 }
2048 if (_json.containsKey("projectId")) {
2049 projectId = _json["projectId"];
2050 }
2051 }
2052
2053 core.Map toJson() {
2054 var _json = new core.Map();
2055 if (jobId != null) {
2056 _json["jobId"] = jobId;
2057 }
2058 if (projectId != null) {
2059 _json["projectId"] = projectId;
2060 }
2061 return _json;
2062 }
2063 }
2064
2065 /** Cloud Dataproc job status. */
2066 class JobStatus {
2067 /**
2068 * [Optional] Job state details, such as an error description if the state is
2069 * ERROR.
2070 */
2071 core.String details;
2072 /**
2073 * [Required] A state message specifying the overall job state.
2074 * Possible string values are:
2075 * - "STATE_UNSPECIFIED" : A STATE_UNSPECIFIED.
2076 * - "PENDING" : A PENDING.
2077 * - "SETUP_DONE" : A SETUP_DONE.
2078 * - "RUNNING" : A RUNNING.
2079 * - "CANCEL_PENDING" : A CANCEL_PENDING.
2080 * - "CANCEL_STARTED" : A CANCEL_STARTED.
2081 * - "CANCELLED" : A CANCELLED.
2082 * - "DONE" : A DONE.
2083 * - "ERROR" : A ERROR.
2084 */
2085 core.String state;
2086 /** [Output-only] The time when this state was entered. */
2087 core.String stateStartTime;
2088
2089 JobStatus();
2090
2091 JobStatus.fromJson(core.Map _json) {
2092 if (_json.containsKey("details")) {
2093 details = _json["details"];
2094 }
2095 if (_json.containsKey("state")) {
2096 state = _json["state"];
2097 }
2098 if (_json.containsKey("stateStartTime")) {
2099 stateStartTime = _json["stateStartTime"];
2100 }
2101 }
2102
2103 core.Map toJson() {
2104 var _json = new core.Map();
2105 if (details != null) {
2106 _json["details"] = details;
2107 }
2108 if (state != null) {
2109 _json["state"] = state;
2110 }
2111 if (stateStartTime != null) {
2112 _json["stateStartTime"] = stateStartTime;
2113 }
2114 return _json;
2115 }
2116 }
2117
2118 /** The list of all clusters in a project. */
2119 class ListClustersResponse {
2120 /** [Output-only] The clusters in the project. */
2121 core.List<Cluster> clusters;
2122 /**
2123 * [Optional] This token is included in the response if there are more results
2124 * to fetch. To fetch additional results, provide this value as the
2125 * `page_token` in a subsequent ListClustersRequest.
2126 */
2127 core.String nextPageToken;
2128
2129 ListClustersResponse();
2130
2131 ListClustersResponse.fromJson(core.Map _json) {
2132 if (_json.containsKey("clusters")) {
2133 clusters = _json["clusters"].map((value) => new Cluster.fromJson(value)).t oList();
2134 }
2135 if (_json.containsKey("nextPageToken")) {
2136 nextPageToken = _json["nextPageToken"];
2137 }
2138 }
2139
2140 core.Map toJson() {
2141 var _json = new core.Map();
2142 if (clusters != null) {
2143 _json["clusters"] = clusters.map((value) => (value).toJson()).toList();
2144 }
2145 if (nextPageToken != null) {
2146 _json["nextPageToken"] = nextPageToken;
2147 }
2148 return _json;
2149 }
2150 }
2151
2152 /** A list of jobs in a project. */
2153 class ListJobsResponse {
2154 /** [Output-only] Jobs list. */
2155 core.List<Job> jobs;
2156 /**
2157 * [Optional] This token is included in the response if there are more results
2158 * to fetch. To fetch additional results, provide this value as the
2159 * `page_token` in a subsequent ListJobsRequest.
2160 */
2161 core.String nextPageToken;
2162
2163 ListJobsResponse();
2164
2165 ListJobsResponse.fromJson(core.Map _json) {
2166 if (_json.containsKey("jobs")) {
2167 jobs = _json["jobs"].map((value) => new Job.fromJson(value)).toList();
2168 }
2169 if (_json.containsKey("nextPageToken")) {
2170 nextPageToken = _json["nextPageToken"];
2171 }
2172 }
2173
2174 core.Map toJson() {
2175 var _json = new core.Map();
2176 if (jobs != null) {
2177 _json["jobs"] = jobs.map((value) => (value).toJson()).toList();
2178 }
2179 if (nextPageToken != null) {
2180 _json["nextPageToken"] = nextPageToken;
2181 }
2182 return _json;
2183 }
2184 }
2185
2186 /** The response message for Operations.ListOperations. */
2187 class ListOperationsResponse {
2188 /** The standard List next-page token. */
2189 core.String nextPageToken;
2190 /** A list of operations that matches the specified filter in the request. */
2191 core.List<Operation> operations;
2192
2193 ListOperationsResponse();
2194
2195 ListOperationsResponse.fromJson(core.Map _json) {
2196 if (_json.containsKey("nextPageToken")) {
2197 nextPageToken = _json["nextPageToken"];
2198 }
2199 if (_json.containsKey("operations")) {
2200 operations = _json["operations"].map((value) => new Operation.fromJson(val ue)).toList();
2201 }
2202 }
2203
2204 core.Map toJson() {
2205 var _json = new core.Map();
2206 if (nextPageToken != null) {
2207 _json["nextPageToken"] = nextPageToken;
2208 }
2209 if (operations != null) {
2210 _json["operations"] = operations.map((value) => (value).toJson()).toList() ;
2211 }
2212 return _json;
2213 }
2214 }
2215
2216 /** The runtime logging config of the job. */
2217 class LoggingConfig {
2218 /**
2219 * The per-package log levels for the driver. This may include "root" package
2220 * name to configure rootLogger. Examples: 'com.google = FATAL', 'root =
2221 * INFO', 'org.apache = DEBUG'
2222 */
2223 core.Map<core.String, core.String> driverLogLevels;
2224
2225 LoggingConfig();
2226
2227 LoggingConfig.fromJson(core.Map _json) {
2228 if (_json.containsKey("driverLogLevels")) {
2229 driverLogLevels = _json["driverLogLevels"];
2230 }
2231 }
2232
2233 core.Map toJson() {
2234 var _json = new core.Map();
2235 if (driverLogLevels != null) {
2236 _json["driverLogLevels"] = driverLogLevels;
2237 }
2238 return _json;
2239 }
2240 }
2241
2242 /** Specifies the resources used to actively manage an instance group. */
2243 class ManagedGroupConfig {
2244 /** [Output-only] The name of the Instance Group Manager for this group. */
2245 core.String instanceGroupManagerName;
2246 /**
2247 * [Output-only] The name of the Instance Template used for the Managed
2248 * Instance Group.
2249 */
2250 core.String instanceTemplateName;
2251
2252 ManagedGroupConfig();
2253
2254 ManagedGroupConfig.fromJson(core.Map _json) {
2255 if (_json.containsKey("instanceGroupManagerName")) {
2256 instanceGroupManagerName = _json["instanceGroupManagerName"];
2257 }
2258 if (_json.containsKey("instanceTemplateName")) {
2259 instanceTemplateName = _json["instanceTemplateName"];
2260 }
2261 }
2262
2263 core.Map toJson() {
2264 var _json = new core.Map();
2265 if (instanceGroupManagerName != null) {
2266 _json["instanceGroupManagerName"] = instanceGroupManagerName;
2267 }
2268 if (instanceTemplateName != null) {
2269 _json["instanceTemplateName"] = instanceTemplateName;
2270 }
2271 return _json;
2272 }
2273 }
2274
199 /** Media resource. */ 2275 /** Media resource. */
200 class Media { 2276 class Media {
201 /** Name of the media resource. */ 2277 /** Name of the media resource. */
202 core.String resourceName; 2278 core.String resourceName;
203 2279
204 Media(); 2280 Media();
205 2281
206 Media.fromJson(core.Map _json) { 2282 Media.fromJson(core.Map _json) {
207 if (_json.containsKey("resourceName")) { 2283 if (_json.containsKey("resourceName")) {
208 resourceName = _json["resourceName"]; 2284 resourceName = _json["resourceName"];
209 } 2285 }
210 } 2286 }
211 2287
212 core.Map toJson() { 2288 core.Map toJson() {
213 var _json = new core.Map(); 2289 var _json = new core.Map();
214 if (resourceName != null) { 2290 if (resourceName != null) {
215 _json["resourceName"] = resourceName; 2291 _json["resourceName"] = resourceName;
216 } 2292 }
217 return _json; 2293 return _json;
218 } 2294 }
2295 }
2296
2297 /**
2298 * Specifies an executable to run on a fully configured node and a timeout
2299 * period for executable completion.
2300 */
2301 class NodeInitializationAction {
2302 /** [Required] Google Cloud Storage URI of executable file. */
2303 core.String executableFile;
2304 /**
2305 * [Optional] Amount of time executable has to complete. Default is 10
2306 * minutes. Cluster creation fails with an explanatory error message (the name
2307 * of the executable that caused the error and the exceeded timeout period) if
2308 * the executable is not completed at end of the timeout period.
2309 */
2310 core.String executionTimeout;
2311
2312 NodeInitializationAction();
2313
2314 NodeInitializationAction.fromJson(core.Map _json) {
2315 if (_json.containsKey("executableFile")) {
2316 executableFile = _json["executableFile"];
2317 }
2318 if (_json.containsKey("executionTimeout")) {
2319 executionTimeout = _json["executionTimeout"];
2320 }
2321 }
2322
2323 core.Map toJson() {
2324 var _json = new core.Map();
2325 if (executableFile != null) {
2326 _json["executableFile"] = executableFile;
2327 }
2328 if (executionTimeout != null) {
2329 _json["executionTimeout"] = executionTimeout;
2330 }
2331 return _json;
2332 }
2333 }
2334
2335 /**
2336 * This resource represents a long-running operation that is the result of a
2337 * network API call.
2338 */
2339 class Operation {
2340 /**
2341 * If the value is `false`, it means the operation is still in progress. If
2342 * true, the operation is completed, and either `error` or `response` is
2343 * available.
2344 */
2345 core.bool done;
2346 /** The error result of the operation in case of failure. */
2347 Status error;
2348 /**
2349 * Service-specific metadata associated with the operation. It typically
2350 * contains progress information and common metadata such as create time. Some
2351 * services might not provide such metadata. Any method that returns a
2352 * long-running operation should document the metadata type, if any.
2353 *
2354 * The values for Object must be JSON objects. It can consist of `num`,
2355 * `String`, `bool` and `null` as well as `Map` and `List` values.
2356 */
2357 core.Map<core.String, core.Object> metadata;
2358 /**
2359 * The server-assigned name, which is only unique within the same service that
2360 * originally returns it. If you use the default HTTP mapping, the `name`
2361 * should have the format of `operations/some/unique/name`.
2362 */
2363 core.String name;
2364 /**
2365 * The normal response of the operation in case of success. If the original
2366 * method returns no data on success, such as `Delete`, the response is
2367 * `google.protobuf.Empty`. If the original method is standard
2368 * `Get`/`Create`/`Update`, the response should be the resource. For other
2369 * methods, the response should have the type `XxxResponse`, where `Xxx` is
2370 * the original method name. For example, if the original method name is
2371 * `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
2372 *
2373 * The values for Object must be JSON objects. It can consist of `num`,
2374 * `String`, `bool` and `null` as well as `Map` and `List` values.
2375 */
2376 core.Map<core.String, core.Object> response;
2377
2378 Operation();
2379
2380 Operation.fromJson(core.Map _json) {
2381 if (_json.containsKey("done")) {
2382 done = _json["done"];
2383 }
2384 if (_json.containsKey("error")) {
2385 error = new Status.fromJson(_json["error"]);
2386 }
2387 if (_json.containsKey("metadata")) {
2388 metadata = _json["metadata"];
2389 }
2390 if (_json.containsKey("name")) {
2391 name = _json["name"];
2392 }
2393 if (_json.containsKey("response")) {
2394 response = _json["response"];
2395 }
2396 }
2397
2398 core.Map toJson() {
2399 var _json = new core.Map();
2400 if (done != null) {
2401 _json["done"] = done;
2402 }
2403 if (error != null) {
2404 _json["error"] = (error).toJson();
2405 }
2406 if (metadata != null) {
2407 _json["metadata"] = metadata;
2408 }
2409 if (name != null) {
2410 _json["name"] = name;
2411 }
2412 if (response != null) {
2413 _json["response"] = response;
2414 }
2415 return _json;
2416 }
219 } 2417 }
220 2418
221 /** Metadata describing the operation. */ 2419 /** Metadata describing the operation. */
222 class OperationMetadata { 2420 class OperationMetadata {
223 /** Name of the cluster for the operation. */ 2421 /** Name of the cluster for the operation. */
224 core.String clusterName; 2422 core.String clusterName;
225 /** Cluster UUId for the operation. */ 2423 /** Cluster UUId for the operation. */
226 core.String clusterUuid; 2424 core.String clusterUuid;
2425 /** [Output-only] Short description of operation. */
2426 core.String description;
227 /** A message containing any operation metadata details. */ 2427 /** A message containing any operation metadata details. */
228 core.String details; 2428 core.String details;
229 /** The time that the operation completed. */ 2429 /** The time that the operation completed. */
230 core.String endTime; 2430 core.String endTime;
231 /** A message containing the detailed operation state. */ 2431 /** A message containing the detailed operation state. */
232 core.String innerState; 2432 core.String innerState;
233 /** The time that the operation was requested. */ 2433 /** The time that the operation was requested. */
234 core.String insertTime; 2434 core.String insertTime;
2435 /** [Output-only] The operation type. */
2436 core.String operationType;
235 /** The time that the operation was started by the server. */ 2437 /** The time that the operation was started by the server. */
236 core.String startTime; 2438 core.String startTime;
237 /** 2439 /**
238 * A message containing the operation state. 2440 * A message containing the operation state.
239 * Possible string values are: 2441 * Possible string values are:
240 * - "UNKNOWN" : A UNKNOWN. 2442 * - "UNKNOWN" : A UNKNOWN.
241 * - "PENDING" : A PENDING. 2443 * - "PENDING" : A PENDING.
242 * - "RUNNING" : A RUNNING. 2444 * - "RUNNING" : A RUNNING.
243 * - "DONE" : A DONE. 2445 * - "DONE" : A DONE.
244 */ 2446 */
245 core.String state; 2447 core.String state;
246 /** [Output-only] Current operation status. */ 2448 /** [Output-only] Current operation status. */
247 OperationStatus status; 2449 OperationStatus status;
248 /** [Output-only] Previous operation status. */ 2450 /** [Output-only] Previous operation status. */
249 core.List<OperationStatus> statusHistory; 2451 core.List<OperationStatus> statusHistory;
250 2452
251 OperationMetadata(); 2453 OperationMetadata();
252 2454
253 OperationMetadata.fromJson(core.Map _json) { 2455 OperationMetadata.fromJson(core.Map _json) {
254 if (_json.containsKey("clusterName")) { 2456 if (_json.containsKey("clusterName")) {
255 clusterName = _json["clusterName"]; 2457 clusterName = _json["clusterName"];
256 } 2458 }
257 if (_json.containsKey("clusterUuid")) { 2459 if (_json.containsKey("clusterUuid")) {
258 clusterUuid = _json["clusterUuid"]; 2460 clusterUuid = _json["clusterUuid"];
259 } 2461 }
2462 if (_json.containsKey("description")) {
2463 description = _json["description"];
2464 }
260 if (_json.containsKey("details")) { 2465 if (_json.containsKey("details")) {
261 details = _json["details"]; 2466 details = _json["details"];
262 } 2467 }
263 if (_json.containsKey("endTime")) { 2468 if (_json.containsKey("endTime")) {
264 endTime = _json["endTime"]; 2469 endTime = _json["endTime"];
265 } 2470 }
266 if (_json.containsKey("innerState")) { 2471 if (_json.containsKey("innerState")) {
267 innerState = _json["innerState"]; 2472 innerState = _json["innerState"];
268 } 2473 }
269 if (_json.containsKey("insertTime")) { 2474 if (_json.containsKey("insertTime")) {
270 insertTime = _json["insertTime"]; 2475 insertTime = _json["insertTime"];
271 } 2476 }
2477 if (_json.containsKey("operationType")) {
2478 operationType = _json["operationType"];
2479 }
272 if (_json.containsKey("startTime")) { 2480 if (_json.containsKey("startTime")) {
273 startTime = _json["startTime"]; 2481 startTime = _json["startTime"];
274 } 2482 }
275 if (_json.containsKey("state")) { 2483 if (_json.containsKey("state")) {
276 state = _json["state"]; 2484 state = _json["state"];
277 } 2485 }
278 if (_json.containsKey("status")) { 2486 if (_json.containsKey("status")) {
279 status = new OperationStatus.fromJson(_json["status"]); 2487 status = new OperationStatus.fromJson(_json["status"]);
280 } 2488 }
281 if (_json.containsKey("statusHistory")) { 2489 if (_json.containsKey("statusHistory")) {
282 statusHistory = _json["statusHistory"].map((value) => new OperationStatus. fromJson(value)).toList(); 2490 statusHistory = _json["statusHistory"].map((value) => new OperationStatus. fromJson(value)).toList();
283 } 2491 }
284 } 2492 }
285 2493
286 core.Map toJson() { 2494 core.Map toJson() {
287 var _json = new core.Map(); 2495 var _json = new core.Map();
288 if (clusterName != null) { 2496 if (clusterName != null) {
289 _json["clusterName"] = clusterName; 2497 _json["clusterName"] = clusterName;
290 } 2498 }
291 if (clusterUuid != null) { 2499 if (clusterUuid != null) {
292 _json["clusterUuid"] = clusterUuid; 2500 _json["clusterUuid"] = clusterUuid;
293 } 2501 }
2502 if (description != null) {
2503 _json["description"] = description;
2504 }
294 if (details != null) { 2505 if (details != null) {
295 _json["details"] = details; 2506 _json["details"] = details;
296 } 2507 }
297 if (endTime != null) { 2508 if (endTime != null) {
298 _json["endTime"] = endTime; 2509 _json["endTime"] = endTime;
299 } 2510 }
300 if (innerState != null) { 2511 if (innerState != null) {
301 _json["innerState"] = innerState; 2512 _json["innerState"] = innerState;
302 } 2513 }
303 if (insertTime != null) { 2514 if (insertTime != null) {
304 _json["insertTime"] = insertTime; 2515 _json["insertTime"] = insertTime;
305 } 2516 }
2517 if (operationType != null) {
2518 _json["operationType"] = operationType;
2519 }
306 if (startTime != null) { 2520 if (startTime != null) {
307 _json["startTime"] = startTime; 2521 _json["startTime"] = startTime;
308 } 2522 }
309 if (state != null) { 2523 if (state != null) {
310 _json["state"] = state; 2524 _json["state"] = state;
311 } 2525 }
312 if (status != null) { 2526 if (status != null) {
313 _json["status"] = (status).toJson(); 2527 _json["status"] = (status).toJson();
314 } 2528 }
315 if (statusHistory != null) { 2529 if (statusHistory != null) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 2578 }
365 if (state != null) { 2579 if (state != null) {
366 _json["state"] = state; 2580 _json["state"] = state;
367 } 2581 }
368 if (stateStartTime != null) { 2582 if (stateStartTime != null) {
369 _json["stateStartTime"] = stateStartTime; 2583 _json["stateStartTime"] = stateStartTime;
370 } 2584 }
371 return _json; 2585 return _json;
372 } 2586 }
373 } 2587 }
2588
2589 /** A Cloud Dataproc job for running Pig queries on YARN. */
2590 class PigJob {
2591 /**
2592 * [Optional] Whether to continue executing queries if a query fails. The
2593 * default value is `false`. Setting to `true` can be useful when executing
2594 * independent parallel queries.
2595 */
2596 core.bool continueOnFailure;
2597 /**
2598 * [Optional] HCFS URIs of jar files to add to the CLASSPATH of the Pig Client
2599 * and Hadoop MapReduce (MR) tasks. Can contain Pig UDFs.
2600 */
2601 core.List<core.String> jarFileUris;
2602 /** [Optional] The runtime log config for job execution. */
2603 LoggingConfig loggingConfig;
2604 /**
2605 * [Optional] A mapping of property names to values, used to configure Pig.
2606 * Properties that conflict with values set by the Cloud Dataproc API may be
2607 * overwritten. Can include properties set in /etc/hadoop/conf / * -site.xml,
2608 * /etc/pig/conf/pig.properties, and classes in user code.
2609 */
2610 core.Map<core.String, core.String> properties;
2611 /** The HCFS URI of the script that contains the Pig queries. */
2612 core.String queryFileUri;
2613 /** A list of queries. */
2614 QueryList queryList;
2615 /**
2616 * [Optional] Mapping of query variable names to values (equivalent to the Pig
2617 * command: `name=[value]`).
2618 */
2619 core.Map<core.String, core.String> scriptVariables;
2620
2621 PigJob();
2622
2623 PigJob.fromJson(core.Map _json) {
2624 if (_json.containsKey("continueOnFailure")) {
2625 continueOnFailure = _json["continueOnFailure"];
2626 }
2627 if (_json.containsKey("jarFileUris")) {
2628 jarFileUris = _json["jarFileUris"];
2629 }
2630 if (_json.containsKey("loggingConfig")) {
2631 loggingConfig = new LoggingConfig.fromJson(_json["loggingConfig"]);
2632 }
2633 if (_json.containsKey("properties")) {
2634 properties = _json["properties"];
2635 }
2636 if (_json.containsKey("queryFileUri")) {
2637 queryFileUri = _json["queryFileUri"];
2638 }
2639 if (_json.containsKey("queryList")) {
2640 queryList = new QueryList.fromJson(_json["queryList"]);
2641 }
2642 if (_json.containsKey("scriptVariables")) {
2643 scriptVariables = _json["scriptVariables"];
2644 }
2645 }
2646
2647 core.Map toJson() {
2648 var _json = new core.Map();
2649 if (continueOnFailure != null) {
2650 _json["continueOnFailure"] = continueOnFailure;
2651 }
2652 if (jarFileUris != null) {
2653 _json["jarFileUris"] = jarFileUris;
2654 }
2655 if (loggingConfig != null) {
2656 _json["loggingConfig"] = (loggingConfig).toJson();
2657 }
2658 if (properties != null) {
2659 _json["properties"] = properties;
2660 }
2661 if (queryFileUri != null) {
2662 _json["queryFileUri"] = queryFileUri;
2663 }
2664 if (queryList != null) {
2665 _json["queryList"] = (queryList).toJson();
2666 }
2667 if (scriptVariables != null) {
2668 _json["scriptVariables"] = scriptVariables;
2669 }
2670 return _json;
2671 }
2672 }
2673
2674 /** A Cloud Dataproc job for running PySpark applications on YARN. */
2675 class PySparkJob {
2676 /**
2677 * [Optional] HCFS URIs of archives to be extracted in the working directory
2678 * of .jar, .tar, .tar.gz, .tgz, and .zip.
2679 */
2680 core.List<core.String> archiveUris;
2681 /**
2682 * [Optional] The arguments to pass to the driver. Do not include arguments,
2683 * such as `--conf`, that can be set as job properties, since a collision may
2684 * occur that causes an incorrect job submission.
2685 */
2686 core.List<core.String> args;
2687 /**
2688 * [Optional] HCFS URIs of files to be copied to the working directory of
2689 * Python drivers and distributed tasks. Useful for naively parallel tasks.
2690 */
2691 core.List<core.String> fileUris;
2692 /**
2693 * [Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Python
2694 * driver and tasks.
2695 */
2696 core.List<core.String> jarFileUris;
2697 /** [Optional] The runtime log config for job execution. */
2698 LoggingConfig loggingConfig;
2699 /**
2700 * [Required] The HCFS URI of the main Python file to use as the driver. Must
2701 * be a .py file.
2702 */
2703 core.String mainPythonFileUri;
2704 /**
2705 * [Optional] A mapping of property names to values, used to configure
2706 * PySpark. Properties that conflict with values set by the Cloud Dataproc API
2707 * may be overwritten. Can include properties set in
2708 * /etc/spark/conf/spark-defaults.conf and classes in user code.
2709 */
2710 core.Map<core.String, core.String> properties;
2711 /**
2712 * [Optional] HCFS file URIs of Python files to pass to the PySpark framework.
2713 * Supported file types: .py, .egg, and .zip.
2714 */
2715 core.List<core.String> pythonFileUris;
2716
2717 PySparkJob();
2718
2719 PySparkJob.fromJson(core.Map _json) {
2720 if (_json.containsKey("archiveUris")) {
2721 archiveUris = _json["archiveUris"];
2722 }
2723 if (_json.containsKey("args")) {
2724 args = _json["args"];
2725 }
2726 if (_json.containsKey("fileUris")) {
2727 fileUris = _json["fileUris"];
2728 }
2729 if (_json.containsKey("jarFileUris")) {
2730 jarFileUris = _json["jarFileUris"];
2731 }
2732 if (_json.containsKey("loggingConfig")) {
2733 loggingConfig = new LoggingConfig.fromJson(_json["loggingConfig"]);
2734 }
2735 if (_json.containsKey("mainPythonFileUri")) {
2736 mainPythonFileUri = _json["mainPythonFileUri"];
2737 }
2738 if (_json.containsKey("properties")) {
2739 properties = _json["properties"];
2740 }
2741 if (_json.containsKey("pythonFileUris")) {
2742 pythonFileUris = _json["pythonFileUris"];
2743 }
2744 }
2745
2746 core.Map toJson() {
2747 var _json = new core.Map();
2748 if (archiveUris != null) {
2749 _json["archiveUris"] = archiveUris;
2750 }
2751 if (args != null) {
2752 _json["args"] = args;
2753 }
2754 if (fileUris != null) {
2755 _json["fileUris"] = fileUris;
2756 }
2757 if (jarFileUris != null) {
2758 _json["jarFileUris"] = jarFileUris;
2759 }
2760 if (loggingConfig != null) {
2761 _json["loggingConfig"] = (loggingConfig).toJson();
2762 }
2763 if (mainPythonFileUri != null) {
2764 _json["mainPythonFileUri"] = mainPythonFileUri;
2765 }
2766 if (properties != null) {
2767 _json["properties"] = properties;
2768 }
2769 if (pythonFileUris != null) {
2770 _json["pythonFileUris"] = pythonFileUris;
2771 }
2772 return _json;
2773 }
2774 }
2775
2776 /** A list of queries to run on a cluster. */
2777 class QueryList {
2778 /**
2779 * [Required] The queries to execute. You do not need to terminate a query
2780 * with a semicolon. Multiple queries can be specified in one string by
2781 * separating each with a semicolon. Here is an example of an Cloud Dataproc
2782 * API snippet that uses a QueryList to specify a HiveJob: "hiveJob": {
2783 * "queryList": { "queries": [ "query1", "query2", "query3;query4", ] } }
2784 */
2785 core.List<core.String> queries;
2786
2787 QueryList();
2788
2789 QueryList.fromJson(core.Map _json) {
2790 if (_json.containsKey("queries")) {
2791 queries = _json["queries"];
2792 }
2793 }
2794
2795 core.Map toJson() {
2796 var _json = new core.Map();
2797 if (queries != null) {
2798 _json["queries"] = queries;
2799 }
2800 return _json;
2801 }
2802 }
2803
2804 /** Specifies the selection and config of software inside the cluster. */
2805 class SoftwareConfig {
2806 /**
2807 * [Optional] The version of software inside the cluster. It must match the
2808 * regular expression `[0-9]+\.[0-9]+`. If unspecified, it defaults to the
2809 * latest version (see [Cloud Dataproc Versioning](/dataproc/versioning)).
2810 */
2811 core.String imageVersion;
2812 /**
2813 * [Optional] The properties to set on daemon config files. Property keys are
2814 * specified in `prefix:property` format, such as `core:fs.defaultFS`. The
2815 * following are supported prefixes and their mappings: * core:
2816 * `core-site.xml` * hdfs: `hdfs-site.xml` * mapred: `mapred-site.xml` * yarn:
2817 * `yarn-site.xml` * hive: `hive-site.xml` * pig: `pig.properties` * spark:
2818 * `spark-defaults.conf`
2819 */
2820 core.Map<core.String, core.String> properties;
2821
2822 SoftwareConfig();
2823
2824 SoftwareConfig.fromJson(core.Map _json) {
2825 if (_json.containsKey("imageVersion")) {
2826 imageVersion = _json["imageVersion"];
2827 }
2828 if (_json.containsKey("properties")) {
2829 properties = _json["properties"];
2830 }
2831 }
2832
2833 core.Map toJson() {
2834 var _json = new core.Map();
2835 if (imageVersion != null) {
2836 _json["imageVersion"] = imageVersion;
2837 }
2838 if (properties != null) {
2839 _json["properties"] = properties;
2840 }
2841 return _json;
2842 }
2843 }
2844
2845 /** A Cloud Dataproc job for running Spark applications on YARN. */
2846 class SparkJob {
2847 /**
2848 * [Optional] HCFS URIs of archives to be extracted in the working directory
2849 * of Spark drivers and tasks. Supported file types: .jar, .tar, .tar.gz,
2850 * .tgz, and .zip.
2851 */
2852 core.List<core.String> archiveUris;
2853 /**
2854 * [Optional] The arguments to pass to the driver. Do not include arguments,
2855 * such as `--conf`, that can be set as job properties, since a collision may
2856 * occur that causes an incorrect job submission.
2857 */
2858 core.List<core.String> args;
2859 /**
2860 * [Optional] HCFS URIs of files to be copied to the working directory of
2861 * Spark drivers and distributed tasks. Useful for naively parallel tasks.
2862 */
2863 core.List<core.String> fileUris;
2864 /**
2865 * [Optional] HCFS URIs of jar files to add to the CLASSPATHs of the Spark
2866 * driver and tasks.
2867 */
2868 core.List<core.String> jarFileUris;
2869 /** [Optional] The runtime log config for job execution. */
2870 LoggingConfig loggingConfig;
2871 /**
2872 * The name of the driver's main class. The jar file that contains the class
2873 * must be in the default CLASSPATH or specified in `jar_file_uris`.
2874 */
2875 core.String mainClass;
2876 /** The HCFS URI of the jar file that contains the main class. */
2877 core.String mainJarFileUri;
2878 /**
2879 * [Optional] A mapping of property names to values, used to configure Spark.
2880 * Properties that conflict with values set by the Cloud Dataproc API may be
2881 * overwritten. Can include properties set in
2882 * /etc/spark/conf/spark-defaults.conf and classes in user code.
2883 */
2884 core.Map<core.String, core.String> properties;
2885
2886 SparkJob();
2887
2888 SparkJob.fromJson(core.Map _json) {
2889 if (_json.containsKey("archiveUris")) {
2890 archiveUris = _json["archiveUris"];
2891 }
2892 if (_json.containsKey("args")) {
2893 args = _json["args"];
2894 }
2895 if (_json.containsKey("fileUris")) {
2896 fileUris = _json["fileUris"];
2897 }
2898 if (_json.containsKey("jarFileUris")) {
2899 jarFileUris = _json["jarFileUris"];
2900 }
2901 if (_json.containsKey("loggingConfig")) {
2902 loggingConfig = new LoggingConfig.fromJson(_json["loggingConfig"]);
2903 }
2904 if (_json.containsKey("mainClass")) {
2905 mainClass = _json["mainClass"];
2906 }
2907 if (_json.containsKey("mainJarFileUri")) {
2908 mainJarFileUri = _json["mainJarFileUri"];
2909 }
2910 if (_json.containsKey("properties")) {
2911 properties = _json["properties"];
2912 }
2913 }
2914
2915 core.Map toJson() {
2916 var _json = new core.Map();
2917 if (archiveUris != null) {
2918 _json["archiveUris"] = archiveUris;
2919 }
2920 if (args != null) {
2921 _json["args"] = args;
2922 }
2923 if (fileUris != null) {
2924 _json["fileUris"] = fileUris;
2925 }
2926 if (jarFileUris != null) {
2927 _json["jarFileUris"] = jarFileUris;
2928 }
2929 if (loggingConfig != null) {
2930 _json["loggingConfig"] = (loggingConfig).toJson();
2931 }
2932 if (mainClass != null) {
2933 _json["mainClass"] = mainClass;
2934 }
2935 if (mainJarFileUri != null) {
2936 _json["mainJarFileUri"] = mainJarFileUri;
2937 }
2938 if (properties != null) {
2939 _json["properties"] = properties;
2940 }
2941 return _json;
2942 }
2943 }
2944
2945 /** A Cloud Dataproc job for running Spark SQL queries. */
2946 class SparkSqlJob {
2947 /** [Optional] HCFS URIs of jar files to be added to the Spark CLASSPATH. */
2948 core.List<core.String> jarFileUris;
2949 /** [Optional] The runtime log config for job execution. */
2950 LoggingConfig loggingConfig;
2951 /**
2952 * [Optional] A mapping of property names to values, used to configure Spark
2953 * SQL's SparkConf. Properties that conflict with values set by the Cloud
2954 * Dataproc API may be overwritten.
2955 */
2956 core.Map<core.String, core.String> properties;
2957 /** The HCFS URI of the script that contains SQL queries. */
2958 core.String queryFileUri;
2959 /** A list of queries. */
2960 QueryList queryList;
2961 /**
2962 * [Optional] Mapping of query variable names to values (equivalent to the
2963 * Spark SQL command: SET `name="value";`).
2964 */
2965 core.Map<core.String, core.String> scriptVariables;
2966
2967 SparkSqlJob();
2968
2969 SparkSqlJob.fromJson(core.Map _json) {
2970 if (_json.containsKey("jarFileUris")) {
2971 jarFileUris = _json["jarFileUris"];
2972 }
2973 if (_json.containsKey("loggingConfig")) {
2974 loggingConfig = new LoggingConfig.fromJson(_json["loggingConfig"]);
2975 }
2976 if (_json.containsKey("properties")) {
2977 properties = _json["properties"];
2978 }
2979 if (_json.containsKey("queryFileUri")) {
2980 queryFileUri = _json["queryFileUri"];
2981 }
2982 if (_json.containsKey("queryList")) {
2983 queryList = new QueryList.fromJson(_json["queryList"]);
2984 }
2985 if (_json.containsKey("scriptVariables")) {
2986 scriptVariables = _json["scriptVariables"];
2987 }
2988 }
2989
2990 core.Map toJson() {
2991 var _json = new core.Map();
2992 if (jarFileUris != null) {
2993 _json["jarFileUris"] = jarFileUris;
2994 }
2995 if (loggingConfig != null) {
2996 _json["loggingConfig"] = (loggingConfig).toJson();
2997 }
2998 if (properties != null) {
2999 _json["properties"] = properties;
3000 }
3001 if (queryFileUri != null) {
3002 _json["queryFileUri"] = queryFileUri;
3003 }
3004 if (queryList != null) {
3005 _json["queryList"] = (queryList).toJson();
3006 }
3007 if (scriptVariables != null) {
3008 _json["scriptVariables"] = scriptVariables;
3009 }
3010 return _json;
3011 }
3012 }
3013
3014 /**
3015 * The `Status` type defines a logical error model that is suitable for
3016 * different programming environments, including REST APIs and RPC APIs. It is
3017 * used by [gRPC](https://github.com/grpc). The error model is designed to be: -
3018 * Simple to use and understand for most users - Flexible enough to meet
3019 * unexpected needs # Overview The `Status` message contains three pieces of
3020 * data: error code, error message, and error details. The error code should be
3021 * an enum value of google.rpc.Code, but it may accept additional error codes if
3022 * needed. The error message should be a developer-facing English message that
3023 * helps developers *understand* and *resolve* the error. If a localized
3024 * user-facing error message is needed, put the localized message in the error
3025 * details or localize it in the client. The optional error details may contain
3026 * arbitrary information about the error. There is a predefined set of error
3027 * detail types in the package `google.rpc` which can be used for common error
3028 * conditions. # Language mapping The `Status` message is the logical
3029 * representation of the error model, but it is not necessarily the actual wire
3030 * format. When the `Status` message is exposed in different client libraries
3031 * and different wire protocols, it can be mapped differently. For example, it
3032 * will likely be mapped to some exceptions in Java, but more likely mapped to
3033 * some error codes in C. # Other uses The error model and the `Status` message
3034 * can be used in a variety of environments, either with or without APIs, to
3035 * provide a consistent developer experience across different environments.
3036 * Example uses of this error model include: - Partial errors. If a service
3037 * needs to return partial errors to the client, it may embed the `Status` in
3038 * the normal response to indicate the partial errors. - Workflow errors. A
3039 * typical workflow has multiple steps. Each step may have a `Status` message
3040 * for error reporting purpose. - Batch operations. If a client uses batch
3041 * request and batch response, the `Status` message should be used directly
3042 * inside batch response, one for each error sub-response. - Asynchronous
3043 * operations. If an API call embeds asynchronous operation results in its
3044 * response, the status of those operations should be represented directly using
3045 * the `Status` message. - Logging. If some API errors are stored in logs, the
3046 * message `Status` could be used directly after any stripping needed for
3047 * security/privacy reasons.
3048 */
3049 class Status {
3050 /** The status code, which should be an enum value of google.rpc.Code. */
3051 core.int code;
3052 /**
3053 * A list of messages that carry the error details. There will be a common set
3054 * of message types for APIs to use.
3055 *
3056 * The values for Object must be JSON objects. It can consist of `num`,
3057 * `String`, `bool` and `null` as well as `Map` and `List` values.
3058 */
3059 core.List<core.Map<core.String, core.Object>> details;
3060 /**
3061 * A developer-facing error message, which should be in English. Any
3062 * user-facing error message should be localized and sent in the
3063 * google.rpc.Status.details field, or localized by the client.
3064 */
3065 core.String message;
3066
3067 Status();
3068
3069 Status.fromJson(core.Map _json) {
3070 if (_json.containsKey("code")) {
3071 code = _json["code"];
3072 }
3073 if (_json.containsKey("details")) {
3074 details = _json["details"];
3075 }
3076 if (_json.containsKey("message")) {
3077 message = _json["message"];
3078 }
3079 }
3080
3081 core.Map toJson() {
3082 var _json = new core.Map();
3083 if (code != null) {
3084 _json["code"] = code;
3085 }
3086 if (details != null) {
3087 _json["details"] = details;
3088 }
3089 if (message != null) {
3090 _json["message"] = message;
3091 }
3092 return _json;
3093 }
3094 }
3095
3096 /** A request to submit a job. */
3097 class SubmitJobRequest {
3098 /** [Required] The job resource. */
3099 Job job;
3100
3101 SubmitJobRequest();
3102
3103 SubmitJobRequest.fromJson(core.Map _json) {
3104 if (_json.containsKey("job")) {
3105 job = new Job.fromJson(_json["job"]);
3106 }
3107 }
3108
3109 core.Map toJson() {
3110 var _json = new core.Map();
3111 if (job != null) {
3112 _json["job"] = (job).toJson();
3113 }
3114 return _json;
3115 }
3116 }
OLDNEW
« no previous file with comments | « generated/googleapis/lib/content/v2sandbox.dart ('k') | generated/googleapis/lib/deploymentmanager/v2.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698