forked from googleapis/google-api-go-client
/
dataproc-gen.go
4516 lines (4046 loc) · 165 KB
/
dataproc-gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Package dataproc provides access to the Google Cloud Dataproc API.
//
// See https://cloud.google.com/dataproc/
//
// Usage example:
//
// import "google.golang.org/api/dataproc/v1beta1"
// ...
// dataprocService, err := dataproc.New(oauthHttpClient)
package dataproc // import "google.golang.org/api/dataproc/v1beta1"
import (
"bytes"
"encoding/json"
"errors"
"fmt"
context "golang.org/x/net/context"
ctxhttp "golang.org/x/net/context/ctxhttp"
gensupport "google.golang.org/api/gensupport"
googleapi "google.golang.org/api/googleapi"
"io"
"net/http"
"net/url"
"strconv"
"strings"
)
// Always reference these packages, just in case the auto-generated code
// below doesn't.
var _ = bytes.NewBuffer
var _ = strconv.Itoa
var _ = fmt.Sprintf
var _ = json.NewDecoder
var _ = io.Copy
var _ = url.Parse
var _ = gensupport.MarshalJSON
var _ = googleapi.Version
var _ = errors.New
var _ = strings.Replace
var _ = context.Canceled
var _ = ctxhttp.Do
const apiId = "dataproc:v1beta1"
const apiName = "dataproc"
const apiVersion = "v1beta1"
const basePath = "https://dataproc.googleapis.com/"
// OAuth2 scopes used by this API.
const (
// View and manage your data across Google Cloud Platform services
CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
)
func New(client *http.Client) (*Service, error) {
if client == nil {
return nil, errors.New("client is nil")
}
s := &Service{client: client, BasePath: basePath}
s.Operations = NewOperationsService(s)
s.Projects = NewProjectsService(s)
return s, nil
}
type Service struct {
client *http.Client
BasePath string // API endpoint base URL
UserAgent string // optional additional User-Agent fragment
Operations *OperationsService
Projects *ProjectsService
}
func (s *Service) userAgent() string {
if s.UserAgent == "" {
return googleapi.UserAgent
}
return googleapi.UserAgent + " " + s.UserAgent
}
func NewOperationsService(s *Service) *OperationsService {
rs := &OperationsService{s: s}
return rs
}
type OperationsService struct {
s *Service
}
func NewProjectsService(s *Service) *ProjectsService {
rs := &ProjectsService{s: s}
rs.Clusters = NewProjectsClustersService(s)
rs.Jobs = NewProjectsJobsService(s)
return rs
}
type ProjectsService struct {
s *Service
Clusters *ProjectsClustersService
Jobs *ProjectsJobsService
}
func NewProjectsClustersService(s *Service) *ProjectsClustersService {
rs := &ProjectsClustersService{s: s}
return rs
}
type ProjectsClustersService struct {
s *Service
}
func NewProjectsJobsService(s *Service) *ProjectsJobsService {
rs := &ProjectsJobsService{s: s}
return rs
}
type ProjectsJobsService struct {
s *Service
}
// AcceleratorConfiguration: Specifies the type and number of
// accelerator cards attached to the instances of an instance group (see
// GPUs on Compute Engine).
type AcceleratorConfiguration struct {
// AcceleratorCount: The number of the accelerator cards of this type
// exposed to this instance.
AcceleratorCount int64 `json:"acceleratorCount,omitempty"`
// AcceleratorTypeUri: Full or partial URI of the accelerator type
// resource to expose to this instance. See Google Compute Engine
// AcceleratorTypes( /compute/docs/reference/beta/acceleratorTypes)
AcceleratorTypeUri string `json:"acceleratorTypeUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "AcceleratorCount") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "AcceleratorCount") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *AcceleratorConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod AcceleratorConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// CancelJobRequest: A request to cancel a job.
type CancelJobRequest struct {
}
// CancelOperationRequest: The request message for
// Operations.CancelOperation.
type CancelOperationRequest struct {
}
// Cluster: Describes the identifying information, configuration, and
// status of a cluster of Google Compute Engine instances.
type Cluster struct {
// ClusterName: Required The cluster name. Cluster names within a
// project must be unique. Names from deleted clusters can be reused.
ClusterName string `json:"clusterName,omitempty"`
// ClusterUuid: Output-only A cluster UUID (Unique Universal
// Identifier). Cloud Dataproc generates this value when it creates the
// cluster.
ClusterUuid string `json:"clusterUuid,omitempty"`
// Configuration: Required The cluster configuration. Note that Cloud
// Dataproc may set default values, and values may change when clusters
// are updated.
Configuration *ClusterConfiguration `json:"configuration,omitempty"`
// Labels: Optional The labels to associate with this cluster.Label keys
// must be between 1 and 63 characters long, and must conform to the
// following PCRE regular expression: \p{Ll}\p{Lo}{0,62}Label values
// must be between 1 and 63 characters long, and must conform to the
// following PCRE regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more
// than 64 labels can be associated with a given cluster.
Labels map[string]string `json:"labels,omitempty"`
// Metrics: Contains cluster daemon metrics such as HDFS and YARN stats.
Metrics *ClusterMetrics `json:"metrics,omitempty"`
// ProjectId: Required The Google Cloud Platform project ID that the
// cluster belongs to.
ProjectId string `json:"projectId,omitempty"`
// Status: Output-only Cluster status.
Status *ClusterStatus `json:"status,omitempty"`
// StatusHistory: Output-only Previous cluster statuses.
StatusHistory []*ClusterStatus `json:"statusHistory,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g. "ClusterName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ClusterName") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *Cluster) MarshalJSON() ([]byte, error) {
type NoMethod Cluster
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClusterConfiguration: The cluster configuration.
type ClusterConfiguration struct {
// ConfigurationBucket: Optional A Google Cloud Storage staging bucket
// used for sharing generated SSH keys and configuration. If you do not
// specify a staging bucket, Cloud Dataproc will determine an
// appropriate Cloud Storage location (US, ASIA, or EU) for your
// cluster's staging bucket according to the Google Compute Engine zone
// where your cluster is deployed, and then it will create and manage
// this project-level, per-location bucket for you.
ConfigurationBucket string `json:"configurationBucket,omitempty"`
// GceClusterConfiguration: Required The shared Google Compute Engine
// configuration settings for all instances in a cluster.
GceClusterConfiguration *GceClusterConfiguration `json:"gceClusterConfiguration,omitempty"`
// InitializationActions: Optional Commands to execute on each node
// after configuration is completed. By default, executables are run on
// master and all worker nodes. You can test a node's <code>role</code>
// metadata to run an executable on a master or worker node, as shown
// below:
// ROLE=$(/usr/share/google/get_metadata_value attributes/role)
// if [[ "${ROLE}" == 'Master' ]]; then
// ... master specific actions ...
// else
// ... worker specific actions ...
// fi
//
InitializationActions []*NodeInitializationAction `json:"initializationActions,omitempty"`
// MasterConfiguration: Optional The Google Compute Engine configuration
// settings for the master instance in a cluster.
MasterConfiguration *InstanceGroupConfiguration `json:"masterConfiguration,omitempty"`
// SecondaryWorkerConfiguration: Optional The Google Compute Engine
// configuration settings for additional worker instances in a cluster.
SecondaryWorkerConfiguration *InstanceGroupConfiguration `json:"secondaryWorkerConfiguration,omitempty"`
// SoftwareConfiguration: Optional The configuration settings for
// software inside the cluster.
SoftwareConfiguration *SoftwareConfiguration `json:"softwareConfiguration,omitempty"`
// WorkerConfiguration: Optional The Google Compute Engine configuration
// settings for worker instances in a cluster.
WorkerConfiguration *InstanceGroupConfiguration `json:"workerConfiguration,omitempty"`
// ForceSendFields is a list of field names (e.g. "ConfigurationBucket")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ConfigurationBucket") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *ClusterConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod ClusterConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClusterMetrics: Contains cluster daemon metrics, such as HDFS and
// YARN stats.
type ClusterMetrics struct {
// HdfsMetrics: The HDFS metrics.
HdfsMetrics map[string]string `json:"hdfsMetrics,omitempty"`
// YarnMetrics: The YARN metrics.
YarnMetrics map[string]string `json:"yarnMetrics,omitempty"`
// ForceSendFields is a list of field names (e.g. "HdfsMetrics") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "HdfsMetrics") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClusterMetrics) MarshalJSON() ([]byte, error) {
type NoMethod ClusterMetrics
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClusterOperationMetadata: Metadata describing the operation.
type ClusterOperationMetadata struct {
// ClusterName: Output-only. Name of the cluster for the operation.
ClusterName string `json:"clusterName,omitempty"`
// ClusterUuid: Output-only. Cluster UUID for the operation.
ClusterUuid string `json:"clusterUuid,omitempty"`
// Description: Output-only. Short description of operation.
Description string `json:"description,omitempty"`
// Labels: Output-only. Labels associated with the operation
Labels map[string]string `json:"labels,omitempty"`
// OperationType: Output-only. The operation type.
OperationType string `json:"operationType,omitempty"`
// Status: Output-only. Current operation status.
Status *ClusterOperationStatus `json:"status,omitempty"`
// StatusHistory: Output-only. The previous operation status.
StatusHistory []*ClusterOperationStatus `json:"statusHistory,omitempty"`
// Warnings: Output-only. Errors encountered during operation execution.
Warnings []string `json:"warnings,omitempty"`
// ForceSendFields is a list of field names (e.g. "ClusterName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ClusterName") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClusterOperationMetadata) MarshalJSON() ([]byte, error) {
type NoMethod ClusterOperationMetadata
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClusterOperationStatus: The status of the operation.
type ClusterOperationStatus struct {
// Details: Output-only.A message containing any operation metadata
// details.
Details string `json:"details,omitempty"`
// InnerState: Output-only. A message containing the detailed operation
// state.
InnerState string `json:"innerState,omitempty"`
// State: Output-only. A message containing the operation state.
//
// Possible values:
// "UNKNOWN" - Unused.
// "PENDING" - The operation has been created.
// "RUNNING" - The operation is running.
// "DONE" - The operation is done; either cancelled or completed.
State string `json:"state,omitempty"`
// StateStartTime: Output-only. The time this state was entered.
StateStartTime string `json:"stateStartTime,omitempty"`
// ForceSendFields is a list of field names (e.g. "Details") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Details") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClusterOperationStatus) MarshalJSON() ([]byte, error) {
type NoMethod ClusterOperationStatus
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// ClusterStatus: The status of a cluster and its instances.
type ClusterStatus struct {
// Detail: Optional details of cluster's state.
Detail string `json:"detail,omitempty"`
// State: The cluster's state.
//
// Possible values:
// "UNKNOWN" - The cluster state is unknown.
// "CREATING" - The cluster is being created and set up. It is not
// ready for use.
// "RUNNING" - The cluster is currently running and healthy. It is
// ready for use.
// "ERROR" - The cluster encountered an error. It is not ready for
// use.
// "DELETING" - The cluster is being deleted. It cannot be used.
// "UPDATING" - The cluster is being updated. It continues to accept
// and process jobs.
State string `json:"state,omitempty"`
// StateStartTime: Time when this state was entered.
StateStartTime string `json:"stateStartTime,omitempty"`
// Substate: Output-only Additional state information that includes
// status reported by the agent.
//
// Possible values:
// "UNSPECIFIED"
// "UNHEALTHY" - The cluster is known to be in an unhealthy state (for
// example, critical daemons are not running or HDFS capacity is
// exhausted).Applies to RUNNING state.
// "STALE_STATUS" - The agent-reported status is out of date (may
// occur if Cloud Dataproc loses communication with Agent).Applies to
// RUNNING state.
Substate string `json:"substate,omitempty"`
// ForceSendFields is a list of field names (e.g. "Detail") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Detail") to include in API
// requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *ClusterStatus) MarshalJSON() ([]byte, error) {
type NoMethod ClusterStatus
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DiagnoseClusterOutputLocation: The location of diagnostic output.
type DiagnoseClusterOutputLocation struct {
// OutputUri: Output-only The Google Cloud Storage URI of the diagnostic
// output. This is a plain text file with a summary of collected
// diagnostics.
OutputUri string `json:"outputUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "OutputUri") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "OutputUri") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DiagnoseClusterOutputLocation) MarshalJSON() ([]byte, error) {
type NoMethod DiagnoseClusterOutputLocation
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DiagnoseClusterRequest: A request to collect cluster diagnostic
// information.
type DiagnoseClusterRequest struct {
}
// DiagnoseClusterResults: The location of diagnostic output.
type DiagnoseClusterResults struct {
// OutputUri: Output-only. The Google Cloud Storage URI of the
// diagnostic output. The output report is a plain text file with a
// summary of collected diagnostics.
OutputUri string `json:"outputUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "OutputUri") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "OutputUri") to include in
// API requests with the JSON null value. By default, fields with empty
// values are omitted from API requests. However, any field with an
// empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *DiagnoseClusterResults) MarshalJSON() ([]byte, error) {
type NoMethod DiagnoseClusterResults
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// DiskConfiguration: Specifies the configuration of disk options for a
// group of VM instances.
type DiskConfiguration struct {
// BootDiskSizeGb: Optional Size in GB of the boot disk (default is
// 500GB).
BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"`
// NumLocalSsds: Optional Number of attached SSDs, from 0 to 4 (default
// is 0). If SSDs are not attached, the boot disk is used to store
// runtime logs and HDFS data. If one or more SSDs are attached, this
// runtime bulk data is spread across them, and the boot disk contains
// only basic configuration and installed binaries.
NumLocalSsds int64 `json:"numLocalSsds,omitempty"`
// ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "BootDiskSizeGb") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *DiskConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod DiskConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Empty: A generic empty message that you can re-use to avoid defining
// duplicated empty messages in your APIs. A typical example is to use
// it as the request or the response type of an API method. For
// instance:
// service Foo {
// rpc Bar(google.protobuf.Empty) returns
// (google.protobuf.Empty);
// }
// The JSON representation for Empty is empty JSON object {}.
type Empty struct {
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
}
// GceClusterConfiguration: Common configuration settings for resources
// of Google Compute Engine cluster instances, applicable to all
// instances in the cluster.
type GceClusterConfiguration struct {
// InternalIpOnly: If true, all instances in the cluser will only have
// internal IP addresses. By default, clusters are not restricted to
// internal IP addresses, and will have ephemeral external IP addresses
// assigned to each instance. This restriction can only be enabled for
// subnetwork enabled networks, and all off-cluster dependencies must be
// configured to be accessible without external IP addresses.
InternalIpOnly bool `json:"internalIpOnly,omitempty"`
// Metadata: The Google Compute Engine metadata entries to add to all
// instances.
Metadata map[string]string `json:"metadata,omitempty"`
// NetworkUri: The Google Compute Engine network to be used for machine
// communications. Cannot be specified with subnetwork_uri. If neither
// network_uri nor subnetwork_uri is specified, the "default" network of
// the project is used, if it exists. Cannot be a "Custom Subnet
// Network" (see https://cloud.google.com/compute/docs/subnetworks for
// more information). Example:
// https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default.
NetworkUri string `json:"networkUri,omitempty"`
// ServiceAccount: Optional The service account of the instances.
// Defaults to the default Google Compute Engine service account. Custom
// service accounts need permissions equivalent to the folloing IAM
// roles:
// roles/logging.logWriter
// roles/storage.objectAdmin(see
// https://cloud.google.com/compute/docs/access/service-accounts#custom_service_accounts for more information). Example:
// [account_id]@[project_id].iam.gserviceaccount.com
ServiceAccount string `json:"serviceAccount,omitempty"`
// ServiceAccountScopes: The URIs of service account scopes to be
// included in Google Compute Engine instances. The following base set
// of scopes is always included: -
// https://www.googleapis.com/auth/cloud.useraccounts.readonly -
// https://www.googleapis.com/auth/devstorage.read_write -
// https://www.googleapis.com/auth/logging.write If no scopes are
// specfied, the following defaults are also provided: -
// https://www.googleapis.com/auth/bigquery -
// https://www.googleapis.com/auth/bigtable.admin.table -
// https://www.googleapis.com/auth/bigtable.data -
// https://www.googleapis.com/auth/devstorage.full_control
ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"`
// SubnetworkUri: The Google Compute Engine subnetwork to be used for
// machine communications. Cannot be specified with network_uri.
// Example:
// https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/sub0.
SubnetworkUri string `json:"subnetworkUri,omitempty"`
// Tags: The Google Compute Engine tags to add to all instances.
Tags []string `json:"tags,omitempty"`
// ZoneUri: Required The zone where the Google Compute Engine cluster
// will be located. Example:
// https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone].
ZoneUri string `json:"zoneUri,omitempty"`
// ForceSendFields is a list of field names (e.g. "InternalIpOnly") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "InternalIpOnly") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *GceClusterConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod GceClusterConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// HadoopJob: A Cloud Dataproc job for running Hadoop MapReduce jobs on
// YARN.
type HadoopJob struct {
// ArchiveUris: Optional HCFS URIs of archives to be extracted in the
// working directory of Hadoop drivers and tasks. Supported file types:
// .jar, .tar, .tar.gz, .tgz, or .zip.
ArchiveUris []string `json:"archiveUris,omitempty"`
// Args: Optional The arguments to pass to the driver. Do not include
// arguments, such as -libjars or -Dfoo=bar, that can be set as job
// properties, since a collision may occur that causes an incorrect job
// submission.
Args []string `json:"args,omitempty"`
// FileUris: Optional HCFS URIs of files to be copied to the working
// directory of Hadoop drivers and distributed tasks. Useful for naively
// parallel tasks.
FileUris []string `json:"fileUris,omitempty"`
// JarFileUris: Optional Jar file URIs to add to the CLASSPATHs of the
// Hadoop driver and tasks.
JarFileUris []string `json:"jarFileUris,omitempty"`
// LoggingConfiguration: Optional The runtime log configuration for job
// execution.
LoggingConfiguration *LoggingConfiguration `json:"loggingConfiguration,omitempty"`
// MainClass: The name of the driver's main class. The jar file
// containing the class must be in the default CLASSPATH or specified in
// jar_file_uris.
MainClass string `json:"mainClass,omitempty"`
// MainJarFileUri: The Hadoop Compatible Filesystem (HCFS) URI of the
// jar file containing the main class. Examples:
// 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
// 'hdfs:/tmp/test-samples/custom-wordcount.jar'
// 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
MainJarFileUri string `json:"mainJarFileUri,omitempty"`
// Properties: Optional A mapping of property names to values, used to
// configure Hadoop. Properties that conflict with values set by the
// Cloud Dataproc API may be overwritten. Can include properties set in
// /etc/hadoop/conf/*-site and classes in user code.
Properties map[string]string `json:"properties,omitempty"`
// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ArchiveUris") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *HadoopJob) MarshalJSON() ([]byte, error) {
type NoMethod HadoopJob
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// HiveJob: A Cloud Dataproc job for running Hive queries on YARN.
type HiveJob struct {
// ContinueOnFailure: Optional Whether to continue executing queries if
// a query fails. The default value is false. Setting to true can be
// useful when executing independent parallel queries.
ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
// JarFileUris: Optional HCFS URIs of jar files to add to the CLASSPATH
// of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive
// SerDes and UDFs.
JarFileUris []string `json:"jarFileUris,omitempty"`
// Properties: Optional A mapping of property names and values, used to
// configure Hive. Properties that conflict with values set by the Cloud
// Dataproc API may be overwritten. Can include properties set in
// /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and
// classes in user code.
Properties map[string]string `json:"properties,omitempty"`
// QueryFileUri: The HCFS URI of the script that contains Hive queries.
QueryFileUri string `json:"queryFileUri,omitempty"`
// QueryList: A list of queries.
QueryList *QueryList `json:"queryList,omitempty"`
// ScriptVariables: Optional Mapping of query variable names to values
// (equivalent to the Hive command: SET name="value";).
ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
// ForceSendFields is a list of field names (e.g. "ContinueOnFailure")
// to unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ContinueOnFailure") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *HiveJob) MarshalJSON() ([]byte, error) {
type NoMethod HiveJob
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// InstanceGroupConfiguration: The configuration settings for Google
// Compute Engine resources in an instance group, such as a master or
// worker group.
type InstanceGroupConfiguration struct {
// Accelerators: Optional The Google Compute Engine accelerator
// configuration for these instances.
Accelerators []*AcceleratorConfiguration `json:"accelerators,omitempty"`
// DiskConfiguration: Disk option configuration settings.
DiskConfiguration *DiskConfiguration `json:"diskConfiguration,omitempty"`
// ImageUri: Output-only The Google Compute Engine image resource used
// for cluster instances. Inferred from
// SoftwareConfiguration.image_version.
ImageUri string `json:"imageUri,omitempty"`
// InstanceNames: The list of instance names. Dataproc derives the names
// from cluster_name, num_instances, and the instance group if not set
// by user (recommended practice is to let Dataproc derive the name).
InstanceNames []string `json:"instanceNames,omitempty"`
// IsPreemptible: Specifies that this instance group contains
// Preemptible Instances.
IsPreemptible bool `json:"isPreemptible,omitempty"`
// MachineTypeUri: The Google Compute Engine machine type used for
// cluster instances. Example:
// https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2.
MachineTypeUri string `json:"machineTypeUri,omitempty"`
// ManagedGroupConfiguration: Output-only The configuration for Google
// Compute Engine Instance Group Manager that manages this group. This
// is only used for preemptible instance groups.
ManagedGroupConfiguration *ManagedGroupConfiguration `json:"managedGroupConfiguration,omitempty"`
// NumInstances: The number of VM instances in the instance group. For
// master instance groups, must be set to 1.
NumInstances int64 `json:"numInstances,omitempty"`
// ForceSendFields is a list of field names (e.g. "Accelerators") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "Accelerators") to include
// in API requests with the JSON null value. By default, fields with
// empty values are omitted from API requests. However, any field with
// an empty value appearing in NullFields will be sent to the server as
// null. It is an error if a field in this list has a non-empty value.
// This may be used to include null fields in Patch requests.
NullFields []string `json:"-"`
}
func (s *InstanceGroupConfiguration) MarshalJSON() ([]byte, error) {
type NoMethod InstanceGroupConfiguration
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// Job: A Cloud Dataproc job resource.
type Job struct {
// DriverControlFilesUri: Output-only If present, the location of
// miscellaneous control files which may be used as part of job setup
// and handling. If not present, control files may be placed in the same
// location as driver_output_uri.
DriverControlFilesUri string `json:"driverControlFilesUri,omitempty"`
// DriverInputResourceUri: Output-only A URI pointing to the location of
// the stdin of the job's driver program, only set if the job is
// interactive.
DriverInputResourceUri string `json:"driverInputResourceUri,omitempty"`
// DriverOutputResourceUri: Output-only A URI pointing to the location
// of the stdout of the job's driver program.
DriverOutputResourceUri string `json:"driverOutputResourceUri,omitempty"`
// HadoopJob: Job is a Hadoop job.
HadoopJob *HadoopJob `json:"hadoopJob,omitempty"`
// HiveJob: Job is a Hive job.
HiveJob *HiveJob `json:"hiveJob,omitempty"`
// Interactive: Optional If set to true, the driver's stdin will be kept
// open and driver_input_uri will be set to provide a path at which
// additional input can be sent to the driver.
Interactive bool `json:"interactive,omitempty"`
// Labels: Optional The labels to associate with this job.Label keys
// must be between 1 and 63 characters long, and must conform to the
// following regular expression: \p{Ll}\p{Lo}{0,62}Label values must be
// between 1 and 63 characters long, and must conform to the following
// regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 64 labels
// can be associated with a given job.
Labels map[string]string `json:"labels,omitempty"`
// PigJob: Job is a Pig job.
PigJob *PigJob `json:"pigJob,omitempty"`
// Placement: Required Job information, including how, when, and where
// to run the job.
Placement *JobPlacement `json:"placement,omitempty"`
// PysparkJob: Job is a Pyspark job.
PysparkJob *PySparkJob `json:"pysparkJob,omitempty"`
// Reference: Optional The fully qualified reference to the job, which
// can be used to obtain the equivalent REST path of the job resource.
// If this property is not specified when a job is created, the server
// generates a <code>job_id</code>.
Reference *JobReference `json:"reference,omitempty"`
// Scheduling: Optional Job scheduling configuration.
Scheduling *JobScheduling `json:"scheduling,omitempty"`
// SparkJob: Job is a Spark job.
SparkJob *SparkJob `json:"sparkJob,omitempty"`
// SparkSqlJob: Job is a SparkSql job.
SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"`
// Status: Output-only The job status. Additional application-specific
// status information may be contained in the <code>type_job</code> and
// <code>yarn_applications</code> fields.
Status *JobStatus `json:"status,omitempty"`
// StatusHistory: Output-only The previous job status.
StatusHistory []*JobStatus `json:"statusHistory,omitempty"`
// SubmittedBy: Output-only The email address of the user submitting the
// job. For jobs submitted on the cluster, the address is
// <code>username@hostname</code>.
SubmittedBy string `json:"submittedBy,omitempty"`
// YarnApplications: Output-only The collection of YARN applications
// spun up by this job.
YarnApplications []*YarnApplication `json:"yarnApplications,omitempty"`
// ServerResponse contains the HTTP response code and headers from the
// server.
googleapi.ServerResponse `json:"-"`
// ForceSendFields is a list of field names (e.g.
// "DriverControlFilesUri") to unconditionally include in API requests.
// By default, fields with empty values are omitted from API requests.
// However, any non-pointer, non-interface field appearing in
// ForceSendFields will be sent to the server regardless of whether the
// field is empty or not. This may be used to include empty fields in
// Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "DriverControlFilesUri") to
// include in API requests with the JSON null value. By default, fields
// with empty values are omitted from API requests. However, any field
// with an empty value appearing in NullFields will be sent to the
// server as null. It is an error if a field in this list has a
// non-empty value. This may be used to include null fields in Patch
// requests.
NullFields []string `json:"-"`
}
func (s *Job) MarshalJSON() ([]byte, error) {
type NoMethod Job
raw := NoMethod(*s)
return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
}
// JobPlacement: Cloud Dataproc job configuration.
type JobPlacement struct {
// ClusterName: Required The name of the cluster where the job will be
// submitted.
ClusterName string `json:"clusterName,omitempty"`
// ClusterUuid: Output-only A cluster UUID generated by the Dataproc
// service when the job is submitted.
ClusterUuid string `json:"clusterUuid,omitempty"`
// ForceSendFields is a list of field names (e.g. "ClusterName") to
// unconditionally include in API requests. By default, fields with
// empty values are omitted from API requests. However, any non-pointer,
// non-interface field appearing in ForceSendFields will be sent to the
// server regardless of whether the field is empty or not. This may be
// used to include empty fields in Patch requests.
ForceSendFields []string `json:"-"`
// NullFields is a list of field names (e.g. "ClusterName") to include