1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style
3// license that can be found in the LICENSE file.
4
5// Code generated file. DO NOT EDIT.
6
7// Package dataproc provides access to the Cloud Dataproc API.
8//
9// This package is DEPRECATED. Use package cloud.google.com/go/dataproc/apiv1 instead.
10//
11// For product documentation, see: https://cloud.google.com/dataproc/
12//
13// Creating a client
14//
15// Usage example:
16//
17//   import "google.golang.org/api/dataproc/v1"
18//   ...
19//   ctx := context.Background()
20//   dataprocService, err := dataproc.NewService(ctx)
21//
22// In this example, Google Application Default Credentials are used for authentication.
23//
24// For information on how to create and obtain Application Default Credentials, see https://developers.google.com/identity/protocols/application-default-credentials.
25//
26// Other authentication options
27//
28// To use an API key for authentication (note: some APIs do not support API keys), use option.WithAPIKey:
29//
30//   dataprocService, err := dataproc.NewService(ctx, option.WithAPIKey("AIza..."))
31//
32// To use an OAuth token (e.g., a user token obtained via a three-legged OAuth flow), use option.WithTokenSource:
33//
34//   config := &oauth2.Config{...}
35//   // ...
36//   token, err := config.Exchange(ctx, ...)
37//   dataprocService, err := dataproc.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
38//
39// See https://godoc.org/google.golang.org/api/option/ for details on options.
40package dataproc // import "google.golang.org/api/dataproc/v1"
41
42import (
43	"bytes"
44	"context"
45	"encoding/json"
46	"errors"
47	"fmt"
48	"io"
49	"net/http"
50	"net/url"
51	"strconv"
52	"strings"
53
54	googleapi "google.golang.org/api/googleapi"
55	gensupport "google.golang.org/api/internal/gensupport"
56	option "google.golang.org/api/option"
57	internaloption "google.golang.org/api/option/internaloption"
58	htransport "google.golang.org/api/transport/http"
59)
60
61// Always reference these packages, just in case the auto-generated code
62// below doesn't.
63var _ = bytes.NewBuffer
64var _ = strconv.Itoa
65var _ = fmt.Sprintf
66var _ = json.NewDecoder
67var _ = io.Copy
68var _ = url.Parse
69var _ = gensupport.MarshalJSON
70var _ = googleapi.Version
71var _ = errors.New
72var _ = strings.Replace
73var _ = context.Canceled
74var _ = internaloption.WithDefaultEndpoint
75
76const apiId = "dataproc:v1"
77const apiName = "dataproc"
78const apiVersion = "v1"
79const basePath = "https://dataproc.googleapis.com/"
80
81// OAuth2 scopes used by this API.
82const (
83	// View and manage your data across Google Cloud Platform services
84	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
85)
86
87// NewService creates a new Service.
88func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
89	scopesOption := option.WithScopes(
90		"https://www.googleapis.com/auth/cloud-platform",
91	)
92	// NOTE: prepend, so we don't override user-specified scopes.
93	opts = append([]option.ClientOption{scopesOption}, opts...)
94	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
95	client, endpoint, err := htransport.NewClient(ctx, opts...)
96	if err != nil {
97		return nil, err
98	}
99	s, err := New(client)
100	if err != nil {
101		return nil, err
102	}
103	if endpoint != "" {
104		s.BasePath = endpoint
105	}
106	return s, nil
107}
108
109// New creates a new Service. It uses the provided http.Client for requests.
110//
111// Deprecated: please use NewService instead.
112// To provide a custom HTTP client, use option.WithHTTPClient.
113// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
114func New(client *http.Client) (*Service, error) {
115	if client == nil {
116		return nil, errors.New("client is nil")
117	}
118	s := &Service{client: client, BasePath: basePath}
119	s.Projects = NewProjectsService(s)
120	return s, nil
121}
122
123type Service struct {
124	client    *http.Client
125	BasePath  string // API endpoint base URL
126	UserAgent string // optional additional User-Agent fragment
127
128	Projects *ProjectsService
129}
130
131func (s *Service) userAgent() string {
132	if s.UserAgent == "" {
133		return googleapi.UserAgent
134	}
135	return googleapi.UserAgent + " " + s.UserAgent
136}
137
138func NewProjectsService(s *Service) *ProjectsService {
139	rs := &ProjectsService{s: s}
140	rs.Locations = NewProjectsLocationsService(s)
141	rs.Regions = NewProjectsRegionsService(s)
142	return rs
143}
144
145type ProjectsService struct {
146	s *Service
147
148	Locations *ProjectsLocationsService
149
150	Regions *ProjectsRegionsService
151}
152
153func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
154	rs := &ProjectsLocationsService{s: s}
155	rs.AutoscalingPolicies = NewProjectsLocationsAutoscalingPoliciesService(s)
156	rs.WorkflowTemplates = NewProjectsLocationsWorkflowTemplatesService(s)
157	return rs
158}
159
160type ProjectsLocationsService struct {
161	s *Service
162
163	AutoscalingPolicies *ProjectsLocationsAutoscalingPoliciesService
164
165	WorkflowTemplates *ProjectsLocationsWorkflowTemplatesService
166}
167
168func NewProjectsLocationsAutoscalingPoliciesService(s *Service) *ProjectsLocationsAutoscalingPoliciesService {
169	rs := &ProjectsLocationsAutoscalingPoliciesService{s: s}
170	return rs
171}
172
173type ProjectsLocationsAutoscalingPoliciesService struct {
174	s *Service
175}
176
177func NewProjectsLocationsWorkflowTemplatesService(s *Service) *ProjectsLocationsWorkflowTemplatesService {
178	rs := &ProjectsLocationsWorkflowTemplatesService{s: s}
179	return rs
180}
181
182type ProjectsLocationsWorkflowTemplatesService struct {
183	s *Service
184}
185
186func NewProjectsRegionsService(s *Service) *ProjectsRegionsService {
187	rs := &ProjectsRegionsService{s: s}
188	rs.AutoscalingPolicies = NewProjectsRegionsAutoscalingPoliciesService(s)
189	rs.Clusters = NewProjectsRegionsClustersService(s)
190	rs.Jobs = NewProjectsRegionsJobsService(s)
191	rs.Operations = NewProjectsRegionsOperationsService(s)
192	rs.WorkflowTemplates = NewProjectsRegionsWorkflowTemplatesService(s)
193	return rs
194}
195
196type ProjectsRegionsService struct {
197	s *Service
198
199	AutoscalingPolicies *ProjectsRegionsAutoscalingPoliciesService
200
201	Clusters *ProjectsRegionsClustersService
202
203	Jobs *ProjectsRegionsJobsService
204
205	Operations *ProjectsRegionsOperationsService
206
207	WorkflowTemplates *ProjectsRegionsWorkflowTemplatesService
208}
209
210func NewProjectsRegionsAutoscalingPoliciesService(s *Service) *ProjectsRegionsAutoscalingPoliciesService {
211	rs := &ProjectsRegionsAutoscalingPoliciesService{s: s}
212	return rs
213}
214
215type ProjectsRegionsAutoscalingPoliciesService struct {
216	s *Service
217}
218
219func NewProjectsRegionsClustersService(s *Service) *ProjectsRegionsClustersService {
220	rs := &ProjectsRegionsClustersService{s: s}
221	return rs
222}
223
224type ProjectsRegionsClustersService struct {
225	s *Service
226}
227
228func NewProjectsRegionsJobsService(s *Service) *ProjectsRegionsJobsService {
229	rs := &ProjectsRegionsJobsService{s: s}
230	return rs
231}
232
233type ProjectsRegionsJobsService struct {
234	s *Service
235}
236
237func NewProjectsRegionsOperationsService(s *Service) *ProjectsRegionsOperationsService {
238	rs := &ProjectsRegionsOperationsService{s: s}
239	return rs
240}
241
242type ProjectsRegionsOperationsService struct {
243	s *Service
244}
245
246func NewProjectsRegionsWorkflowTemplatesService(s *Service) *ProjectsRegionsWorkflowTemplatesService {
247	rs := &ProjectsRegionsWorkflowTemplatesService{s: s}
248	return rs
249}
250
251type ProjectsRegionsWorkflowTemplatesService struct {
252	s *Service
253}
254
255// AcceleratorConfig: Specifies the type and number of accelerator cards
256// attached to the instances of an instance. See GPUs on Compute Engine
257// (https://cloud.google.com/compute/docs/gpus/).
258type AcceleratorConfig struct {
259	// AcceleratorCount: The number of the accelerator cards of this type
260	// exposed to this instance.
261	AcceleratorCount int64 `json:"acceleratorCount,omitempty"`
262
263	// AcceleratorTypeUri: Full URL, partial URI, or short name of the
264	// accelerator type resource to expose to this instance. See Compute
265	// Engine AcceleratorTypes
266	// (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes
267	// ).Examples:
268	// https://www.googleapis.com/compute/beta/projects/[project_
269	// id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
270	// projects/[proje
271	// ct_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
272	// nvidia-tesla
273	// -k80Auto Zone Exception: If you are using the Dataproc Auto Zone
274	// Placement
275	// (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/
276	// auto-zone#using_auto_zone_placement) feature, you must use the short
277	// name of the accelerator type resource, for example, nvidia-tesla-k80.
278	AcceleratorTypeUri string `json:"acceleratorTypeUri,omitempty"`
279
280	// ForceSendFields is a list of field names (e.g. "AcceleratorCount") to
281	// unconditionally include in API requests. By default, fields with
282	// empty values are omitted from API requests. However, any non-pointer,
283	// non-interface field appearing in ForceSendFields will be sent to the
284	// server regardless of whether the field is empty or not. This may be
285	// used to include empty fields in Patch requests.
286	ForceSendFields []string `json:"-"`
287
288	// NullFields is a list of field names (e.g. "AcceleratorCount") to
289	// include in API requests with the JSON null value. By default, fields
290	// with empty values are omitted from API requests. However, any field
291	// with an empty value appearing in NullFields will be sent to the
292	// server as null. It is an error if a field in this list has a
293	// non-empty value. This may be used to include null fields in Patch
294	// requests.
295	NullFields []string `json:"-"`
296}
297
298func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) {
299	type NoMethod AcceleratorConfig
300	raw := NoMethod(*s)
301	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
302}
303
304// AutoscalingConfig: Autoscaling Policy config associated with the
305// cluster.
306type AutoscalingConfig struct {
307	// PolicyUri: Optional. The autoscaling policy used by the cluster.Only
308	// resource names including projectid and location (region) are valid.
309	// Examples:
310	// https://www.googleapis.com/compute/v1/projects/[project_id]/
311	// locations/[dataproc_region]/autoscalingPolicies/[policy_id]
312	// projects/[
313	// project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id
314	// ]Note that the policy must be in the same project and Dataproc
315	// region.
316	PolicyUri string `json:"policyUri,omitempty"`
317
318	// ForceSendFields is a list of field names (e.g. "PolicyUri") to
319	// unconditionally include in API requests. By default, fields with
320	// empty values are omitted from API requests. However, any non-pointer,
321	// non-interface field appearing in ForceSendFields will be sent to the
322	// server regardless of whether the field is empty or not. This may be
323	// used to include empty fields in Patch requests.
324	ForceSendFields []string `json:"-"`
325
326	// NullFields is a list of field names (e.g. "PolicyUri") to include in
327	// API requests with the JSON null value. By default, fields with empty
328	// values are omitted from API requests. However, any field with an
329	// empty value appearing in NullFields will be sent to the server as
330	// null. It is an error if a field in this list has a non-empty value.
331	// This may be used to include null fields in Patch requests.
332	NullFields []string `json:"-"`
333}
334
335func (s *AutoscalingConfig) MarshalJSON() ([]byte, error) {
336	type NoMethod AutoscalingConfig
337	raw := NoMethod(*s)
338	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
339}
340
341// AutoscalingPolicy: Describes an autoscaling policy for Dataproc
342// cluster autoscaler.
343type AutoscalingPolicy struct {
344	BasicAlgorithm *BasicAutoscalingAlgorithm `json:"basicAlgorithm,omitempty"`
345
346	// Id: Required. The policy id.The id must contain only letters (a-z,
347	// A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin
348	// or end with underscore or hyphen. Must consist of between 3 and 50
349	// characters.
350	Id string `json:"id,omitempty"`
351
352	// Name: Output only. The "resource name" of the autoscaling policy, as
353	// described in https://cloud.google.com/apis/design/resource_names.
354	// For projects.regions.autoscalingPolicies, the resource name of the
355	// policy has the following format:
356	// projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
357	//
358	// For projects.locations.autoscalingPolicies, the resource name of the
359	// policy has the following format:
360	// projects/{project_id}/locations/{location}/autoscalingPolicies/{policy
361	// _id}
362	Name string `json:"name,omitempty"`
363
364	// SecondaryWorkerConfig: Optional. Describes how the autoscaler will
365	// operate for secondary workers.
366	SecondaryWorkerConfig *InstanceGroupAutoscalingPolicyConfig `json:"secondaryWorkerConfig,omitempty"`
367
368	// WorkerConfig: Required. Describes how the autoscaler will operate for
369	// primary workers.
370	WorkerConfig *InstanceGroupAutoscalingPolicyConfig `json:"workerConfig,omitempty"`
371
372	// ServerResponse contains the HTTP response code and headers from the
373	// server.
374	googleapi.ServerResponse `json:"-"`
375
376	// ForceSendFields is a list of field names (e.g. "BasicAlgorithm") to
377	// unconditionally include in API requests. By default, fields with
378	// empty values are omitted from API requests. However, any non-pointer,
379	// non-interface field appearing in ForceSendFields will be sent to the
380	// server regardless of whether the field is empty or not. This may be
381	// used to include empty fields in Patch requests.
382	ForceSendFields []string `json:"-"`
383
384	// NullFields is a list of field names (e.g. "BasicAlgorithm") to
385	// include in API requests with the JSON null value. By default, fields
386	// with empty values are omitted from API requests. However, any field
387	// with an empty value appearing in NullFields will be sent to the
388	// server as null. It is an error if a field in this list has a
389	// non-empty value. This may be used to include null fields in Patch
390	// requests.
391	NullFields []string `json:"-"`
392}
393
394func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) {
395	type NoMethod AutoscalingPolicy
396	raw := NoMethod(*s)
397	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
398}
399
400// BasicAutoscalingAlgorithm: Basic algorithm for autoscaling.
401type BasicAutoscalingAlgorithm struct {
402	// CooldownPeriod: Optional. Duration between scaling events. A scaling
403	// period starts after the update operation from the previous event has
404	// completed.Bounds: 2m, 1d. Default: 2m.
405	CooldownPeriod string `json:"cooldownPeriod,omitempty"`
406
407	// YarnConfig: Required. YARN autoscaling configuration.
408	YarnConfig *BasicYarnAutoscalingConfig `json:"yarnConfig,omitempty"`
409
410	// ForceSendFields is a list of field names (e.g. "CooldownPeriod") to
411	// unconditionally include in API requests. By default, fields with
412	// empty values are omitted from API requests. However, any non-pointer,
413	// non-interface field appearing in ForceSendFields will be sent to the
414	// server regardless of whether the field is empty or not. This may be
415	// used to include empty fields in Patch requests.
416	ForceSendFields []string `json:"-"`
417
418	// NullFields is a list of field names (e.g. "CooldownPeriod") to
419	// include in API requests with the JSON null value. By default, fields
420	// with empty values are omitted from API requests. However, any field
421	// with an empty value appearing in NullFields will be sent to the
422	// server as null. It is an error if a field in this list has a
423	// non-empty value. This may be used to include null fields in Patch
424	// requests.
425	NullFields []string `json:"-"`
426}
427
428func (s *BasicAutoscalingAlgorithm) MarshalJSON() ([]byte, error) {
429	type NoMethod BasicAutoscalingAlgorithm
430	raw := NoMethod(*s)
431	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
432}
433
434// BasicYarnAutoscalingConfig: Basic autoscaling configurations for
435// YARN.
436type BasicYarnAutoscalingConfig struct {
437	// GracefulDecommissionTimeout: Required. Timeout for YARN graceful
438	// decommissioning of Node Managers. Specifies the duration to wait for
439	// jobs to complete before forcefully removing workers (and potentially
440	// interrupting jobs). Only applicable to downscaling operations.Bounds:
441	// 0s, 1d.
442	GracefulDecommissionTimeout string `json:"gracefulDecommissionTimeout,omitempty"`
443
444	// ScaleDownFactor: Required. Fraction of average pending memory in the
445	// last cooldown period for which to remove workers. A scale-down factor
446	// of 1 will result in scaling down so that there is no available memory
447	// remaining after the update (more aggressive scaling). A scale-down
448	// factor of 0 disables removing workers, which can be beneficial for
449	// autoscaling a single job.Bounds: 0.0, 1.0.
450	ScaleDownFactor float64 `json:"scaleDownFactor,omitempty"`
451
452	// ScaleDownMinWorkerFraction: Optional. Minimum scale-down threshold as
453	// a fraction of total cluster size before scaling occurs. For example,
454	// in a 20-worker cluster, a threshold of 0.1 means the autoscaler must
455	// recommend at least a 2 worker scale-down for the cluster to scale. A
456	// threshold of 0 means the autoscaler will scale down on any
457	// recommended change.Bounds: 0.0, 1.0. Default: 0.0.
458	ScaleDownMinWorkerFraction float64 `json:"scaleDownMinWorkerFraction,omitempty"`
459
460	// ScaleUpFactor: Required. Fraction of average pending memory in the
461	// last cooldown period for which to add workers. A scale-up factor of
462	// 1.0 will result in scaling up so that there is no pending memory
463	// remaining after the update (more aggressive scaling). A scale-up
464	// factor closer to 0 will result in a smaller magnitude of scaling up
465	// (less aggressive scaling).Bounds: 0.0, 1.0.
466	ScaleUpFactor float64 `json:"scaleUpFactor,omitempty"`
467
468	// ScaleUpMinWorkerFraction: Optional. Minimum scale-up threshold as a
469	// fraction of total cluster size before scaling occurs. For example, in
470	// a 20-worker cluster, a threshold of 0.1 means the autoscaler must
471	// recommend at least a 2-worker scale-up for the cluster to scale. A
472	// threshold of 0 means the autoscaler will scale up on any recommended
473	// change.Bounds: 0.0, 1.0. Default: 0.0.
474	ScaleUpMinWorkerFraction float64 `json:"scaleUpMinWorkerFraction,omitempty"`
475
476	// ForceSendFields is a list of field names (e.g.
477	// "GracefulDecommissionTimeout") to unconditionally include in API
478	// requests. By default, fields with empty values are omitted from API
479	// requests. However, any non-pointer, non-interface field appearing in
480	// ForceSendFields will be sent to the server regardless of whether the
481	// field is empty or not. This may be used to include empty fields in
482	// Patch requests.
483	ForceSendFields []string `json:"-"`
484
485	// NullFields is a list of field names (e.g.
486	// "GracefulDecommissionTimeout") to include in API requests with the
487	// JSON null value. By default, fields with empty values are omitted
488	// from API requests. However, any field with an empty value appearing
489	// in NullFields will be sent to the server as null. It is an error if a
490	// field in this list has a non-empty value. This may be used to include
491	// null fields in Patch requests.
492	NullFields []string `json:"-"`
493}
494
495func (s *BasicYarnAutoscalingConfig) MarshalJSON() ([]byte, error) {
496	type NoMethod BasicYarnAutoscalingConfig
497	raw := NoMethod(*s)
498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
499}
500
501func (s *BasicYarnAutoscalingConfig) UnmarshalJSON(data []byte) error {
502	type NoMethod BasicYarnAutoscalingConfig
503	var s1 struct {
504		ScaleDownFactor            gensupport.JSONFloat64 `json:"scaleDownFactor"`
505		ScaleDownMinWorkerFraction gensupport.JSONFloat64 `json:"scaleDownMinWorkerFraction"`
506		ScaleUpFactor              gensupport.JSONFloat64 `json:"scaleUpFactor"`
507		ScaleUpMinWorkerFraction   gensupport.JSONFloat64 `json:"scaleUpMinWorkerFraction"`
508		*NoMethod
509	}
510	s1.NoMethod = (*NoMethod)(s)
511	if err := json.Unmarshal(data, &s1); err != nil {
512		return err
513	}
514	s.ScaleDownFactor = float64(s1.ScaleDownFactor)
515	s.ScaleDownMinWorkerFraction = float64(s1.ScaleDownMinWorkerFraction)
516	s.ScaleUpFactor = float64(s1.ScaleUpFactor)
517	s.ScaleUpMinWorkerFraction = float64(s1.ScaleUpMinWorkerFraction)
518	return nil
519}
520
521// Binding: Associates members with a role.
522type Binding struct {
523	// Condition: The condition that is associated with this binding. NOTE:
524	// An unsatisfied condition will not allow user access via current
525	// binding. Different bindings, including their conditions, are examined
526	// independently.
527	Condition *Expr `json:"condition,omitempty"`
528
529	// Members: Specifies the identities requesting access for a Cloud
530	// Platform resource. members can have the following values:
531	// allUsers: A special identifier that represents anyone who is  on the
532	// internet; with or without a Google account.
533	// allAuthenticatedUsers: A special identifier that represents anyone
534	// who is authenticated with a Google account or a service
535	// account.
536	// user:{emailid}: An email address that represents a specific Google
537	// account. For example, alice@example.com .
538	// serviceAccount:{emailid}: An email address that represents a service
539	// account. For example,
540	// my-other-app@appspot.gserviceaccount.com.
541	// group:{emailid}: An email address that represents a Google group.
542	// For example,
543	// admins@example.com.
544	// deleted:user:{emailid}?uid={uniqueid}: An email address (plus unique
545	// identifier) representing a user that has been recently deleted. For
546	// example, alice@example.com?uid=123456789012345678901. If the user is
547	// recovered, this value reverts to user:{emailid} and the recovered
548	// user  retains the role in the
549	// binding.
550	// deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address
551	// (plus  unique identifier) representing a service account that has
552	// been recently  deleted. For example,
553	// my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901.
554	// If the service account is undeleted, this value reverts to
555	// serviceAccount:{emailid} and the undeleted service account retains
556	// the  role in the binding.
557	// deleted:group:{emailid}?uid={uniqueid}: An email address (plus unique
558	//  identifier) representing a Google group that has been recently
559	// deleted. For example, admins@example.com?uid=123456789012345678901.
560	// If  the group is recovered, this value reverts to group:{emailid} and
561	// the  recovered group retains the role in the
562	// binding.
563	// domain:{domain}: The G Suite domain (primary) that represents all the
564	//  users of that domain. For example, google.com or example.com.
565	Members []string `json:"members,omitempty"`
566
567	// Role: Role that is assigned to members. For example, roles/viewer,
568	// roles/editor, or roles/owner.
569	Role string `json:"role,omitempty"`
570
571	// ForceSendFields is a list of field names (e.g. "Condition") to
572	// unconditionally include in API requests. By default, fields with
573	// empty values are omitted from API requests. However, any non-pointer,
574	// non-interface field appearing in ForceSendFields will be sent to the
575	// server regardless of whether the field is empty or not. This may be
576	// used to include empty fields in Patch requests.
577	ForceSendFields []string `json:"-"`
578
579	// NullFields is a list of field names (e.g. "Condition") to include in
580	// API requests with the JSON null value. By default, fields with empty
581	// values are omitted from API requests. However, any field with an
582	// empty value appearing in NullFields will be sent to the server as
583	// null. It is an error if a field in this list has a non-empty value.
584	// This may be used to include null fields in Patch requests.
585	NullFields []string `json:"-"`
586}
587
588func (s *Binding) MarshalJSON() ([]byte, error) {
589	type NoMethod Binding
590	raw := NoMethod(*s)
591	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
592}
593
594// CancelJobRequest: A request to cancel a job.
595type CancelJobRequest struct {
596}
597
598// Cluster: Describes the identifying information, config, and status of
599// a cluster of Compute Engine instances.
600type Cluster struct {
601	// ClusterName: Required. The cluster name. Cluster names within a
602	// project must be unique. Names of deleted clusters can be reused.
603	ClusterName string `json:"clusterName,omitempty"`
604
605	// ClusterUuid: Output only. A cluster UUID (Unique Universal
606	// Identifier). Dataproc generates this value when it creates the
607	// cluster.
608	ClusterUuid string `json:"clusterUuid,omitempty"`
609
610	// Config: Required. The cluster config. Note that Dataproc may set
611	// default values, and values may change when clusters are updated.
612	Config *ClusterConfig `json:"config,omitempty"`
613
614	// Labels: Optional. The labels to associate with this cluster. Label
615	// keys must contain 1 to 63 characters, and must conform to RFC 1035
616	// (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty,
617	// but, if present, must contain 1 to 63 characters, and must conform to
618	// RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32
619	// labels can be associated with a cluster.
620	Labels map[string]string `json:"labels,omitempty"`
621
622	// Metrics: Output only. Contains cluster daemon metrics such as HDFS
623	// and YARN stats.Beta Feature: This report is available for testing
624	// purposes only. It may be changed before final release.
625	Metrics *ClusterMetrics `json:"metrics,omitempty"`
626
627	// ProjectId: Required. The Google Cloud Platform project ID that the
628	// cluster belongs to.
629	ProjectId string `json:"projectId,omitempty"`
630
631	// Status: Output only. Cluster status.
632	Status *ClusterStatus `json:"status,omitempty"`
633
634	// StatusHistory: Output only. The previous cluster status.
635	StatusHistory []*ClusterStatus `json:"statusHistory,omitempty"`
636
637	// ServerResponse contains the HTTP response code and headers from the
638	// server.
639	googleapi.ServerResponse `json:"-"`
640
641	// ForceSendFields is a list of field names (e.g. "ClusterName") to
642	// unconditionally include in API requests. By default, fields with
643	// empty values are omitted from API requests. However, any non-pointer,
644	// non-interface field appearing in ForceSendFields will be sent to the
645	// server regardless of whether the field is empty or not. This may be
646	// used to include empty fields in Patch requests.
647	ForceSendFields []string `json:"-"`
648
649	// NullFields is a list of field names (e.g. "ClusterName") to include
650	// in API requests with the JSON null value. By default, fields with
651	// empty values are omitted from API requests. However, any field with
652	// an empty value appearing in NullFields will be sent to the server as
653	// null. It is an error if a field in this list has a non-empty value.
654	// This may be used to include null fields in Patch requests.
655	NullFields []string `json:"-"`
656}
657
658func (s *Cluster) MarshalJSON() ([]byte, error) {
659	type NoMethod Cluster
660	raw := NoMethod(*s)
661	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
662}
663
664// ClusterConfig: The cluster config.
665type ClusterConfig struct {
666	// AutoscalingConfig: Optional. Autoscaling config for the policy
667	// associated with the cluster. Cluster does not autoscale if this field
668	// is unset.
669	AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"`
670
671	// ConfigBucket: Optional. A Cloud Storage bucket used to stage job
672	// dependencies, config files, and job driver console output. If you do
673	// not specify a staging bucket, Cloud Dataproc will determine a Cloud
674	// Storage location (US, ASIA, or EU) for your cluster's staging bucket
675	// according to the Compute Engine zone where your cluster is deployed,
676	// and then create and manage this project-level, per-location bucket
677	// (see Dataproc staging bucket
678	// (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/
679	// staging-bucket)).
680	ConfigBucket string `json:"configBucket,omitempty"`
681
682	// EncryptionConfig: Optional. Encryption settings for the cluster.
683	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
684
685	// GceClusterConfig: Optional. The shared Compute Engine config settings
686	// for all instances in a cluster.
687	GceClusterConfig *GceClusterConfig `json:"gceClusterConfig,omitempty"`
688
689	// InitializationActions: Optional. Commands to execute on each node
690	// after config is completed. By default, executables are run on master
691	// and all worker nodes. You can test a node's role metadata to run an
692	// executable on a master or worker node, as shown below using curl (you
693	// can also use wget):
694	// ROLE=$(curl -H
695	// Metadata-Flavor:Google
696	// http://metadata/computeMetadata/v1/instance/att
697	// ributes/dataproc-role)
698	// if [[ "${ROLE}" == 'Master' ]]; then
699	//   ... master specific actions ...
700	// else
701	//   ... worker specific actions ...
702	// fi
703	//
704	InitializationActions []*NodeInitializationAction `json:"initializationActions,omitempty"`
705
706	// LifecycleConfig: Optional. Lifecycle setting for the cluster.
707	LifecycleConfig *LifecycleConfig `json:"lifecycleConfig,omitempty"`
708
709	// MasterConfig: Optional. The Compute Engine config settings for the
710	// master instance in a cluster.
711	MasterConfig *InstanceGroupConfig `json:"masterConfig,omitempty"`
712
713	// SecondaryWorkerConfig: Optional. The Compute Engine config settings
714	// for additional worker instances in a cluster.
715	SecondaryWorkerConfig *InstanceGroupConfig `json:"secondaryWorkerConfig,omitempty"`
716
717	// SecurityConfig: Optional. Security settings for the cluster.
718	SecurityConfig *SecurityConfig `json:"securityConfig,omitempty"`
719
720	// SoftwareConfig: Optional. The config settings for software inside the
721	// cluster.
722	SoftwareConfig *SoftwareConfig `json:"softwareConfig,omitempty"`
723
724	// WorkerConfig: Optional. The Compute Engine config settings for worker
725	// instances in a cluster.
726	WorkerConfig *InstanceGroupConfig `json:"workerConfig,omitempty"`
727
728	// ForceSendFields is a list of field names (e.g. "AutoscalingConfig")
729	// to unconditionally include in API requests. By default, fields with
730	// empty values are omitted from API requests. However, any non-pointer,
731	// non-interface field appearing in ForceSendFields will be sent to the
732	// server regardless of whether the field is empty or not. This may be
733	// used to include empty fields in Patch requests.
734	ForceSendFields []string `json:"-"`
735
736	// NullFields is a list of field names (e.g. "AutoscalingConfig") to
737	// include in API requests with the JSON null value. By default, fields
738	// with empty values are omitted from API requests. However, any field
739	// with an empty value appearing in NullFields will be sent to the
740	// server as null. It is an error if a field in this list has a
741	// non-empty value. This may be used to include null fields in Patch
742	// requests.
743	NullFields []string `json:"-"`
744}
745
746func (s *ClusterConfig) MarshalJSON() ([]byte, error) {
747	type NoMethod ClusterConfig
748	raw := NoMethod(*s)
749	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
750}
751
752// ClusterMetrics: Contains cluster daemon metrics, such as HDFS and
753// YARN stats.Beta Feature: This report is available for testing
754// purposes only. It may be changed before final release.
755type ClusterMetrics struct {
756	// HdfsMetrics: The HDFS metrics.
757	HdfsMetrics map[string]string `json:"hdfsMetrics,omitempty"`
758
759	// YarnMetrics: The YARN metrics.
760	YarnMetrics map[string]string `json:"yarnMetrics,omitempty"`
761
762	// ForceSendFields is a list of field names (e.g. "HdfsMetrics") to
763	// unconditionally include in API requests. By default, fields with
764	// empty values are omitted from API requests. However, any non-pointer,
765	// non-interface field appearing in ForceSendFields will be sent to the
766	// server regardless of whether the field is empty or not. This may be
767	// used to include empty fields in Patch requests.
768	ForceSendFields []string `json:"-"`
769
770	// NullFields is a list of field names (e.g. "HdfsMetrics") to include
771	// in API requests with the JSON null value. By default, fields with
772	// empty values are omitted from API requests. However, any field with
773	// an empty value appearing in NullFields will be sent to the server as
774	// null. It is an error if a field in this list has a non-empty value.
775	// This may be used to include null fields in Patch requests.
776	NullFields []string `json:"-"`
777}
778
779func (s *ClusterMetrics) MarshalJSON() ([]byte, error) {
780	type NoMethod ClusterMetrics
781	raw := NoMethod(*s)
782	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
783}
784
785// ClusterOperation: The cluster operation triggered by a workflow.
786type ClusterOperation struct {
787	// Done: Output only. Indicates the operation is done.
788	Done bool `json:"done,omitempty"`
789
790	// Error: Output only. Error, if operation failed.
791	Error string `json:"error,omitempty"`
792
793	// OperationId: Output only. The id of the cluster operation.
794	OperationId string `json:"operationId,omitempty"`
795
796	// ForceSendFields is a list of field names (e.g. "Done") to
797	// unconditionally include in API requests. By default, fields with
798	// empty values are omitted from API requests. However, any non-pointer,
799	// non-interface field appearing in ForceSendFields will be sent to the
800	// server regardless of whether the field is empty or not. This may be
801	// used to include empty fields in Patch requests.
802	ForceSendFields []string `json:"-"`
803
804	// NullFields is a list of field names (e.g. "Done") to include in API
805	// requests with the JSON null value. By default, fields with empty
806	// values are omitted from API requests. However, any field with an
807	// empty value appearing in NullFields will be sent to the server as
808	// null. It is an error if a field in this list has a non-empty value.
809	// This may be used to include null fields in Patch requests.
810	NullFields []string `json:"-"`
811}
812
813func (s *ClusterOperation) MarshalJSON() ([]byte, error) {
814	type NoMethod ClusterOperation
815	raw := NoMethod(*s)
816	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
817}
818
819// ClusterOperationMetadata: Metadata describing the operation.
820type ClusterOperationMetadata struct {
821	// ClusterName: Output only. Name of the cluster for the operation.
822	ClusterName string `json:"clusterName,omitempty"`
823
824	// ClusterUuid: Output only. Cluster UUID for the operation.
825	ClusterUuid string `json:"clusterUuid,omitempty"`
826
827	// Description: Output only. Short description of operation.
828	Description string `json:"description,omitempty"`
829
830	// Labels: Output only. Labels associated with the operation
831	Labels map[string]string `json:"labels,omitempty"`
832
833	// OperationType: Output only. The operation type.
834	OperationType string `json:"operationType,omitempty"`
835
836	// Status: Output only. Current operation status.
837	Status *ClusterOperationStatus `json:"status,omitempty"`
838
839	// StatusHistory: Output only. The previous operation status.
840	StatusHistory []*ClusterOperationStatus `json:"statusHistory,omitempty"`
841
842	// Warnings: Output only. Errors encountered during operation execution.
843	Warnings []string `json:"warnings,omitempty"`
844
845	// ForceSendFields is a list of field names (e.g. "ClusterName") to
846	// unconditionally include in API requests. By default, fields with
847	// empty values are omitted from API requests. However, any non-pointer,
848	// non-interface field appearing in ForceSendFields will be sent to the
849	// server regardless of whether the field is empty or not. This may be
850	// used to include empty fields in Patch requests.
851	ForceSendFields []string `json:"-"`
852
853	// NullFields is a list of field names (e.g. "ClusterName") to include
854	// in API requests with the JSON null value. By default, fields with
855	// empty values are omitted from API requests. However, any field with
856	// an empty value appearing in NullFields will be sent to the server as
857	// null. It is an error if a field in this list has a non-empty value.
858	// This may be used to include null fields in Patch requests.
859	NullFields []string `json:"-"`
860}
861
862func (s *ClusterOperationMetadata) MarshalJSON() ([]byte, error) {
863	type NoMethod ClusterOperationMetadata
864	raw := NoMethod(*s)
865	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
866}
867
868// ClusterOperationStatus: The status of the operation.
869type ClusterOperationStatus struct {
870	// Details: Output only. A message containing any operation metadata
871	// details.
872	Details string `json:"details,omitempty"`
873
874	// InnerState: Output only. A message containing the detailed operation
875	// state.
876	InnerState string `json:"innerState,omitempty"`
877
878	// State: Output only. A message containing the operation state.
879	//
880	// Possible values:
881	//   "UNKNOWN" - Unused.
882	//   "PENDING" - The operation has been created.
883	//   "RUNNING" - The operation is running.
884	//   "DONE" - The operation is done; either cancelled or completed.
885	State string `json:"state,omitempty"`
886
887	// StateStartTime: Output only. The time this state was entered.
888	StateStartTime string `json:"stateStartTime,omitempty"`
889
890	// ForceSendFields is a list of field names (e.g. "Details") to
891	// unconditionally include in API requests. By default, fields with
892	// empty values are omitted from API requests. However, any non-pointer,
893	// non-interface field appearing in ForceSendFields will be sent to the
894	// server regardless of whether the field is empty or not. This may be
895	// used to include empty fields in Patch requests.
896	ForceSendFields []string `json:"-"`
897
898	// NullFields is a list of field names (e.g. "Details") to include in
899	// API requests with the JSON null value. By default, fields with empty
900	// values are omitted from API requests. However, any field with an
901	// empty value appearing in NullFields will be sent to the server as
902	// null. It is an error if a field in this list has a non-empty value.
903	// This may be used to include null fields in Patch requests.
904	NullFields []string `json:"-"`
905}
906
907func (s *ClusterOperationStatus) MarshalJSON() ([]byte, error) {
908	type NoMethod ClusterOperationStatus
909	raw := NoMethod(*s)
910	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
911}
912
913// ClusterSelector: A selector that chooses target cluster for jobs
914// based on metadata.
915type ClusterSelector struct {
916	// ClusterLabels: Required. The cluster labels. Cluster must have all
917	// labels to match.
918	ClusterLabels map[string]string `json:"clusterLabels,omitempty"`
919
920	// Zone: Optional. The zone where workflow process executes. This
921	// parameter does not affect the selection of the cluster.If
922	// unspecified, the zone of the first cluster matching the selector is
923	// used.
924	Zone string `json:"zone,omitempty"`
925
926	// ForceSendFields is a list of field names (e.g. "ClusterLabels") to
927	// unconditionally include in API requests. By default, fields with
928	// empty values are omitted from API requests. However, any non-pointer,
929	// non-interface field appearing in ForceSendFields will be sent to the
930	// server regardless of whether the field is empty or not. This may be
931	// used to include empty fields in Patch requests.
932	ForceSendFields []string `json:"-"`
933
934	// NullFields is a list of field names (e.g. "ClusterLabels") to include
935	// in API requests with the JSON null value. By default, fields with
936	// empty values are omitted from API requests. However, any field with
937	// an empty value appearing in NullFields will be sent to the server as
938	// null. It is an error if a field in this list has a non-empty value.
939	// This may be used to include null fields in Patch requests.
940	NullFields []string `json:"-"`
941}
942
943func (s *ClusterSelector) MarshalJSON() ([]byte, error) {
944	type NoMethod ClusterSelector
945	raw := NoMethod(*s)
946	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
947}
948
949// ClusterStatus: The status of a cluster and its instances.
950type ClusterStatus struct {
951	// Detail: Optional. Output only. Details of cluster's state.
952	Detail string `json:"detail,omitempty"`
953
954	// State: Output only. The cluster's state.
955	//
956	// Possible values:
957	//   "UNKNOWN" - The cluster state is unknown.
958	//   "CREATING" - The cluster is being created and set up. It is not
959	// ready for use.
960	//   "RUNNING" - The cluster is currently running and healthy. It is
961	// ready for use.
962	//   "ERROR" - The cluster encountered an error. It is not ready for
963	// use.
964	//   "DELETING" - The cluster is being deleted. It cannot be used.
965	//   "UPDATING" - The cluster is being updated. It continues to accept
966	// and process jobs.
967	State string `json:"state,omitempty"`
968
969	// StateStartTime: Output only. Time when this state was entered (see
970	// JSON representation of Timestamp
971	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
972	StateStartTime string `json:"stateStartTime,omitempty"`
973
974	// Substate: Output only. Additional state information that includes
975	// status reported by the agent.
976	//
977	// Possible values:
978	//   "UNSPECIFIED" - The cluster substate is unknown.
979	//   "UNHEALTHY" - The cluster is known to be in an unhealthy state (for
980	// example, critical daemons are not running or HDFS capacity is
981	// exhausted).Applies to RUNNING state.
982	//   "STALE_STATUS" - The agent-reported status is out of date (may
983	// occur if Dataproc loses communication with Agent).Applies to RUNNING
984	// state.
985	Substate string `json:"substate,omitempty"`
986
987	// ForceSendFields is a list of field names (e.g. "Detail") to
988	// unconditionally include in API requests. By default, fields with
989	// empty values are omitted from API requests. However, any non-pointer,
990	// non-interface field appearing in ForceSendFields will be sent to the
991	// server regardless of whether the field is empty or not. This may be
992	// used to include empty fields in Patch requests.
993	ForceSendFields []string `json:"-"`
994
995	// NullFields is a list of field names (e.g. "Detail") to include in API
996	// requests with the JSON null value. By default, fields with empty
997	// values are omitted from API requests. However, any field with an
998	// empty value appearing in NullFields will be sent to the server as
999	// null. It is an error if a field in this list has a non-empty value.
1000	// This may be used to include null fields in Patch requests.
1001	NullFields []string `json:"-"`
1002}
1003
1004func (s *ClusterStatus) MarshalJSON() ([]byte, error) {
1005	type NoMethod ClusterStatus
1006	raw := NoMethod(*s)
1007	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1008}
1009
1010// DiagnoseClusterRequest: A request to collect cluster diagnostic
1011// information.
1012type DiagnoseClusterRequest struct {
1013}
1014
1015// DiagnoseClusterResults: The location of diagnostic output.
1016type DiagnoseClusterResults struct {
1017	// OutputUri: Output only. The Cloud Storage URI of the diagnostic
1018	// output. The output report is a plain text file with a summary of
1019	// collected diagnostics.
1020	OutputUri string `json:"outputUri,omitempty"`
1021
1022	// ForceSendFields is a list of field names (e.g. "OutputUri") to
1023	// unconditionally include in API requests. By default, fields with
1024	// empty values are omitted from API requests. However, any non-pointer,
1025	// non-interface field appearing in ForceSendFields will be sent to the
1026	// server regardless of whether the field is empty or not. This may be
1027	// used to include empty fields in Patch requests.
1028	ForceSendFields []string `json:"-"`
1029
1030	// NullFields is a list of field names (e.g. "OutputUri") to include in
1031	// API requests with the JSON null value. By default, fields with empty
1032	// values are omitted from API requests. However, any field with an
1033	// empty value appearing in NullFields will be sent to the server as
1034	// null. It is an error if a field in this list has a non-empty value.
1035	// This may be used to include null fields in Patch requests.
1036	NullFields []string `json:"-"`
1037}
1038
1039func (s *DiagnoseClusterResults) MarshalJSON() ([]byte, error) {
1040	type NoMethod DiagnoseClusterResults
1041	raw := NoMethod(*s)
1042	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1043}
1044
1045// DiskConfig: Specifies the config of disk options for a group of VM
1046// instances.
1047type DiskConfig struct {
1048	// BootDiskSizeGb: Optional. Size in GB of the boot disk (default is
1049	// 500GB).
1050	BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"`
1051
1052	// BootDiskType: Optional. Type of the boot disk (default is
1053	// "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State
1054	// Drive) or "pd-standard" (Persistent Disk Hard Disk Drive).
1055	BootDiskType string `json:"bootDiskType,omitempty"`
1056
1057	// NumLocalSsds: Optional. Number of attached SSDs, from 0 to 4 (default
1058	// is 0). If SSDs are not attached, the boot disk is used to store
1059	// runtime logs and HDFS
1060	// (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html) data. If
1061	// one or more SSDs are attached, this runtime bulk data is spread
1062	// across them, and the boot disk contains only basic config and
1063	// installed binaries.
1064	NumLocalSsds int64 `json:"numLocalSsds,omitempty"`
1065
1066	// ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") to
1067	// unconditionally include in API requests. By default, fields with
1068	// empty values are omitted from API requests. However, any non-pointer,
1069	// non-interface field appearing in ForceSendFields will be sent to the
1070	// server regardless of whether the field is empty or not. This may be
1071	// used to include empty fields in Patch requests.
1072	ForceSendFields []string `json:"-"`
1073
1074	// NullFields is a list of field names (e.g. "BootDiskSizeGb") to
1075	// include in API requests with the JSON null value. By default, fields
1076	// with empty values are omitted from API requests. However, any field
1077	// with an empty value appearing in NullFields will be sent to the
1078	// server as null. It is an error if a field in this list has a
1079	// non-empty value. This may be used to include null fields in Patch
1080	// requests.
1081	NullFields []string `json:"-"`
1082}
1083
1084func (s *DiskConfig) MarshalJSON() ([]byte, error) {
1085	type NoMethod DiskConfig
1086	raw := NoMethod(*s)
1087	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1088}
1089
1090// Empty: A generic empty message that you can re-use to avoid defining
1091// duplicated empty messages in your APIs. A typical example is to use
1092// it as the request or the response type of an API method. For
1093// instance:
1094// service Foo {
1095//   rpc Bar(google.protobuf.Empty) returns
1096// (google.protobuf.Empty);
1097// }
1098// The JSON representation for Empty is empty JSON object {}.
1099type Empty struct {
1100	// ServerResponse contains the HTTP response code and headers from the
1101	// server.
1102	googleapi.ServerResponse `json:"-"`
1103}
1104
1105// EncryptionConfig: Encryption settings for the cluster.
1106type EncryptionConfig struct {
1107	// GcePdKmsKeyName: Optional. The Cloud KMS key name to use for PD disk
1108	// encryption for all instances in the cluster.
1109	GcePdKmsKeyName string `json:"gcePdKmsKeyName,omitempty"`
1110
1111	// ForceSendFields is a list of field names (e.g. "GcePdKmsKeyName") to
1112	// unconditionally include in API requests. By default, fields with
1113	// empty values are omitted from API requests. However, any non-pointer,
1114	// non-interface field appearing in ForceSendFields will be sent to the
1115	// server regardless of whether the field is empty or not. This may be
1116	// used to include empty fields in Patch requests.
1117	ForceSendFields []string `json:"-"`
1118
1119	// NullFields is a list of field names (e.g. "GcePdKmsKeyName") to
1120	// include in API requests with the JSON null value. By default, fields
1121	// with empty values are omitted from API requests. However, any field
1122	// with an empty value appearing in NullFields will be sent to the
1123	// server as null. It is an error if a field in this list has a
1124	// non-empty value. This may be used to include null fields in Patch
1125	// requests.
1126	NullFields []string `json:"-"`
1127}
1128
1129func (s *EncryptionConfig) MarshalJSON() ([]byte, error) {
1130	type NoMethod EncryptionConfig
1131	raw := NoMethod(*s)
1132	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1133}
1134
1135// Expr: Represents a textual expression in the Common Expression
1136// Language (CEL) syntax. CEL is a C-like expression language. The
1137// syntax and semantics of CEL are documented at
1138// https://github.com/google/cel-spec.Example (Comparison):
1139// title: "Summary size limit"
1140// description: "Determines if a summary is less than 100
1141// chars"
1142// expression: "document.summary.size() < 100"
1143// Example (Equality):
1144// title: "Requestor is owner"
1145// description: "Determines if requestor is the document
1146// owner"
1147// expression: "document.owner == request.auth.claims.email"
1148// Example (Logic):
1149// title: "Public documents"
1150// description: "Determine whether the document should be publicly
1151// visible"
1152// expression: "document.type != 'private' && document.type !=
1153// 'internal'"
1154// Example (Data Manipulation):
1155// title: "Notification string"
1156// description: "Create a notification string with a
1157// timestamp."
1158// expression: "'New message received at ' +
1159// string(document.create_time)"
1160// The exact variables and functions that may be referenced within an
1161// expression are determined by the service that evaluates it. See the
1162// service documentation for additional information.
1163type Expr struct {
1164	// Description: Optional. Description of the expression. This is a
1165	// longer text which describes the expression, e.g. when hovered over it
1166	// in a UI.
1167	Description string `json:"description,omitempty"`
1168
1169	// Expression: Textual representation of an expression in Common
1170	// Expression Language syntax.
1171	Expression string `json:"expression,omitempty"`
1172
1173	// Location: Optional. String indicating the location of the expression
1174	// for error reporting, e.g. a file name and a position in the file.
1175	Location string `json:"location,omitempty"`
1176
1177	// Title: Optional. Title for the expression, i.e. a short string
1178	// describing its purpose. This can be used e.g. in UIs which allow to
1179	// enter the expression.
1180	Title string `json:"title,omitempty"`
1181
1182	// ForceSendFields is a list of field names (e.g. "Description") to
1183	// unconditionally include in API requests. By default, fields with
1184	// empty values are omitted from API requests. However, any non-pointer,
1185	// non-interface field appearing in ForceSendFields will be sent to the
1186	// server regardless of whether the field is empty or not. This may be
1187	// used to include empty fields in Patch requests.
1188	ForceSendFields []string `json:"-"`
1189
1190	// NullFields is a list of field names (e.g. "Description") to include
1191	// in API requests with the JSON null value. By default, fields with
1192	// empty values are omitted from API requests. However, any field with
1193	// an empty value appearing in NullFields will be sent to the server as
1194	// null. It is an error if a field in this list has a non-empty value.
1195	// This may be used to include null fields in Patch requests.
1196	NullFields []string `json:"-"`
1197}
1198
1199func (s *Expr) MarshalJSON() ([]byte, error) {
1200	type NoMethod Expr
1201	raw := NoMethod(*s)
1202	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1203}
1204
1205// GceClusterConfig: Common config settings for resources of Compute
1206// Engine cluster instances, applicable to all instances in the cluster.
1207type GceClusterConfig struct {
1208	// InternalIpOnly: Optional. If true, all instances in the cluster will
1209	// only have internal IP addresses. By default, clusters are not
1210	// restricted to internal IP addresses, and will have ephemeral external
1211	// IP addresses assigned to each instance. This internal_ip_only
1212	// restriction can only be enabled for subnetwork enabled networks, and
1213	// all off-cluster dependencies must be configured to be accessible
1214	// without external IP addresses.
1215	InternalIpOnly bool `json:"internalIpOnly,omitempty"`
1216
1217	// Metadata: The Compute Engine metadata entries to add to all instances
1218	// (see Project and instance metadata
1219	// (https://cloud.google.com/compute/docs/storing-retrieving-metadata#pro
1220	// ject_and_instance_metadata)).
1221	Metadata map[string]string `json:"metadata,omitempty"`
1222
1223	// NetworkUri: Optional. The Compute Engine network to be used for
1224	// machine communications. Cannot be specified with subnetwork_uri. If
1225	// neither network_uri nor subnetwork_uri is specified, the "default"
1226	// network of the project is used, if it exists. Cannot be a "Custom
1227	// Subnet Network" (see Using Subnetworks
1228	// (https://cloud.google.com/compute/docs/subnetworks) for more
1229	// information).A full URL, partial URI, or short name are valid.
1230	// Examples:
1231	// https://www.googleapis.com/compute/v1/projects/[project_id]/
1232	// regions/global/default
1233	// projects/[project_id]/regions/global/default
1234	// de
1235	// fault
1236	NetworkUri string `json:"networkUri,omitempty"`
1237
1238	// ReservationAffinity: Optional. Reservation Affinity for consuming
1239	// Zonal reservation.
1240	ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"`
1241
1242	// ServiceAccount: Optional. The Dataproc service account
1243	// (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/
1244	// service-accounts#service_accounts_in_cloud_dataproc) (also see VM
1245	// Data Plane identity
1246	// (https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principa
1247	// ls#vm_service_account_data_plane_identity)) used by Dataproc cluster
1248	// VM instances to access Google Cloud Platform services.If not
1249	// specified, the Compute Engine default service account
1250	// (https://cloud.google.com/compute/docs/access/service-accounts#default
1251	// _service_account) is used.
1252	ServiceAccount string `json:"serviceAccount,omitempty"`
1253
1254	// ServiceAccountScopes: Optional. The URIs of service account scopes to
1255	// be included in Compute Engine instances. The following base set of
1256	// scopes is always
1257	// included:
1258	// https://www.googleapis.com/auth/cloud.useraccounts.readonly
1259	//
1260	// https://www.googleapis.com/auth/devstorage.read_write
1261	// https://www.goog
1262	// leapis.com/auth/logging.writeIf no scopes are specified, the
1263	// following defaults are also
1264	// provided:
1265	// https://www.googleapis.com/auth/bigquery
1266	// https://www.googlea
1267	// pis.com/auth/bigtable.admin.table
1268	// https://www.googleapis.com/auth/bigt
1269	// able.data
1270	// https://www.googleapis.com/auth/devstorage.full_control
1271	ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"`
1272
1273	// SubnetworkUri: Optional. The Compute Engine subnetwork to be used for
1274	// machine communications. Cannot be specified with network_uri.A full
1275	// URL, partial URI, or short name are valid.
1276	// Examples:
1277	// https://www.googleapis.com/compute/v1/projects/[project_id]/
1278	// regions/us-east1/subnetworks/sub0
1279	// projects/[project_id]/regions/us-eas
1280	// t1/subnetworks/sub0
1281	// sub0
1282	SubnetworkUri string `json:"subnetworkUri,omitempty"`
1283
1284	// Tags: The Compute Engine tags to add to all instances (see Tagging
1285	// instances
1286	// (https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
1287	Tags []string `json:"tags,omitempty"`
1288
1289	// ZoneUri: Optional. The zone where the Compute Engine cluster will be
1290	// located. On a create request, it is required in the "global" region.
1291	// If omitted in a non-global Dataproc region, the service will pick a
1292	// zone in the corresponding Compute Engine region. On a get request,
1293	// zone will always be present.A full URL, partial URI, or short name
1294	// are valid.
1295	// Examples:
1296	// https://www.googleapis.com/compute/v1/projects/[project_id]/
1297	// zones/[zone]
1298	// projects/[project_id]/zones/[zone]
1299	// us-central1-f
1300	ZoneUri string `json:"zoneUri,omitempty"`
1301
1302	// ForceSendFields is a list of field names (e.g. "InternalIpOnly") to
1303	// unconditionally include in API requests. By default, fields with
1304	// empty values are omitted from API requests. However, any non-pointer,
1305	// non-interface field appearing in ForceSendFields will be sent to the
1306	// server regardless of whether the field is empty or not. This may be
1307	// used to include empty fields in Patch requests.
1308	ForceSendFields []string `json:"-"`
1309
1310	// NullFields is a list of field names (e.g. "InternalIpOnly") to
1311	// include in API requests with the JSON null value. By default, fields
1312	// with empty values are omitted from API requests. However, any field
1313	// with an empty value appearing in NullFields will be sent to the
1314	// server as null. It is an error if a field in this list has a
1315	// non-empty value. This may be used to include null fields in Patch
1316	// requests.
1317	NullFields []string `json:"-"`
1318}
1319
1320func (s *GceClusterConfig) MarshalJSON() ([]byte, error) {
1321	type NoMethod GceClusterConfig
1322	raw := NoMethod(*s)
1323	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1324}
1325
1326// GetIamPolicyRequest: Request message for GetIamPolicy method.
1327type GetIamPolicyRequest struct {
1328	// Options: OPTIONAL: A GetPolicyOptions object for specifying options
1329	// to GetIamPolicy. This field is only used by Cloud IAM.
1330	Options *GetPolicyOptions `json:"options,omitempty"`
1331
1332	// ForceSendFields is a list of field names (e.g. "Options") to
1333	// unconditionally include in API requests. By default, fields with
1334	// empty values are omitted from API requests. However, any non-pointer,
1335	// non-interface field appearing in ForceSendFields will be sent to the
1336	// server regardless of whether the field is empty or not. This may be
1337	// used to include empty fields in Patch requests.
1338	ForceSendFields []string `json:"-"`
1339
1340	// NullFields is a list of field names (e.g. "Options") to include in
1341	// API requests with the JSON null value. By default, fields with empty
1342	// values are omitted from API requests. However, any field with an
1343	// empty value appearing in NullFields will be sent to the server as
1344	// null. It is an error if a field in this list has a non-empty value.
1345	// This may be used to include null fields in Patch requests.
1346	NullFields []string `json:"-"`
1347}
1348
1349func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1350	type NoMethod GetIamPolicyRequest
1351	raw := NoMethod(*s)
1352	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1353}
1354
1355// GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
1356type GetPolicyOptions struct {
1357	// RequestedPolicyVersion: Optional. The policy format version to be
1358	// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
1359	// value will be rejected.Requests for policies with any conditional
1360	// bindings must specify version 3. Policies without any conditional
1361	// bindings may specify any valid value or leave the field unset.
1362	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
1363
1364	// ForceSendFields is a list of field names (e.g.
1365	// "RequestedPolicyVersion") to unconditionally include in API requests.
1366	// By default, fields with empty values are omitted from API requests.
1367	// However, any non-pointer, non-interface field appearing in
1368	// ForceSendFields will be sent to the server regardless of whether the
1369	// field is empty or not. This may be used to include empty fields in
1370	// Patch requests.
1371	ForceSendFields []string `json:"-"`
1372
1373	// NullFields is a list of field names (e.g. "RequestedPolicyVersion")
1374	// to include in API requests with the JSON null value. By default,
1375	// fields with empty values are omitted from API requests. However, any
1376	// field with an empty value appearing in NullFields will be sent to the
1377	// server as null. It is an error if a field in this list has a
1378	// non-empty value. This may be used to include null fields in Patch
1379	// requests.
1380	NullFields []string `json:"-"`
1381}
1382
1383func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
1384	type NoMethod GetPolicyOptions
1385	raw := NoMethod(*s)
1386	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1387}
1388
1389// HadoopJob: A Dataproc job for running Apache Hadoop MapReduce
1390// (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop
1391// -mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop
1392// YARN
1393// (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YA
1394// RN.html).
1395type HadoopJob struct {
1396	// ArchiveUris: Optional. HCFS URIs of archives to be extracted in the
1397	// working directory of Hadoop drivers and tasks. Supported file types:
1398	// .jar, .tar, .tar.gz, .tgz, or .zip.
1399	ArchiveUris []string `json:"archiveUris,omitempty"`
1400
1401	// Args: Optional. The arguments to pass to the driver. Do not include
1402	// arguments, such as -libjars or -Dfoo=bar, that can be set as job
1403	// properties, since a collision may occur that causes an incorrect job
1404	// submission.
1405	Args []string `json:"args,omitempty"`
1406
1407	// FileUris: Optional. HCFS (Hadoop Compatible Filesystem) URIs of files
1408	// to be copied to the working directory of Hadoop drivers and
1409	// distributed tasks. Useful for naively parallel tasks.
1410	FileUris []string `json:"fileUris,omitempty"`
1411
1412	// JarFileUris: Optional. Jar file URIs to add to the CLASSPATHs of the
1413	// Hadoop driver and tasks.
1414	JarFileUris []string `json:"jarFileUris,omitempty"`
1415
1416	// LoggingConfig: Optional. The runtime log config for job execution.
1417	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
1418
1419	// MainClass: The name of the driver's main class. The jar file
1420	// containing the class must be in the default CLASSPATH or specified in
1421	// jar_file_uris.
1422	MainClass string `json:"mainClass,omitempty"`
1423
1424	// MainJarFileUri: The HCFS URI of the jar file containing the main
1425	// class. Examples:
1426	// 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
1427	// 'hdfs:/tmp/test-samples/custom-wordcount.jar'
1428	// 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
1429	MainJarFileUri string `json:"mainJarFileUri,omitempty"`
1430
1431	// Properties: Optional. A mapping of property names to values, used to
1432	// configure Hadoop. Properties that conflict with values set by the
1433	// Dataproc API may be overwritten. Can include properties set in
1434	// /etc/hadoop/conf/*-site and classes in user code.
1435	Properties map[string]string `json:"properties,omitempty"`
1436
1437	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
1438	// unconditionally include in API requests. By default, fields with
1439	// empty values are omitted from API requests. However, any non-pointer,
1440	// non-interface field appearing in ForceSendFields will be sent to the
1441	// server regardless of whether the field is empty or not. This may be
1442	// used to include empty fields in Patch requests.
1443	ForceSendFields []string `json:"-"`
1444
1445	// NullFields is a list of field names (e.g. "ArchiveUris") to include
1446	// in API requests with the JSON null value. By default, fields with
1447	// empty values are omitted from API requests. However, any field with
1448	// an empty value appearing in NullFields will be sent to the server as
1449	// null. It is an error if a field in this list has a non-empty value.
1450	// This may be used to include null fields in Patch requests.
1451	NullFields []string `json:"-"`
1452}
1453
1454func (s *HadoopJob) MarshalJSON() ([]byte, error) {
1455	type NoMethod HadoopJob
1456	raw := NoMethod(*s)
1457	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1458}
1459
1460// HiveJob: A Dataproc job for running Apache Hive
1461// (https://hive.apache.org/) queries on YARN.
1462type HiveJob struct {
1463	// ContinueOnFailure: Optional. Whether to continue executing queries if
1464	// a query fails. The default value is false. Setting to true can be
1465	// useful when executing independent parallel queries.
1466	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
1467
1468	// JarFileUris: Optional. HCFS URIs of jar files to add to the CLASSPATH
1469	// of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive
1470	// SerDes and UDFs.
1471	JarFileUris []string `json:"jarFileUris,omitempty"`
1472
1473	// Properties: Optional. A mapping of property names and values, used to
1474	// configure Hive. Properties that conflict with values set by the
1475	// Dataproc API may be overwritten. Can include properties set in
1476	// /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and
1477	// classes in user code.
1478	Properties map[string]string `json:"properties,omitempty"`
1479
1480	// QueryFileUri: The HCFS URI of the script that contains Hive queries.
1481	QueryFileUri string `json:"queryFileUri,omitempty"`
1482
1483	// QueryList: A list of queries.
1484	QueryList *QueryList `json:"queryList,omitempty"`
1485
1486	// ScriptVariables: Optional. Mapping of query variable names to values
1487	// (equivalent to the Hive command: SET name="value";).
1488	ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
1489
1490	// ForceSendFields is a list of field names (e.g. "ContinueOnFailure")
1491	// to unconditionally include in API requests. By default, fields with
1492	// empty values are omitted from API requests. However, any non-pointer,
1493	// non-interface field appearing in ForceSendFields will be sent to the
1494	// server regardless of whether the field is empty or not. This may be
1495	// used to include empty fields in Patch requests.
1496	ForceSendFields []string `json:"-"`
1497
1498	// NullFields is a list of field names (e.g. "ContinueOnFailure") to
1499	// include in API requests with the JSON null value. By default, fields
1500	// with empty values are omitted from API requests. However, any field
1501	// with an empty value appearing in NullFields will be sent to the
1502	// server as null. It is an error if a field in this list has a
1503	// non-empty value. This may be used to include null fields in Patch
1504	// requests.
1505	NullFields []string `json:"-"`
1506}
1507
1508func (s *HiveJob) MarshalJSON() ([]byte, error) {
1509	type NoMethod HiveJob
1510	raw := NoMethod(*s)
1511	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1512}
1513
1514// InstanceGroupAutoscalingPolicyConfig: Configuration for the size
1515// bounds of an instance group, including its proportional size to other
1516// groups.
1517type InstanceGroupAutoscalingPolicyConfig struct {
1518	// MaxInstances: Required. Maximum number of instances for this group.
1519	// Required for primary workers. Note that by default, clusters will not
1520	// use secondary workers. Required for secondary workers if the minimum
1521	// secondary instances is set.Primary workers - Bounds: [min_instances,
1522	// ). Secondary workers - Bounds: [min_instances, ). Default: 0.
1523	MaxInstances int64 `json:"maxInstances,omitempty"`
1524
1525	// MinInstances: Optional. Minimum number of instances for this
1526	// group.Primary workers - Bounds: 2, max_instances. Default: 2.
1527	// Secondary workers - Bounds: 0, max_instances. Default: 0.
1528	MinInstances int64 `json:"minInstances,omitempty"`
1529
1530	// Weight: Optional. Weight for the instance group, which is used to
1531	// determine the fraction of total workers in the cluster from this
1532	// instance group. For example, if primary workers have weight 2, and
1533	// secondary workers have weight 1, the cluster will have approximately
1534	// 2 primary workers for each secondary worker.The cluster may not reach
1535	// the specified balance if constrained by min/max bounds or other
1536	// autoscaling settings. For example, if max_instances for secondary
1537	// workers is 0, then only primary workers will be added. The cluster
1538	// can also be out of balance when created.If weight is not set on any
1539	// instance group, the cluster will default to equal weight for all
1540	// groups: the cluster will attempt to maintain an equal number of
1541	// workers in each group within the configured size bounds for each
1542	// group. If weight is set for one group only, the cluster will default
1543	// to zero weight on the unset group. For example if weight is set only
1544	// on primary workers, the cluster will use primary workers only and no
1545	// secondary workers.
1546	Weight int64 `json:"weight,omitempty"`
1547
1548	// ForceSendFields is a list of field names (e.g. "MaxInstances") to
1549	// unconditionally include in API requests. By default, fields with
1550	// empty values are omitted from API requests. However, any non-pointer,
1551	// non-interface field appearing in ForceSendFields will be sent to the
1552	// server regardless of whether the field is empty or not. This may be
1553	// used to include empty fields in Patch requests.
1554	ForceSendFields []string `json:"-"`
1555
1556	// NullFields is a list of field names (e.g. "MaxInstances") to include
1557	// in API requests with the JSON null value. By default, fields with
1558	// empty values are omitted from API requests. However, any field with
1559	// an empty value appearing in NullFields will be sent to the server as
1560	// null. It is an error if a field in this list has a non-empty value.
1561	// This may be used to include null fields in Patch requests.
1562	NullFields []string `json:"-"`
1563}
1564
1565func (s *InstanceGroupAutoscalingPolicyConfig) MarshalJSON() ([]byte, error) {
1566	type NoMethod InstanceGroupAutoscalingPolicyConfig
1567	raw := NoMethod(*s)
1568	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1569}
1570
1571// InstanceGroupConfig: The config settings for Compute Engine resources
1572// in an instance group, such as a master or worker group.
1573type InstanceGroupConfig struct {
1574	// Accelerators: Optional. The Compute Engine accelerator configuration
1575	// for these instances.
1576	Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"`
1577
1578	// DiskConfig: Optional. Disk option config settings.
1579	DiskConfig *DiskConfig `json:"diskConfig,omitempty"`
1580
1581	// ImageUri: Optional. The Compute Engine image resource used for
1582	// cluster instances.The URI can represent an image or image
1583	// family.Image
1584	// examples:
1585	// https://www.googleapis.com/compute/beta/projects/[project_id
1586	// ]/global/images/[image-id]
1587	// projects/[project_id]/global/images/[image-
1588	// id]
1589	// image-idImage family examples. Dataproc will use the most recent
1590	// image from the
1591	// family:
1592	// https://www.googleapis.com/compute/beta/projects/[project_id]/
1593	// global/images/family/[custom-image-family-name]
1594	// projects/[project_id]/
1595	// global/images/family/[custom-image-family-name]If the URI is
1596	// unspecified, it will be inferred from SoftwareConfig.image_version or
1597	// the system default.
1598	ImageUri string `json:"imageUri,omitempty"`
1599
1600	// InstanceNames: Output only. The list of instance names. Dataproc
1601	// derives the names from cluster_name, num_instances, and the instance
1602	// group.
1603	InstanceNames []string `json:"instanceNames,omitempty"`
1604
1605	// IsPreemptible: Output only. Specifies that this instance group
1606	// contains preemptible instances.
1607	IsPreemptible bool `json:"isPreemptible,omitempty"`
1608
1609	// MachineTypeUri: Optional. The Compute Engine machine type used for
1610	// cluster instances.A full URL, partial URI, or short name are valid.
1611	// Examples:
1612	// https://www.googleapis.com/compute/v1/projects/[project_id]/
1613	// zones/us-east1-a/machineTypes/n1-standard-2
1614	// projects/[project_id]/zone
1615	// s/us-east1-a/machineTypes/n1-standard-2
1616	// n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto
1617	// Zone Placement
1618	// (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/
1619	// auto-zone#using_auto_zone_placement) feature, you must use the short
1620	// name of the machine type resource, for example, n1-standard-2.
1621	MachineTypeUri string `json:"machineTypeUri,omitempty"`
1622
1623	// ManagedGroupConfig: Output only. The config for Compute Engine
1624	// Instance Group Manager that manages this group. This is only used for
1625	// preemptible instance groups.
1626	ManagedGroupConfig *ManagedGroupConfig `json:"managedGroupConfig,omitempty"`
1627
1628	// MinCpuPlatform: Optional. Specifies the minimum cpu platform for the
1629	// Instance Group. See Dataproc -&gt; Minimum CPU Platform
1630	// (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-
1631	// cpu).
1632	MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
1633
1634	// NumInstances: Optional. The number of VM instances in the instance
1635	// group. For master instance groups, must be set to 1.
1636	NumInstances int64 `json:"numInstances,omitempty"`
1637
1638	// Preemptibility: Optional. Specifies the preemptibility of the
1639	// instance group.The default value for master and worker groups is
1640	// NON_PREEMPTIBLE. This default cannot be changed.The default value for
1641	// secondary instances is PREEMPTIBLE.
1642	//
1643	// Possible values:
1644	//   "PREEMPTIBILITY_UNSPECIFIED" - Preemptibility is unspecified, the
1645	// system will choose the appropriate setting for each instance group.
1646	//   "NON_PREEMPTIBLE" - Instances are non-preemptible.This option is
1647	// allowed for all instance groups and is the only valid value for
1648	// Master and Worker instance groups.
1649	//   "PREEMPTIBLE" - Instances are preemptible.This option is allowed
1650	// only for secondary worker groups.
1651	Preemptibility string `json:"preemptibility,omitempty"`
1652
1653	// ForceSendFields is a list of field names (e.g. "Accelerators") to
1654	// unconditionally include in API requests. By default, fields with
1655	// empty values are omitted from API requests. However, any non-pointer,
1656	// non-interface field appearing in ForceSendFields will be sent to the
1657	// server regardless of whether the field is empty or not. This may be
1658	// used to include empty fields in Patch requests.
1659	ForceSendFields []string `json:"-"`
1660
1661	// NullFields is a list of field names (e.g. "Accelerators") to include
1662	// in API requests with the JSON null value. By default, fields with
1663	// empty values are omitted from API requests. However, any field with
1664	// an empty value appearing in NullFields will be sent to the server as
1665	// null. It is an error if a field in this list has a non-empty value.
1666	// This may be used to include null fields in Patch requests.
1667	NullFields []string `json:"-"`
1668}
1669
1670func (s *InstanceGroupConfig) MarshalJSON() ([]byte, error) {
1671	type NoMethod InstanceGroupConfig
1672	raw := NoMethod(*s)
1673	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1674}
1675
1676// InstantiateWorkflowTemplateRequest: A request to instantiate a
1677// workflow template.
1678type InstantiateWorkflowTemplateRequest struct {
1679	// Parameters: Optional. Map from parameter names to values that should
1680	// be used for those parameters. Values may not exceed 100 characters.
1681	Parameters map[string]string `json:"parameters,omitempty"`
1682
1683	// RequestId: Optional. A tag that prevents multiple concurrent workflow
1684	// instances with the same tag from running. This mitigates risk of
1685	// concurrent instances started due to retries.It is recommended to
1686	// always set this value to a UUID
1687	// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag
1688	// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
1689	// and hyphens (-). The maximum length is 40 characters.
1690	RequestId string `json:"requestId,omitempty"`
1691
1692	// Version: Optional. The version of workflow template to instantiate.
1693	// If specified, the workflow will be instantiated only if the current
1694	// version of the workflow template has the supplied version.This option
1695	// cannot be used to instantiate a previous version of workflow
1696	// template.
1697	Version int64 `json:"version,omitempty"`
1698
1699	// ForceSendFields is a list of field names (e.g. "Parameters") to
1700	// unconditionally include in API requests. By default, fields with
1701	// empty values are omitted from API requests. However, any non-pointer,
1702	// non-interface field appearing in ForceSendFields will be sent to the
1703	// server regardless of whether the field is empty or not. This may be
1704	// used to include empty fields in Patch requests.
1705	ForceSendFields []string `json:"-"`
1706
1707	// NullFields is a list of field names (e.g. "Parameters") to include in
1708	// API requests with the JSON null value. By default, fields with empty
1709	// values are omitted from API requests. However, any field with an
1710	// empty value appearing in NullFields will be sent to the server as
1711	// null. It is an error if a field in this list has a non-empty value.
1712	// This may be used to include null fields in Patch requests.
1713	NullFields []string `json:"-"`
1714}
1715
1716func (s *InstantiateWorkflowTemplateRequest) MarshalJSON() ([]byte, error) {
1717	type NoMethod InstantiateWorkflowTemplateRequest
1718	raw := NoMethod(*s)
1719	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1720}
1721
1722// Job: A Dataproc job resource.
1723type Job struct {
1724	// Done: Output only. Indicates whether the job is completed. If the
1725	// value is false, the job is still in progress. If true, the job is
1726	// completed, and status.state field will indicate if it was successful,
1727	// failed, or cancelled.
1728	Done bool `json:"done,omitempty"`
1729
1730	// DriverControlFilesUri: Output only. If present, the location of
1731	// miscellaneous control files which may be used as part of job setup
1732	// and handling. If not present, control files may be placed in the same
1733	// location as driver_output_uri.
1734	DriverControlFilesUri string `json:"driverControlFilesUri,omitempty"`
1735
1736	// DriverOutputResourceUri: Output only. A URI pointing to the location
1737	// of the stdout of the job's driver program.
1738	DriverOutputResourceUri string `json:"driverOutputResourceUri,omitempty"`
1739
1740	// HadoopJob: Optional. Job is a Hadoop job.
1741	HadoopJob *HadoopJob `json:"hadoopJob,omitempty"`
1742
1743	// HiveJob: Optional. Job is a Hive job.
1744	HiveJob *HiveJob `json:"hiveJob,omitempty"`
1745
1746	// JobUuid: Output only. A UUID that uniquely identifies a job within
1747	// the project over time. This is in contrast to a user-settable
1748	// reference.job_id that may be reused over time.
1749	JobUuid string `json:"jobUuid,omitempty"`
1750
1751	// Labels: Optional. The labels to associate with this job. Label keys
1752	// must contain 1 to 63 characters, and must conform to RFC 1035
1753	// (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty,
1754	// but, if present, must contain 1 to 63 characters, and must conform to
1755	// RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32
1756	// labels can be associated with a job.
1757	Labels map[string]string `json:"labels,omitempty"`
1758
1759	// PigJob: Optional. Job is a Pig job.
1760	PigJob *PigJob `json:"pigJob,omitempty"`
1761
1762	// Placement: Required. Job information, including how, when, and where
1763	// to run the job.
1764	Placement *JobPlacement `json:"placement,omitempty"`
1765
1766	// PrestoJob: Optional. Job is a Presto job.
1767	PrestoJob *PrestoJob `json:"prestoJob,omitempty"`
1768
1769	// PysparkJob: Optional. Job is a PySpark job.
1770	PysparkJob *PySparkJob `json:"pysparkJob,omitempty"`
1771
1772	// Reference: Optional. The fully qualified reference to the job, which
1773	// can be used to obtain the equivalent REST path of the job resource.
1774	// If this property is not specified when a job is created, the server
1775	// generates a <code>job_id</code>.
1776	Reference *JobReference `json:"reference,omitempty"`
1777
1778	// Scheduling: Optional. Job scheduling configuration.
1779	Scheduling *JobScheduling `json:"scheduling,omitempty"`
1780
1781	// SparkJob: Optional. Job is a Spark job.
1782	SparkJob *SparkJob `json:"sparkJob,omitempty"`
1783
1784	// SparkRJob: Optional. Job is a SparkR job.
1785	SparkRJob *SparkRJob `json:"sparkRJob,omitempty"`
1786
1787	// SparkSqlJob: Optional. Job is a SparkSql job.
1788	SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"`
1789
1790	// Status: Output only. The job status. Additional application-specific
1791	// status information may be contained in the <code>type_job</code> and
1792	// <code>yarn_applications</code> fields.
1793	Status *JobStatus `json:"status,omitempty"`
1794
1795	// StatusHistory: Output only. The previous job status.
1796	StatusHistory []*JobStatus `json:"statusHistory,omitempty"`
1797
1798	// YarnApplications: Output only. The collection of YARN applications
1799	// spun up by this job.Beta Feature: This report is available for
1800	// testing purposes only. It may be changed before final release.
1801	YarnApplications []*YarnApplication `json:"yarnApplications,omitempty"`
1802
1803	// ServerResponse contains the HTTP response code and headers from the
1804	// server.
1805	googleapi.ServerResponse `json:"-"`
1806
1807	// ForceSendFields is a list of field names (e.g. "Done") to
1808	// unconditionally include in API requests. By default, fields with
1809	// empty values are omitted from API requests. However, any non-pointer,
1810	// non-interface field appearing in ForceSendFields will be sent to the
1811	// server regardless of whether the field is empty or not. This may be
1812	// used to include empty fields in Patch requests.
1813	ForceSendFields []string `json:"-"`
1814
1815	// NullFields is a list of field names (e.g. "Done") to include in API
1816	// requests with the JSON null value. By default, fields with empty
1817	// values are omitted from API requests. However, any field with an
1818	// empty value appearing in NullFields will be sent to the server as
1819	// null. It is an error if a field in this list has a non-empty value.
1820	// This may be used to include null fields in Patch requests.
1821	NullFields []string `json:"-"`
1822}
1823
1824func (s *Job) MarshalJSON() ([]byte, error) {
1825	type NoMethod Job
1826	raw := NoMethod(*s)
1827	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1828}
1829
1830// JobMetadata: Job Operation metadata.
1831type JobMetadata struct {
1832	// JobId: Output only. The job id.
1833	JobId string `json:"jobId,omitempty"`
1834
1835	// OperationType: Output only. Operation type.
1836	OperationType string `json:"operationType,omitempty"`
1837
1838	// StartTime: Output only. Job submission time.
1839	StartTime string `json:"startTime,omitempty"`
1840
1841	// Status: Output only. Most recent job status.
1842	Status *JobStatus `json:"status,omitempty"`
1843
1844	// ForceSendFields is a list of field names (e.g. "JobId") to
1845	// unconditionally include in API requests. By default, fields with
1846	// empty values are omitted from API requests. However, any non-pointer,
1847	// non-interface field appearing in ForceSendFields will be sent to the
1848	// server regardless of whether the field is empty or not. This may be
1849	// used to include empty fields in Patch requests.
1850	ForceSendFields []string `json:"-"`
1851
1852	// NullFields is a list of field names (e.g. "JobId") to include in API
1853	// requests with the JSON null value. By default, fields with empty
1854	// values are omitted from API requests. However, any field with an
1855	// empty value appearing in NullFields will be sent to the server as
1856	// null. It is an error if a field in this list has a non-empty value.
1857	// This may be used to include null fields in Patch requests.
1858	NullFields []string `json:"-"`
1859}
1860
1861func (s *JobMetadata) MarshalJSON() ([]byte, error) {
1862	type NoMethod JobMetadata
1863	raw := NoMethod(*s)
1864	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1865}
1866
1867// JobPlacement: Dataproc job config.
1868type JobPlacement struct {
1869	// ClusterName: Required. The name of the cluster where the job will be
1870	// submitted.
1871	ClusterName string `json:"clusterName,omitempty"`
1872
1873	// ClusterUuid: Output only. A cluster UUID generated by the Dataproc
1874	// service when the job is submitted.
1875	ClusterUuid string `json:"clusterUuid,omitempty"`
1876
1877	// ForceSendFields is a list of field names (e.g. "ClusterName") to
1878	// unconditionally include in API requests. By default, fields with
1879	// empty values are omitted from API requests. However, any non-pointer,
1880	// non-interface field appearing in ForceSendFields will be sent to the
1881	// server regardless of whether the field is empty or not. This may be
1882	// used to include empty fields in Patch requests.
1883	ForceSendFields []string `json:"-"`
1884
1885	// NullFields is a list of field names (e.g. "ClusterName") to include
1886	// in API requests with the JSON null value. By default, fields with
1887	// empty values are omitted from API requests. However, any field with
1888	// an empty value appearing in NullFields will be sent to the server as
1889	// null. It is an error if a field in this list has a non-empty value.
1890	// This may be used to include null fields in Patch requests.
1891	NullFields []string `json:"-"`
1892}
1893
1894func (s *JobPlacement) MarshalJSON() ([]byte, error) {
1895	type NoMethod JobPlacement
1896	raw := NoMethod(*s)
1897	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1898}
1899
1900// JobReference: Encapsulates the full scoping used to reference a job.
1901type JobReference struct {
1902	// JobId: Optional. The job ID, which must be unique within the
1903	// project.The ID must contain only letters (a-z, A-Z), numbers (0-9),
1904	// underscores (_), or hyphens (-). The maximum length is 100
1905	// characters.If not specified by the caller, the job ID will be
1906	// provided by the server.
1907	JobId string `json:"jobId,omitempty"`
1908
1909	// ProjectId: Required. The ID of the Google Cloud Platform project that
1910	// the job belongs to.
1911	ProjectId string `json:"projectId,omitempty"`
1912
1913	// ForceSendFields is a list of field names (e.g. "JobId") to
1914	// unconditionally include in API requests. By default, fields with
1915	// empty values are omitted from API requests. However, any non-pointer,
1916	// non-interface field appearing in ForceSendFields will be sent to the
1917	// server regardless of whether the field is empty or not. This may be
1918	// used to include empty fields in Patch requests.
1919	ForceSendFields []string `json:"-"`
1920
1921	// NullFields is a list of field names (e.g. "JobId") to include in API
1922	// requests with the JSON null value. By default, fields with empty
1923	// values are omitted from API requests. However, any field with an
1924	// empty value appearing in NullFields will be sent to the server as
1925	// null. It is an error if a field in this list has a non-empty value.
1926	// This may be used to include null fields in Patch requests.
1927	NullFields []string `json:"-"`
1928}
1929
1930func (s *JobReference) MarshalJSON() ([]byte, error) {
1931	type NoMethod JobReference
1932	raw := NoMethod(*s)
1933	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1934}
1935
1936// JobScheduling: Job scheduling options.
1937type JobScheduling struct {
1938	// MaxFailuresPerHour: Optional. Maximum number of times per hour a
1939	// driver may be restarted as a result of driver terminating with
1940	// non-zero code before job is reported failed.A job may be reported as
1941	// thrashing if driver exits with non-zero code 4 times within 10 minute
1942	// window.Maximum value is 10.
1943	MaxFailuresPerHour int64 `json:"maxFailuresPerHour,omitempty"`
1944
1945	// ForceSendFields is a list of field names (e.g. "MaxFailuresPerHour")
1946	// to unconditionally include in API requests. By default, fields with
1947	// empty values are omitted from API requests. However, any non-pointer,
1948	// non-interface field appearing in ForceSendFields will be sent to the
1949	// server regardless of whether the field is empty or not. This may be
1950	// used to include empty fields in Patch requests.
1951	ForceSendFields []string `json:"-"`
1952
1953	// NullFields is a list of field names (e.g. "MaxFailuresPerHour") to
1954	// include in API requests with the JSON null value. By default, fields
1955	// with empty values are omitted from API requests. However, any field
1956	// with an empty value appearing in NullFields will be sent to the
1957	// server as null. It is an error if a field in this list has a
1958	// non-empty value. This may be used to include null fields in Patch
1959	// requests.
1960	NullFields []string `json:"-"`
1961}
1962
1963func (s *JobScheduling) MarshalJSON() ([]byte, error) {
1964	type NoMethod JobScheduling
1965	raw := NoMethod(*s)
1966	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1967}
1968
1969// JobStatus: Dataproc job status.
1970type JobStatus struct {
1971	// Details: Optional. Output only. Job state details, such as an error
1972	// description if the state is <code>ERROR</code>.
1973	Details string `json:"details,omitempty"`
1974
1975	// State: Output only. A state message specifying the overall job state.
1976	//
1977	// Possible values:
1978	//   "STATE_UNSPECIFIED" - The job state is unknown.
1979	//   "PENDING" - The job is pending; it has been submitted, but is not
1980	// yet running.
1981	//   "SETUP_DONE" - Job has been received by the service and completed
1982	// initial setup; it will soon be submitted to the cluster.
1983	//   "RUNNING" - The job is running on the cluster.
1984	//   "CANCEL_PENDING" - A CancelJob request has been received, but is
1985	// pending.
1986	//   "CANCEL_STARTED" - Transient in-flight resources have been
1987	// canceled, and the request to cancel the running job has been issued
1988	// to the cluster.
1989	//   "CANCELLED" - The job cancellation was successful.
1990	//   "DONE" - The job has completed successfully.
1991	//   "ERROR" - The job has completed, but encountered an error.
1992	//   "ATTEMPT_FAILURE" - Job attempt has failed. The detail field
1993	// contains failure details for this attempt.Applies to restartable jobs
1994	// only.
1995	State string `json:"state,omitempty"`
1996
1997	// StateStartTime: Output only. The time when this state was entered.
1998	StateStartTime string `json:"stateStartTime,omitempty"`
1999
2000	// Substate: Output only. Additional state information, which includes
2001	// status reported by the agent.
2002	//
2003	// Possible values:
2004	//   "UNSPECIFIED" - The job substate is unknown.
2005	//   "SUBMITTED" - The Job is submitted to the agent.Applies to RUNNING
2006	// state.
2007	//   "QUEUED" - The Job has been received and is awaiting execution (it
2008	// may be waiting for a condition to be met). See the "details" field
2009	// for the reason for the delay.Applies to RUNNING state.
2010	//   "STALE_STATUS" - The agent-reported status is out of date, which
2011	// may be caused by a loss of communication between the agent and
2012	// Dataproc. If the agent does not send a timely update, the job will
2013	// fail.Applies to RUNNING state.
2014	Substate string `json:"substate,omitempty"`
2015
2016	// ForceSendFields is a list of field names (e.g. "Details") to
2017	// unconditionally include in API requests. By default, fields with
2018	// empty values are omitted from API requests. However, any non-pointer,
2019	// non-interface field appearing in ForceSendFields will be sent to the
2020	// server regardless of whether the field is empty or not. This may be
2021	// used to include empty fields in Patch requests.
2022	ForceSendFields []string `json:"-"`
2023
2024	// NullFields is a list of field names (e.g. "Details") to include in
2025	// API requests with the JSON null value. By default, fields with empty
2026	// values are omitted from API requests. However, any field with an
2027	// empty value appearing in NullFields will be sent to the server as
2028	// null. It is an error if a field in this list has a non-empty value.
2029	// This may be used to include null fields in Patch requests.
2030	NullFields []string `json:"-"`
2031}
2032
2033func (s *JobStatus) MarshalJSON() ([]byte, error) {
2034	type NoMethod JobStatus
2035	raw := NoMethod(*s)
2036	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2037}
2038
2039// KerberosConfig: Specifies Kerberos related configuration.
2040type KerberosConfig struct {
2041	// CrossRealmTrustAdminServer: Optional. The admin server (IP or
2042	// hostname) for the remote trusted realm in a cross realm trust
2043	// relationship.
2044	CrossRealmTrustAdminServer string `json:"crossRealmTrustAdminServer,omitempty"`
2045
2046	// CrossRealmTrustKdc: Optional. The KDC (IP or hostname) for the remote
2047	// trusted realm in a cross realm trust relationship.
2048	CrossRealmTrustKdc string `json:"crossRealmTrustKdc,omitempty"`
2049
2050	// CrossRealmTrustRealm: Optional. The remote realm the Dataproc
2051	// on-cluster KDC will trust, should the user enable cross realm trust.
2052	CrossRealmTrustRealm string `json:"crossRealmTrustRealm,omitempty"`
2053
2054	// CrossRealmTrustSharedPasswordUri: Optional. The Cloud Storage URI of
2055	// a KMS encrypted file containing the shared password between the
2056	// on-cluster Kerberos realm and the remote trusted realm, in a cross
2057	// realm trust relationship.
2058	CrossRealmTrustSharedPasswordUri string `json:"crossRealmTrustSharedPasswordUri,omitempty"`
2059
2060	// EnableKerberos: Optional. Flag to indicate whether to Kerberize the
2061	// cluster (default: false). Set this field to true to enable Kerberos
2062	// on a cluster.
2063	EnableKerberos bool `json:"enableKerberos,omitempty"`
2064
2065	// KdcDbKeyUri: Optional. The Cloud Storage URI of a KMS encrypted file
2066	// containing the master key of the KDC database.
2067	KdcDbKeyUri string `json:"kdcDbKeyUri,omitempty"`
2068
2069	// KeyPasswordUri: Optional. The Cloud Storage URI of a KMS encrypted
2070	// file containing the password to the user provided key. For the
2071	// self-signed certificate, this password is generated by Dataproc.
2072	KeyPasswordUri string `json:"keyPasswordUri,omitempty"`
2073
2074	// KeystorePasswordUri: Optional. The Cloud Storage URI of a KMS
2075	// encrypted file containing the password to the user provided keystore.
2076	// For the self-signed certificate, this password is generated by
2077	// Dataproc.
2078	KeystorePasswordUri string `json:"keystorePasswordUri,omitempty"`
2079
2080	// KeystoreUri: Optional. The Cloud Storage URI of the keystore file
2081	// used for SSL encryption. If not provided, Dataproc will provide a
2082	// self-signed certificate.
2083	KeystoreUri string `json:"keystoreUri,omitempty"`
2084
2085	// KmsKeyUri: Required. The uri of the KMS key used to encrypt various
2086	// sensitive files.
2087	KmsKeyUri string `json:"kmsKeyUri,omitempty"`
2088
2089	// Realm: Optional. The name of the on-cluster Kerberos realm. If not
2090	// specified, the uppercased domain of hostnames will be the realm.
2091	Realm string `json:"realm,omitempty"`
2092
2093	// RootPrincipalPasswordUri: Required. The Cloud Storage URI of a KMS
2094	// encrypted file containing the root principal password.
2095	RootPrincipalPasswordUri string `json:"rootPrincipalPasswordUri,omitempty"`
2096
2097	// TgtLifetimeHours: Optional. The lifetime of the ticket granting
2098	// ticket, in hours. If not specified, or user specifies 0, then default
2099	// value 10 will be used.
2100	TgtLifetimeHours int64 `json:"tgtLifetimeHours,omitempty"`
2101
2102	// TruststorePasswordUri: Optional. The Cloud Storage URI of a KMS
2103	// encrypted file containing the password to the user provided
2104	// truststore. For the self-signed certificate, this password is
2105	// generated by Dataproc.
2106	TruststorePasswordUri string `json:"truststorePasswordUri,omitempty"`
2107
2108	// TruststoreUri: Optional. The Cloud Storage URI of the truststore file
2109	// used for SSL encryption. If not provided, Dataproc will provide a
2110	// self-signed certificate.
2111	TruststoreUri string `json:"truststoreUri,omitempty"`
2112
2113	// ForceSendFields is a list of field names (e.g.
2114	// "CrossRealmTrustAdminServer") to unconditionally include in API
2115	// requests. By default, fields with empty values are omitted from API
2116	// requests. However, any non-pointer, non-interface field appearing in
2117	// ForceSendFields will be sent to the server regardless of whether the
2118	// field is empty or not. This may be used to include empty fields in
2119	// Patch requests.
2120	ForceSendFields []string `json:"-"`
2121
2122	// NullFields is a list of field names (e.g.
2123	// "CrossRealmTrustAdminServer") to include in API requests with the
2124	// JSON null value. By default, fields with empty values are omitted
2125	// from API requests. However, any field with an empty value appearing
2126	// in NullFields will be sent to the server as null. It is an error if a
2127	// field in this list has a non-empty value. This may be used to include
2128	// null fields in Patch requests.
2129	NullFields []string `json:"-"`
2130}
2131
2132func (s *KerberosConfig) MarshalJSON() ([]byte, error) {
2133	type NoMethod KerberosConfig
2134	raw := NoMethod(*s)
2135	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2136}
2137
2138// LifecycleConfig: Specifies the cluster auto-delete schedule
2139// configuration.
2140type LifecycleConfig struct {
2141	// AutoDeleteTime: Optional. The time when cluster will be auto-deleted
2142	// (see JSON representation of Timestamp
2143	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
2144	AutoDeleteTime string `json:"autoDeleteTime,omitempty"`
2145
2146	// AutoDeleteTtl: Optional. The lifetime duration of cluster. The
2147	// cluster will be auto-deleted at the end of this period. Minimum value
2148	// is 10 minutes; maximum value is 14 days (see JSON representation of
2149	// Duration
2150	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
2151	AutoDeleteTtl string `json:"autoDeleteTtl,omitempty"`
2152
2153	// IdleDeleteTtl: Optional. The duration to keep the cluster alive while
2154	// idling (when no jobs are running). Passing this threshold will cause
2155	// the cluster to be deleted. Minimum value is 10 minutes; maximum value
2156	// is 14 days (see JSON representation of Duration
2157	// (https://developers.google.com/protocol-buffers/docs/proto3#json).
2158	IdleDeleteTtl string `json:"idleDeleteTtl,omitempty"`
2159
2160	// IdleStartTime: Output only. The time when cluster became idle (most
2161	// recent job finished) and became eligible for deletion due to idleness
2162	// (see JSON representation of Timestamp
2163	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
2164	IdleStartTime string `json:"idleStartTime,omitempty"`
2165
2166	// ForceSendFields is a list of field names (e.g. "AutoDeleteTime") to
2167	// unconditionally include in API requests. By default, fields with
2168	// empty values are omitted from API requests. However, any non-pointer,
2169	// non-interface field appearing in ForceSendFields will be sent to the
2170	// server regardless of whether the field is empty or not. This may be
2171	// used to include empty fields in Patch requests.
2172	ForceSendFields []string `json:"-"`
2173
2174	// NullFields is a list of field names (e.g. "AutoDeleteTime") to
2175	// include in API requests with the JSON null value. By default, fields
2176	// with empty values are omitted from API requests. However, any field
2177	// with an empty value appearing in NullFields will be sent to the
2178	// server as null. It is an error if a field in this list has a
2179	// non-empty value. This may be used to include null fields in Patch
2180	// requests.
2181	NullFields []string `json:"-"`
2182}
2183
2184func (s *LifecycleConfig) MarshalJSON() ([]byte, error) {
2185	type NoMethod LifecycleConfig
2186	raw := NoMethod(*s)
2187	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2188}
2189
2190// ListAutoscalingPoliciesResponse: A response to a request to list
2191// autoscaling policies in a project.
2192type ListAutoscalingPoliciesResponse struct {
2193	// NextPageToken: Output only. This token is included in the response if
2194	// there are more results to fetch.
2195	NextPageToken string `json:"nextPageToken,omitempty"`
2196
2197	// Policies: Output only. Autoscaling policies list.
2198	Policies []*AutoscalingPolicy `json:"policies,omitempty"`
2199
2200	// ServerResponse contains the HTTP response code and headers from the
2201	// server.
2202	googleapi.ServerResponse `json:"-"`
2203
2204	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2205	// unconditionally include in API requests. By default, fields with
2206	// empty values are omitted from API requests. However, any non-pointer,
2207	// non-interface field appearing in ForceSendFields will be sent to the
2208	// server regardless of whether the field is empty or not. This may be
2209	// used to include empty fields in Patch requests.
2210	ForceSendFields []string `json:"-"`
2211
2212	// NullFields is a list of field names (e.g. "NextPageToken") to include
2213	// in API requests with the JSON null value. By default, fields with
2214	// empty values are omitted from API requests. However, any field with
2215	// an empty value appearing in NullFields will be sent to the server as
2216	// null. It is an error if a field in this list has a non-empty value.
2217	// This may be used to include null fields in Patch requests.
2218	NullFields []string `json:"-"`
2219}
2220
2221func (s *ListAutoscalingPoliciesResponse) MarshalJSON() ([]byte, error) {
2222	type NoMethod ListAutoscalingPoliciesResponse
2223	raw := NoMethod(*s)
2224	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2225}
2226
2227// ListClustersResponse: The list of all clusters in a project.
2228type ListClustersResponse struct {
2229	// Clusters: Output only. The clusters in the project.
2230	Clusters []*Cluster `json:"clusters,omitempty"`
2231
2232	// NextPageToken: Output only. This token is included in the response if
2233	// there are more results to fetch. To fetch additional results, provide
2234	// this value as the page_token in a subsequent ListClustersRequest.
2235	NextPageToken string `json:"nextPageToken,omitempty"`
2236
2237	// ServerResponse contains the HTTP response code and headers from the
2238	// server.
2239	googleapi.ServerResponse `json:"-"`
2240
2241	// ForceSendFields is a list of field names (e.g. "Clusters") to
2242	// unconditionally include in API requests. By default, fields with
2243	// empty values are omitted from API requests. However, any non-pointer,
2244	// non-interface field appearing in ForceSendFields will be sent to the
2245	// server regardless of whether the field is empty or not. This may be
2246	// used to include empty fields in Patch requests.
2247	ForceSendFields []string `json:"-"`
2248
2249	// NullFields is a list of field names (e.g. "Clusters") to include in
2250	// API requests with the JSON null value. By default, fields with empty
2251	// values are omitted from API requests. However, any field with an
2252	// empty value appearing in NullFields will be sent to the server as
2253	// null. It is an error if a field in this list has a non-empty value.
2254	// This may be used to include null fields in Patch requests.
2255	NullFields []string `json:"-"`
2256}
2257
2258func (s *ListClustersResponse) MarshalJSON() ([]byte, error) {
2259	type NoMethod ListClustersResponse
2260	raw := NoMethod(*s)
2261	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2262}
2263
2264// ListJobsResponse: A list of jobs in a project.
2265type ListJobsResponse struct {
2266	// Jobs: Output only. Jobs list.
2267	Jobs []*Job `json:"jobs,omitempty"`
2268
2269	// NextPageToken: Optional. This token is included in the response if
2270	// there are more results to fetch. To fetch additional results, provide
2271	// this value as the page_token in a subsequent
2272	// <code>ListJobsRequest</code>.
2273	NextPageToken string `json:"nextPageToken,omitempty"`
2274
2275	// ServerResponse contains the HTTP response code and headers from the
2276	// server.
2277	googleapi.ServerResponse `json:"-"`
2278
2279	// ForceSendFields is a list of field names (e.g. "Jobs") to
2280	// unconditionally include in API requests. By default, fields with
2281	// empty values are omitted from API requests. However, any non-pointer,
2282	// non-interface field appearing in ForceSendFields will be sent to the
2283	// server regardless of whether the field is empty or not. This may be
2284	// used to include empty fields in Patch requests.
2285	ForceSendFields []string `json:"-"`
2286
2287	// NullFields is a list of field names (e.g. "Jobs") to include in API
2288	// requests with the JSON null value. By default, fields with empty
2289	// values are omitted from API requests. However, any field with an
2290	// empty value appearing in NullFields will be sent to the server as
2291	// null. It is an error if a field in this list has a non-empty value.
2292	// This may be used to include null fields in Patch requests.
2293	NullFields []string `json:"-"`
2294}
2295
2296func (s *ListJobsResponse) MarshalJSON() ([]byte, error) {
2297	type NoMethod ListJobsResponse
2298	raw := NoMethod(*s)
2299	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2300}
2301
2302// ListOperationsResponse: The response message for
2303// Operations.ListOperations.
2304type ListOperationsResponse struct {
2305	// NextPageToken: The standard List next-page token.
2306	NextPageToken string `json:"nextPageToken,omitempty"`
2307
2308	// Operations: A list of operations that matches the specified filter in
2309	// the request.
2310	Operations []*Operation `json:"operations,omitempty"`
2311
2312	// ServerResponse contains the HTTP response code and headers from the
2313	// server.
2314	googleapi.ServerResponse `json:"-"`
2315
2316	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2317	// unconditionally include in API requests. By default, fields with
2318	// empty values are omitted from API requests. However, any non-pointer,
2319	// non-interface field appearing in ForceSendFields will be sent to the
2320	// server regardless of whether the field is empty or not. This may be
2321	// used to include empty fields in Patch requests.
2322	ForceSendFields []string `json:"-"`
2323
2324	// NullFields is a list of field names (e.g. "NextPageToken") to include
2325	// in API requests with the JSON null value. By default, fields with
2326	// empty values are omitted from API requests. However, any field with
2327	// an empty value appearing in NullFields will be sent to the server as
2328	// null. It is an error if a field in this list has a non-empty value.
2329	// This may be used to include null fields in Patch requests.
2330	NullFields []string `json:"-"`
2331}
2332
2333func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
2334	type NoMethod ListOperationsResponse
2335	raw := NoMethod(*s)
2336	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2337}
2338
2339// ListWorkflowTemplatesResponse: A response to a request to list
2340// workflow templates in a project.
2341type ListWorkflowTemplatesResponse struct {
2342	// NextPageToken: Output only. This token is included in the response if
2343	// there are more results to fetch. To fetch additional results, provide
2344	// this value as the page_token in a subsequent
2345	// <code>ListWorkflowTemplatesRequest</code>.
2346	NextPageToken string `json:"nextPageToken,omitempty"`
2347
2348	// Templates: Output only. WorkflowTemplates list.
2349	Templates []*WorkflowTemplate `json:"templates,omitempty"`
2350
2351	// ServerResponse contains the HTTP response code and headers from the
2352	// server.
2353	googleapi.ServerResponse `json:"-"`
2354
2355	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2356	// unconditionally include in API requests. By default, fields with
2357	// empty values are omitted from API requests. However, any non-pointer,
2358	// non-interface field appearing in ForceSendFields will be sent to the
2359	// server regardless of whether the field is empty or not. This may be
2360	// used to include empty fields in Patch requests.
2361	ForceSendFields []string `json:"-"`
2362
2363	// NullFields is a list of field names (e.g. "NextPageToken") to include
2364	// in API requests with the JSON null value. By default, fields with
2365	// empty values are omitted from API requests. However, any field with
2366	// an empty value appearing in NullFields will be sent to the server as
2367	// null. It is an error if a field in this list has a non-empty value.
2368	// This may be used to include null fields in Patch requests.
2369	NullFields []string `json:"-"`
2370}
2371
2372func (s *ListWorkflowTemplatesResponse) MarshalJSON() ([]byte, error) {
2373	type NoMethod ListWorkflowTemplatesResponse
2374	raw := NoMethod(*s)
2375	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2376}
2377
2378// LoggingConfig: The runtime logging config of the job.
2379type LoggingConfig struct {
2380	// DriverLogLevels: The per-package log levels for the driver. This may
2381	// include "root" package name to configure rootLogger. Examples:
2382	// 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
2383	DriverLogLevels map[string]string `json:"driverLogLevels,omitempty"`
2384
2385	// ForceSendFields is a list of field names (e.g. "DriverLogLevels") to
2386	// unconditionally include in API requests. By default, fields with
2387	// empty values are omitted from API requests. However, any non-pointer,
2388	// non-interface field appearing in ForceSendFields will be sent to the
2389	// server regardless of whether the field is empty or not. This may be
2390	// used to include empty fields in Patch requests.
2391	ForceSendFields []string `json:"-"`
2392
2393	// NullFields is a list of field names (e.g. "DriverLogLevels") to
2394	// include in API requests with the JSON null value. By default, fields
2395	// with empty values are omitted from API requests. However, any field
2396	// with an empty value appearing in NullFields will be sent to the
2397	// server as null. It is an error if a field in this list has a
2398	// non-empty value. This may be used to include null fields in Patch
2399	// requests.
2400	NullFields []string `json:"-"`
2401}
2402
2403func (s *LoggingConfig) MarshalJSON() ([]byte, error) {
2404	type NoMethod LoggingConfig
2405	raw := NoMethod(*s)
2406	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2407}
2408
2409// ManagedCluster: Cluster that is managed by the workflow.
2410type ManagedCluster struct {
2411	// ClusterName: Required. The cluster name prefix. A unique cluster name
2412	// will be formed by appending a random suffix.The name must contain
2413	// only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must
2414	// begin with a letter. Cannot begin or end with hyphen. Must consist of
2415	// between 2 and 35 characters.
2416	ClusterName string `json:"clusterName,omitempty"`
2417
2418	// Config: Required. The cluster configuration.
2419	Config *ClusterConfig `json:"config,omitempty"`
2420
2421	// Labels: Optional. The labels to associate with this cluster.Label
2422	// keys must be between 1 and 63 characters long, and must conform to
2423	// the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}Label values
2424	// must be between 1 and 63 characters long, and must conform to the
2425	// following PCRE regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more
2426	// than 32 labels can be associated with a given cluster.
2427	Labels map[string]string `json:"labels,omitempty"`
2428
2429	// ForceSendFields is a list of field names (e.g. "ClusterName") to
2430	// unconditionally include in API requests. By default, fields with
2431	// empty values are omitted from API requests. However, any non-pointer,
2432	// non-interface field appearing in ForceSendFields will be sent to the
2433	// server regardless of whether the field is empty or not. This may be
2434	// used to include empty fields in Patch requests.
2435	ForceSendFields []string `json:"-"`
2436
2437	// NullFields is a list of field names (e.g. "ClusterName") to include
2438	// in API requests with the JSON null value. By default, fields with
2439	// empty values are omitted from API requests. However, any field with
2440	// an empty value appearing in NullFields will be sent to the server as
2441	// null. It is an error if a field in this list has a non-empty value.
2442	// This may be used to include null fields in Patch requests.
2443	NullFields []string `json:"-"`
2444}
2445
2446func (s *ManagedCluster) MarshalJSON() ([]byte, error) {
2447	type NoMethod ManagedCluster
2448	raw := NoMethod(*s)
2449	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2450}
2451
2452// ManagedGroupConfig: Specifies the resources used to actively manage
2453// an instance group.
2454type ManagedGroupConfig struct {
2455	// InstanceGroupManagerName: Output only. The name of the Instance Group
2456	// Manager for this group.
2457	InstanceGroupManagerName string `json:"instanceGroupManagerName,omitempty"`
2458
2459	// InstanceTemplateName: Output only. The name of the Instance Template
2460	// used for the Managed Instance Group.
2461	InstanceTemplateName string `json:"instanceTemplateName,omitempty"`
2462
2463	// ForceSendFields is a list of field names (e.g.
2464	// "InstanceGroupManagerName") to unconditionally include in API
2465	// requests. By default, fields with empty values are omitted from API
2466	// requests. However, any non-pointer, non-interface field appearing in
2467	// ForceSendFields will be sent to the server regardless of whether the
2468	// field is empty or not. This may be used to include empty fields in
2469	// Patch requests.
2470	ForceSendFields []string `json:"-"`
2471
2472	// NullFields is a list of field names (e.g. "InstanceGroupManagerName")
2473	// to include in API requests with the JSON null value. By default,
2474	// fields with empty values are omitted from API requests. However, any
2475	// field with an empty value appearing in NullFields will be sent to the
2476	// server as null. It is an error if a field in this list has a
2477	// non-empty value. This may be used to include null fields in Patch
2478	// requests.
2479	NullFields []string `json:"-"`
2480}
2481
2482func (s *ManagedGroupConfig) MarshalJSON() ([]byte, error) {
2483	type NoMethod ManagedGroupConfig
2484	raw := NoMethod(*s)
2485	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2486}
2487
2488// NodeInitializationAction: Specifies an executable to run on a fully
2489// configured node and a timeout period for executable completion.
2490type NodeInitializationAction struct {
2491	// ExecutableFile: Required. Cloud Storage URI of executable file.
2492	ExecutableFile string `json:"executableFile,omitempty"`
2493
2494	// ExecutionTimeout: Optional. Amount of time executable has to
2495	// complete. Default is 10 minutes (see JSON representation of Duration
2496	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).Clu
2497	// ster creation fails with an explanatory error message (the name of
2498	// the executable that caused the error and the exceeded timeout period)
2499	// if the executable is not completed at end of the timeout period.
2500	ExecutionTimeout string `json:"executionTimeout,omitempty"`
2501
2502	// ForceSendFields is a list of field names (e.g. "ExecutableFile") to
2503	// unconditionally include in API requests. By default, fields with
2504	// empty values are omitted from API requests. However, any non-pointer,
2505	// non-interface field appearing in ForceSendFields will be sent to the
2506	// server regardless of whether the field is empty or not. This may be
2507	// used to include empty fields in Patch requests.
2508	ForceSendFields []string `json:"-"`
2509
2510	// NullFields is a list of field names (e.g. "ExecutableFile") to
2511	// include in API requests with the JSON null value. By default, fields
2512	// with empty values are omitted from API requests. However, any field
2513	// with an empty value appearing in NullFields will be sent to the
2514	// server as null. It is an error if a field in this list has a
2515	// non-empty value. This may be used to include null fields in Patch
2516	// requests.
2517	NullFields []string `json:"-"`
2518}
2519
2520func (s *NodeInitializationAction) MarshalJSON() ([]byte, error) {
2521	type NoMethod NodeInitializationAction
2522	raw := NoMethod(*s)
2523	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2524}
2525
2526// Operation: This resource represents a long-running operation that is
2527// the result of a network API call.
2528type Operation struct {
2529	// Done: If the value is false, it means the operation is still in
2530	// progress. If true, the operation is completed, and either error or
2531	// response is available.
2532	Done bool `json:"done,omitempty"`
2533
2534	// Error: The error result of the operation in case of failure or
2535	// cancellation.
2536	Error *Status `json:"error,omitempty"`
2537
2538	// Metadata: Service-specific metadata associated with the operation. It
2539	// typically contains progress information and common metadata such as
2540	// create time. Some services might not provide such metadata. Any
2541	// method that returns a long-running operation should document the
2542	// metadata type, if any.
2543	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2544
2545	// Name: The server-assigned name, which is only unique within the same
2546	// service that originally returns it. If you use the default HTTP
2547	// mapping, the name should be a resource name ending with
2548	// operations/{unique_id}.
2549	Name string `json:"name,omitempty"`
2550
2551	// Response: The normal response of the operation in case of success. If
2552	// the original method returns no data on success, such as Delete, the
2553	// response is google.protobuf.Empty. If the original method is standard
2554	// Get/Create/Update, the response should be the resource. For other
2555	// methods, the response should have the type XxxResponse, where Xxx is
2556	// the original method name. For example, if the original method name is
2557	// TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
2558	Response googleapi.RawMessage `json:"response,omitempty"`
2559
2560	// ServerResponse contains the HTTP response code and headers from the
2561	// server.
2562	googleapi.ServerResponse `json:"-"`
2563
2564	// ForceSendFields is a list of field names (e.g. "Done") to
2565	// unconditionally include in API requests. By default, fields with
2566	// empty values are omitted from API requests. However, any non-pointer,
2567	// non-interface field appearing in ForceSendFields will be sent to the
2568	// server regardless of whether the field is empty or not. This may be
2569	// used to include empty fields in Patch requests.
2570	ForceSendFields []string `json:"-"`
2571
2572	// NullFields is a list of field names (e.g. "Done") to include in API
2573	// requests with the JSON null value. By default, fields with empty
2574	// values are omitted from API requests. However, any field with an
2575	// empty value appearing in NullFields will be sent to the server as
2576	// null. It is an error if a field in this list has a non-empty value.
2577	// This may be used to include null fields in Patch requests.
2578	NullFields []string `json:"-"`
2579}
2580
2581func (s *Operation) MarshalJSON() ([]byte, error) {
2582	type NoMethod Operation
2583	raw := NoMethod(*s)
2584	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2585}
2586
2587// OrderedJob: A job executed by the workflow.
2588type OrderedJob struct {
2589	// HadoopJob: Optional. Job is a Hadoop job.
2590	HadoopJob *HadoopJob `json:"hadoopJob,omitempty"`
2591
2592	// HiveJob: Optional. Job is a Hive job.
2593	HiveJob *HiveJob `json:"hiveJob,omitempty"`
2594
2595	// Labels: Optional. The labels to associate with this job.Label keys
2596	// must be between 1 and 63 characters long, and must conform to the
2597	// following regular expression: \p{Ll}\p{Lo}{0,62}Label values must be
2598	// between 1 and 63 characters long, and must conform to the following
2599	// regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 32 labels
2600	// can be associated with a given job.
2601	Labels map[string]string `json:"labels,omitempty"`
2602
2603	// PigJob: Optional. Job is a Pig job.
2604	PigJob *PigJob `json:"pigJob,omitempty"`
2605
2606	// PrerequisiteStepIds: Optional. The optional list of prerequisite job
2607	// step_ids. If not specified, the job will start at the beginning of
2608	// workflow.
2609	PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"`
2610
2611	// PrestoJob: Optional. Job is a Presto job.
2612	PrestoJob *PrestoJob `json:"prestoJob,omitempty"`
2613
2614	// PysparkJob: Optional. Job is a PySpark job.
2615	PysparkJob *PySparkJob `json:"pysparkJob,omitempty"`
2616
2617	// Scheduling: Optional. Job scheduling configuration.
2618	Scheduling *JobScheduling `json:"scheduling,omitempty"`
2619
2620	// SparkJob: Optional. Job is a Spark job.
2621	SparkJob *SparkJob `json:"sparkJob,omitempty"`
2622
2623	// SparkRJob: Optional. Job is a SparkR job.
2624	SparkRJob *SparkRJob `json:"sparkRJob,omitempty"`
2625
2626	// SparkSqlJob: Optional. Job is a SparkSql job.
2627	SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"`
2628
2629	// StepId: Required. The step id. The id must be unique among all jobs
2630	// within the template.The step id is used as prefix for job id, as job
2631	// goog-dataproc-workflow-step-id label, and in prerequisiteStepIds
2632	// field from other steps.The id must contain only letters (a-z, A-Z),
2633	// numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end
2634	// with underscore or hyphen. Must consist of between 3 and 50
2635	// characters.
2636	StepId string `json:"stepId,omitempty"`
2637
2638	// ForceSendFields is a list of field names (e.g. "HadoopJob") to
2639	// unconditionally include in API requests. By default, fields with
2640	// empty values are omitted from API requests. However, any non-pointer,
2641	// non-interface field appearing in ForceSendFields will be sent to the
2642	// server regardless of whether the field is empty or not. This may be
2643	// used to include empty fields in Patch requests.
2644	ForceSendFields []string `json:"-"`
2645
2646	// NullFields is a list of field names (e.g. "HadoopJob") to include in
2647	// API requests with the JSON null value. By default, fields with empty
2648	// values are omitted from API requests. However, any field with an
2649	// empty value appearing in NullFields will be sent to the server as
2650	// null. It is an error if a field in this list has a non-empty value.
2651	// This may be used to include null fields in Patch requests.
2652	NullFields []string `json:"-"`
2653}
2654
2655func (s *OrderedJob) MarshalJSON() ([]byte, error) {
2656	type NoMethod OrderedJob
2657	raw := NoMethod(*s)
2658	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2659}
2660
2661// ParameterValidation: Configuration for parameter validation.
2662type ParameterValidation struct {
2663	// Regex: Validation based on regular expressions.
2664	Regex *RegexValidation `json:"regex,omitempty"`
2665
2666	// Values: Validation based on a list of allowed values.
2667	Values *ValueValidation `json:"values,omitempty"`
2668
2669	// ForceSendFields is a list of field names (e.g. "Regex") to
2670	// unconditionally include in API requests. By default, fields with
2671	// empty values are omitted from API requests. However, any non-pointer,
2672	// non-interface field appearing in ForceSendFields will be sent to the
2673	// server regardless of whether the field is empty or not. This may be
2674	// used to include empty fields in Patch requests.
2675	ForceSendFields []string `json:"-"`
2676
2677	// NullFields is a list of field names (e.g. "Regex") to include in API
2678	// requests with the JSON null value. By default, fields with empty
2679	// values are omitted from API requests. However, any field with an
2680	// empty value appearing in NullFields will be sent to the server as
2681	// null. It is an error if a field in this list has a non-empty value.
2682	// This may be used to include null fields in Patch requests.
2683	NullFields []string `json:"-"`
2684}
2685
2686func (s *ParameterValidation) MarshalJSON() ([]byte, error) {
2687	type NoMethod ParameterValidation
2688	raw := NoMethod(*s)
2689	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2690}
2691
2692// PigJob: A Dataproc job for running Apache Pig
2693// (https://pig.apache.org/) queries on YARN.
2694type PigJob struct {
2695	// ContinueOnFailure: Optional. Whether to continue executing queries if
2696	// a query fails. The default value is false. Setting to true can be
2697	// useful when executing independent parallel queries.
2698	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
2699
2700	// JarFileUris: Optional. HCFS URIs of jar files to add to the CLASSPATH
2701	// of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig
2702	// UDFs.
2703	JarFileUris []string `json:"jarFileUris,omitempty"`
2704
2705	// LoggingConfig: Optional. The runtime log config for job execution.
2706	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
2707
2708	// Properties: Optional. A mapping of property names to values, used to
2709	// configure Pig. Properties that conflict with values set by the
2710	// Dataproc API may be overwritten. Can include properties set in
2711	// /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and
2712	// classes in user code.
2713	Properties map[string]string `json:"properties,omitempty"`
2714
2715	// QueryFileUri: The HCFS URI of the script that contains the Pig
2716	// queries.
2717	QueryFileUri string `json:"queryFileUri,omitempty"`
2718
2719	// QueryList: A list of queries.
2720	QueryList *QueryList `json:"queryList,omitempty"`
2721
2722	// ScriptVariables: Optional. Mapping of query variable names to values
2723	// (equivalent to the Pig command: name=[value]).
2724	ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
2725
2726	// ForceSendFields is a list of field names (e.g. "ContinueOnFailure")
2727	// to unconditionally include in API requests. By default, fields with
2728	// empty values are omitted from API requests. However, any non-pointer,
2729	// non-interface field appearing in ForceSendFields will be sent to the
2730	// server regardless of whether the field is empty or not. This may be
2731	// used to include empty fields in Patch requests.
2732	ForceSendFields []string `json:"-"`
2733
2734	// NullFields is a list of field names (e.g. "ContinueOnFailure") to
2735	// include in API requests with the JSON null value. By default, fields
2736	// with empty values are omitted from API requests. However, any field
2737	// with an empty value appearing in NullFields will be sent to the
2738	// server as null. It is an error if a field in this list has a
2739	// non-empty value. This may be used to include null fields in Patch
2740	// requests.
2741	NullFields []string `json:"-"`
2742}
2743
2744func (s *PigJob) MarshalJSON() ([]byte, error) {
2745	type NoMethod PigJob
2746	raw := NoMethod(*s)
2747	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2748}
2749
2750// Policy: An Identity and Access Management (IAM) policy, which
2751// specifies access controls for Google Cloud resources.A Policy is a
2752// collection of bindings. A binding binds one or more members to a
2753// single role. Members can be user accounts, service accounts, Google
2754// groups, and domains (such as G Suite). A role is a named list of
2755// permissions; each role can be an IAM predefined role or a
2756// user-created custom role.Optionally, a binding can specify a
2757// condition, which is a logical expression that allows access to a
2758// resource only if the expression evaluates to true. A condition can
2759// add constraints based on attributes of the request, the resource, or
2760// both.JSON example:
2761// {
2762//   "bindings": [
2763//     {
2764//       "role": "roles/resourcemanager.organizationAdmin",
2765//       "members": [
2766//         "user:mike@example.com",
2767//         "group:admins@example.com",
2768//         "domain:google.com",
2769//         "serviceAccount:my-project-id@appspot.gserviceaccount.com"
2770//       ]
2771//     },
2772//     {
2773//       "role": "roles/resourcemanager.organizationViewer",
2774//       "members": ["user:eve@example.com"],
2775//       "condition": {
2776//         "title": "expirable access",
2777//         "description": "Does not grant access after Sep 2020",
2778//         "expression": "request.time <
2779// timestamp('2020-10-01T00:00:00.000Z')",
2780//       }
2781//     }
2782//   ],
2783//   "etag": "BwWWja0YfJA=",
2784//   "version": 3
2785// }
2786// YAML example:
2787// bindings:
2788// - members:
2789//   - user:mike@example.com
2790//   - group:admins@example.com
2791//   - domain:google.com
2792//   - serviceAccount:my-project-id@appspot.gserviceaccount.com
2793//   role: roles/resourcemanager.organizationAdmin
2794// - members:
2795//   - user:eve@example.com
2796//   role: roles/resourcemanager.organizationViewer
2797//   condition:
2798//     title: expirable access
2799//     description: Does not grant access after Sep 2020
2800//     expression: request.time <
2801// timestamp('2020-10-01T00:00:00.000Z')
2802// - etag: BwWWja0YfJA=
2803// - version: 3
2804// For a description of IAM and its features, see the IAM documentation
2805// (https://cloud.google.com/iam/docs/).
2806type Policy struct {
2807	// Bindings: Associates a list of members to a role. Optionally, may
2808	// specify a condition that determines how and when the bindings are
2809	// applied. Each of the bindings must contain at least one member.
2810	Bindings []*Binding `json:"bindings,omitempty"`
2811
2812	// Etag: etag is used for optimistic concurrency control as a way to
2813	// help prevent simultaneous updates of a policy from overwriting each
2814	// other. It is strongly suggested that systems make use of the etag in
2815	// the read-modify-write cycle to perform policy updates in order to
2816	// avoid race conditions: An etag is returned in the response to
2817	// getIamPolicy, and systems are expected to put that etag in the
2818	// request to setIamPolicy to ensure that their change will be applied
2819	// to the same version of the policy.Important: If you use IAM
2820	// Conditions, you must include the etag field whenever you call
2821	// setIamPolicy. If you omit this field, then IAM allows you to
2822	// overwrite a version 3 policy with a version 1 policy, and all of the
2823	// conditions in the version 3 policy are lost.
2824	Etag string `json:"etag,omitempty"`
2825
2826	// Version: Specifies the format of the policy.Valid values are 0, 1,
2827	// and 3. Requests that specify an invalid value are rejected.Any
2828	// operation that affects conditional role bindings must specify version
2829	// 3. This requirement applies to the following operations:
2830	// Getting a policy that includes a conditional role binding
2831	// Adding a conditional role binding to a policy
2832	// Changing a conditional role binding in a policy
2833	// Removing any role binding, with or without a condition, from a policy
2834	//  that includes conditionsImportant: If you use IAM Conditions, you
2835	// must include the etag field whenever you call setIamPolicy. If you
2836	// omit this field, then IAM allows you to overwrite a version 3 policy
2837	// with a version 1 policy, and all of the conditions in the version 3
2838	// policy are lost.If a policy does not include any conditions,
2839	// operations on that policy may specify any valid version or leave the
2840	// field unset.
2841	Version int64 `json:"version,omitempty"`
2842
2843	// ServerResponse contains the HTTP response code and headers from the
2844	// server.
2845	googleapi.ServerResponse `json:"-"`
2846
2847	// ForceSendFields is a list of field names (e.g. "Bindings") to
2848	// unconditionally include in API requests. By default, fields with
2849	// empty values are omitted from API requests. However, any non-pointer,
2850	// non-interface field appearing in ForceSendFields will be sent to the
2851	// server regardless of whether the field is empty or not. This may be
2852	// used to include empty fields in Patch requests.
2853	ForceSendFields []string `json:"-"`
2854
2855	// NullFields is a list of field names (e.g. "Bindings") to include in
2856	// API requests with the JSON null value. By default, fields with empty
2857	// values are omitted from API requests. However, any field with an
2858	// empty value appearing in NullFields will be sent to the server as
2859	// null. It is an error if a field in this list has a non-empty value.
2860	// This may be used to include null fields in Patch requests.
2861	NullFields []string `json:"-"`
2862}
2863
2864func (s *Policy) MarshalJSON() ([]byte, error) {
2865	type NoMethod Policy
2866	raw := NoMethod(*s)
2867	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2868}
2869
2870// PrestoJob: A Dataproc job for running Presto (https://prestosql.io/)
2871// queries. IMPORTANT: The Dataproc Presto Optional Component
2872// (https://cloud.google.com/dataproc/docs/concepts/components/presto)
2873// must be enabled when the cluster is created to submit a Presto job to
2874// the cluster.
2875type PrestoJob struct {
2876	// ClientTags: Optional. Presto client tags to attach to this query
2877	ClientTags []string `json:"clientTags,omitempty"`
2878
2879	// ContinueOnFailure: Optional. Whether to continue executing queries if
2880	// a query fails. The default value is false. Setting to true can be
2881	// useful when executing independent parallel queries.
2882	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
2883
2884	// LoggingConfig: Optional. The runtime log config for job execution.
2885	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
2886
2887	// OutputFormat: Optional. The format in which query output will be
2888	// displayed. See the Presto documentation for supported output formats
2889	OutputFormat string `json:"outputFormat,omitempty"`
2890
2891	// Properties: Optional. A mapping of property names to values. Used to
2892	// set Presto session properties
2893	// (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to
2894	// using the --session flag in the Presto CLI
2895	Properties map[string]string `json:"properties,omitempty"`
2896
2897	// QueryFileUri: The HCFS URI of the script that contains SQL queries.
2898	QueryFileUri string `json:"queryFileUri,omitempty"`
2899
2900	// QueryList: A list of queries.
2901	QueryList *QueryList `json:"queryList,omitempty"`
2902
2903	// ForceSendFields is a list of field names (e.g. "ClientTags") to
2904	// unconditionally include in API requests. By default, fields with
2905	// empty values are omitted from API requests. However, any non-pointer,
2906	// non-interface field appearing in ForceSendFields will be sent to the
2907	// server regardless of whether the field is empty or not. This may be
2908	// used to include empty fields in Patch requests.
2909	ForceSendFields []string `json:"-"`
2910
2911	// NullFields is a list of field names (e.g. "ClientTags") to include in
2912	// API requests with the JSON null value. By default, fields with empty
2913	// values are omitted from API requests. However, any field with an
2914	// empty value appearing in NullFields will be sent to the server as
2915	// null. It is an error if a field in this list has a non-empty value.
2916	// This may be used to include null fields in Patch requests.
2917	NullFields []string `json:"-"`
2918}
2919
2920func (s *PrestoJob) MarshalJSON() ([]byte, error) {
2921	type NoMethod PrestoJob
2922	raw := NoMethod(*s)
2923	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2924}
2925
2926// PySparkJob: A Dataproc job for running Apache PySpark
2927// (https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
2928// applications on YARN.
2929type PySparkJob struct {
2930	// ArchiveUris: Optional. HCFS URIs of archives to be extracted in the
2931	// working directory of .jar, .tar, .tar.gz, .tgz, and .zip.
2932	ArchiveUris []string `json:"archiveUris,omitempty"`
2933
2934	// Args: Optional. The arguments to pass to the driver. Do not include
2935	// arguments, such as --conf, that can be set as job properties, since a
2936	// collision may occur that causes an incorrect job submission.
2937	Args []string `json:"args,omitempty"`
2938
2939	// FileUris: Optional. HCFS URIs of files to be copied to the working
2940	// directory of Python drivers and distributed tasks. Useful for naively
2941	// parallel tasks.
2942	FileUris []string `json:"fileUris,omitempty"`
2943
2944	// JarFileUris: Optional. HCFS URIs of jar files to add to the
2945	// CLASSPATHs of the Python driver and tasks.
2946	JarFileUris []string `json:"jarFileUris,omitempty"`
2947
2948	// LoggingConfig: Optional. The runtime log config for job execution.
2949	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
2950
2951	// MainPythonFileUri: Required. The HCFS URI of the main Python file to
2952	// use as the driver. Must be a .py file.
2953	MainPythonFileUri string `json:"mainPythonFileUri,omitempty"`
2954
2955	// Properties: Optional. A mapping of property names to values, used to
2956	// configure PySpark. Properties that conflict with values set by the
2957	// Dataproc API may be overwritten. Can include properties set in
2958	// /etc/spark/conf/spark-defaults.conf and classes in user code.
2959	Properties map[string]string `json:"properties,omitempty"`
2960
2961	// PythonFileUris: Optional. HCFS file URIs of Python files to pass to
2962	// the PySpark framework. Supported file types: .py, .egg, and .zip.
2963	PythonFileUris []string `json:"pythonFileUris,omitempty"`
2964
2965	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
2966	// unconditionally include in API requests. By default, fields with
2967	// empty values are omitted from API requests. However, any non-pointer,
2968	// non-interface field appearing in ForceSendFields will be sent to the
2969	// server regardless of whether the field is empty or not. This may be
2970	// used to include empty fields in Patch requests.
2971	ForceSendFields []string `json:"-"`
2972
2973	// NullFields is a list of field names (e.g. "ArchiveUris") to include
2974	// in API requests with the JSON null value. By default, fields with
2975	// empty values are omitted from API requests. However, any field with
2976	// an empty value appearing in NullFields will be sent to the server as
2977	// null. It is an error if a field in this list has a non-empty value.
2978	// This may be used to include null fields in Patch requests.
2979	NullFields []string `json:"-"`
2980}
2981
2982func (s *PySparkJob) MarshalJSON() ([]byte, error) {
2983	type NoMethod PySparkJob
2984	raw := NoMethod(*s)
2985	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2986}
2987
2988// QueryList: A list of queries to run on a cluster.
2989type QueryList struct {
2990	// Queries: Required. The queries to execute. You do not need to
2991	// terminate a query with a semicolon. Multiple queries can be specified
2992	// in one string by separating each with a semicolon. Here is an example
2993	// of an Cloud Dataproc API snippet that uses a QueryList to specify a
2994	// HiveJob:
2995	// "hiveJob": {
2996	//   "queryList": {
2997	//     "queries": [
2998	//       "query1",
2999	//       "query2",
3000	//       "query3;query4",
3001	//     ]
3002	//   }
3003	// }
3004	//
3005	Queries []string `json:"queries,omitempty"`
3006
3007	// ForceSendFields is a list of field names (e.g. "Queries") to
3008	// unconditionally include in API requests. By default, fields with
3009	// empty values are omitted from API requests. However, any non-pointer,
3010	// non-interface field appearing in ForceSendFields will be sent to the
3011	// server regardless of whether the field is empty or not. This may be
3012	// used to include empty fields in Patch requests.
3013	ForceSendFields []string `json:"-"`
3014
3015	// NullFields is a list of field names (e.g. "Queries") to include in
3016	// API requests with the JSON null value. By default, fields with empty
3017	// values are omitted from API requests. However, any field with an
3018	// empty value appearing in NullFields will be sent to the server as
3019	// null. It is an error if a field in this list has a non-empty value.
3020	// This may be used to include null fields in Patch requests.
3021	NullFields []string `json:"-"`
3022}
3023
3024func (s *QueryList) MarshalJSON() ([]byte, error) {
3025	type NoMethod QueryList
3026	raw := NoMethod(*s)
3027	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3028}
3029
3030// RegexValidation: Validation based on regular expressions.
3031type RegexValidation struct {
3032	// Regexes: Required. RE2 regular expressions used to validate the
3033	// parameter's value. The value must match the regex in its entirety
3034	// (substring matches are not sufficient).
3035	Regexes []string `json:"regexes,omitempty"`
3036
3037	// ForceSendFields is a list of field names (e.g. "Regexes") to
3038	// unconditionally include in API requests. By default, fields with
3039	// empty values are omitted from API requests. However, any non-pointer,
3040	// non-interface field appearing in ForceSendFields will be sent to the
3041	// server regardless of whether the field is empty or not. This may be
3042	// used to include empty fields in Patch requests.
3043	ForceSendFields []string `json:"-"`
3044
3045	// NullFields is a list of field names (e.g. "Regexes") to include in
3046	// API requests with the JSON null value. By default, fields with empty
3047	// values are omitted from API requests. However, any field with an
3048	// empty value appearing in NullFields will be sent to the server as
3049	// null. It is an error if a field in this list has a non-empty value.
3050	// This may be used to include null fields in Patch requests.
3051	NullFields []string `json:"-"`
3052}
3053
3054func (s *RegexValidation) MarshalJSON() ([]byte, error) {
3055	type NoMethod RegexValidation
3056	raw := NoMethod(*s)
3057	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3058}
3059
3060// ReservationAffinity: Reservation Affinity for consuming Zonal
3061// reservation.
3062type ReservationAffinity struct {
3063	// ConsumeReservationType: Optional. Type of reservation to consume
3064	//
3065	// Possible values:
3066	//   "TYPE_UNSPECIFIED"
3067	//   "NO_RESERVATION" - Do not consume from any allocated capacity.
3068	//   "ANY_RESERVATION" - Consume any reservation available.
3069	//   "SPECIFIC_RESERVATION" - Must consume from a specific reservation.
3070	// Must specify key value fields for specifying the reservations.
3071	ConsumeReservationType string `json:"consumeReservationType,omitempty"`
3072
3073	// Key: Optional. Corresponds to the label key of reservation resource.
3074	Key string `json:"key,omitempty"`
3075
3076	// Values: Optional. Corresponds to the label values of reservation
3077	// resource.
3078	Values []string `json:"values,omitempty"`
3079
3080	// ForceSendFields is a list of field names (e.g.
3081	// "ConsumeReservationType") to unconditionally include in API requests.
3082	// By default, fields with empty values are omitted from API requests.
3083	// However, any non-pointer, non-interface field appearing in
3084	// ForceSendFields will be sent to the server regardless of whether the
3085	// field is empty or not. This may be used to include empty fields in
3086	// Patch requests.
3087	ForceSendFields []string `json:"-"`
3088
3089	// NullFields is a list of field names (e.g. "ConsumeReservationType")
3090	// to include in API requests with the JSON null value. By default,
3091	// fields with empty values are omitted from API requests. However, any
3092	// field with an empty value appearing in NullFields will be sent to the
3093	// server as null. It is an error if a field in this list has a
3094	// non-empty value. This may be used to include null fields in Patch
3095	// requests.
3096	NullFields []string `json:"-"`
3097}
3098
3099func (s *ReservationAffinity) MarshalJSON() ([]byte, error) {
3100	type NoMethod ReservationAffinity
3101	raw := NoMethod(*s)
3102	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3103}
3104
3105// SecurityConfig: Security related configuration, including Kerberos.
3106type SecurityConfig struct {
3107	// KerberosConfig: Kerberos related configuration.
3108	KerberosConfig *KerberosConfig `json:"kerberosConfig,omitempty"`
3109
3110	// ForceSendFields is a list of field names (e.g. "KerberosConfig") to
3111	// unconditionally include in API requests. By default, fields with
3112	// empty values are omitted from API requests. However, any non-pointer,
3113	// non-interface field appearing in ForceSendFields will be sent to the
3114	// server regardless of whether the field is empty or not. This may be
3115	// used to include empty fields in Patch requests.
3116	ForceSendFields []string `json:"-"`
3117
3118	// NullFields is a list of field names (e.g. "KerberosConfig") to
3119	// include in API requests with the JSON null value. By default, fields
3120	// with empty values are omitted from API requests. However, any field
3121	// with an empty value appearing in NullFields will be sent to the
3122	// server as null. It is an error if a field in this list has a
3123	// non-empty value. This may be used to include null fields in Patch
3124	// requests.
3125	NullFields []string `json:"-"`
3126}
3127
3128func (s *SecurityConfig) MarshalJSON() ([]byte, error) {
3129	type NoMethod SecurityConfig
3130	raw := NoMethod(*s)
3131	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3132}
3133
3134// SetIamPolicyRequest: Request message for SetIamPolicy method.
3135type SetIamPolicyRequest struct {
3136	// Policy: REQUIRED: The complete policy to be applied to the resource.
3137	// The size of the policy is limited to a few 10s of KB. An empty policy
3138	// is a valid policy but certain Cloud Platform services (such as
3139	// Projects) might reject them.
3140	Policy *Policy `json:"policy,omitempty"`
3141
3142	// ForceSendFields is a list of field names (e.g. "Policy") to
3143	// unconditionally include in API requests. By default, fields with
3144	// empty values are omitted from API requests. However, any non-pointer,
3145	// non-interface field appearing in ForceSendFields will be sent to the
3146	// server regardless of whether the field is empty or not. This may be
3147	// used to include empty fields in Patch requests.
3148	ForceSendFields []string `json:"-"`
3149
3150	// NullFields is a list of field names (e.g. "Policy") to include in API
3151	// requests with the JSON null value. By default, fields with empty
3152	// values are omitted from API requests. However, any field with an
3153	// empty value appearing in NullFields will be sent to the server as
3154	// null. It is an error if a field in this list has a non-empty value.
3155	// This may be used to include null fields in Patch requests.
3156	NullFields []string `json:"-"`
3157}
3158
3159func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
3160	type NoMethod SetIamPolicyRequest
3161	raw := NoMethod(*s)
3162	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3163}
3164
3165// SoftwareConfig: Specifies the selection and config of software inside
3166// the cluster.
3167type SoftwareConfig struct {
3168	// ImageVersion: Optional. The version of software inside the cluster.
3169	// It must be one of the supported Dataproc Versions
3170	// (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-v
3171	// ersions#supported_cloud_dataproc_versions), such as "1.2" (including
3172	// a subminor version, such as "1.2.29"), or the "preview" version
3173	// (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-v
3174	// ersions#other_versions). If unspecified, it defaults to the latest
3175	// Debian version.
3176	ImageVersion string `json:"imageVersion,omitempty"`
3177
3178	// OptionalComponents: Optional. The set of components to activate on
3179	// the cluster.
3180	//
3181	// Possible values:
3182	//   "COMPONENT_UNSPECIFIED" - Unspecified component.
3183	//   "ANACONDA" - The Anaconda python distribution.
3184	//   "HIVE_WEBHCAT" - The Hive Web HCatalog (the REST service for
3185	// accessing HCatalog).
3186	//   "JUPYTER" - The Jupyter Notebook.
3187	//   "PRESTO" - The Presto query engine.
3188	//   "ZEPPELIN" - The Zeppelin notebook.
3189	//   "ZOOKEEPER" - The Zookeeper service.
3190	OptionalComponents []string `json:"optionalComponents,omitempty"`
3191
3192	// Properties: Optional. The properties to set on daemon config
3193	// files.Property keys are specified in prefix:property format, for
3194	// example core:hadoop.tmp.dir. The following are supported prefixes and
3195	// their mappings:
3196	// capacity-scheduler: capacity-scheduler.xml
3197	// core: core-site.xml
3198	// distcp: distcp-default.xml
3199	// hdfs: hdfs-site.xml
3200	// hive: hive-site.xml
3201	// mapred: mapred-site.xml
3202	// pig: pig.properties
3203	// spark: spark-defaults.conf
3204	// yarn: yarn-site.xmlFor more information, see Cluster properties
3205	// (https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
3206	Properties map[string]string `json:"properties,omitempty"`
3207
3208	// ForceSendFields is a list of field names (e.g. "ImageVersion") to
3209	// unconditionally include in API requests. By default, fields with
3210	// empty values are omitted from API requests. However, any non-pointer,
3211	// non-interface field appearing in ForceSendFields will be sent to the
3212	// server regardless of whether the field is empty or not. This may be
3213	// used to include empty fields in Patch requests.
3214	ForceSendFields []string `json:"-"`
3215
3216	// NullFields is a list of field names (e.g. "ImageVersion") to include
3217	// in API requests with the JSON null value. By default, fields with
3218	// empty values are omitted from API requests. However, any field with
3219	// an empty value appearing in NullFields will be sent to the server as
3220	// null. It is an error if a field in this list has a non-empty value.
3221	// This may be used to include null fields in Patch requests.
3222	NullFields []string `json:"-"`
3223}
3224
3225func (s *SoftwareConfig) MarshalJSON() ([]byte, error) {
3226	type NoMethod SoftwareConfig
3227	raw := NoMethod(*s)
3228	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3229}
3230
3231// SparkJob: A Dataproc job for running Apache Spark
3232// (http://spark.apache.org/) applications on YARN.
3233type SparkJob struct {
3234	// ArchiveUris: Optional. HCFS URIs of archives to be extracted in the
3235	// working directory of Spark drivers and tasks. Supported file types:
3236	// .jar, .tar, .tar.gz, .tgz, and .zip.
3237	ArchiveUris []string `json:"archiveUris,omitempty"`
3238
3239	// Args: Optional. The arguments to pass to the driver. Do not include
3240	// arguments, such as --conf, that can be set as job properties, since a
3241	// collision may occur that causes an incorrect job submission.
3242	Args []string `json:"args,omitempty"`
3243
3244	// FileUris: Optional. HCFS URIs of files to be copied to the working
3245	// directory of Spark drivers and distributed tasks. Useful for naively
3246	// parallel tasks.
3247	FileUris []string `json:"fileUris,omitempty"`
3248
3249	// JarFileUris: Optional. HCFS URIs of jar files to add to the
3250	// CLASSPATHs of the Spark driver and tasks.
3251	JarFileUris []string `json:"jarFileUris,omitempty"`
3252
3253	// LoggingConfig: Optional. The runtime log config for job execution.
3254	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3255
3256	// MainClass: The name of the driver's main class. The jar file that
3257	// contains the class must be in the default CLASSPATH or specified in
3258	// jar_file_uris.
3259	MainClass string `json:"mainClass,omitempty"`
3260
3261	// MainJarFileUri: The HCFS URI of the jar file that contains the main
3262	// class.
3263	MainJarFileUri string `json:"mainJarFileUri,omitempty"`
3264
3265	// Properties: Optional. A mapping of property names to values, used to
3266	// configure Spark. Properties that conflict with values set by the
3267	// Dataproc API may be overwritten. Can include properties set in
3268	// /etc/spark/conf/spark-defaults.conf and classes in user code.
3269	Properties map[string]string `json:"properties,omitempty"`
3270
3271	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
3272	// unconditionally include in API requests. By default, fields with
3273	// empty values are omitted from API requests. However, any non-pointer,
3274	// non-interface field appearing in ForceSendFields will be sent to the
3275	// server regardless of whether the field is empty or not. This may be
3276	// used to include empty fields in Patch requests.
3277	ForceSendFields []string `json:"-"`
3278
3279	// NullFields is a list of field names (e.g. "ArchiveUris") to include
3280	// in API requests with the JSON null value. By default, fields with
3281	// empty values are omitted from API requests. However, any field with
3282	// an empty value appearing in NullFields will be sent to the server as
3283	// null. It is an error if a field in this list has a non-empty value.
3284	// This may be used to include null fields in Patch requests.
3285	NullFields []string `json:"-"`
3286}
3287
3288func (s *SparkJob) MarshalJSON() ([]byte, error) {
3289	type NoMethod SparkJob
3290	raw := NoMethod(*s)
3291	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3292}
3293
3294// SparkRJob: A Dataproc job for running Apache SparkR
3295// (https://spark.apache.org/docs/latest/sparkr.html) applications on
3296// YARN.
3297type SparkRJob struct {
3298	// ArchiveUris: Optional. HCFS URIs of archives to be extracted in the
3299	// working directory of Spark drivers and tasks. Supported file types:
3300	// .jar, .tar, .tar.gz, .tgz, and .zip.
3301	ArchiveUris []string `json:"archiveUris,omitempty"`
3302
3303	// Args: Optional. The arguments to pass to the driver. Do not include
3304	// arguments, such as --conf, that can be set as job properties, since a
3305	// collision may occur that causes an incorrect job submission.
3306	Args []string `json:"args,omitempty"`
3307
3308	// FileUris: Optional. HCFS URIs of files to be copied to the working
3309	// directory of R drivers and distributed tasks. Useful for naively
3310	// parallel tasks.
3311	FileUris []string `json:"fileUris,omitempty"`
3312
3313	// LoggingConfig: Optional. The runtime log config for job execution.
3314	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3315
3316	// MainRFileUri: Required. The HCFS URI of the main R file to use as the
3317	// driver. Must be a .R file.
3318	MainRFileUri string `json:"mainRFileUri,omitempty"`
3319
3320	// Properties: Optional. A mapping of property names to values, used to
3321	// configure SparkR. Properties that conflict with values set by the
3322	// Dataproc API may be overwritten. Can include properties set in
3323	// /etc/spark/conf/spark-defaults.conf and classes in user code.
3324	Properties map[string]string `json:"properties,omitempty"`
3325
3326	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
3327	// unconditionally include in API requests. By default, fields with
3328	// empty values are omitted from API requests. However, any non-pointer,
3329	// non-interface field appearing in ForceSendFields will be sent to the
3330	// server regardless of whether the field is empty or not. This may be
3331	// used to include empty fields in Patch requests.
3332	ForceSendFields []string `json:"-"`
3333
3334	// NullFields is a list of field names (e.g. "ArchiveUris") to include
3335	// in API requests with the JSON null value. By default, fields with
3336	// empty values are omitted from API requests. However, any field with
3337	// an empty value appearing in NullFields will be sent to the server as
3338	// null. It is an error if a field in this list has a non-empty value.
3339	// This may be used to include null fields in Patch requests.
3340	NullFields []string `json:"-"`
3341}
3342
3343func (s *SparkRJob) MarshalJSON() ([]byte, error) {
3344	type NoMethod SparkRJob
3345	raw := NoMethod(*s)
3346	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3347}
3348
3349// SparkSqlJob: A Dataproc job for running Apache Spark SQL
3350// (http://spark.apache.org/sql/) queries.
3351type SparkSqlJob struct {
3352	// JarFileUris: Optional. HCFS URIs of jar files to be added to the
3353	// Spark CLASSPATH.
3354	JarFileUris []string `json:"jarFileUris,omitempty"`
3355
3356	// LoggingConfig: Optional. The runtime log config for job execution.
3357	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3358
3359	// Properties: Optional. A mapping of property names to values, used to
3360	// configure Spark SQL's SparkConf. Properties that conflict with values
3361	// set by the Dataproc API may be overwritten.
3362	Properties map[string]string `json:"properties,omitempty"`
3363
3364	// QueryFileUri: The HCFS URI of the script that contains SQL queries.
3365	QueryFileUri string `json:"queryFileUri,omitempty"`
3366
3367	// QueryList: A list of queries.
3368	QueryList *QueryList `json:"queryList,omitempty"`
3369
3370	// ScriptVariables: Optional. Mapping of query variable names to values
3371	// (equivalent to the Spark SQL command: SET name="value";).
3372	ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
3373
3374	// ForceSendFields is a list of field names (e.g. "JarFileUris") to
3375	// unconditionally include in API requests. By default, fields with
3376	// empty values are omitted from API requests. However, any non-pointer,
3377	// non-interface field appearing in ForceSendFields will be sent to the
3378	// server regardless of whether the field is empty or not. This may be
3379	// used to include empty fields in Patch requests.
3380	ForceSendFields []string `json:"-"`
3381
3382	// NullFields is a list of field names (e.g. "JarFileUris") to include
3383	// in API requests with the JSON null value. By default, fields with
3384	// empty values are omitted from API requests. However, any field with
3385	// an empty value appearing in NullFields will be sent to the server as
3386	// null. It is an error if a field in this list has a non-empty value.
3387	// This may be used to include null fields in Patch requests.
3388	NullFields []string `json:"-"`
3389}
3390
3391func (s *SparkSqlJob) MarshalJSON() ([]byte, error) {
3392	type NoMethod SparkSqlJob
3393	raw := NoMethod(*s)
3394	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3395}
3396
3397// Status: The Status type defines a logical error model that is
3398// suitable for different programming environments, including REST APIs
3399// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
3400// Status message contains three pieces of data: error code, error
3401// message, and error details.You can find out more about this error
3402// model and how to work with it in the API Design Guide
3403// (https://cloud.google.com/apis/design/errors).
3404type Status struct {
3405	// Code: The status code, which should be an enum value of
3406	// google.rpc.Code.
3407	Code int64 `json:"code,omitempty"`
3408
3409	// Details: A list of messages that carry the error details. There is a
3410	// common set of message types for APIs to use.
3411	Details []googleapi.RawMessage `json:"details,omitempty"`
3412
3413	// Message: A developer-facing error message, which should be in
3414	// English. Any user-facing error message should be localized and sent
3415	// in the google.rpc.Status.details field, or localized by the client.
3416	Message string `json:"message,omitempty"`
3417
3418	// ForceSendFields is a list of field names (e.g. "Code") to
3419	// unconditionally include in API requests. By default, fields with
3420	// empty values are omitted from API requests. However, any non-pointer,
3421	// non-interface field appearing in ForceSendFields will be sent to the
3422	// server regardless of whether the field is empty or not. This may be
3423	// used to include empty fields in Patch requests.
3424	ForceSendFields []string `json:"-"`
3425
3426	// NullFields is a list of field names (e.g. "Code") to include in API
3427	// requests with the JSON null value. By default, fields with empty
3428	// values are omitted from API requests. However, any field with an
3429	// empty value appearing in NullFields will be sent to the server as
3430	// null. It is an error if a field in this list has a non-empty value.
3431	// This may be used to include null fields in Patch requests.
3432	NullFields []string `json:"-"`
3433}
3434
3435func (s *Status) MarshalJSON() ([]byte, error) {
3436	type NoMethod Status
3437	raw := NoMethod(*s)
3438	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3439}
3440
3441// SubmitJobRequest: A request to submit a job.
3442type SubmitJobRequest struct {
3443	// Job: Required. The job resource.
3444	Job *Job `json:"job,omitempty"`
3445
3446	// RequestId: Optional. A unique id used to identify the request. If the
3447	// server receives two SubmitJobRequest requests with the same id, then
3448	// the second request will be ignored and the first Job created and
3449	// stored in the backend is returned.It is recommended to always set
3450	// this value to a UUID
3451	// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
3452	// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
3453	// and hyphens (-). The maximum length is 40 characters.
3454	RequestId string `json:"requestId,omitempty"`
3455
3456	// ForceSendFields is a list of field names (e.g. "Job") to
3457	// unconditionally include in API requests. By default, fields with
3458	// empty values are omitted from API requests. However, any non-pointer,
3459	// non-interface field appearing in ForceSendFields will be sent to the
3460	// server regardless of whether the field is empty or not. This may be
3461	// used to include empty fields in Patch requests.
3462	ForceSendFields []string `json:"-"`
3463
3464	// NullFields is a list of field names (e.g. "Job") to include in API
3465	// requests with the JSON null value. By default, fields with empty
3466	// values are omitted from API requests. However, any field with an
3467	// empty value appearing in NullFields will be sent to the server as
3468	// null. It is an error if a field in this list has a non-empty value.
3469	// This may be used to include null fields in Patch requests.
3470	NullFields []string `json:"-"`
3471}
3472
3473func (s *SubmitJobRequest) MarshalJSON() ([]byte, error) {
3474	type NoMethod SubmitJobRequest
3475	raw := NoMethod(*s)
3476	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3477}
3478
3479// TemplateParameter: A configurable parameter that replaces one or more
3480// fields in the template. Parameterizable fields: - Labels - File uris
3481// - Job properties - Job arguments - Script variables - Main class (in
3482// HadoopJob and SparkJob) - Zone (in ClusterSelector)
3483type TemplateParameter struct {
3484	// Description: Optional. Brief description of the parameter. Must not
3485	// exceed 1024 characters.
3486	Description string `json:"description,omitempty"`
3487
3488	// Fields: Required. Paths to all fields that the parameter replaces. A
3489	// field is allowed to appear in at most one parameter's list of field
3490	// paths.A field path is similar in syntax to a
3491	// google.protobuf.FieldMask. For example, a field path that references
3492	// the zone field of a workflow template's cluster selector would be
3493	// specified as placement.clusterSelector.zone.Also, field paths can
3494	// reference fields using the following syntax:
3495	// Values in maps can be referenced by
3496	// key:
3497	// labels'key'
3498	// placement.clusterSelector.clusterLabels'key'
3499	// placemen
3500	// t.managedCluster.labels'key'
3501	// placement.clusterSelector.clusterLabels'k
3502	// ey'
3503	// jobs'step-id'.labels'key'
3504	// Jobs in the jobs list can be referenced by
3505	// step-id:
3506	// jobs'step-id'.hadoopJob.mainJarFileUri
3507	// jobs'step-id'.hiveJob.
3508	// queryFileUri
3509	// jobs'step-id'.pySparkJob.mainPythonFileUri
3510	// jobs'step-id'.
3511	// hadoopJob.jarFileUris0
3512	// jobs'step-id'.hadoopJob.archiveUris0
3513	// jobs'step-
3514	// id'.hadoopJob.fileUris0
3515	// jobs'step-id'.pySparkJob.pythonFileUris0
3516	// Items
3517	//  in repeated fields can be referenced by a zero-based
3518	// index:
3519	// jobs'step-id'.sparkJob.args0
3520	// Other
3521	// examples:
3522	// jobs'step-id'.hadoopJob.properties'key'
3523	// jobs'step-id'.hadoop
3524	// Job.args0
3525	// jobs'step-id'.hiveJob.scriptVariables'key'
3526	// jobs'step-id'.had
3527	// oopJob.mainJarFileUri
3528	// placement.clusterSelector.zoneIt may not be possible to parameterize
3529	// maps and repeated fields in their entirety since only individual map
3530	// values and individual items in repeated fields can be referenced. For
3531	// example, the following field paths are
3532	// invalid:
3533	// placement.clusterSelector.clusterLabels
3534	// jobs'step-id'.sparkJo
3535	// b.args
3536	Fields []string `json:"fields,omitempty"`
3537
3538	// Name: Required. Parameter name. The parameter name is used as the
3539	// key, and paired with the parameter value, which are passed to the
3540	// template when the template is instantiated. The name must contain
3541	// only capital letters (A-Z), numbers (0-9), and underscores (_), and
3542	// must not start with a number. The maximum length is 40 characters.
3543	Name string `json:"name,omitempty"`
3544
3545	// Validation: Optional. Validation rules to be applied to this
3546	// parameter's value.
3547	Validation *ParameterValidation `json:"validation,omitempty"`
3548
3549	// ForceSendFields is a list of field names (e.g. "Description") to
3550	// unconditionally include in API requests. By default, fields with
3551	// empty values are omitted from API requests. However, any non-pointer,
3552	// non-interface field appearing in ForceSendFields will be sent to the
3553	// server regardless of whether the field is empty or not. This may be
3554	// used to include empty fields in Patch requests.
3555	ForceSendFields []string `json:"-"`
3556
3557	// NullFields is a list of field names (e.g. "Description") to include
3558	// in API requests with the JSON null value. By default, fields with
3559	// empty values are omitted from API requests. However, any field with
3560	// an empty value appearing in NullFields will be sent to the server as
3561	// null. It is an error if a field in this list has a non-empty value.
3562	// This may be used to include null fields in Patch requests.
3563	NullFields []string `json:"-"`
3564}
3565
3566func (s *TemplateParameter) MarshalJSON() ([]byte, error) {
3567	type NoMethod TemplateParameter
3568	raw := NoMethod(*s)
3569	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3570}
3571
3572// TestIamPermissionsRequest: Request message for TestIamPermissions
3573// method.
3574type TestIamPermissionsRequest struct {
3575	// Permissions: The set of permissions to check for the resource.
3576	// Permissions with wildcards (such as '*' or 'storage.*') are not
3577	// allowed. For more information see IAM Overview
3578	// (https://cloud.google.com/iam/docs/overview#permissions).
3579	Permissions []string `json:"permissions,omitempty"`
3580
3581	// ForceSendFields is a list of field names (e.g. "Permissions") to
3582	// unconditionally include in API requests. By default, fields with
3583	// empty values are omitted from API requests. However, any non-pointer,
3584	// non-interface field appearing in ForceSendFields will be sent to the
3585	// server regardless of whether the field is empty or not. This may be
3586	// used to include empty fields in Patch requests.
3587	ForceSendFields []string `json:"-"`
3588
3589	// NullFields is a list of field names (e.g. "Permissions") to include
3590	// in API requests with the JSON null value. By default, fields with
3591	// empty values are omitted from API requests. However, any field with
3592	// an empty value appearing in NullFields will be sent to the server as
3593	// null. It is an error if a field in this list has a non-empty value.
3594	// This may be used to include null fields in Patch requests.
3595	NullFields []string `json:"-"`
3596}
3597
3598func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
3599	type NoMethod TestIamPermissionsRequest
3600	raw := NoMethod(*s)
3601	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3602}
3603
3604// TestIamPermissionsResponse: Response message for TestIamPermissions
3605// method.
3606type TestIamPermissionsResponse struct {
3607	// Permissions: A subset of TestPermissionsRequest.permissions that the
3608	// caller is allowed.
3609	Permissions []string `json:"permissions,omitempty"`
3610
3611	// ServerResponse contains the HTTP response code and headers from the
3612	// server.
3613	googleapi.ServerResponse `json:"-"`
3614
3615	// ForceSendFields is a list of field names (e.g. "Permissions") to
3616	// unconditionally include in API requests. By default, fields with
3617	// empty values are omitted from API requests. However, any non-pointer,
3618	// non-interface field appearing in ForceSendFields will be sent to the
3619	// server regardless of whether the field is empty or not. This may be
3620	// used to include empty fields in Patch requests.
3621	ForceSendFields []string `json:"-"`
3622
3623	// NullFields is a list of field names (e.g. "Permissions") to include
3624	// in API requests with the JSON null value. By default, fields with
3625	// empty values are omitted from API requests. However, any field with
3626	// an empty value appearing in NullFields will be sent to the server as
3627	// null. It is an error if a field in this list has a non-empty value.
3628	// This may be used to include null fields in Patch requests.
3629	NullFields []string `json:"-"`
3630}
3631
3632func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
3633	type NoMethod TestIamPermissionsResponse
3634	raw := NoMethod(*s)
3635	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3636}
3637
3638// ValueValidation: Validation based on a list of allowed values.
3639type ValueValidation struct {
3640	// Values: Required. List of allowed values for the parameter.
3641	Values []string `json:"values,omitempty"`
3642
3643	// ForceSendFields is a list of field names (e.g. "Values") to
3644	// unconditionally include in API requests. By default, fields with
3645	// empty values are omitted from API requests. However, any non-pointer,
3646	// non-interface field appearing in ForceSendFields will be sent to the
3647	// server regardless of whether the field is empty or not. This may be
3648	// used to include empty fields in Patch requests.
3649	ForceSendFields []string `json:"-"`
3650
3651	// NullFields is a list of field names (e.g. "Values") to include in API
3652	// requests with the JSON null value. By default, fields with empty
3653	// values are omitted from API requests. However, any field with an
3654	// empty value appearing in NullFields will be sent to the server as
3655	// null. It is an error if a field in this list has a non-empty value.
3656	// This may be used to include null fields in Patch requests.
3657	NullFields []string `json:"-"`
3658}
3659
3660func (s *ValueValidation) MarshalJSON() ([]byte, error) {
3661	type NoMethod ValueValidation
3662	raw := NoMethod(*s)
3663	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3664}
3665
3666// WorkflowGraph: The workflow graph.
3667type WorkflowGraph struct {
3668	// Nodes: Output only. The workflow nodes.
3669	Nodes []*WorkflowNode `json:"nodes,omitempty"`
3670
3671	// ForceSendFields is a list of field names (e.g. "Nodes") to
3672	// unconditionally include in API requests. By default, fields with
3673	// empty values are omitted from API requests. However, any non-pointer,
3674	// non-interface field appearing in ForceSendFields will be sent to the
3675	// server regardless of whether the field is empty or not. This may be
3676	// used to include empty fields in Patch requests.
3677	ForceSendFields []string `json:"-"`
3678
3679	// NullFields is a list of field names (e.g. "Nodes") to include in API
3680	// requests with the JSON null value. By default, fields with empty
3681	// values are omitted from API requests. However, any field with an
3682	// empty value appearing in NullFields will be sent to the server as
3683	// null. It is an error if a field in this list has a non-empty value.
3684	// This may be used to include null fields in Patch requests.
3685	NullFields []string `json:"-"`
3686}
3687
3688func (s *WorkflowGraph) MarshalJSON() ([]byte, error) {
3689	type NoMethod WorkflowGraph
3690	raw := NoMethod(*s)
3691	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3692}
3693
3694// WorkflowMetadata: A Dataproc workflow template resource.
3695type WorkflowMetadata struct {
3696	// ClusterName: Output only. The name of the target cluster.
3697	ClusterName string `json:"clusterName,omitempty"`
3698
3699	// ClusterUuid: Output only. The UUID of target cluster.
3700	ClusterUuid string `json:"clusterUuid,omitempty"`
3701
3702	// CreateCluster: Output only. The create cluster operation metadata.
3703	CreateCluster *ClusterOperation `json:"createCluster,omitempty"`
3704
3705	// DeleteCluster: Output only. The delete cluster operation metadata.
3706	DeleteCluster *ClusterOperation `json:"deleteCluster,omitempty"`
3707
3708	// EndTime: Output only. Workflow end time.
3709	EndTime string `json:"endTime,omitempty"`
3710
3711	// Graph: Output only. The workflow graph.
3712	Graph *WorkflowGraph `json:"graph,omitempty"`
3713
3714	// Parameters: Map from parameter names to values that were used for
3715	// those parameters.
3716	Parameters map[string]string `json:"parameters,omitempty"`
3717
3718	// StartTime: Output only. Workflow start time.
3719	StartTime string `json:"startTime,omitempty"`
3720
3721	// State: Output only. The workflow state.
3722	//
3723	// Possible values:
3724	//   "UNKNOWN" - Unused.
3725	//   "PENDING" - The operation has been created.
3726	//   "RUNNING" - The operation is running.
3727	//   "DONE" - The operation is done; either cancelled or completed.
3728	State string `json:"state,omitempty"`
3729
3730	// Template: Output only. The resource name of the workflow template as
3731	// described in https://cloud.google.com/apis/design/resource_names.
3732	// For projects.regions.workflowTemplates, the resource name of the
3733	// template has the following format:
3734	// projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
3735	//
3736	// For projects.locations.workflowTemplates, the resource name of the
3737	// template has the following format:
3738	// projects/{project_id}/locations/{location}/workflowTemplates/{template
3739	// _id}
3740	Template string `json:"template,omitempty"`
3741
3742	// Version: Output only. The version of template at the time of workflow
3743	// instantiation.
3744	Version int64 `json:"version,omitempty"`
3745
3746	// ForceSendFields is a list of field names (e.g. "ClusterName") to
3747	// unconditionally include in API requests. By default, fields with
3748	// empty values are omitted from API requests. However, any non-pointer,
3749	// non-interface field appearing in ForceSendFields will be sent to the
3750	// server regardless of whether the field is empty or not. This may be
3751	// used to include empty fields in Patch requests.
3752	ForceSendFields []string `json:"-"`
3753
3754	// NullFields is a list of field names (e.g. "ClusterName") to include
3755	// in API requests with the JSON null value. By default, fields with
3756	// empty values are omitted from API requests. However, any field with
3757	// an empty value appearing in NullFields will be sent to the server as
3758	// null. It is an error if a field in this list has a non-empty value.
3759	// This may be used to include null fields in Patch requests.
3760	NullFields []string `json:"-"`
3761}
3762
3763func (s *WorkflowMetadata) MarshalJSON() ([]byte, error) {
3764	type NoMethod WorkflowMetadata
3765	raw := NoMethod(*s)
3766	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3767}
3768
3769// WorkflowNode: The workflow node.
3770type WorkflowNode struct {
3771	// Error: Output only. The error detail.
3772	Error string `json:"error,omitempty"`
3773
3774	// JobId: Output only. The job id; populated after the node enters
3775	// RUNNING state.
3776	JobId string `json:"jobId,omitempty"`
3777
3778	// PrerequisiteStepIds: Output only. Node's prerequisite nodes.
3779	PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"`
3780
3781	// State: Output only. The node state.
3782	//
3783	// Possible values:
3784	//   "NODE_STATE_UNSPECIFIED" - State is unspecified.
3785	//   "BLOCKED" - The node is awaiting prerequisite node to finish.
3786	//   "RUNNABLE" - The node is runnable but not running.
3787	//   "RUNNING" - The node is running.
3788	//   "COMPLETED" - The node completed successfully.
3789	//   "FAILED" - The node failed. A node can be marked FAILED because its
3790	// ancestor or peer failed.
3791	State string `json:"state,omitempty"`
3792
3793	// StepId: Output only. The name of the node.
3794	StepId string `json:"stepId,omitempty"`
3795
3796	// ForceSendFields is a list of field names (e.g. "Error") to
3797	// unconditionally include in API requests. By default, fields with
3798	// empty values are omitted from API requests. However, any non-pointer,
3799	// non-interface field appearing in ForceSendFields will be sent to the
3800	// server regardless of whether the field is empty or not. This may be
3801	// used to include empty fields in Patch requests.
3802	ForceSendFields []string `json:"-"`
3803
3804	// NullFields is a list of field names (e.g. "Error") to include in API
3805	// requests with the JSON null value. By default, fields with empty
3806	// values are omitted from API requests. However, any field with an
3807	// empty value appearing in NullFields will be sent to the server as
3808	// null. It is an error if a field in this list has a non-empty value.
3809	// This may be used to include null fields in Patch requests.
3810	NullFields []string `json:"-"`
3811}
3812
3813func (s *WorkflowNode) MarshalJSON() ([]byte, error) {
3814	type NoMethod WorkflowNode
3815	raw := NoMethod(*s)
3816	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3817}
3818
3819// WorkflowTemplate: A Dataproc workflow template resource.
3820type WorkflowTemplate struct {
3821	// CreateTime: Output only. The time template was created.
3822	CreateTime string `json:"createTime,omitempty"`
3823
3824	Id string `json:"id,omitempty"`
3825
3826	// Jobs: Required. The Directed Acyclic Graph of Jobs to submit.
3827	Jobs []*OrderedJob `json:"jobs,omitempty"`
3828
3829	// Labels: Optional. The labels to associate with this template. These
3830	// labels will be propagated to all jobs and clusters created by the
3831	// workflow instance.Label keys must contain 1 to 63 characters, and
3832	// must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label
3833	// values may be empty, but, if present, must contain 1 to 63
3834	// characters, and must conform to RFC 1035
3835	// (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be
3836	// associated with a template.
3837	Labels map[string]string `json:"labels,omitempty"`
3838
3839	// Name: Output only. The resource name of the workflow template, as
3840	// described in https://cloud.google.com/apis/design/resource_names.
3841	// For projects.regions.workflowTemplates, the resource name of the
3842	// template has the following format:
3843	// projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
3844	//
3845	// For projects.locations.workflowTemplates, the resource name of the
3846	// template has the following format:
3847	// projects/{project_id}/locations/{location}/workflowTemplates/{template
3848	// _id}
3849	Name string `json:"name,omitempty"`
3850
3851	// Parameters: Optional. emplate parameters whose values are substituted
3852	// into the template. Values for parameters must be provided when the
3853	// template is instantiated.
3854	Parameters []*TemplateParameter `json:"parameters,omitempty"`
3855
3856	// Placement: Required. WorkflowTemplate scheduling information.
3857	Placement *WorkflowTemplatePlacement `json:"placement,omitempty"`
3858
3859	// UpdateTime: Output only. The time template was last updated.
3860	UpdateTime string `json:"updateTime,omitempty"`
3861
3862	// Version: Optional. Used to perform a consistent
3863	// read-modify-write.This field should be left blank for a
3864	// CreateWorkflowTemplate request. It is required for an
3865	// UpdateWorkflowTemplate request, and must match the current server
3866	// version. A typical update template flow would fetch the current
3867	// template with a GetWorkflowTemplate request, which will return the
3868	// current template with the version field filled in with the current
3869	// server version. The user updates other fields in the template, then
3870	// returns it as part of the UpdateWorkflowTemplate request.
3871	Version int64 `json:"version,omitempty"`
3872
3873	// ServerResponse contains the HTTP response code and headers from the
3874	// server.
3875	googleapi.ServerResponse `json:"-"`
3876
3877	// ForceSendFields is a list of field names (e.g. "CreateTime") to
3878	// unconditionally include in API requests. By default, fields with
3879	// empty values are omitted from API requests. However, any non-pointer,
3880	// non-interface field appearing in ForceSendFields will be sent to the
3881	// server regardless of whether the field is empty or not. This may be
3882	// used to include empty fields in Patch requests.
3883	ForceSendFields []string `json:"-"`
3884
3885	// NullFields is a list of field names (e.g. "CreateTime") to include in
3886	// API requests with the JSON null value. By default, fields with empty
3887	// values are omitted from API requests. However, any field with an
3888	// empty value appearing in NullFields will be sent to the server as
3889	// null. It is an error if a field in this list has a non-empty value.
3890	// This may be used to include null fields in Patch requests.
3891	NullFields []string `json:"-"`
3892}
3893
3894func (s *WorkflowTemplate) MarshalJSON() ([]byte, error) {
3895	type NoMethod WorkflowTemplate
3896	raw := NoMethod(*s)
3897	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3898}
3899
3900// WorkflowTemplatePlacement: Specifies workflow execution target.Either
3901// managed_cluster or cluster_selector is required.
3902type WorkflowTemplatePlacement struct {
3903	// ClusterSelector: Optional. A selector that chooses target cluster for
3904	// jobs based on metadata.The selector is evaluated at the time each job
3905	// is submitted.
3906	ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"`
3907
3908	// ManagedCluster: A cluster that is managed by the workflow.
3909	ManagedCluster *ManagedCluster `json:"managedCluster,omitempty"`
3910
3911	// ForceSendFields is a list of field names (e.g. "ClusterSelector") to
3912	// unconditionally include in API requests. By default, fields with
3913	// empty values are omitted from API requests. However, any non-pointer,
3914	// non-interface field appearing in ForceSendFields will be sent to the
3915	// server regardless of whether the field is empty or not. This may be
3916	// used to include empty fields in Patch requests.
3917	ForceSendFields []string `json:"-"`
3918
3919	// NullFields is a list of field names (e.g. "ClusterSelector") to
3920	// include in API requests with the JSON null value. By default, fields
3921	// with empty values are omitted from API requests. However, any field
3922	// with an empty value appearing in NullFields will be sent to the
3923	// server as null. It is an error if a field in this list has a
3924	// non-empty value. This may be used to include null fields in Patch
3925	// requests.
3926	NullFields []string `json:"-"`
3927}
3928
3929func (s *WorkflowTemplatePlacement) MarshalJSON() ([]byte, error) {
3930	type NoMethod WorkflowTemplatePlacement
3931	raw := NoMethod(*s)
3932	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3933}
3934
3935// YarnApplication: A YARN application created by a job. Application
3936// information is a subset of
3937// <code>org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto</
3938// code>.Beta Feature: This report is available for testing purposes
3939// only. It may be changed before final release.
3940type YarnApplication struct {
3941	// Name: Required. The application name.
3942	Name string `json:"name,omitempty"`
3943
3944	// Progress: Required. The numerical progress of the application, from 1
3945	// to 100.
3946	Progress float64 `json:"progress,omitempty"`
3947
3948	// State: Required. The application state.
3949	//
3950	// Possible values:
3951	//   "STATE_UNSPECIFIED" - Status is unspecified.
3952	//   "NEW" - Status is NEW.
3953	//   "NEW_SAVING" - Status is NEW_SAVING.
3954	//   "SUBMITTED" - Status is SUBMITTED.
3955	//   "ACCEPTED" - Status is ACCEPTED.
3956	//   "RUNNING" - Status is RUNNING.
3957	//   "FINISHED" - Status is FINISHED.
3958	//   "FAILED" - Status is FAILED.
3959	//   "KILLED" - Status is KILLED.
3960	State string `json:"state,omitempty"`
3961
3962	// TrackingUrl: Optional. The HTTP URL of the ApplicationMaster,
3963	// HistoryServer, or TimelineServer that provides application-specific
3964	// information. The URL uses the internal hostname, and requires a proxy
3965	// server for resolution and, possibly, access.
3966	TrackingUrl string `json:"trackingUrl,omitempty"`
3967
3968	// ForceSendFields is a list of field names (e.g. "Name") to
3969	// unconditionally include in API requests. By default, fields with
3970	// empty values are omitted from API requests. However, any non-pointer,
3971	// non-interface field appearing in ForceSendFields will be sent to the
3972	// server regardless of whether the field is empty or not. This may be
3973	// used to include empty fields in Patch requests.
3974	ForceSendFields []string `json:"-"`
3975
3976	// NullFields is a list of field names (e.g. "Name") to include in API
3977	// requests with the JSON null value. By default, fields with empty
3978	// values are omitted from API requests. However, any field with an
3979	// empty value appearing in NullFields will be sent to the server as
3980	// null. It is an error if a field in this list has a non-empty value.
3981	// This may be used to include null fields in Patch requests.
3982	NullFields []string `json:"-"`
3983}
3984
3985func (s *YarnApplication) MarshalJSON() ([]byte, error) {
3986	type NoMethod YarnApplication
3987	raw := NoMethod(*s)
3988	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3989}
3990
3991func (s *YarnApplication) UnmarshalJSON(data []byte) error {
3992	type NoMethod YarnApplication
3993	var s1 struct {
3994		Progress gensupport.JSONFloat64 `json:"progress"`
3995		*NoMethod
3996	}
3997	s1.NoMethod = (*NoMethod)(s)
3998	if err := json.Unmarshal(data, &s1); err != nil {
3999		return err
4000	}
4001	s.Progress = float64(s1.Progress)
4002	return nil
4003}
4004
4005// method id "dataproc.projects.locations.autoscalingPolicies.create":
4006
4007type ProjectsLocationsAutoscalingPoliciesCreateCall struct {
4008	s                 *Service
4009	parent            string
4010	autoscalingpolicy *AutoscalingPolicy
4011	urlParams_        gensupport.URLParams
4012	ctx_              context.Context
4013	header_           http.Header
4014}
4015
4016// Create: Creates new autoscaling policy.
4017func (r *ProjectsLocationsAutoscalingPoliciesService) Create(parent string, autoscalingpolicy *AutoscalingPolicy) *ProjectsLocationsAutoscalingPoliciesCreateCall {
4018	c := &ProjectsLocationsAutoscalingPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4019	c.parent = parent
4020	c.autoscalingpolicy = autoscalingpolicy
4021	return c
4022}
4023
4024// Fields allows partial responses to be retrieved. See
4025// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4026// for more information.
4027func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesCreateCall {
4028	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4029	return c
4030}
4031
4032// Context sets the context to be used in this call's Do method. Any
4033// pending HTTP request will be aborted if the provided context is
4034// canceled.
4035func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesCreateCall {
4036	c.ctx_ = ctx
4037	return c
4038}
4039
4040// Header returns an http.Header that can be modified by the caller to
4041// add HTTP headers to the request.
4042func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Header() http.Header {
4043	if c.header_ == nil {
4044		c.header_ = make(http.Header)
4045	}
4046	return c.header_
4047}
4048
4049func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
4050	reqHeaders := make(http.Header)
4051	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4052	for k, v := range c.header_ {
4053		reqHeaders[k] = v
4054	}
4055	reqHeaders.Set("User-Agent", c.s.userAgent())
4056	var body io.Reader = nil
4057	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
4058	if err != nil {
4059		return nil, err
4060	}
4061	reqHeaders.Set("Content-Type", "application/json")
4062	c.urlParams_.Set("alt", alt)
4063	c.urlParams_.Set("prettyPrint", "false")
4064	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/autoscalingPolicies")
4065	urls += "?" + c.urlParams_.Encode()
4066	req, err := http.NewRequest("POST", urls, body)
4067	if err != nil {
4068		return nil, err
4069	}
4070	req.Header = reqHeaders
4071	googleapi.Expand(req.URL, map[string]string{
4072		"parent": c.parent,
4073	})
4074	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4075}
4076
4077// Do executes the "dataproc.projects.locations.autoscalingPolicies.create" call.
4078// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
4079// non-2xx status code is an error. Response headers are in either
4080// *AutoscalingPolicy.ServerResponse.Header or (if a response was
4081// returned at all) in error.(*googleapi.Error).Header. Use
4082// googleapi.IsNotModified to check whether the returned error was
4083// because http.StatusNotModified was returned.
4084func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
4085	gensupport.SetOptions(c.urlParams_, opts...)
4086	res, err := c.doRequest("json")
4087	if res != nil && res.StatusCode == http.StatusNotModified {
4088		if res.Body != nil {
4089			res.Body.Close()
4090		}
4091		return nil, &googleapi.Error{
4092			Code:   res.StatusCode,
4093			Header: res.Header,
4094		}
4095	}
4096	if err != nil {
4097		return nil, err
4098	}
4099	defer googleapi.CloseBody(res)
4100	if err := googleapi.CheckResponse(res); err != nil {
4101		return nil, err
4102	}
4103	ret := &AutoscalingPolicy{
4104		ServerResponse: googleapi.ServerResponse{
4105			Header:         res.Header,
4106			HTTPStatusCode: res.StatusCode,
4107		},
4108	}
4109	target := &ret
4110	if err := gensupport.DecodeResponse(target, res); err != nil {
4111		return nil, err
4112	}
4113	return ret, nil
4114	// {
4115	//   "description": "Creates new autoscaling policy.",
4116	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies",
4117	//   "httpMethod": "POST",
4118	//   "id": "dataproc.projects.locations.autoscalingPolicies.create",
4119	//   "parameterOrder": [
4120	//     "parent"
4121	//   ],
4122	//   "parameters": {
4123	//     "parent": {
4124	//       "description": "Required. The \"resource name\" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.autoscalingPolicies.create, the resource name  of the region has the following format:  projects/{project_id}/regions/{region}\nFor projects.locations.autoscalingPolicies.create, the resource name  of the location has the following format:  projects/{project_id}/locations/{location}",
4125	//       "location": "path",
4126	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4127	//       "required": true,
4128	//       "type": "string"
4129	//     }
4130	//   },
4131	//   "path": "v1/{+parent}/autoscalingPolicies",
4132	//   "request": {
4133	//     "$ref": "AutoscalingPolicy"
4134	//   },
4135	//   "response": {
4136	//     "$ref": "AutoscalingPolicy"
4137	//   },
4138	//   "scopes": [
4139	//     "https://www.googleapis.com/auth/cloud-platform"
4140	//   ]
4141	// }
4142
4143}
4144
4145// method id "dataproc.projects.locations.autoscalingPolicies.delete":
4146
4147type ProjectsLocationsAutoscalingPoliciesDeleteCall struct {
4148	s          *Service
4149	name       string
4150	urlParams_ gensupport.URLParams
4151	ctx_       context.Context
4152	header_    http.Header
4153}
4154
4155// Delete: Deletes an autoscaling policy. It is an error to delete an
4156// autoscaling policy that is in use by one or more clusters.
4157func (r *ProjectsLocationsAutoscalingPoliciesService) Delete(name string) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
4158	c := &ProjectsLocationsAutoscalingPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4159	c.name = name
4160	return c
4161}
4162
4163// Fields allows partial responses to be retrieved. See
4164// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4165// for more information.
4166func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
4167	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4168	return c
4169}
4170
4171// Context sets the context to be used in this call's Do method. Any
4172// pending HTTP request will be aborted if the provided context is
4173// canceled.
4174func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
4175	c.ctx_ = ctx
4176	return c
4177}
4178
4179// Header returns an http.Header that can be modified by the caller to
4180// add HTTP headers to the request.
4181func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Header() http.Header {
4182	if c.header_ == nil {
4183		c.header_ = make(http.Header)
4184	}
4185	return c.header_
4186}
4187
4188func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
4189	reqHeaders := make(http.Header)
4190	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4191	for k, v := range c.header_ {
4192		reqHeaders[k] = v
4193	}
4194	reqHeaders.Set("User-Agent", c.s.userAgent())
4195	var body io.Reader = nil
4196	c.urlParams_.Set("alt", alt)
4197	c.urlParams_.Set("prettyPrint", "false")
4198	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4199	urls += "?" + c.urlParams_.Encode()
4200	req, err := http.NewRequest("DELETE", urls, body)
4201	if err != nil {
4202		return nil, err
4203	}
4204	req.Header = reqHeaders
4205	googleapi.Expand(req.URL, map[string]string{
4206		"name": c.name,
4207	})
4208	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4209}
4210
4211// Do executes the "dataproc.projects.locations.autoscalingPolicies.delete" call.
4212// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4213// code is an error. Response headers are in either
4214// *Empty.ServerResponse.Header or (if a response was returned at all)
4215// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4216// check whether the returned error was because http.StatusNotModified
4217// was returned.
4218func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4219	gensupport.SetOptions(c.urlParams_, opts...)
4220	res, err := c.doRequest("json")
4221	if res != nil && res.StatusCode == http.StatusNotModified {
4222		if res.Body != nil {
4223			res.Body.Close()
4224		}
4225		return nil, &googleapi.Error{
4226			Code:   res.StatusCode,
4227			Header: res.Header,
4228		}
4229	}
4230	if err != nil {
4231		return nil, err
4232	}
4233	defer googleapi.CloseBody(res)
4234	if err := googleapi.CheckResponse(res); err != nil {
4235		return nil, err
4236	}
4237	ret := &Empty{
4238		ServerResponse: googleapi.ServerResponse{
4239			Header:         res.Header,
4240			HTTPStatusCode: res.StatusCode,
4241		},
4242	}
4243	target := &ret
4244	if err := gensupport.DecodeResponse(target, res); err != nil {
4245		return nil, err
4246	}
4247	return ret, nil
4248	// {
4249	//   "description": "Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.",
4250	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}",
4251	//   "httpMethod": "DELETE",
4252	//   "id": "dataproc.projects.locations.autoscalingPolicies.delete",
4253	//   "parameterOrder": [
4254	//     "name"
4255	//   ],
4256	//   "parameters": {
4257	//     "name": {
4258	//       "description": "Required. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.autoscalingPolicies.delete, the resource name  of the policy has the following format:  projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}\nFor projects.locations.autoscalingPolicies.delete, the resource name  of the policy has the following format:  projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
4259	//       "location": "path",
4260	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
4261	//       "required": true,
4262	//       "type": "string"
4263	//     }
4264	//   },
4265	//   "path": "v1/{+name}",
4266	//   "response": {
4267	//     "$ref": "Empty"
4268	//   },
4269	//   "scopes": [
4270	//     "https://www.googleapis.com/auth/cloud-platform"
4271	//   ]
4272	// }
4273
4274}
4275
4276// method id "dataproc.projects.locations.autoscalingPolicies.get":
4277
4278type ProjectsLocationsAutoscalingPoliciesGetCall struct {
4279	s            *Service
4280	name         string
4281	urlParams_   gensupport.URLParams
4282	ifNoneMatch_ string
4283	ctx_         context.Context
4284	header_      http.Header
4285}
4286
4287// Get: Retrieves autoscaling policy.
4288func (r *ProjectsLocationsAutoscalingPoliciesService) Get(name string) *ProjectsLocationsAutoscalingPoliciesGetCall {
4289	c := &ProjectsLocationsAutoscalingPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4290	c.name = name
4291	return c
4292}
4293
4294// Fields allows partial responses to be retrieved. See
4295// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4296// for more information.
4297func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesGetCall {
4298	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4299	return c
4300}
4301
4302// IfNoneMatch sets the optional parameter which makes the operation
4303// fail if the object's ETag matches the given value. This is useful for
4304// getting updates only after the object has changed since the last
4305// request. Use googleapi.IsNotModified to check whether the response
4306// error from Do is the result of In-None-Match.
4307func (c *ProjectsLocationsAutoscalingPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutoscalingPoliciesGetCall {
4308	c.ifNoneMatch_ = entityTag
4309	return c
4310}
4311
4312// Context sets the context to be used in this call's Do method. Any
4313// pending HTTP request will be aborted if the provided context is
4314// canceled.
4315func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesGetCall {
4316	c.ctx_ = ctx
4317	return c
4318}
4319
4320// Header returns an http.Header that can be modified by the caller to
4321// add HTTP headers to the request.
4322func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Header() http.Header {
4323	if c.header_ == nil {
4324		c.header_ = make(http.Header)
4325	}
4326	return c.header_
4327}
4328
4329func (c *ProjectsLocationsAutoscalingPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
4330	reqHeaders := make(http.Header)
4331	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4332	for k, v := range c.header_ {
4333		reqHeaders[k] = v
4334	}
4335	reqHeaders.Set("User-Agent", c.s.userAgent())
4336	if c.ifNoneMatch_ != "" {
4337		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4338	}
4339	var body io.Reader = nil
4340	c.urlParams_.Set("alt", alt)
4341	c.urlParams_.Set("prettyPrint", "false")
4342	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
4343	urls += "?" + c.urlParams_.Encode()
4344	req, err := http.NewRequest("GET", urls, body)
4345	if err != nil {
4346		return nil, err
4347	}
4348	req.Header = reqHeaders
4349	googleapi.Expand(req.URL, map[string]string{
4350		"name": c.name,
4351	})
4352	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4353}
4354
4355// Do executes the "dataproc.projects.locations.autoscalingPolicies.get" call.
4356// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
4357// non-2xx status code is an error. Response headers are in either
4358// *AutoscalingPolicy.ServerResponse.Header or (if a response was
4359// returned at all) in error.(*googleapi.Error).Header. Use
4360// googleapi.IsNotModified to check whether the returned error was
4361// because http.StatusNotModified was returned.
4362func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
4363	gensupport.SetOptions(c.urlParams_, opts...)
4364	res, err := c.doRequest("json")
4365	if res != nil && res.StatusCode == http.StatusNotModified {
4366		if res.Body != nil {
4367			res.Body.Close()
4368		}
4369		return nil, &googleapi.Error{
4370			Code:   res.StatusCode,
4371			Header: res.Header,
4372		}
4373	}
4374	if err != nil {
4375		return nil, err
4376	}
4377	defer googleapi.CloseBody(res)
4378	if err := googleapi.CheckResponse(res); err != nil {
4379		return nil, err
4380	}
4381	ret := &AutoscalingPolicy{
4382		ServerResponse: googleapi.ServerResponse{
4383			Header:         res.Header,
4384			HTTPStatusCode: res.StatusCode,
4385		},
4386	}
4387	target := &ret
4388	if err := gensupport.DecodeResponse(target, res); err != nil {
4389		return nil, err
4390	}
4391	return ret, nil
4392	// {
4393	//   "description": "Retrieves autoscaling policy.",
4394	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}",
4395	//   "httpMethod": "GET",
4396	//   "id": "dataproc.projects.locations.autoscalingPolicies.get",
4397	//   "parameterOrder": [
4398	//     "name"
4399	//   ],
4400	//   "parameters": {
4401	//     "name": {
4402	//       "description": "Required. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.autoscalingPolicies.get, the resource name  of the policy has the following format:  projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}\nFor projects.locations.autoscalingPolicies.get, the resource name  of the policy has the following format:  projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
4403	//       "location": "path",
4404	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
4405	//       "required": true,
4406	//       "type": "string"
4407	//     }
4408	//   },
4409	//   "path": "v1/{+name}",
4410	//   "response": {
4411	//     "$ref": "AutoscalingPolicy"
4412	//   },
4413	//   "scopes": [
4414	//     "https://www.googleapis.com/auth/cloud-platform"
4415	//   ]
4416	// }
4417
4418}
4419
4420// method id "dataproc.projects.locations.autoscalingPolicies.getIamPolicy":
4421
4422type ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall struct {
4423	s                   *Service
4424	resource            string
4425	getiampolicyrequest *GetIamPolicyRequest
4426	urlParams_          gensupport.URLParams
4427	ctx_                context.Context
4428	header_             http.Header
4429}
4430
4431// GetIamPolicy: Gets the access control policy for a resource. Returns
4432// an empty policy if the resource exists and does not have a policy
4433// set.
4434func (r *ProjectsLocationsAutoscalingPoliciesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4435	c := &ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4436	c.resource = resource
4437	c.getiampolicyrequest = getiampolicyrequest
4438	return c
4439}
4440
4441// Fields allows partial responses to be retrieved. See
4442// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4443// for more information.
4444func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4445	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4446	return c
4447}
4448
4449// Context sets the context to be used in this call's Do method. Any
4450// pending HTTP request will be aborted if the provided context is
4451// canceled.
4452func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4453	c.ctx_ = ctx
4454	return c
4455}
4456
4457// Header returns an http.Header that can be modified by the caller to
4458// add HTTP headers to the request.
4459func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Header() http.Header {
4460	if c.header_ == nil {
4461		c.header_ = make(http.Header)
4462	}
4463	return c.header_
4464}
4465
4466func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4467	reqHeaders := make(http.Header)
4468	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4469	for k, v := range c.header_ {
4470		reqHeaders[k] = v
4471	}
4472	reqHeaders.Set("User-Agent", c.s.userAgent())
4473	var body io.Reader = nil
4474	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
4475	if err != nil {
4476		return nil, err
4477	}
4478	reqHeaders.Set("Content-Type", "application/json")
4479	c.urlParams_.Set("alt", alt)
4480	c.urlParams_.Set("prettyPrint", "false")
4481	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
4482	urls += "?" + c.urlParams_.Encode()
4483	req, err := http.NewRequest("POST", urls, body)
4484	if err != nil {
4485		return nil, err
4486	}
4487	req.Header = reqHeaders
4488	googleapi.Expand(req.URL, map[string]string{
4489		"resource": c.resource,
4490	})
4491	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4492}
4493
4494// Do executes the "dataproc.projects.locations.autoscalingPolicies.getIamPolicy" call.
4495// Exactly one of *Policy or error will be non-nil. Any non-2xx status
4496// code is an error. Response headers are in either
4497// *Policy.ServerResponse.Header or (if a response was returned at all)
4498// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4499// check whether the returned error was because http.StatusNotModified
4500// was returned.
4501func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4502	gensupport.SetOptions(c.urlParams_, opts...)
4503	res, err := c.doRequest("json")
4504	if res != nil && res.StatusCode == http.StatusNotModified {
4505		if res.Body != nil {
4506			res.Body.Close()
4507		}
4508		return nil, &googleapi.Error{
4509			Code:   res.StatusCode,
4510			Header: res.Header,
4511		}
4512	}
4513	if err != nil {
4514		return nil, err
4515	}
4516	defer googleapi.CloseBody(res)
4517	if err := googleapi.CheckResponse(res); err != nil {
4518		return nil, err
4519	}
4520	ret := &Policy{
4521		ServerResponse: googleapi.ServerResponse{
4522			Header:         res.Header,
4523			HTTPStatusCode: res.StatusCode,
4524		},
4525	}
4526	target := &ret
4527	if err := gensupport.DecodeResponse(target, res); err != nil {
4528		return nil, err
4529	}
4530	return ret, nil
4531	// {
4532	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
4533	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}:getIamPolicy",
4534	//   "httpMethod": "POST",
4535	//   "id": "dataproc.projects.locations.autoscalingPolicies.getIamPolicy",
4536	//   "parameterOrder": [
4537	//     "resource"
4538	//   ],
4539	//   "parameters": {
4540	//     "resource": {
4541	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
4542	//       "location": "path",
4543	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
4544	//       "required": true,
4545	//       "type": "string"
4546	//     }
4547	//   },
4548	//   "path": "v1/{+resource}:getIamPolicy",
4549	//   "request": {
4550	//     "$ref": "GetIamPolicyRequest"
4551	//   },
4552	//   "response": {
4553	//     "$ref": "Policy"
4554	//   },
4555	//   "scopes": [
4556	//     "https://www.googleapis.com/auth/cloud-platform"
4557	//   ]
4558	// }
4559
4560}
4561
4562// method id "dataproc.projects.locations.autoscalingPolicies.list":
4563
4564type ProjectsLocationsAutoscalingPoliciesListCall struct {
4565	s            *Service
4566	parent       string
4567	urlParams_   gensupport.URLParams
4568	ifNoneMatch_ string
4569	ctx_         context.Context
4570	header_      http.Header
4571}
4572
4573// List: Lists autoscaling policies in the project.
4574func (r *ProjectsLocationsAutoscalingPoliciesService) List(parent string) *ProjectsLocationsAutoscalingPoliciesListCall {
4575	c := &ProjectsLocationsAutoscalingPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4576	c.parent = parent
4577	return c
4578}
4579
4580// PageSize sets the optional parameter "pageSize": The maximum number
4581// of results to return in each response. Must be less than or equal to
4582// 1000. Defaults to 100.
4583func (c *ProjectsLocationsAutoscalingPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsAutoscalingPoliciesListCall {
4584	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4585	return c
4586}
4587
4588// PageToken sets the optional parameter "pageToken": The page token,
4589// returned by a previous call, to request the next page of results.
4590func (c *ProjectsLocationsAutoscalingPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsAutoscalingPoliciesListCall {
4591	c.urlParams_.Set("pageToken", pageToken)
4592	return c
4593}
4594
4595// Fields allows partial responses to be retrieved. See
4596// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4597// for more information.
4598func (c *ProjectsLocationsAutoscalingPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesListCall {
4599	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4600	return c
4601}
4602
4603// IfNoneMatch sets the optional parameter which makes the operation
4604// fail if the object's ETag matches the given value. This is useful for
4605// getting updates only after the object has changed since the last
4606// request. Use googleapi.IsNotModified to check whether the response
4607// error from Do is the result of In-None-Match.
4608func (c *ProjectsLocationsAutoscalingPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutoscalingPoliciesListCall {
4609	c.ifNoneMatch_ = entityTag
4610	return c
4611}
4612
4613// Context sets the context to be used in this call's Do method. Any
4614// pending HTTP request will be aborted if the provided context is
4615// canceled.
4616func (c *ProjectsLocationsAutoscalingPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesListCall {
4617	c.ctx_ = ctx
4618	return c
4619}
4620
4621// Header returns an http.Header that can be modified by the caller to
4622// add HTTP headers to the request.
4623func (c *ProjectsLocationsAutoscalingPoliciesListCall) Header() http.Header {
4624	if c.header_ == nil {
4625		c.header_ = make(http.Header)
4626	}
4627	return c.header_
4628}
4629
4630func (c *ProjectsLocationsAutoscalingPoliciesListCall) doRequest(alt string) (*http.Response, error) {
4631	reqHeaders := make(http.Header)
4632	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4633	for k, v := range c.header_ {
4634		reqHeaders[k] = v
4635	}
4636	reqHeaders.Set("User-Agent", c.s.userAgent())
4637	if c.ifNoneMatch_ != "" {
4638		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4639	}
4640	var body io.Reader = nil
4641	c.urlParams_.Set("alt", alt)
4642	c.urlParams_.Set("prettyPrint", "false")
4643	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/autoscalingPolicies")
4644	urls += "?" + c.urlParams_.Encode()
4645	req, err := http.NewRequest("GET", urls, body)
4646	if err != nil {
4647		return nil, err
4648	}
4649	req.Header = reqHeaders
4650	googleapi.Expand(req.URL, map[string]string{
4651		"parent": c.parent,
4652	})
4653	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4654}
4655
4656// Do executes the "dataproc.projects.locations.autoscalingPolicies.list" call.
4657// Exactly one of *ListAutoscalingPoliciesResponse or error will be
4658// non-nil. Any non-2xx status code is an error. Response headers are in
4659// either *ListAutoscalingPoliciesResponse.ServerResponse.Header or (if
4660// a response was returned at all) in error.(*googleapi.Error).Header.
4661// Use googleapi.IsNotModified to check whether the returned error was
4662// because http.StatusNotModified was returned.
4663func (c *ProjectsLocationsAutoscalingPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListAutoscalingPoliciesResponse, error) {
4664	gensupport.SetOptions(c.urlParams_, opts...)
4665	res, err := c.doRequest("json")
4666	if res != nil && res.StatusCode == http.StatusNotModified {
4667		if res.Body != nil {
4668			res.Body.Close()
4669		}
4670		return nil, &googleapi.Error{
4671			Code:   res.StatusCode,
4672			Header: res.Header,
4673		}
4674	}
4675	if err != nil {
4676		return nil, err
4677	}
4678	defer googleapi.CloseBody(res)
4679	if err := googleapi.CheckResponse(res); err != nil {
4680		return nil, err
4681	}
4682	ret := &ListAutoscalingPoliciesResponse{
4683		ServerResponse: googleapi.ServerResponse{
4684			Header:         res.Header,
4685			HTTPStatusCode: res.StatusCode,
4686		},
4687	}
4688	target := &ret
4689	if err := gensupport.DecodeResponse(target, res); err != nil {
4690		return nil, err
4691	}
4692	return ret, nil
4693	// {
4694	//   "description": "Lists autoscaling policies in the project.",
4695	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies",
4696	//   "httpMethod": "GET",
4697	//   "id": "dataproc.projects.locations.autoscalingPolicies.list",
4698	//   "parameterOrder": [
4699	//     "parent"
4700	//   ],
4701	//   "parameters": {
4702	//     "pageSize": {
4703	//       "description": "Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.",
4704	//       "format": "int32",
4705	//       "location": "query",
4706	//       "type": "integer"
4707	//     },
4708	//     "pageToken": {
4709	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
4710	//       "location": "query",
4711	//       "type": "string"
4712	//     },
4713	//     "parent": {
4714	//       "description": "Required. The \"resource name\" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.autoscalingPolicies.list, the resource name  of the region has the following format:  projects/{project_id}/regions/{region}\nFor projects.locations.autoscalingPolicies.list, the resource name  of the location has the following format:  projects/{project_id}/locations/{location}",
4715	//       "location": "path",
4716	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4717	//       "required": true,
4718	//       "type": "string"
4719	//     }
4720	//   },
4721	//   "path": "v1/{+parent}/autoscalingPolicies",
4722	//   "response": {
4723	//     "$ref": "ListAutoscalingPoliciesResponse"
4724	//   },
4725	//   "scopes": [
4726	//     "https://www.googleapis.com/auth/cloud-platform"
4727	//   ]
4728	// }
4729
4730}
4731
4732// Pages invokes f for each page of results.
4733// A non-nil error returned from f will halt the iteration.
4734// The provided context supersedes any context provided to the Context method.
4735func (c *ProjectsLocationsAutoscalingPoliciesListCall) Pages(ctx context.Context, f func(*ListAutoscalingPoliciesResponse) error) error {
4736	c.ctx_ = ctx
4737	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4738	for {
4739		x, err := c.Do()
4740		if err != nil {
4741			return err
4742		}
4743		if err := f(x); err != nil {
4744			return err
4745		}
4746		if x.NextPageToken == "" {
4747			return nil
4748		}
4749		c.PageToken(x.NextPageToken)
4750	}
4751}
4752
4753// method id "dataproc.projects.locations.autoscalingPolicies.setIamPolicy":
4754
4755type ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall struct {
4756	s                   *Service
4757	resource            string
4758	setiampolicyrequest *SetIamPolicyRequest
4759	urlParams_          gensupport.URLParams
4760	ctx_                context.Context
4761	header_             http.Header
4762}
4763
4764// SetIamPolicy: Sets the access control policy on the specified
4765// resource. Replaces any existing policy.Can return Public Errors:
4766// NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
4767func (r *ProjectsLocationsAutoscalingPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
4768	c := &ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4769	c.resource = resource
4770	c.setiampolicyrequest = setiampolicyrequest
4771	return c
4772}
4773
4774// Fields allows partial responses to be retrieved. See
4775// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4776// for more information.
4777func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
4778	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4779	return c
4780}
4781
4782// Context sets the context to be used in this call's Do method. Any
4783// pending HTTP request will be aborted if the provided context is
4784// canceled.
4785func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
4786	c.ctx_ = ctx
4787	return c
4788}
4789
4790// Header returns an http.Header that can be modified by the caller to
4791// add HTTP headers to the request.
4792func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Header() http.Header {
4793	if c.header_ == nil {
4794		c.header_ = make(http.Header)
4795	}
4796	return c.header_
4797}
4798
4799func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4800	reqHeaders := make(http.Header)
4801	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4802	for k, v := range c.header_ {
4803		reqHeaders[k] = v
4804	}
4805	reqHeaders.Set("User-Agent", c.s.userAgent())
4806	var body io.Reader = nil
4807	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
4808	if err != nil {
4809		return nil, err
4810	}
4811	reqHeaders.Set("Content-Type", "application/json")
4812	c.urlParams_.Set("alt", alt)
4813	c.urlParams_.Set("prettyPrint", "false")
4814	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
4815	urls += "?" + c.urlParams_.Encode()
4816	req, err := http.NewRequest("POST", urls, body)
4817	if err != nil {
4818		return nil, err
4819	}
4820	req.Header = reqHeaders
4821	googleapi.Expand(req.URL, map[string]string{
4822		"resource": c.resource,
4823	})
4824	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4825}
4826
4827// Do executes the "dataproc.projects.locations.autoscalingPolicies.setIamPolicy" call.
4828// Exactly one of *Policy or error will be non-nil. Any non-2xx status
4829// code is an error. Response headers are in either
4830// *Policy.ServerResponse.Header or (if a response was returned at all)
4831// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4832// check whether the returned error was because http.StatusNotModified
4833// was returned.
4834func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4835	gensupport.SetOptions(c.urlParams_, opts...)
4836	res, err := c.doRequest("json")
4837	if res != nil && res.StatusCode == http.StatusNotModified {
4838		if res.Body != nil {
4839			res.Body.Close()
4840		}
4841		return nil, &googleapi.Error{
4842			Code:   res.StatusCode,
4843			Header: res.Header,
4844		}
4845	}
4846	if err != nil {
4847		return nil, err
4848	}
4849	defer googleapi.CloseBody(res)
4850	if err := googleapi.CheckResponse(res); err != nil {
4851		return nil, err
4852	}
4853	ret := &Policy{
4854		ServerResponse: googleapi.ServerResponse{
4855			Header:         res.Header,
4856			HTTPStatusCode: res.StatusCode,
4857		},
4858	}
4859	target := &ret
4860	if err := gensupport.DecodeResponse(target, res); err != nil {
4861		return nil, err
4862	}
4863	return ret, nil
4864	// {
4865	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED",
4866	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}:setIamPolicy",
4867	//   "httpMethod": "POST",
4868	//   "id": "dataproc.projects.locations.autoscalingPolicies.setIamPolicy",
4869	//   "parameterOrder": [
4870	//     "resource"
4871	//   ],
4872	//   "parameters": {
4873	//     "resource": {
4874	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
4875	//       "location": "path",
4876	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
4877	//       "required": true,
4878	//       "type": "string"
4879	//     }
4880	//   },
4881	//   "path": "v1/{+resource}:setIamPolicy",
4882	//   "request": {
4883	//     "$ref": "SetIamPolicyRequest"
4884	//   },
4885	//   "response": {
4886	//     "$ref": "Policy"
4887	//   },
4888	//   "scopes": [
4889	//     "https://www.googleapis.com/auth/cloud-platform"
4890	//   ]
4891	// }
4892
4893}
4894
4895// method id "dataproc.projects.locations.autoscalingPolicies.testIamPermissions":
4896
4897type ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall struct {
4898	s                         *Service
4899	resource                  string
4900	testiampermissionsrequest *TestIamPermissionsRequest
4901	urlParams_                gensupport.URLParams
4902	ctx_                      context.Context
4903	header_                   http.Header
4904}
4905
4906// TestIamPermissions: Returns permissions that a caller has on the
4907// specified resource. If the resource does not exist, this will return
4908// an empty set of permissions, not a NOT_FOUND error.Note: This
4909// operation is designed to be used for building permission-aware UIs
4910// and command-line tools, not for authorization checking. This
4911// operation may "fail open" without warning.
4912func (r *ProjectsLocationsAutoscalingPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
4913	c := &ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4914	c.resource = resource
4915	c.testiampermissionsrequest = testiampermissionsrequest
4916	return c
4917}
4918
4919// Fields allows partial responses to be retrieved. See
4920// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4921// for more information.
4922func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
4923	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4924	return c
4925}
4926
4927// Context sets the context to be used in this call's Do method. Any
4928// pending HTTP request will be aborted if the provided context is
4929// canceled.
4930func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
4931	c.ctx_ = ctx
4932	return c
4933}
4934
4935// Header returns an http.Header that can be modified by the caller to
4936// add HTTP headers to the request.
4937func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Header() http.Header {
4938	if c.header_ == nil {
4939		c.header_ = make(http.Header)
4940	}
4941	return c.header_
4942}
4943
4944func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
4945	reqHeaders := make(http.Header)
4946	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
4947	for k, v := range c.header_ {
4948		reqHeaders[k] = v
4949	}
4950	reqHeaders.Set("User-Agent", c.s.userAgent())
4951	var body io.Reader = nil
4952	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
4953	if err != nil {
4954		return nil, err
4955	}
4956	reqHeaders.Set("Content-Type", "application/json")
4957	c.urlParams_.Set("alt", alt)
4958	c.urlParams_.Set("prettyPrint", "false")
4959	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
4960	urls += "?" + c.urlParams_.Encode()
4961	req, err := http.NewRequest("POST", urls, body)
4962	if err != nil {
4963		return nil, err
4964	}
4965	req.Header = reqHeaders
4966	googleapi.Expand(req.URL, map[string]string{
4967		"resource": c.resource,
4968	})
4969	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4970}
4971
4972// Do executes the "dataproc.projects.locations.autoscalingPolicies.testIamPermissions" call.
4973// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
4974// Any non-2xx status code is an error. Response headers are in either
4975// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
4976// was returned at all) in error.(*googleapi.Error).Header. Use
4977// googleapi.IsNotModified to check whether the returned error was
4978// because http.StatusNotModified was returned.
4979func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
4980	gensupport.SetOptions(c.urlParams_, opts...)
4981	res, err := c.doRequest("json")
4982	if res != nil && res.StatusCode == http.StatusNotModified {
4983		if res.Body != nil {
4984			res.Body.Close()
4985		}
4986		return nil, &googleapi.Error{
4987			Code:   res.StatusCode,
4988			Header: res.Header,
4989		}
4990	}
4991	if err != nil {
4992		return nil, err
4993	}
4994	defer googleapi.CloseBody(res)
4995	if err := googleapi.CheckResponse(res); err != nil {
4996		return nil, err
4997	}
4998	ret := &TestIamPermissionsResponse{
4999		ServerResponse: googleapi.ServerResponse{
5000			Header:         res.Header,
5001			HTTPStatusCode: res.StatusCode,
5002		},
5003	}
5004	target := &ret
5005	if err := gensupport.DecodeResponse(target, res); err != nil {
5006		return nil, err
5007	}
5008	return ret, nil
5009	// {
5010	//   "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.",
5011	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}:testIamPermissions",
5012	//   "httpMethod": "POST",
5013	//   "id": "dataproc.projects.locations.autoscalingPolicies.testIamPermissions",
5014	//   "parameterOrder": [
5015	//     "resource"
5016	//   ],
5017	//   "parameters": {
5018	//     "resource": {
5019	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
5020	//       "location": "path",
5021	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
5022	//       "required": true,
5023	//       "type": "string"
5024	//     }
5025	//   },
5026	//   "path": "v1/{+resource}:testIamPermissions",
5027	//   "request": {
5028	//     "$ref": "TestIamPermissionsRequest"
5029	//   },
5030	//   "response": {
5031	//     "$ref": "TestIamPermissionsResponse"
5032	//   },
5033	//   "scopes": [
5034	//     "https://www.googleapis.com/auth/cloud-platform"
5035	//   ]
5036	// }
5037
5038}
5039
5040// method id "dataproc.projects.locations.autoscalingPolicies.update":
5041
5042type ProjectsLocationsAutoscalingPoliciesUpdateCall struct {
5043	s                 *Service
5044	name              string
5045	autoscalingpolicy *AutoscalingPolicy
5046	urlParams_        gensupport.URLParams
5047	ctx_              context.Context
5048	header_           http.Header
5049}
5050
5051// Update: Updates (replaces) autoscaling policy.Disabled check for
5052// update_mask, because all updates will be full replacements.
5053func (r *ProjectsLocationsAutoscalingPoliciesService) Update(name string, autoscalingpolicy *AutoscalingPolicy) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
5054	c := &ProjectsLocationsAutoscalingPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5055	c.name = name
5056	c.autoscalingpolicy = autoscalingpolicy
5057	return c
5058}
5059
5060// Fields allows partial responses to be retrieved. See
5061// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5062// for more information.
5063func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
5064	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5065	return c
5066}
5067
5068// Context sets the context to be used in this call's Do method. Any
5069// pending HTTP request will be aborted if the provided context is
5070// canceled.
5071func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
5072	c.ctx_ = ctx
5073	return c
5074}
5075
5076// Header returns an http.Header that can be modified by the caller to
5077// add HTTP headers to the request.
5078func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Header() http.Header {
5079	if c.header_ == nil {
5080		c.header_ = make(http.Header)
5081	}
5082	return c.header_
5083}
5084
5085func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
5086	reqHeaders := make(http.Header)
5087	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5088	for k, v := range c.header_ {
5089		reqHeaders[k] = v
5090	}
5091	reqHeaders.Set("User-Agent", c.s.userAgent())
5092	var body io.Reader = nil
5093	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
5094	if err != nil {
5095		return nil, err
5096	}
5097	reqHeaders.Set("Content-Type", "application/json")
5098	c.urlParams_.Set("alt", alt)
5099	c.urlParams_.Set("prettyPrint", "false")
5100	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5101	urls += "?" + c.urlParams_.Encode()
5102	req, err := http.NewRequest("PUT", urls, body)
5103	if err != nil {
5104		return nil, err
5105	}
5106	req.Header = reqHeaders
5107	googleapi.Expand(req.URL, map[string]string{
5108		"name": c.name,
5109	})
5110	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5111}
5112
5113// Do executes the "dataproc.projects.locations.autoscalingPolicies.update" call.
5114// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
5115// non-2xx status code is an error. Response headers are in either
5116// *AutoscalingPolicy.ServerResponse.Header or (if a response was
5117// returned at all) in error.(*googleapi.Error).Header. Use
5118// googleapi.IsNotModified to check whether the returned error was
5119// because http.StatusNotModified was returned.
5120func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
5121	gensupport.SetOptions(c.urlParams_, opts...)
5122	res, err := c.doRequest("json")
5123	if res != nil && res.StatusCode == http.StatusNotModified {
5124		if res.Body != nil {
5125			res.Body.Close()
5126		}
5127		return nil, &googleapi.Error{
5128			Code:   res.StatusCode,
5129			Header: res.Header,
5130		}
5131	}
5132	if err != nil {
5133		return nil, err
5134	}
5135	defer googleapi.CloseBody(res)
5136	if err := googleapi.CheckResponse(res); err != nil {
5137		return nil, err
5138	}
5139	ret := &AutoscalingPolicy{
5140		ServerResponse: googleapi.ServerResponse{
5141			Header:         res.Header,
5142			HTTPStatusCode: res.StatusCode,
5143		},
5144	}
5145	target := &ret
5146	if err := gensupport.DecodeResponse(target, res); err != nil {
5147		return nil, err
5148	}
5149	return ret, nil
5150	// {
5151	//   "description": "Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.",
5152	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}",
5153	//   "httpMethod": "PUT",
5154	//   "id": "dataproc.projects.locations.autoscalingPolicies.update",
5155	//   "parameterOrder": [
5156	//     "name"
5157	//   ],
5158	//   "parameters": {
5159	//     "name": {
5160	//       "description": "Output only. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.autoscalingPolicies, the resource name of the  policy has the following format:  projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}\nFor projects.locations.autoscalingPolicies, the resource name of the  policy has the following format:  projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
5161	//       "location": "path",
5162	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
5163	//       "required": true,
5164	//       "type": "string"
5165	//     }
5166	//   },
5167	//   "path": "v1/{+name}",
5168	//   "request": {
5169	//     "$ref": "AutoscalingPolicy"
5170	//   },
5171	//   "response": {
5172	//     "$ref": "AutoscalingPolicy"
5173	//   },
5174	//   "scopes": [
5175	//     "https://www.googleapis.com/auth/cloud-platform"
5176	//   ]
5177	// }
5178
5179}
5180
5181// method id "dataproc.projects.locations.workflowTemplates.create":
5182
5183type ProjectsLocationsWorkflowTemplatesCreateCall struct {
5184	s                *Service
5185	parent           string
5186	workflowtemplate *WorkflowTemplate
5187	urlParams_       gensupport.URLParams
5188	ctx_             context.Context
5189	header_          http.Header
5190}
5191
5192// Create: Creates new workflow template.
5193func (r *ProjectsLocationsWorkflowTemplatesService) Create(parent string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesCreateCall {
5194	c := &ProjectsLocationsWorkflowTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5195	c.parent = parent
5196	c.workflowtemplate = workflowtemplate
5197	return c
5198}
5199
5200// Fields allows partial responses to be retrieved. See
5201// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5202// for more information.
5203func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesCreateCall {
5204	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5205	return c
5206}
5207
5208// Context sets the context to be used in this call's Do method. Any
5209// pending HTTP request will be aborted if the provided context is
5210// canceled.
5211func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesCreateCall {
5212	c.ctx_ = ctx
5213	return c
5214}
5215
5216// Header returns an http.Header that can be modified by the caller to
5217// add HTTP headers to the request.
5218func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Header() http.Header {
5219	if c.header_ == nil {
5220		c.header_ = make(http.Header)
5221	}
5222	return c.header_
5223}
5224
5225func (c *ProjectsLocationsWorkflowTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
5226	reqHeaders := make(http.Header)
5227	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5228	for k, v := range c.header_ {
5229		reqHeaders[k] = v
5230	}
5231	reqHeaders.Set("User-Agent", c.s.userAgent())
5232	var body io.Reader = nil
5233	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
5234	if err != nil {
5235		return nil, err
5236	}
5237	reqHeaders.Set("Content-Type", "application/json")
5238	c.urlParams_.Set("alt", alt)
5239	c.urlParams_.Set("prettyPrint", "false")
5240	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates")
5241	urls += "?" + c.urlParams_.Encode()
5242	req, err := http.NewRequest("POST", urls, body)
5243	if err != nil {
5244		return nil, err
5245	}
5246	req.Header = reqHeaders
5247	googleapi.Expand(req.URL, map[string]string{
5248		"parent": c.parent,
5249	})
5250	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5251}
5252
5253// Do executes the "dataproc.projects.locations.workflowTemplates.create" call.
5254// Exactly one of *WorkflowTemplate or error will be non-nil. Any
5255// non-2xx status code is an error. Response headers are in either
5256// *WorkflowTemplate.ServerResponse.Header or (if a response was
5257// returned at all) in error.(*googleapi.Error).Header. Use
5258// googleapi.IsNotModified to check whether the returned error was
5259// because http.StatusNotModified was returned.
5260func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
5261	gensupport.SetOptions(c.urlParams_, opts...)
5262	res, err := c.doRequest("json")
5263	if res != nil && res.StatusCode == http.StatusNotModified {
5264		if res.Body != nil {
5265			res.Body.Close()
5266		}
5267		return nil, &googleapi.Error{
5268			Code:   res.StatusCode,
5269			Header: res.Header,
5270		}
5271	}
5272	if err != nil {
5273		return nil, err
5274	}
5275	defer googleapi.CloseBody(res)
5276	if err := googleapi.CheckResponse(res); err != nil {
5277		return nil, err
5278	}
5279	ret := &WorkflowTemplate{
5280		ServerResponse: googleapi.ServerResponse{
5281			Header:         res.Header,
5282			HTTPStatusCode: res.StatusCode,
5283		},
5284	}
5285	target := &ret
5286	if err := gensupport.DecodeResponse(target, res); err != nil {
5287		return nil, err
5288	}
5289	return ret, nil
5290	// {
5291	//   "description": "Creates new workflow template.",
5292	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates",
5293	//   "httpMethod": "POST",
5294	//   "id": "dataproc.projects.locations.workflowTemplates.create",
5295	//   "parameterOrder": [
5296	//     "parent"
5297	//   ],
5298	//   "parameters": {
5299	//     "parent": {
5300	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates,create, the resource name of the  region has the following format:  projects/{project_id}/regions/{region}\nFor projects.locations.workflowTemplates.create, the resource name of  the location has the following format:  projects/{project_id}/locations/{location}",
5301	//       "location": "path",
5302	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
5303	//       "required": true,
5304	//       "type": "string"
5305	//     }
5306	//   },
5307	//   "path": "v1/{+parent}/workflowTemplates",
5308	//   "request": {
5309	//     "$ref": "WorkflowTemplate"
5310	//   },
5311	//   "response": {
5312	//     "$ref": "WorkflowTemplate"
5313	//   },
5314	//   "scopes": [
5315	//     "https://www.googleapis.com/auth/cloud-platform"
5316	//   ]
5317	// }
5318
5319}
5320
5321// method id "dataproc.projects.locations.workflowTemplates.delete":
5322
5323type ProjectsLocationsWorkflowTemplatesDeleteCall struct {
5324	s          *Service
5325	name       string
5326	urlParams_ gensupport.URLParams
5327	ctx_       context.Context
5328	header_    http.Header
5329}
5330
5331// Delete: Deletes a workflow template. It does not cancel in-progress
5332// workflows.
5333func (r *ProjectsLocationsWorkflowTemplatesService) Delete(name string) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5334	c := &ProjectsLocationsWorkflowTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5335	c.name = name
5336	return c
5337}
5338
5339// Version sets the optional parameter "version": The version of
5340// workflow template to delete. If specified, will only delete the
5341// template if the current server version matches specified version.
5342func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Version(version int64) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5343	c.urlParams_.Set("version", fmt.Sprint(version))
5344	return c
5345}
5346
5347// Fields allows partial responses to be retrieved. See
5348// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5349// for more information.
5350func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5351	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5352	return c
5353}
5354
5355// Context sets the context to be used in this call's Do method. Any
5356// pending HTTP request will be aborted if the provided context is
5357// canceled.
5358func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5359	c.ctx_ = ctx
5360	return c
5361}
5362
5363// Header returns an http.Header that can be modified by the caller to
5364// add HTTP headers to the request.
5365func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Header() http.Header {
5366	if c.header_ == nil {
5367		c.header_ = make(http.Header)
5368	}
5369	return c.header_
5370}
5371
5372func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
5373	reqHeaders := make(http.Header)
5374	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5375	for k, v := range c.header_ {
5376		reqHeaders[k] = v
5377	}
5378	reqHeaders.Set("User-Agent", c.s.userAgent())
5379	var body io.Reader = nil
5380	c.urlParams_.Set("alt", alt)
5381	c.urlParams_.Set("prettyPrint", "false")
5382	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5383	urls += "?" + c.urlParams_.Encode()
5384	req, err := http.NewRequest("DELETE", urls, body)
5385	if err != nil {
5386		return nil, err
5387	}
5388	req.Header = reqHeaders
5389	googleapi.Expand(req.URL, map[string]string{
5390		"name": c.name,
5391	})
5392	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5393}
5394
5395// Do executes the "dataproc.projects.locations.workflowTemplates.delete" call.
5396// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5397// code is an error. Response headers are in either
5398// *Empty.ServerResponse.Header or (if a response was returned at all)
5399// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5400// check whether the returned error was because http.StatusNotModified
5401// was returned.
5402func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5403	gensupport.SetOptions(c.urlParams_, opts...)
5404	res, err := c.doRequest("json")
5405	if res != nil && res.StatusCode == http.StatusNotModified {
5406		if res.Body != nil {
5407			res.Body.Close()
5408		}
5409		return nil, &googleapi.Error{
5410			Code:   res.StatusCode,
5411			Header: res.Header,
5412		}
5413	}
5414	if err != nil {
5415		return nil, err
5416	}
5417	defer googleapi.CloseBody(res)
5418	if err := googleapi.CheckResponse(res); err != nil {
5419		return nil, err
5420	}
5421	ret := &Empty{
5422		ServerResponse: googleapi.ServerResponse{
5423			Header:         res.Header,
5424			HTTPStatusCode: res.StatusCode,
5425		},
5426	}
5427	target := &ret
5428	if err := gensupport.DecodeResponse(target, res); err != nil {
5429		return nil, err
5430	}
5431	return ret, nil
5432	// {
5433	//   "description": "Deletes a workflow template. It does not cancel in-progress workflows.",
5434	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}",
5435	//   "httpMethod": "DELETE",
5436	//   "id": "dataproc.projects.locations.workflowTemplates.delete",
5437	//   "parameterOrder": [
5438	//     "name"
5439	//   ],
5440	//   "parameters": {
5441	//     "name": {
5442	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates.delete, the resource name of the template has the following format:  projects/{project_id}/regions/{region}/workflowTemplates/{template_id}\nFor projects.locations.workflowTemplates.instantiate, the resource name  of the template has the following format:  projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
5443	//       "location": "path",
5444	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
5445	//       "required": true,
5446	//       "type": "string"
5447	//     },
5448	//     "version": {
5449	//       "description": "Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.",
5450	//       "format": "int32",
5451	//       "location": "query",
5452	//       "type": "integer"
5453	//     }
5454	//   },
5455	//   "path": "v1/{+name}",
5456	//   "response": {
5457	//     "$ref": "Empty"
5458	//   },
5459	//   "scopes": [
5460	//     "https://www.googleapis.com/auth/cloud-platform"
5461	//   ]
5462	// }
5463
5464}
5465
5466// method id "dataproc.projects.locations.workflowTemplates.get":
5467
5468type ProjectsLocationsWorkflowTemplatesGetCall struct {
5469	s            *Service
5470	name         string
5471	urlParams_   gensupport.URLParams
5472	ifNoneMatch_ string
5473	ctx_         context.Context
5474	header_      http.Header
5475}
5476
5477// Get: Retrieves the latest workflow template.Can retrieve previously
5478// instantiated template by specifying optional version parameter.
5479func (r *ProjectsLocationsWorkflowTemplatesService) Get(name string) *ProjectsLocationsWorkflowTemplatesGetCall {
5480	c := &ProjectsLocationsWorkflowTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5481	c.name = name
5482	return c
5483}
5484
5485// Version sets the optional parameter "version": The version of
5486// workflow template to retrieve. Only previously instantiated versions
5487// can be retrieved.If unspecified, retrieves the current version.
5488func (c *ProjectsLocationsWorkflowTemplatesGetCall) Version(version int64) *ProjectsLocationsWorkflowTemplatesGetCall {
5489	c.urlParams_.Set("version", fmt.Sprint(version))
5490	return c
5491}
5492
5493// Fields allows partial responses to be retrieved. See
5494// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5495// for more information.
5496func (c *ProjectsLocationsWorkflowTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesGetCall {
5497	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5498	return c
5499}
5500
5501// IfNoneMatch sets the optional parameter which makes the operation
5502// fail if the object's ETag matches the given value. This is useful for
5503// getting updates only after the object has changed since the last
5504// request. Use googleapi.IsNotModified to check whether the response
5505// error from Do is the result of In-None-Match.
5506func (c *ProjectsLocationsWorkflowTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowTemplatesGetCall {
5507	c.ifNoneMatch_ = entityTag
5508	return c
5509}
5510
5511// Context sets the context to be used in this call's Do method. Any
5512// pending HTTP request will be aborted if the provided context is
5513// canceled.
5514func (c *ProjectsLocationsWorkflowTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesGetCall {
5515	c.ctx_ = ctx
5516	return c
5517}
5518
5519// Header returns an http.Header that can be modified by the caller to
5520// add HTTP headers to the request.
5521func (c *ProjectsLocationsWorkflowTemplatesGetCall) Header() http.Header {
5522	if c.header_ == nil {
5523		c.header_ = make(http.Header)
5524	}
5525	return c.header_
5526}
5527
5528func (c *ProjectsLocationsWorkflowTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
5529	reqHeaders := make(http.Header)
5530	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5531	for k, v := range c.header_ {
5532		reqHeaders[k] = v
5533	}
5534	reqHeaders.Set("User-Agent", c.s.userAgent())
5535	if c.ifNoneMatch_ != "" {
5536		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5537	}
5538	var body io.Reader = nil
5539	c.urlParams_.Set("alt", alt)
5540	c.urlParams_.Set("prettyPrint", "false")
5541	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
5542	urls += "?" + c.urlParams_.Encode()
5543	req, err := http.NewRequest("GET", urls, body)
5544	if err != nil {
5545		return nil, err
5546	}
5547	req.Header = reqHeaders
5548	googleapi.Expand(req.URL, map[string]string{
5549		"name": c.name,
5550	})
5551	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5552}
5553
5554// Do executes the "dataproc.projects.locations.workflowTemplates.get" call.
5555// Exactly one of *WorkflowTemplate or error will be non-nil. Any
5556// non-2xx status code is an error. Response headers are in either
5557// *WorkflowTemplate.ServerResponse.Header or (if a response was
5558// returned at all) in error.(*googleapi.Error).Header. Use
5559// googleapi.IsNotModified to check whether the returned error was
5560// because http.StatusNotModified was returned.
5561func (c *ProjectsLocationsWorkflowTemplatesGetCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
5562	gensupport.SetOptions(c.urlParams_, opts...)
5563	res, err := c.doRequest("json")
5564	if res != nil && res.StatusCode == http.StatusNotModified {
5565		if res.Body != nil {
5566			res.Body.Close()
5567		}
5568		return nil, &googleapi.Error{
5569			Code:   res.StatusCode,
5570			Header: res.Header,
5571		}
5572	}
5573	if err != nil {
5574		return nil, err
5575	}
5576	defer googleapi.CloseBody(res)
5577	if err := googleapi.CheckResponse(res); err != nil {
5578		return nil, err
5579	}
5580	ret := &WorkflowTemplate{
5581		ServerResponse: googleapi.ServerResponse{
5582			Header:         res.Header,
5583			HTTPStatusCode: res.StatusCode,
5584		},
5585	}
5586	target := &ret
5587	if err := gensupport.DecodeResponse(target, res); err != nil {
5588		return nil, err
5589	}
5590	return ret, nil
5591	// {
5592	//   "description": "Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.",
5593	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}",
5594	//   "httpMethod": "GET",
5595	//   "id": "dataproc.projects.locations.workflowTemplates.get",
5596	//   "parameterOrder": [
5597	//     "name"
5598	//   ],
5599	//   "parameters": {
5600	//     "name": {
5601	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates.get, the resource name of the  template has the following format:  projects/{project_id}/regions/{region}/workflowTemplates/{template_id}\nFor projects.locations.workflowTemplates.get, the resource name of the  template has the following format:  projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
5602	//       "location": "path",
5603	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
5604	//       "required": true,
5605	//       "type": "string"
5606	//     },
5607	//     "version": {
5608	//       "description": "Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.If unspecified, retrieves the current version.",
5609	//       "format": "int32",
5610	//       "location": "query",
5611	//       "type": "integer"
5612	//     }
5613	//   },
5614	//   "path": "v1/{+name}",
5615	//   "response": {
5616	//     "$ref": "WorkflowTemplate"
5617	//   },
5618	//   "scopes": [
5619	//     "https://www.googleapis.com/auth/cloud-platform"
5620	//   ]
5621	// }
5622
5623}
5624
5625// method id "dataproc.projects.locations.workflowTemplates.getIamPolicy":
5626
5627type ProjectsLocationsWorkflowTemplatesGetIamPolicyCall struct {
5628	s                   *Service
5629	resource            string
5630	getiampolicyrequest *GetIamPolicyRequest
5631	urlParams_          gensupport.URLParams
5632	ctx_                context.Context
5633	header_             http.Header
5634}
5635
5636// GetIamPolicy: Gets the access control policy for a resource. Returns
5637// an empty policy if the resource exists and does not have a policy
5638// set.
5639func (r *ProjectsLocationsWorkflowTemplatesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
5640	c := &ProjectsLocationsWorkflowTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5641	c.resource = resource
5642	c.getiampolicyrequest = getiampolicyrequest
5643	return c
5644}
5645
5646// Fields allows partial responses to be retrieved. See
5647// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5648// for more information.
5649func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
5650	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5651	return c
5652}
5653
5654// Context sets the context to be used in this call's Do method. Any
5655// pending HTTP request will be aborted if the provided context is
5656// canceled.
5657func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
5658	c.ctx_ = ctx
5659	return c
5660}
5661
5662// Header returns an http.Header that can be modified by the caller to
5663// add HTTP headers to the request.
5664func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Header() http.Header {
5665	if c.header_ == nil {
5666		c.header_ = make(http.Header)
5667	}
5668	return c.header_
5669}
5670
5671func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5672	reqHeaders := make(http.Header)
5673	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5674	for k, v := range c.header_ {
5675		reqHeaders[k] = v
5676	}
5677	reqHeaders.Set("User-Agent", c.s.userAgent())
5678	var body io.Reader = nil
5679	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
5680	if err != nil {
5681		return nil, err
5682	}
5683	reqHeaders.Set("Content-Type", "application/json")
5684	c.urlParams_.Set("alt", alt)
5685	c.urlParams_.Set("prettyPrint", "false")
5686	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
5687	urls += "?" + c.urlParams_.Encode()
5688	req, err := http.NewRequest("POST", urls, body)
5689	if err != nil {
5690		return nil, err
5691	}
5692	req.Header = reqHeaders
5693	googleapi.Expand(req.URL, map[string]string{
5694		"resource": c.resource,
5695	})
5696	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5697}
5698
5699// Do executes the "dataproc.projects.locations.workflowTemplates.getIamPolicy" call.
5700// Exactly one of *Policy or error will be non-nil. Any non-2xx status
5701// code is an error. Response headers are in either
5702// *Policy.ServerResponse.Header or (if a response was returned at all)
5703// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5704// check whether the returned error was because http.StatusNotModified
5705// was returned.
5706func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5707	gensupport.SetOptions(c.urlParams_, opts...)
5708	res, err := c.doRequest("json")
5709	if res != nil && res.StatusCode == http.StatusNotModified {
5710		if res.Body != nil {
5711			res.Body.Close()
5712		}
5713		return nil, &googleapi.Error{
5714			Code:   res.StatusCode,
5715			Header: res.Header,
5716		}
5717	}
5718	if err != nil {
5719		return nil, err
5720	}
5721	defer googleapi.CloseBody(res)
5722	if err := googleapi.CheckResponse(res); err != nil {
5723		return nil, err
5724	}
5725	ret := &Policy{
5726		ServerResponse: googleapi.ServerResponse{
5727			Header:         res.Header,
5728			HTTPStatusCode: res.StatusCode,
5729		},
5730	}
5731	target := &ret
5732	if err := gensupport.DecodeResponse(target, res); err != nil {
5733		return nil, err
5734	}
5735	return ret, nil
5736	// {
5737	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
5738	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:getIamPolicy",
5739	//   "httpMethod": "POST",
5740	//   "id": "dataproc.projects.locations.workflowTemplates.getIamPolicy",
5741	//   "parameterOrder": [
5742	//     "resource"
5743	//   ],
5744	//   "parameters": {
5745	//     "resource": {
5746	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
5747	//       "location": "path",
5748	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
5749	//       "required": true,
5750	//       "type": "string"
5751	//     }
5752	//   },
5753	//   "path": "v1/{+resource}:getIamPolicy",
5754	//   "request": {
5755	//     "$ref": "GetIamPolicyRequest"
5756	//   },
5757	//   "response": {
5758	//     "$ref": "Policy"
5759	//   },
5760	//   "scopes": [
5761	//     "https://www.googleapis.com/auth/cloud-platform"
5762	//   ]
5763	// }
5764
5765}
5766
5767// method id "dataproc.projects.locations.workflowTemplates.instantiate":
5768
5769type ProjectsLocationsWorkflowTemplatesInstantiateCall struct {
5770	s                                  *Service
5771	name                               string
5772	instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest
5773	urlParams_                         gensupport.URLParams
5774	ctx_                               context.Context
5775	header_                            http.Header
5776}
5777
5778// Instantiate: Instantiates a template and begins execution.The
5779// returned Operation can be used to track execution of workflow by
5780// polling operations.get. The Operation will complete when entire
5781// workflow is finished.The running workflow can be aborted via
5782// operations.cancel. This will cause any inflight jobs to be cancelled
5783// and workflow-owned clusters to be deleted.The Operation.metadata will
5784// be WorkflowMetadata
5785// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
5786// aproc.v1#workflowmetadata). Also see Using WorkflowMetadata
5787// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#u
5788// sing_workflowmetadata).On successful completion, Operation.response
5789// will be Empty.
5790func (r *ProjectsLocationsWorkflowTemplatesService) Instantiate(name string, instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
5791	c := &ProjectsLocationsWorkflowTemplatesInstantiateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5792	c.name = name
5793	c.instantiateworkflowtemplaterequest = instantiateworkflowtemplaterequest
5794	return c
5795}
5796
5797// Fields allows partial responses to be retrieved. See
5798// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5799// for more information.
5800func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
5801	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5802	return c
5803}
5804
5805// Context sets the context to be used in this call's Do method. Any
5806// pending HTTP request will be aborted if the provided context is
5807// canceled.
5808func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
5809	c.ctx_ = ctx
5810	return c
5811}
5812
5813// Header returns an http.Header that can be modified by the caller to
5814// add HTTP headers to the request.
5815func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Header() http.Header {
5816	if c.header_ == nil {
5817		c.header_ = make(http.Header)
5818	}
5819	return c.header_
5820}
5821
5822func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) doRequest(alt string) (*http.Response, error) {
5823	reqHeaders := make(http.Header)
5824	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5825	for k, v := range c.header_ {
5826		reqHeaders[k] = v
5827	}
5828	reqHeaders.Set("User-Agent", c.s.userAgent())
5829	var body io.Reader = nil
5830	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantiateworkflowtemplaterequest)
5831	if err != nil {
5832		return nil, err
5833	}
5834	reqHeaders.Set("Content-Type", "application/json")
5835	c.urlParams_.Set("alt", alt)
5836	c.urlParams_.Set("prettyPrint", "false")
5837	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:instantiate")
5838	urls += "?" + c.urlParams_.Encode()
5839	req, err := http.NewRequest("POST", urls, body)
5840	if err != nil {
5841		return nil, err
5842	}
5843	req.Header = reqHeaders
5844	googleapi.Expand(req.URL, map[string]string{
5845		"name": c.name,
5846	})
5847	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5848}
5849
5850// Do executes the "dataproc.projects.locations.workflowTemplates.instantiate" call.
5851// Exactly one of *Operation or error will be non-nil. Any non-2xx
5852// status code is an error. Response headers are in either
5853// *Operation.ServerResponse.Header or (if a response was returned at
5854// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
5855// to check whether the returned error was because
5856// http.StatusNotModified was returned.
5857func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
5858	gensupport.SetOptions(c.urlParams_, opts...)
5859	res, err := c.doRequest("json")
5860	if res != nil && res.StatusCode == http.StatusNotModified {
5861		if res.Body != nil {
5862			res.Body.Close()
5863		}
5864		return nil, &googleapi.Error{
5865			Code:   res.StatusCode,
5866			Header: res.Header,
5867		}
5868	}
5869	if err != nil {
5870		return nil, err
5871	}
5872	defer googleapi.CloseBody(res)
5873	if err := googleapi.CheckResponse(res); err != nil {
5874		return nil, err
5875	}
5876	ret := &Operation{
5877		ServerResponse: googleapi.ServerResponse{
5878			Header:         res.Header,
5879			HTTPStatusCode: res.StatusCode,
5880		},
5881	}
5882	target := &ret
5883	if err := gensupport.DecodeResponse(target, res); err != nil {
5884		return nil, err
5885	}
5886	return ret, nil
5887	// {
5888	//   "description": "Instantiates a template and begins execution.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.",
5889	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:instantiate",
5890	//   "httpMethod": "POST",
5891	//   "id": "dataproc.projects.locations.workflowTemplates.instantiate",
5892	//   "parameterOrder": [
5893	//     "name"
5894	//   ],
5895	//   "parameters": {
5896	//     "name": {
5897	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format:  projects/{project_id}/regions/{region}/workflowTemplates/{template_id}\nFor projects.locations.workflowTemplates.instantiate, the resource name  of the template has the following format:  projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
5898	//       "location": "path",
5899	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
5900	//       "required": true,
5901	//       "type": "string"
5902	//     }
5903	//   },
5904	//   "path": "v1/{+name}:instantiate",
5905	//   "request": {
5906	//     "$ref": "InstantiateWorkflowTemplateRequest"
5907	//   },
5908	//   "response": {
5909	//     "$ref": "Operation"
5910	//   },
5911	//   "scopes": [
5912	//     "https://www.googleapis.com/auth/cloud-platform"
5913	//   ]
5914	// }
5915
5916}
5917
5918// method id "dataproc.projects.locations.workflowTemplates.instantiateInline":
5919
5920type ProjectsLocationsWorkflowTemplatesInstantiateInlineCall struct {
5921	s                *Service
5922	parent           string
5923	workflowtemplate *WorkflowTemplate
5924	urlParams_       gensupport.URLParams
5925	ctx_             context.Context
5926	header_          http.Header
5927}
5928
5929// InstantiateInline: Instantiates a template and begins execution.This
5930// method is equivalent to executing the sequence
5931// CreateWorkflowTemplate, InstantiateWorkflowTemplate,
5932// DeleteWorkflowTemplate.The returned Operation can be used to track
5933// execution of workflow by polling operations.get. The Operation will
5934// complete when entire workflow is finished.The running workflow can be
5935// aborted via operations.cancel. This will cause any inflight jobs to
5936// be cancelled and workflow-owned clusters to be deleted.The
5937// Operation.metadata will be WorkflowMetadata
5938// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
5939// aproc.v1#workflowmetadata). Also see Using WorkflowMetadata
5940// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#u
5941// sing_workflowmetadata).On successful completion, Operation.response
5942// will be Empty.
5943func (r *ProjectsLocationsWorkflowTemplatesService) InstantiateInline(parent string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
5944	c := &ProjectsLocationsWorkflowTemplatesInstantiateInlineCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5945	c.parent = parent
5946	c.workflowtemplate = workflowtemplate
5947	return c
5948}
5949
5950// RequestId sets the optional parameter "requestId": A tag that
5951// prevents multiple concurrent workflow instances with the same tag
5952// from running. This mitigates risk of concurrent instances started due
5953// to retries.It is recommended to always set this value to a UUID
5954// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag
5955// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
5956// and hyphens (-). The maximum length is 40 characters.
5957func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) RequestId(requestId string) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
5958	c.urlParams_.Set("requestId", requestId)
5959	return c
5960}
5961
5962// Fields allows partial responses to be retrieved. See
5963// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5964// for more information.
5965func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
5966	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5967	return c
5968}
5969
5970// Context sets the context to be used in this call's Do method. Any
5971// pending HTTP request will be aborted if the provided context is
5972// canceled.
5973func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
5974	c.ctx_ = ctx
5975	return c
5976}
5977
5978// Header returns an http.Header that can be modified by the caller to
5979// add HTTP headers to the request.
5980func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Header() http.Header {
5981	if c.header_ == nil {
5982		c.header_ = make(http.Header)
5983	}
5984	return c.header_
5985}
5986
5987func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) doRequest(alt string) (*http.Response, error) {
5988	reqHeaders := make(http.Header)
5989	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
5990	for k, v := range c.header_ {
5991		reqHeaders[k] = v
5992	}
5993	reqHeaders.Set("User-Agent", c.s.userAgent())
5994	var body io.Reader = nil
5995	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
5996	if err != nil {
5997		return nil, err
5998	}
5999	reqHeaders.Set("Content-Type", "application/json")
6000	c.urlParams_.Set("alt", alt)
6001	c.urlParams_.Set("prettyPrint", "false")
6002	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates:instantiateInline")
6003	urls += "?" + c.urlParams_.Encode()
6004	req, err := http.NewRequest("POST", urls, body)
6005	if err != nil {
6006		return nil, err
6007	}
6008	req.Header = reqHeaders
6009	googleapi.Expand(req.URL, map[string]string{
6010		"parent": c.parent,
6011	})
6012	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6013}
6014
6015// Do executes the "dataproc.projects.locations.workflowTemplates.instantiateInline" call.
6016// Exactly one of *Operation or error will be non-nil. Any non-2xx
6017// status code is an error. Response headers are in either
6018// *Operation.ServerResponse.Header or (if a response was returned at
6019// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6020// to check whether the returned error was because
6021// http.StatusNotModified was returned.
6022func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6023	gensupport.SetOptions(c.urlParams_, opts...)
6024	res, err := c.doRequest("json")
6025	if res != nil && res.StatusCode == http.StatusNotModified {
6026		if res.Body != nil {
6027			res.Body.Close()
6028		}
6029		return nil, &googleapi.Error{
6030			Code:   res.StatusCode,
6031			Header: res.Header,
6032		}
6033	}
6034	if err != nil {
6035		return nil, err
6036	}
6037	defer googleapi.CloseBody(res)
6038	if err := googleapi.CheckResponse(res); err != nil {
6039		return nil, err
6040	}
6041	ret := &Operation{
6042		ServerResponse: googleapi.ServerResponse{
6043			Header:         res.Header,
6044			HTTPStatusCode: res.StatusCode,
6045		},
6046	}
6047	target := &ret
6048	if err := gensupport.DecodeResponse(target, res); err != nil {
6049		return nil, err
6050	}
6051	return ret, nil
6052	// {
6053	//   "description": "Instantiates a template and begins execution.This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.",
6054	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates:instantiateInline",
6055	//   "httpMethod": "POST",
6056	//   "id": "dataproc.projects.locations.workflowTemplates.instantiateInline",
6057	//   "parameterOrder": [
6058	//     "parent"
6059	//   ],
6060	//   "parameters": {
6061	//     "parent": {
6062	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates,instantiateinline, the resource  name of the region has the following format:  projects/{project_id}/regions/{region}\nFor projects.locations.workflowTemplates.instantiateinline, the  resource name of the location has the following format:  projects/{project_id}/locations/{location}",
6063	//       "location": "path",
6064	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
6065	//       "required": true,
6066	//       "type": "string"
6067	//     },
6068	//     "requestId": {
6069	//       "description": "Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.",
6070	//       "location": "query",
6071	//       "type": "string"
6072	//     }
6073	//   },
6074	//   "path": "v1/{+parent}/workflowTemplates:instantiateInline",
6075	//   "request": {
6076	//     "$ref": "WorkflowTemplate"
6077	//   },
6078	//   "response": {
6079	//     "$ref": "Operation"
6080	//   },
6081	//   "scopes": [
6082	//     "https://www.googleapis.com/auth/cloud-platform"
6083	//   ]
6084	// }
6085
6086}
6087
6088// method id "dataproc.projects.locations.workflowTemplates.list":
6089
6090type ProjectsLocationsWorkflowTemplatesListCall struct {
6091	s            *Service
6092	parent       string
6093	urlParams_   gensupport.URLParams
6094	ifNoneMatch_ string
6095	ctx_         context.Context
6096	header_      http.Header
6097}
6098
6099// List: Lists workflows that match the specified filter in the request.
6100func (r *ProjectsLocationsWorkflowTemplatesService) List(parent string) *ProjectsLocationsWorkflowTemplatesListCall {
6101	c := &ProjectsLocationsWorkflowTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6102	c.parent = parent
6103	return c
6104}
6105
6106// PageSize sets the optional parameter "pageSize": The maximum number
6107// of results to return in each response.
6108func (c *ProjectsLocationsWorkflowTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowTemplatesListCall {
6109	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6110	return c
6111}
6112
6113// PageToken sets the optional parameter "pageToken": The page token,
6114// returned by a previous call, to request the next page of results.
6115func (c *ProjectsLocationsWorkflowTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowTemplatesListCall {
6116	c.urlParams_.Set("pageToken", pageToken)
6117	return c
6118}
6119
6120// Fields allows partial responses to be retrieved. See
6121// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6122// for more information.
6123func (c *ProjectsLocationsWorkflowTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesListCall {
6124	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6125	return c
6126}
6127
6128// IfNoneMatch sets the optional parameter which makes the operation
6129// fail if the object's ETag matches the given value. This is useful for
6130// getting updates only after the object has changed since the last
6131// request. Use googleapi.IsNotModified to check whether the response
6132// error from Do is the result of In-None-Match.
6133func (c *ProjectsLocationsWorkflowTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowTemplatesListCall {
6134	c.ifNoneMatch_ = entityTag
6135	return c
6136}
6137
6138// Context sets the context to be used in this call's Do method. Any
6139// pending HTTP request will be aborted if the provided context is
6140// canceled.
6141func (c *ProjectsLocationsWorkflowTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesListCall {
6142	c.ctx_ = ctx
6143	return c
6144}
6145
6146// Header returns an http.Header that can be modified by the caller to
6147// add HTTP headers to the request.
6148func (c *ProjectsLocationsWorkflowTemplatesListCall) Header() http.Header {
6149	if c.header_ == nil {
6150		c.header_ = make(http.Header)
6151	}
6152	return c.header_
6153}
6154
6155func (c *ProjectsLocationsWorkflowTemplatesListCall) doRequest(alt string) (*http.Response, error) {
6156	reqHeaders := make(http.Header)
6157	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6158	for k, v := range c.header_ {
6159		reqHeaders[k] = v
6160	}
6161	reqHeaders.Set("User-Agent", c.s.userAgent())
6162	if c.ifNoneMatch_ != "" {
6163		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6164	}
6165	var body io.Reader = nil
6166	c.urlParams_.Set("alt", alt)
6167	c.urlParams_.Set("prettyPrint", "false")
6168	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates")
6169	urls += "?" + c.urlParams_.Encode()
6170	req, err := http.NewRequest("GET", urls, body)
6171	if err != nil {
6172		return nil, err
6173	}
6174	req.Header = reqHeaders
6175	googleapi.Expand(req.URL, map[string]string{
6176		"parent": c.parent,
6177	})
6178	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6179}
6180
6181// Do executes the "dataproc.projects.locations.workflowTemplates.list" call.
6182// Exactly one of *ListWorkflowTemplatesResponse or error will be
6183// non-nil. Any non-2xx status code is an error. Response headers are in
6184// either *ListWorkflowTemplatesResponse.ServerResponse.Header or (if a
6185// response was returned at all) in error.(*googleapi.Error).Header. Use
6186// googleapi.IsNotModified to check whether the returned error was
6187// because http.StatusNotModified was returned.
6188func (c *ProjectsLocationsWorkflowTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListWorkflowTemplatesResponse, error) {
6189	gensupport.SetOptions(c.urlParams_, opts...)
6190	res, err := c.doRequest("json")
6191	if res != nil && res.StatusCode == http.StatusNotModified {
6192		if res.Body != nil {
6193			res.Body.Close()
6194		}
6195		return nil, &googleapi.Error{
6196			Code:   res.StatusCode,
6197			Header: res.Header,
6198		}
6199	}
6200	if err != nil {
6201		return nil, err
6202	}
6203	defer googleapi.CloseBody(res)
6204	if err := googleapi.CheckResponse(res); err != nil {
6205		return nil, err
6206	}
6207	ret := &ListWorkflowTemplatesResponse{
6208		ServerResponse: googleapi.ServerResponse{
6209			Header:         res.Header,
6210			HTTPStatusCode: res.StatusCode,
6211		},
6212	}
6213	target := &ret
6214	if err := gensupport.DecodeResponse(target, res); err != nil {
6215		return nil, err
6216	}
6217	return ret, nil
6218	// {
6219	//   "description": "Lists workflows that match the specified filter in the request.",
6220	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates",
6221	//   "httpMethod": "GET",
6222	//   "id": "dataproc.projects.locations.workflowTemplates.list",
6223	//   "parameterOrder": [
6224	//     "parent"
6225	//   ],
6226	//   "parameters": {
6227	//     "pageSize": {
6228	//       "description": "Optional. The maximum number of results to return in each response.",
6229	//       "format": "int32",
6230	//       "location": "query",
6231	//       "type": "integer"
6232	//     },
6233	//     "pageToken": {
6234	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
6235	//       "location": "query",
6236	//       "type": "string"
6237	//     },
6238	//     "parent": {
6239	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates,list, the resource  name of the region has the following format:  projects/{project_id}/regions/{region}\nFor projects.locations.workflowTemplates.list, the  resource name of the location has the following format:  projects/{project_id}/locations/{location}",
6240	//       "location": "path",
6241	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
6242	//       "required": true,
6243	//       "type": "string"
6244	//     }
6245	//   },
6246	//   "path": "v1/{+parent}/workflowTemplates",
6247	//   "response": {
6248	//     "$ref": "ListWorkflowTemplatesResponse"
6249	//   },
6250	//   "scopes": [
6251	//     "https://www.googleapis.com/auth/cloud-platform"
6252	//   ]
6253	// }
6254
6255}
6256
6257// Pages invokes f for each page of results.
6258// A non-nil error returned from f will halt the iteration.
6259// The provided context supersedes any context provided to the Context method.
6260func (c *ProjectsLocationsWorkflowTemplatesListCall) Pages(ctx context.Context, f func(*ListWorkflowTemplatesResponse) error) error {
6261	c.ctx_ = ctx
6262	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6263	for {
6264		x, err := c.Do()
6265		if err != nil {
6266			return err
6267		}
6268		if err := f(x); err != nil {
6269			return err
6270		}
6271		if x.NextPageToken == "" {
6272			return nil
6273		}
6274		c.PageToken(x.NextPageToken)
6275	}
6276}
6277
6278// method id "dataproc.projects.locations.workflowTemplates.setIamPolicy":
6279
6280type ProjectsLocationsWorkflowTemplatesSetIamPolicyCall struct {
6281	s                   *Service
6282	resource            string
6283	setiampolicyrequest *SetIamPolicyRequest
6284	urlParams_          gensupport.URLParams
6285	ctx_                context.Context
6286	header_             http.Header
6287}
6288
6289// SetIamPolicy: Sets the access control policy on the specified
6290// resource. Replaces any existing policy.Can return Public Errors:
6291// NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
6292func (r *ProjectsLocationsWorkflowTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
6293	c := &ProjectsLocationsWorkflowTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6294	c.resource = resource
6295	c.setiampolicyrequest = setiampolicyrequest
6296	return c
6297}
6298
6299// Fields allows partial responses to be retrieved. See
6300// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6301// for more information.
6302func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
6303	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6304	return c
6305}
6306
6307// Context sets the context to be used in this call's Do method. Any
6308// pending HTTP request will be aborted if the provided context is
6309// canceled.
6310func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
6311	c.ctx_ = ctx
6312	return c
6313}
6314
6315// Header returns an http.Header that can be modified by the caller to
6316// add HTTP headers to the request.
6317func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Header() http.Header {
6318	if c.header_ == nil {
6319		c.header_ = make(http.Header)
6320	}
6321	return c.header_
6322}
6323
6324func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6325	reqHeaders := make(http.Header)
6326	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6327	for k, v := range c.header_ {
6328		reqHeaders[k] = v
6329	}
6330	reqHeaders.Set("User-Agent", c.s.userAgent())
6331	var body io.Reader = nil
6332	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
6333	if err != nil {
6334		return nil, err
6335	}
6336	reqHeaders.Set("Content-Type", "application/json")
6337	c.urlParams_.Set("alt", alt)
6338	c.urlParams_.Set("prettyPrint", "false")
6339	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
6340	urls += "?" + c.urlParams_.Encode()
6341	req, err := http.NewRequest("POST", urls, body)
6342	if err != nil {
6343		return nil, err
6344	}
6345	req.Header = reqHeaders
6346	googleapi.Expand(req.URL, map[string]string{
6347		"resource": c.resource,
6348	})
6349	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6350}
6351
6352// Do executes the "dataproc.projects.locations.workflowTemplates.setIamPolicy" call.
6353// Exactly one of *Policy or error will be non-nil. Any non-2xx status
6354// code is an error. Response headers are in either
6355// *Policy.ServerResponse.Header or (if a response was returned at all)
6356// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6357// check whether the returned error was because http.StatusNotModified
6358// was returned.
6359func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6360	gensupport.SetOptions(c.urlParams_, opts...)
6361	res, err := c.doRequest("json")
6362	if res != nil && res.StatusCode == http.StatusNotModified {
6363		if res.Body != nil {
6364			res.Body.Close()
6365		}
6366		return nil, &googleapi.Error{
6367			Code:   res.StatusCode,
6368			Header: res.Header,
6369		}
6370	}
6371	if err != nil {
6372		return nil, err
6373	}
6374	defer googleapi.CloseBody(res)
6375	if err := googleapi.CheckResponse(res); err != nil {
6376		return nil, err
6377	}
6378	ret := &Policy{
6379		ServerResponse: googleapi.ServerResponse{
6380			Header:         res.Header,
6381			HTTPStatusCode: res.StatusCode,
6382		},
6383	}
6384	target := &ret
6385	if err := gensupport.DecodeResponse(target, res); err != nil {
6386		return nil, err
6387	}
6388	return ret, nil
6389	// {
6390	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED",
6391	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:setIamPolicy",
6392	//   "httpMethod": "POST",
6393	//   "id": "dataproc.projects.locations.workflowTemplates.setIamPolicy",
6394	//   "parameterOrder": [
6395	//     "resource"
6396	//   ],
6397	//   "parameters": {
6398	//     "resource": {
6399	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
6400	//       "location": "path",
6401	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6402	//       "required": true,
6403	//       "type": "string"
6404	//     }
6405	//   },
6406	//   "path": "v1/{+resource}:setIamPolicy",
6407	//   "request": {
6408	//     "$ref": "SetIamPolicyRequest"
6409	//   },
6410	//   "response": {
6411	//     "$ref": "Policy"
6412	//   },
6413	//   "scopes": [
6414	//     "https://www.googleapis.com/auth/cloud-platform"
6415	//   ]
6416	// }
6417
6418}
6419
6420// method id "dataproc.projects.locations.workflowTemplates.testIamPermissions":
6421
6422type ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall struct {
6423	s                         *Service
6424	resource                  string
6425	testiampermissionsrequest *TestIamPermissionsRequest
6426	urlParams_                gensupport.URLParams
6427	ctx_                      context.Context
6428	header_                   http.Header
6429}
6430
6431// TestIamPermissions: Returns permissions that a caller has on the
6432// specified resource. If the resource does not exist, this will return
6433// an empty set of permissions, not a NOT_FOUND error.Note: This
6434// operation is designed to be used for building permission-aware UIs
6435// and command-line tools, not for authorization checking. This
6436// operation may "fail open" without warning.
6437func (r *ProjectsLocationsWorkflowTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
6438	c := &ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6439	c.resource = resource
6440	c.testiampermissionsrequest = testiampermissionsrequest
6441	return c
6442}
6443
6444// Fields allows partial responses to be retrieved. See
6445// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6446// for more information.
6447func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
6448	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6449	return c
6450}
6451
6452// Context sets the context to be used in this call's Do method. Any
6453// pending HTTP request will be aborted if the provided context is
6454// canceled.
6455func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
6456	c.ctx_ = ctx
6457	return c
6458}
6459
6460// Header returns an http.Header that can be modified by the caller to
6461// add HTTP headers to the request.
6462func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Header() http.Header {
6463	if c.header_ == nil {
6464		c.header_ = make(http.Header)
6465	}
6466	return c.header_
6467}
6468
6469func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
6470	reqHeaders := make(http.Header)
6471	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6472	for k, v := range c.header_ {
6473		reqHeaders[k] = v
6474	}
6475	reqHeaders.Set("User-Agent", c.s.userAgent())
6476	var body io.Reader = nil
6477	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
6478	if err != nil {
6479		return nil, err
6480	}
6481	reqHeaders.Set("Content-Type", "application/json")
6482	c.urlParams_.Set("alt", alt)
6483	c.urlParams_.Set("prettyPrint", "false")
6484	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
6485	urls += "?" + c.urlParams_.Encode()
6486	req, err := http.NewRequest("POST", urls, body)
6487	if err != nil {
6488		return nil, err
6489	}
6490	req.Header = reqHeaders
6491	googleapi.Expand(req.URL, map[string]string{
6492		"resource": c.resource,
6493	})
6494	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6495}
6496
6497// Do executes the "dataproc.projects.locations.workflowTemplates.testIamPermissions" call.
6498// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
6499// Any non-2xx status code is an error. Response headers are in either
6500// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
6501// was returned at all) in error.(*googleapi.Error).Header. Use
6502// googleapi.IsNotModified to check whether the returned error was
6503// because http.StatusNotModified was returned.
6504func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
6505	gensupport.SetOptions(c.urlParams_, opts...)
6506	res, err := c.doRequest("json")
6507	if res != nil && res.StatusCode == http.StatusNotModified {
6508		if res.Body != nil {
6509			res.Body.Close()
6510		}
6511		return nil, &googleapi.Error{
6512			Code:   res.StatusCode,
6513			Header: res.Header,
6514		}
6515	}
6516	if err != nil {
6517		return nil, err
6518	}
6519	defer googleapi.CloseBody(res)
6520	if err := googleapi.CheckResponse(res); err != nil {
6521		return nil, err
6522	}
6523	ret := &TestIamPermissionsResponse{
6524		ServerResponse: googleapi.ServerResponse{
6525			Header:         res.Header,
6526			HTTPStatusCode: res.StatusCode,
6527		},
6528	}
6529	target := &ret
6530	if err := gensupport.DecodeResponse(target, res); err != nil {
6531		return nil, err
6532	}
6533	return ret, nil
6534	// {
6535	//   "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.",
6536	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:testIamPermissions",
6537	//   "httpMethod": "POST",
6538	//   "id": "dataproc.projects.locations.workflowTemplates.testIamPermissions",
6539	//   "parameterOrder": [
6540	//     "resource"
6541	//   ],
6542	//   "parameters": {
6543	//     "resource": {
6544	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
6545	//       "location": "path",
6546	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6547	//       "required": true,
6548	//       "type": "string"
6549	//     }
6550	//   },
6551	//   "path": "v1/{+resource}:testIamPermissions",
6552	//   "request": {
6553	//     "$ref": "TestIamPermissionsRequest"
6554	//   },
6555	//   "response": {
6556	//     "$ref": "TestIamPermissionsResponse"
6557	//   },
6558	//   "scopes": [
6559	//     "https://www.googleapis.com/auth/cloud-platform"
6560	//   ]
6561	// }
6562
6563}
6564
6565// method id "dataproc.projects.locations.workflowTemplates.update":
6566
6567type ProjectsLocationsWorkflowTemplatesUpdateCall struct {
6568	s                *Service
6569	name             string
6570	workflowtemplate *WorkflowTemplate
6571	urlParams_       gensupport.URLParams
6572	ctx_             context.Context
6573	header_          http.Header
6574}
6575
6576// Update: Updates (replaces) workflow template. The updated template
6577// must contain version that matches the current server version.
6578func (r *ProjectsLocationsWorkflowTemplatesService) Update(name string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesUpdateCall {
6579	c := &ProjectsLocationsWorkflowTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6580	c.name = name
6581	c.workflowtemplate = workflowtemplate
6582	return c
6583}
6584
6585// Fields allows partial responses to be retrieved. See
6586// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6587// for more information.
6588func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesUpdateCall {
6589	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6590	return c
6591}
6592
6593// Context sets the context to be used in this call's Do method. Any
6594// pending HTTP request will be aborted if the provided context is
6595// canceled.
6596func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesUpdateCall {
6597	c.ctx_ = ctx
6598	return c
6599}
6600
6601// Header returns an http.Header that can be modified by the caller to
6602// add HTTP headers to the request.
6603func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Header() http.Header {
6604	if c.header_ == nil {
6605		c.header_ = make(http.Header)
6606	}
6607	return c.header_
6608}
6609
6610func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
6611	reqHeaders := make(http.Header)
6612	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6613	for k, v := range c.header_ {
6614		reqHeaders[k] = v
6615	}
6616	reqHeaders.Set("User-Agent", c.s.userAgent())
6617	var body io.Reader = nil
6618	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
6619	if err != nil {
6620		return nil, err
6621	}
6622	reqHeaders.Set("Content-Type", "application/json")
6623	c.urlParams_.Set("alt", alt)
6624	c.urlParams_.Set("prettyPrint", "false")
6625	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6626	urls += "?" + c.urlParams_.Encode()
6627	req, err := http.NewRequest("PUT", urls, body)
6628	if err != nil {
6629		return nil, err
6630	}
6631	req.Header = reqHeaders
6632	googleapi.Expand(req.URL, map[string]string{
6633		"name": c.name,
6634	})
6635	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6636}
6637
6638// Do executes the "dataproc.projects.locations.workflowTemplates.update" call.
6639// Exactly one of *WorkflowTemplate or error will be non-nil. Any
6640// non-2xx status code is an error. Response headers are in either
6641// *WorkflowTemplate.ServerResponse.Header or (if a response was
6642// returned at all) in error.(*googleapi.Error).Header. Use
6643// googleapi.IsNotModified to check whether the returned error was
6644// because http.StatusNotModified was returned.
6645func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
6646	gensupport.SetOptions(c.urlParams_, opts...)
6647	res, err := c.doRequest("json")
6648	if res != nil && res.StatusCode == http.StatusNotModified {
6649		if res.Body != nil {
6650			res.Body.Close()
6651		}
6652		return nil, &googleapi.Error{
6653			Code:   res.StatusCode,
6654			Header: res.Header,
6655		}
6656	}
6657	if err != nil {
6658		return nil, err
6659	}
6660	defer googleapi.CloseBody(res)
6661	if err := googleapi.CheckResponse(res); err != nil {
6662		return nil, err
6663	}
6664	ret := &WorkflowTemplate{
6665		ServerResponse: googleapi.ServerResponse{
6666			Header:         res.Header,
6667			HTTPStatusCode: res.StatusCode,
6668		},
6669	}
6670	target := &ret
6671	if err := gensupport.DecodeResponse(target, res); err != nil {
6672		return nil, err
6673	}
6674	return ret, nil
6675	// {
6676	//   "description": "Updates (replaces) workflow template. The updated template must contain version that matches the current server version.",
6677	//   "flatPath": "v1/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}",
6678	//   "httpMethod": "PUT",
6679	//   "id": "dataproc.projects.locations.workflowTemplates.update",
6680	//   "parameterOrder": [
6681	//     "name"
6682	//   ],
6683	//   "parameters": {
6684	//     "name": {
6685	//       "description": "Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates, the resource name of the  template has the following format:  projects/{project_id}/regions/{region}/workflowTemplates/{template_id}\nFor projects.locations.workflowTemplates, the resource name of the  template has the following format:  projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
6686	//       "location": "path",
6687	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6688	//       "required": true,
6689	//       "type": "string"
6690	//     }
6691	//   },
6692	//   "path": "v1/{+name}",
6693	//   "request": {
6694	//     "$ref": "WorkflowTemplate"
6695	//   },
6696	//   "response": {
6697	//     "$ref": "WorkflowTemplate"
6698	//   },
6699	//   "scopes": [
6700	//     "https://www.googleapis.com/auth/cloud-platform"
6701	//   ]
6702	// }
6703
6704}
6705
6706// method id "dataproc.projects.regions.autoscalingPolicies.create":
6707
6708type ProjectsRegionsAutoscalingPoliciesCreateCall struct {
6709	s                 *Service
6710	parent            string
6711	autoscalingpolicy *AutoscalingPolicy
6712	urlParams_        gensupport.URLParams
6713	ctx_              context.Context
6714	header_           http.Header
6715}
6716
6717// Create: Creates new autoscaling policy.
6718func (r *ProjectsRegionsAutoscalingPoliciesService) Create(parent string, autoscalingpolicy *AutoscalingPolicy) *ProjectsRegionsAutoscalingPoliciesCreateCall {
6719	c := &ProjectsRegionsAutoscalingPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6720	c.parent = parent
6721	c.autoscalingpolicy = autoscalingpolicy
6722	return c
6723}
6724
6725// Fields allows partial responses to be retrieved. See
6726// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6727// for more information.
6728func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesCreateCall {
6729	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6730	return c
6731}
6732
6733// Context sets the context to be used in this call's Do method. Any
6734// pending HTTP request will be aborted if the provided context is
6735// canceled.
6736func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesCreateCall {
6737	c.ctx_ = ctx
6738	return c
6739}
6740
6741// Header returns an http.Header that can be modified by the caller to
6742// add HTTP headers to the request.
6743func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Header() http.Header {
6744	if c.header_ == nil {
6745		c.header_ = make(http.Header)
6746	}
6747	return c.header_
6748}
6749
6750func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
6751	reqHeaders := make(http.Header)
6752	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6753	for k, v := range c.header_ {
6754		reqHeaders[k] = v
6755	}
6756	reqHeaders.Set("User-Agent", c.s.userAgent())
6757	var body io.Reader = nil
6758	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
6759	if err != nil {
6760		return nil, err
6761	}
6762	reqHeaders.Set("Content-Type", "application/json")
6763	c.urlParams_.Set("alt", alt)
6764	c.urlParams_.Set("prettyPrint", "false")
6765	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/autoscalingPolicies")
6766	urls += "?" + c.urlParams_.Encode()
6767	req, err := http.NewRequest("POST", urls, body)
6768	if err != nil {
6769		return nil, err
6770	}
6771	req.Header = reqHeaders
6772	googleapi.Expand(req.URL, map[string]string{
6773		"parent": c.parent,
6774	})
6775	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6776}
6777
6778// Do executes the "dataproc.projects.regions.autoscalingPolicies.create" call.
6779// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
6780// non-2xx status code is an error. Response headers are in either
6781// *AutoscalingPolicy.ServerResponse.Header or (if a response was
6782// returned at all) in error.(*googleapi.Error).Header. Use
6783// googleapi.IsNotModified to check whether the returned error was
6784// because http.StatusNotModified was returned.
6785func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
6786	gensupport.SetOptions(c.urlParams_, opts...)
6787	res, err := c.doRequest("json")
6788	if res != nil && res.StatusCode == http.StatusNotModified {
6789		if res.Body != nil {
6790			res.Body.Close()
6791		}
6792		return nil, &googleapi.Error{
6793			Code:   res.StatusCode,
6794			Header: res.Header,
6795		}
6796	}
6797	if err != nil {
6798		return nil, err
6799	}
6800	defer googleapi.CloseBody(res)
6801	if err := googleapi.CheckResponse(res); err != nil {
6802		return nil, err
6803	}
6804	ret := &AutoscalingPolicy{
6805		ServerResponse: googleapi.ServerResponse{
6806			Header:         res.Header,
6807			HTTPStatusCode: res.StatusCode,
6808		},
6809	}
6810	target := &ret
6811	if err := gensupport.DecodeResponse(target, res); err != nil {
6812		return nil, err
6813	}
6814	return ret, nil
6815	// {
6816	//   "description": "Creates new autoscaling policy.",
6817	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies",
6818	//   "httpMethod": "POST",
6819	//   "id": "dataproc.projects.regions.autoscalingPolicies.create",
6820	//   "parameterOrder": [
6821	//     "parent"
6822	//   ],
6823	//   "parameters": {
6824	//     "parent": {
6825	//       "description": "Required. The \"resource name\" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.autoscalingPolicies.create, the resource name  of the region has the following format:  projects/{project_id}/regions/{region}\nFor projects.locations.autoscalingPolicies.create, the resource name  of the location has the following format:  projects/{project_id}/locations/{location}",
6826	//       "location": "path",
6827	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
6828	//       "required": true,
6829	//       "type": "string"
6830	//     }
6831	//   },
6832	//   "path": "v1/{+parent}/autoscalingPolicies",
6833	//   "request": {
6834	//     "$ref": "AutoscalingPolicy"
6835	//   },
6836	//   "response": {
6837	//     "$ref": "AutoscalingPolicy"
6838	//   },
6839	//   "scopes": [
6840	//     "https://www.googleapis.com/auth/cloud-platform"
6841	//   ]
6842	// }
6843
6844}
6845
6846// method id "dataproc.projects.regions.autoscalingPolicies.delete":
6847
6848type ProjectsRegionsAutoscalingPoliciesDeleteCall struct {
6849	s          *Service
6850	name       string
6851	urlParams_ gensupport.URLParams
6852	ctx_       context.Context
6853	header_    http.Header
6854}
6855
6856// Delete: Deletes an autoscaling policy. It is an error to delete an
6857// autoscaling policy that is in use by one or more clusters.
6858func (r *ProjectsRegionsAutoscalingPoliciesService) Delete(name string) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
6859	c := &ProjectsRegionsAutoscalingPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6860	c.name = name
6861	return c
6862}
6863
6864// Fields allows partial responses to be retrieved. See
6865// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6866// for more information.
6867func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
6868	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6869	return c
6870}
6871
6872// Context sets the context to be used in this call's Do method. Any
6873// pending HTTP request will be aborted if the provided context is
6874// canceled.
6875func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
6876	c.ctx_ = ctx
6877	return c
6878}
6879
6880// Header returns an http.Header that can be modified by the caller to
6881// add HTTP headers to the request.
6882func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Header() http.Header {
6883	if c.header_ == nil {
6884		c.header_ = make(http.Header)
6885	}
6886	return c.header_
6887}
6888
6889func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
6890	reqHeaders := make(http.Header)
6891	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
6892	for k, v := range c.header_ {
6893		reqHeaders[k] = v
6894	}
6895	reqHeaders.Set("User-Agent", c.s.userAgent())
6896	var body io.Reader = nil
6897	c.urlParams_.Set("alt", alt)
6898	c.urlParams_.Set("prettyPrint", "false")
6899	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
6900	urls += "?" + c.urlParams_.Encode()
6901	req, err := http.NewRequest("DELETE", urls, body)
6902	if err != nil {
6903		return nil, err
6904	}
6905	req.Header = reqHeaders
6906	googleapi.Expand(req.URL, map[string]string{
6907		"name": c.name,
6908	})
6909	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6910}
6911
6912// Do executes the "dataproc.projects.regions.autoscalingPolicies.delete" call.
6913// Exactly one of *Empty or error will be non-nil. Any non-2xx status
6914// code is an error. Response headers are in either
6915// *Empty.ServerResponse.Header or (if a response was returned at all)
6916// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6917// check whether the returned error was because http.StatusNotModified
6918// was returned.
6919func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
6920	gensupport.SetOptions(c.urlParams_, opts...)
6921	res, err := c.doRequest("json")
6922	if res != nil && res.StatusCode == http.StatusNotModified {
6923		if res.Body != nil {
6924			res.Body.Close()
6925		}
6926		return nil, &googleapi.Error{
6927			Code:   res.StatusCode,
6928			Header: res.Header,
6929		}
6930	}
6931	if err != nil {
6932		return nil, err
6933	}
6934	defer googleapi.CloseBody(res)
6935	if err := googleapi.CheckResponse(res); err != nil {
6936		return nil, err
6937	}
6938	ret := &Empty{
6939		ServerResponse: googleapi.ServerResponse{
6940			Header:         res.Header,
6941			HTTPStatusCode: res.StatusCode,
6942		},
6943	}
6944	target := &ret
6945	if err := gensupport.DecodeResponse(target, res); err != nil {
6946		return nil, err
6947	}
6948	return ret, nil
6949	// {
6950	//   "description": "Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.",
6951	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}",
6952	//   "httpMethod": "DELETE",
6953	//   "id": "dataproc.projects.regions.autoscalingPolicies.delete",
6954	//   "parameterOrder": [
6955	//     "name"
6956	//   ],
6957	//   "parameters": {
6958	//     "name": {
6959	//       "description": "Required. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.autoscalingPolicies.delete, the resource name  of the policy has the following format:  projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}\nFor projects.locations.autoscalingPolicies.delete, the resource name  of the policy has the following format:  projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
6960	//       "location": "path",
6961	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
6962	//       "required": true,
6963	//       "type": "string"
6964	//     }
6965	//   },
6966	//   "path": "v1/{+name}",
6967	//   "response": {
6968	//     "$ref": "Empty"
6969	//   },
6970	//   "scopes": [
6971	//     "https://www.googleapis.com/auth/cloud-platform"
6972	//   ]
6973	// }
6974
6975}
6976
6977// method id "dataproc.projects.regions.autoscalingPolicies.get":
6978
6979type ProjectsRegionsAutoscalingPoliciesGetCall struct {
6980	s            *Service
6981	name         string
6982	urlParams_   gensupport.URLParams
6983	ifNoneMatch_ string
6984	ctx_         context.Context
6985	header_      http.Header
6986}
6987
6988// Get: Retrieves autoscaling policy.
6989func (r *ProjectsRegionsAutoscalingPoliciesService) Get(name string) *ProjectsRegionsAutoscalingPoliciesGetCall {
6990	c := &ProjectsRegionsAutoscalingPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6991	c.name = name
6992	return c
6993}
6994
6995// Fields allows partial responses to be retrieved. See
6996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6997// for more information.
6998func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesGetCall {
6999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7000	return c
7001}
7002
7003// IfNoneMatch sets the optional parameter which makes the operation
7004// fail if the object's ETag matches the given value. This is useful for
7005// getting updates only after the object has changed since the last
7006// request. Use googleapi.IsNotModified to check whether the response
7007// error from Do is the result of In-None-Match.
7008func (c *ProjectsRegionsAutoscalingPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsAutoscalingPoliciesGetCall {
7009	c.ifNoneMatch_ = entityTag
7010	return c
7011}
7012
7013// Context sets the context to be used in this call's Do method. Any
7014// pending HTTP request will be aborted if the provided context is
7015// canceled.
7016func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesGetCall {
7017	c.ctx_ = ctx
7018	return c
7019}
7020
7021// Header returns an http.Header that can be modified by the caller to
7022// add HTTP headers to the request.
7023func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Header() http.Header {
7024	if c.header_ == nil {
7025		c.header_ = make(http.Header)
7026	}
7027	return c.header_
7028}
7029
7030func (c *ProjectsRegionsAutoscalingPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
7031	reqHeaders := make(http.Header)
7032	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7033	for k, v := range c.header_ {
7034		reqHeaders[k] = v
7035	}
7036	reqHeaders.Set("User-Agent", c.s.userAgent())
7037	if c.ifNoneMatch_ != "" {
7038		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7039	}
7040	var body io.Reader = nil
7041	c.urlParams_.Set("alt", alt)
7042	c.urlParams_.Set("prettyPrint", "false")
7043	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7044	urls += "?" + c.urlParams_.Encode()
7045	req, err := http.NewRequest("GET", urls, body)
7046	if err != nil {
7047		return nil, err
7048	}
7049	req.Header = reqHeaders
7050	googleapi.Expand(req.URL, map[string]string{
7051		"name": c.name,
7052	})
7053	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7054}
7055
7056// Do executes the "dataproc.projects.regions.autoscalingPolicies.get" call.
7057// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
7058// non-2xx status code is an error. Response headers are in either
7059// *AutoscalingPolicy.ServerResponse.Header or (if a response was
7060// returned at all) in error.(*googleapi.Error).Header. Use
7061// googleapi.IsNotModified to check whether the returned error was
7062// because http.StatusNotModified was returned.
7063func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
7064	gensupport.SetOptions(c.urlParams_, opts...)
7065	res, err := c.doRequest("json")
7066	if res != nil && res.StatusCode == http.StatusNotModified {
7067		if res.Body != nil {
7068			res.Body.Close()
7069		}
7070		return nil, &googleapi.Error{
7071			Code:   res.StatusCode,
7072			Header: res.Header,
7073		}
7074	}
7075	if err != nil {
7076		return nil, err
7077	}
7078	defer googleapi.CloseBody(res)
7079	if err := googleapi.CheckResponse(res); err != nil {
7080		return nil, err
7081	}
7082	ret := &AutoscalingPolicy{
7083		ServerResponse: googleapi.ServerResponse{
7084			Header:         res.Header,
7085			HTTPStatusCode: res.StatusCode,
7086		},
7087	}
7088	target := &ret
7089	if err := gensupport.DecodeResponse(target, res); err != nil {
7090		return nil, err
7091	}
7092	return ret, nil
7093	// {
7094	//   "description": "Retrieves autoscaling policy.",
7095	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}",
7096	//   "httpMethod": "GET",
7097	//   "id": "dataproc.projects.regions.autoscalingPolicies.get",
7098	//   "parameterOrder": [
7099	//     "name"
7100	//   ],
7101	//   "parameters": {
7102	//     "name": {
7103	//       "description": "Required. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.autoscalingPolicies.get, the resource name  of the policy has the following format:  projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}\nFor projects.locations.autoscalingPolicies.get, the resource name  of the policy has the following format:  projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
7104	//       "location": "path",
7105	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7106	//       "required": true,
7107	//       "type": "string"
7108	//     }
7109	//   },
7110	//   "path": "v1/{+name}",
7111	//   "response": {
7112	//     "$ref": "AutoscalingPolicy"
7113	//   },
7114	//   "scopes": [
7115	//     "https://www.googleapis.com/auth/cloud-platform"
7116	//   ]
7117	// }
7118
7119}
7120
7121// method id "dataproc.projects.regions.autoscalingPolicies.getIamPolicy":
7122
7123type ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall struct {
7124	s                   *Service
7125	resource            string
7126	getiampolicyrequest *GetIamPolicyRequest
7127	urlParams_          gensupport.URLParams
7128	ctx_                context.Context
7129	header_             http.Header
7130}
7131
7132// GetIamPolicy: Gets the access control policy for a resource. Returns
7133// an empty policy if the resource exists and does not have a policy
7134// set.
7135func (r *ProjectsRegionsAutoscalingPoliciesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7136	c := &ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7137	c.resource = resource
7138	c.getiampolicyrequest = getiampolicyrequest
7139	return c
7140}
7141
7142// Fields allows partial responses to be retrieved. See
7143// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7144// for more information.
7145func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7146	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7147	return c
7148}
7149
7150// Context sets the context to be used in this call's Do method. Any
7151// pending HTTP request will be aborted if the provided context is
7152// canceled.
7153func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7154	c.ctx_ = ctx
7155	return c
7156}
7157
7158// Header returns an http.Header that can be modified by the caller to
7159// add HTTP headers to the request.
7160func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Header() http.Header {
7161	if c.header_ == nil {
7162		c.header_ = make(http.Header)
7163	}
7164	return c.header_
7165}
7166
7167func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7168	reqHeaders := make(http.Header)
7169	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7170	for k, v := range c.header_ {
7171		reqHeaders[k] = v
7172	}
7173	reqHeaders.Set("User-Agent", c.s.userAgent())
7174	var body io.Reader = nil
7175	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
7176	if err != nil {
7177		return nil, err
7178	}
7179	reqHeaders.Set("Content-Type", "application/json")
7180	c.urlParams_.Set("alt", alt)
7181	c.urlParams_.Set("prettyPrint", "false")
7182	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
7183	urls += "?" + c.urlParams_.Encode()
7184	req, err := http.NewRequest("POST", urls, body)
7185	if err != nil {
7186		return nil, err
7187	}
7188	req.Header = reqHeaders
7189	googleapi.Expand(req.URL, map[string]string{
7190		"resource": c.resource,
7191	})
7192	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7193}
7194
7195// Do executes the "dataproc.projects.regions.autoscalingPolicies.getIamPolicy" call.
7196// Exactly one of *Policy or error will be non-nil. Any non-2xx status
7197// code is an error. Response headers are in either
7198// *Policy.ServerResponse.Header or (if a response was returned at all)
7199// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7200// check whether the returned error was because http.StatusNotModified
7201// was returned.
7202func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7203	gensupport.SetOptions(c.urlParams_, opts...)
7204	res, err := c.doRequest("json")
7205	if res != nil && res.StatusCode == http.StatusNotModified {
7206		if res.Body != nil {
7207			res.Body.Close()
7208		}
7209		return nil, &googleapi.Error{
7210			Code:   res.StatusCode,
7211			Header: res.Header,
7212		}
7213	}
7214	if err != nil {
7215		return nil, err
7216	}
7217	defer googleapi.CloseBody(res)
7218	if err := googleapi.CheckResponse(res); err != nil {
7219		return nil, err
7220	}
7221	ret := &Policy{
7222		ServerResponse: googleapi.ServerResponse{
7223			Header:         res.Header,
7224			HTTPStatusCode: res.StatusCode,
7225		},
7226	}
7227	target := &ret
7228	if err := gensupport.DecodeResponse(target, res); err != nil {
7229		return nil, err
7230	}
7231	return ret, nil
7232	// {
7233	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
7234	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}:getIamPolicy",
7235	//   "httpMethod": "POST",
7236	//   "id": "dataproc.projects.regions.autoscalingPolicies.getIamPolicy",
7237	//   "parameterOrder": [
7238	//     "resource"
7239	//   ],
7240	//   "parameters": {
7241	//     "resource": {
7242	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
7243	//       "location": "path",
7244	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7245	//       "required": true,
7246	//       "type": "string"
7247	//     }
7248	//   },
7249	//   "path": "v1/{+resource}:getIamPolicy",
7250	//   "request": {
7251	//     "$ref": "GetIamPolicyRequest"
7252	//   },
7253	//   "response": {
7254	//     "$ref": "Policy"
7255	//   },
7256	//   "scopes": [
7257	//     "https://www.googleapis.com/auth/cloud-platform"
7258	//   ]
7259	// }
7260
7261}
7262
7263// method id "dataproc.projects.regions.autoscalingPolicies.list":
7264
7265type ProjectsRegionsAutoscalingPoliciesListCall struct {
7266	s            *Service
7267	parent       string
7268	urlParams_   gensupport.URLParams
7269	ifNoneMatch_ string
7270	ctx_         context.Context
7271	header_      http.Header
7272}
7273
7274// List: Lists autoscaling policies in the project.
7275func (r *ProjectsRegionsAutoscalingPoliciesService) List(parent string) *ProjectsRegionsAutoscalingPoliciesListCall {
7276	c := &ProjectsRegionsAutoscalingPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7277	c.parent = parent
7278	return c
7279}
7280
7281// PageSize sets the optional parameter "pageSize": The maximum number
7282// of results to return in each response. Must be less than or equal to
7283// 1000. Defaults to 100.
7284func (c *ProjectsRegionsAutoscalingPoliciesListCall) PageSize(pageSize int64) *ProjectsRegionsAutoscalingPoliciesListCall {
7285	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7286	return c
7287}
7288
7289// PageToken sets the optional parameter "pageToken": The page token,
7290// returned by a previous call, to request the next page of results.
7291func (c *ProjectsRegionsAutoscalingPoliciesListCall) PageToken(pageToken string) *ProjectsRegionsAutoscalingPoliciesListCall {
7292	c.urlParams_.Set("pageToken", pageToken)
7293	return c
7294}
7295
7296// Fields allows partial responses to be retrieved. See
7297// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7298// for more information.
7299func (c *ProjectsRegionsAutoscalingPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesListCall {
7300	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7301	return c
7302}
7303
7304// IfNoneMatch sets the optional parameter which makes the operation
7305// fail if the object's ETag matches the given value. This is useful for
7306// getting updates only after the object has changed since the last
7307// request. Use googleapi.IsNotModified to check whether the response
7308// error from Do is the result of In-None-Match.
7309func (c *ProjectsRegionsAutoscalingPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsRegionsAutoscalingPoliciesListCall {
7310	c.ifNoneMatch_ = entityTag
7311	return c
7312}
7313
7314// Context sets the context to be used in this call's Do method. Any
7315// pending HTTP request will be aborted if the provided context is
7316// canceled.
7317func (c *ProjectsRegionsAutoscalingPoliciesListCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesListCall {
7318	c.ctx_ = ctx
7319	return c
7320}
7321
7322// Header returns an http.Header that can be modified by the caller to
7323// add HTTP headers to the request.
7324func (c *ProjectsRegionsAutoscalingPoliciesListCall) Header() http.Header {
7325	if c.header_ == nil {
7326		c.header_ = make(http.Header)
7327	}
7328	return c.header_
7329}
7330
7331func (c *ProjectsRegionsAutoscalingPoliciesListCall) doRequest(alt string) (*http.Response, error) {
7332	reqHeaders := make(http.Header)
7333	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7334	for k, v := range c.header_ {
7335		reqHeaders[k] = v
7336	}
7337	reqHeaders.Set("User-Agent", c.s.userAgent())
7338	if c.ifNoneMatch_ != "" {
7339		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7340	}
7341	var body io.Reader = nil
7342	c.urlParams_.Set("alt", alt)
7343	c.urlParams_.Set("prettyPrint", "false")
7344	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/autoscalingPolicies")
7345	urls += "?" + c.urlParams_.Encode()
7346	req, err := http.NewRequest("GET", urls, body)
7347	if err != nil {
7348		return nil, err
7349	}
7350	req.Header = reqHeaders
7351	googleapi.Expand(req.URL, map[string]string{
7352		"parent": c.parent,
7353	})
7354	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7355}
7356
7357// Do executes the "dataproc.projects.regions.autoscalingPolicies.list" call.
7358// Exactly one of *ListAutoscalingPoliciesResponse or error will be
7359// non-nil. Any non-2xx status code is an error. Response headers are in
7360// either *ListAutoscalingPoliciesResponse.ServerResponse.Header or (if
7361// a response was returned at all) in error.(*googleapi.Error).Header.
7362// Use googleapi.IsNotModified to check whether the returned error was
7363// because http.StatusNotModified was returned.
7364func (c *ProjectsRegionsAutoscalingPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListAutoscalingPoliciesResponse, error) {
7365	gensupport.SetOptions(c.urlParams_, opts...)
7366	res, err := c.doRequest("json")
7367	if res != nil && res.StatusCode == http.StatusNotModified {
7368		if res.Body != nil {
7369			res.Body.Close()
7370		}
7371		return nil, &googleapi.Error{
7372			Code:   res.StatusCode,
7373			Header: res.Header,
7374		}
7375	}
7376	if err != nil {
7377		return nil, err
7378	}
7379	defer googleapi.CloseBody(res)
7380	if err := googleapi.CheckResponse(res); err != nil {
7381		return nil, err
7382	}
7383	ret := &ListAutoscalingPoliciesResponse{
7384		ServerResponse: googleapi.ServerResponse{
7385			Header:         res.Header,
7386			HTTPStatusCode: res.StatusCode,
7387		},
7388	}
7389	target := &ret
7390	if err := gensupport.DecodeResponse(target, res); err != nil {
7391		return nil, err
7392	}
7393	return ret, nil
7394	// {
7395	//   "description": "Lists autoscaling policies in the project.",
7396	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies",
7397	//   "httpMethod": "GET",
7398	//   "id": "dataproc.projects.regions.autoscalingPolicies.list",
7399	//   "parameterOrder": [
7400	//     "parent"
7401	//   ],
7402	//   "parameters": {
7403	//     "pageSize": {
7404	//       "description": "Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.",
7405	//       "format": "int32",
7406	//       "location": "query",
7407	//       "type": "integer"
7408	//     },
7409	//     "pageToken": {
7410	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
7411	//       "location": "query",
7412	//       "type": "string"
7413	//     },
7414	//     "parent": {
7415	//       "description": "Required. The \"resource name\" of the region or location, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.autoscalingPolicies.list, the resource name  of the region has the following format:  projects/{project_id}/regions/{region}\nFor projects.locations.autoscalingPolicies.list, the resource name  of the location has the following format:  projects/{project_id}/locations/{location}",
7416	//       "location": "path",
7417	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
7418	//       "required": true,
7419	//       "type": "string"
7420	//     }
7421	//   },
7422	//   "path": "v1/{+parent}/autoscalingPolicies",
7423	//   "response": {
7424	//     "$ref": "ListAutoscalingPoliciesResponse"
7425	//   },
7426	//   "scopes": [
7427	//     "https://www.googleapis.com/auth/cloud-platform"
7428	//   ]
7429	// }
7430
7431}
7432
7433// Pages invokes f for each page of results.
7434// A non-nil error returned from f will halt the iteration.
7435// The provided context supersedes any context provided to the Context method.
7436func (c *ProjectsRegionsAutoscalingPoliciesListCall) Pages(ctx context.Context, f func(*ListAutoscalingPoliciesResponse) error) error {
7437	c.ctx_ = ctx
7438	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7439	for {
7440		x, err := c.Do()
7441		if err != nil {
7442			return err
7443		}
7444		if err := f(x); err != nil {
7445			return err
7446		}
7447		if x.NextPageToken == "" {
7448			return nil
7449		}
7450		c.PageToken(x.NextPageToken)
7451	}
7452}
7453
7454// method id "dataproc.projects.regions.autoscalingPolicies.setIamPolicy":
7455
7456type ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall struct {
7457	s                   *Service
7458	resource            string
7459	setiampolicyrequest *SetIamPolicyRequest
7460	urlParams_          gensupport.URLParams
7461	ctx_                context.Context
7462	header_             http.Header
7463}
7464
7465// SetIamPolicy: Sets the access control policy on the specified
7466// resource. Replaces any existing policy.Can return Public Errors:
7467// NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
7468func (r *ProjectsRegionsAutoscalingPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
7469	c := &ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7470	c.resource = resource
7471	c.setiampolicyrequest = setiampolicyrequest
7472	return c
7473}
7474
7475// Fields allows partial responses to be retrieved. See
7476// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7477// for more information.
7478func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
7479	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7480	return c
7481}
7482
7483// Context sets the context to be used in this call's Do method. Any
7484// pending HTTP request will be aborted if the provided context is
7485// canceled.
7486func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
7487	c.ctx_ = ctx
7488	return c
7489}
7490
7491// Header returns an http.Header that can be modified by the caller to
7492// add HTTP headers to the request.
7493func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Header() http.Header {
7494	if c.header_ == nil {
7495		c.header_ = make(http.Header)
7496	}
7497	return c.header_
7498}
7499
7500func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7501	reqHeaders := make(http.Header)
7502	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7503	for k, v := range c.header_ {
7504		reqHeaders[k] = v
7505	}
7506	reqHeaders.Set("User-Agent", c.s.userAgent())
7507	var body io.Reader = nil
7508	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
7509	if err != nil {
7510		return nil, err
7511	}
7512	reqHeaders.Set("Content-Type", "application/json")
7513	c.urlParams_.Set("alt", alt)
7514	c.urlParams_.Set("prettyPrint", "false")
7515	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
7516	urls += "?" + c.urlParams_.Encode()
7517	req, err := http.NewRequest("POST", urls, body)
7518	if err != nil {
7519		return nil, err
7520	}
7521	req.Header = reqHeaders
7522	googleapi.Expand(req.URL, map[string]string{
7523		"resource": c.resource,
7524	})
7525	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7526}
7527
7528// Do executes the "dataproc.projects.regions.autoscalingPolicies.setIamPolicy" call.
7529// Exactly one of *Policy or error will be non-nil. Any non-2xx status
7530// code is an error. Response headers are in either
7531// *Policy.ServerResponse.Header or (if a response was returned at all)
7532// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7533// check whether the returned error was because http.StatusNotModified
7534// was returned.
7535func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7536	gensupport.SetOptions(c.urlParams_, opts...)
7537	res, err := c.doRequest("json")
7538	if res != nil && res.StatusCode == http.StatusNotModified {
7539		if res.Body != nil {
7540			res.Body.Close()
7541		}
7542		return nil, &googleapi.Error{
7543			Code:   res.StatusCode,
7544			Header: res.Header,
7545		}
7546	}
7547	if err != nil {
7548		return nil, err
7549	}
7550	defer googleapi.CloseBody(res)
7551	if err := googleapi.CheckResponse(res); err != nil {
7552		return nil, err
7553	}
7554	ret := &Policy{
7555		ServerResponse: googleapi.ServerResponse{
7556			Header:         res.Header,
7557			HTTPStatusCode: res.StatusCode,
7558		},
7559	}
7560	target := &ret
7561	if err := gensupport.DecodeResponse(target, res); err != nil {
7562		return nil, err
7563	}
7564	return ret, nil
7565	// {
7566	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED",
7567	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}:setIamPolicy",
7568	//   "httpMethod": "POST",
7569	//   "id": "dataproc.projects.regions.autoscalingPolicies.setIamPolicy",
7570	//   "parameterOrder": [
7571	//     "resource"
7572	//   ],
7573	//   "parameters": {
7574	//     "resource": {
7575	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
7576	//       "location": "path",
7577	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7578	//       "required": true,
7579	//       "type": "string"
7580	//     }
7581	//   },
7582	//   "path": "v1/{+resource}:setIamPolicy",
7583	//   "request": {
7584	//     "$ref": "SetIamPolicyRequest"
7585	//   },
7586	//   "response": {
7587	//     "$ref": "Policy"
7588	//   },
7589	//   "scopes": [
7590	//     "https://www.googleapis.com/auth/cloud-platform"
7591	//   ]
7592	// }
7593
7594}
7595
7596// method id "dataproc.projects.regions.autoscalingPolicies.testIamPermissions":
7597
7598type ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall struct {
7599	s                         *Service
7600	resource                  string
7601	testiampermissionsrequest *TestIamPermissionsRequest
7602	urlParams_                gensupport.URLParams
7603	ctx_                      context.Context
7604	header_                   http.Header
7605}
7606
7607// TestIamPermissions: Returns permissions that a caller has on the
7608// specified resource. If the resource does not exist, this will return
7609// an empty set of permissions, not a NOT_FOUND error.Note: This
7610// operation is designed to be used for building permission-aware UIs
7611// and command-line tools, not for authorization checking. This
7612// operation may "fail open" without warning.
7613func (r *ProjectsRegionsAutoscalingPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
7614	c := &ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7615	c.resource = resource
7616	c.testiampermissionsrequest = testiampermissionsrequest
7617	return c
7618}
7619
7620// Fields allows partial responses to be retrieved. See
7621// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7622// for more information.
7623func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
7624	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7625	return c
7626}
7627
7628// Context sets the context to be used in this call's Do method. Any
7629// pending HTTP request will be aborted if the provided context is
7630// canceled.
7631func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
7632	c.ctx_ = ctx
7633	return c
7634}
7635
7636// Header returns an http.Header that can be modified by the caller to
7637// add HTTP headers to the request.
7638func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Header() http.Header {
7639	if c.header_ == nil {
7640		c.header_ = make(http.Header)
7641	}
7642	return c.header_
7643}
7644
7645func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
7646	reqHeaders := make(http.Header)
7647	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7648	for k, v := range c.header_ {
7649		reqHeaders[k] = v
7650	}
7651	reqHeaders.Set("User-Agent", c.s.userAgent())
7652	var body io.Reader = nil
7653	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
7654	if err != nil {
7655		return nil, err
7656	}
7657	reqHeaders.Set("Content-Type", "application/json")
7658	c.urlParams_.Set("alt", alt)
7659	c.urlParams_.Set("prettyPrint", "false")
7660	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
7661	urls += "?" + c.urlParams_.Encode()
7662	req, err := http.NewRequest("POST", urls, body)
7663	if err != nil {
7664		return nil, err
7665	}
7666	req.Header = reqHeaders
7667	googleapi.Expand(req.URL, map[string]string{
7668		"resource": c.resource,
7669	})
7670	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7671}
7672
7673// Do executes the "dataproc.projects.regions.autoscalingPolicies.testIamPermissions" call.
7674// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
7675// Any non-2xx status code is an error. Response headers are in either
7676// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
7677// was returned at all) in error.(*googleapi.Error).Header. Use
7678// googleapi.IsNotModified to check whether the returned error was
7679// because http.StatusNotModified was returned.
7680func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
7681	gensupport.SetOptions(c.urlParams_, opts...)
7682	res, err := c.doRequest("json")
7683	if res != nil && res.StatusCode == http.StatusNotModified {
7684		if res.Body != nil {
7685			res.Body.Close()
7686		}
7687		return nil, &googleapi.Error{
7688			Code:   res.StatusCode,
7689			Header: res.Header,
7690		}
7691	}
7692	if err != nil {
7693		return nil, err
7694	}
7695	defer googleapi.CloseBody(res)
7696	if err := googleapi.CheckResponse(res); err != nil {
7697		return nil, err
7698	}
7699	ret := &TestIamPermissionsResponse{
7700		ServerResponse: googleapi.ServerResponse{
7701			Header:         res.Header,
7702			HTTPStatusCode: res.StatusCode,
7703		},
7704	}
7705	target := &ret
7706	if err := gensupport.DecodeResponse(target, res); err != nil {
7707		return nil, err
7708	}
7709	return ret, nil
7710	// {
7711	//   "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.",
7712	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}:testIamPermissions",
7713	//   "httpMethod": "POST",
7714	//   "id": "dataproc.projects.regions.autoscalingPolicies.testIamPermissions",
7715	//   "parameterOrder": [
7716	//     "resource"
7717	//   ],
7718	//   "parameters": {
7719	//     "resource": {
7720	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
7721	//       "location": "path",
7722	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7723	//       "required": true,
7724	//       "type": "string"
7725	//     }
7726	//   },
7727	//   "path": "v1/{+resource}:testIamPermissions",
7728	//   "request": {
7729	//     "$ref": "TestIamPermissionsRequest"
7730	//   },
7731	//   "response": {
7732	//     "$ref": "TestIamPermissionsResponse"
7733	//   },
7734	//   "scopes": [
7735	//     "https://www.googleapis.com/auth/cloud-platform"
7736	//   ]
7737	// }
7738
7739}
7740
7741// method id "dataproc.projects.regions.autoscalingPolicies.update":
7742
7743type ProjectsRegionsAutoscalingPoliciesUpdateCall struct {
7744	s                 *Service
7745	name              string
7746	autoscalingpolicy *AutoscalingPolicy
7747	urlParams_        gensupport.URLParams
7748	ctx_              context.Context
7749	header_           http.Header
7750}
7751
7752// Update: Updates (replaces) autoscaling policy.Disabled check for
7753// update_mask, because all updates will be full replacements.
7754func (r *ProjectsRegionsAutoscalingPoliciesService) Update(name string, autoscalingpolicy *AutoscalingPolicy) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
7755	c := &ProjectsRegionsAutoscalingPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7756	c.name = name
7757	c.autoscalingpolicy = autoscalingpolicy
7758	return c
7759}
7760
7761// Fields allows partial responses to be retrieved. See
7762// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7763// for more information.
7764func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
7765	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7766	return c
7767}
7768
7769// Context sets the context to be used in this call's Do method. Any
7770// pending HTTP request will be aborted if the provided context is
7771// canceled.
7772func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
7773	c.ctx_ = ctx
7774	return c
7775}
7776
7777// Header returns an http.Header that can be modified by the caller to
7778// add HTTP headers to the request.
7779func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Header() http.Header {
7780	if c.header_ == nil {
7781		c.header_ = make(http.Header)
7782	}
7783	return c.header_
7784}
7785
7786func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
7787	reqHeaders := make(http.Header)
7788	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7789	for k, v := range c.header_ {
7790		reqHeaders[k] = v
7791	}
7792	reqHeaders.Set("User-Agent", c.s.userAgent())
7793	var body io.Reader = nil
7794	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
7795	if err != nil {
7796		return nil, err
7797	}
7798	reqHeaders.Set("Content-Type", "application/json")
7799	c.urlParams_.Set("alt", alt)
7800	c.urlParams_.Set("prettyPrint", "false")
7801	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
7802	urls += "?" + c.urlParams_.Encode()
7803	req, err := http.NewRequest("PUT", urls, body)
7804	if err != nil {
7805		return nil, err
7806	}
7807	req.Header = reqHeaders
7808	googleapi.Expand(req.URL, map[string]string{
7809		"name": c.name,
7810	})
7811	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7812}
7813
7814// Do executes the "dataproc.projects.regions.autoscalingPolicies.update" call.
7815// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
7816// non-2xx status code is an error. Response headers are in either
7817// *AutoscalingPolicy.ServerResponse.Header or (if a response was
7818// returned at all) in error.(*googleapi.Error).Header. Use
7819// googleapi.IsNotModified to check whether the returned error was
7820// because http.StatusNotModified was returned.
7821func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
7822	gensupport.SetOptions(c.urlParams_, opts...)
7823	res, err := c.doRequest("json")
7824	if res != nil && res.StatusCode == http.StatusNotModified {
7825		if res.Body != nil {
7826			res.Body.Close()
7827		}
7828		return nil, &googleapi.Error{
7829			Code:   res.StatusCode,
7830			Header: res.Header,
7831		}
7832	}
7833	if err != nil {
7834		return nil, err
7835	}
7836	defer googleapi.CloseBody(res)
7837	if err := googleapi.CheckResponse(res); err != nil {
7838		return nil, err
7839	}
7840	ret := &AutoscalingPolicy{
7841		ServerResponse: googleapi.ServerResponse{
7842			Header:         res.Header,
7843			HTTPStatusCode: res.StatusCode,
7844		},
7845	}
7846	target := &ret
7847	if err := gensupport.DecodeResponse(target, res); err != nil {
7848		return nil, err
7849	}
7850	return ret, nil
7851	// {
7852	//   "description": "Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.",
7853	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}",
7854	//   "httpMethod": "PUT",
7855	//   "id": "dataproc.projects.regions.autoscalingPolicies.update",
7856	//   "parameterOrder": [
7857	//     "name"
7858	//   ],
7859	//   "parameters": {
7860	//     "name": {
7861	//       "description": "Output only. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.autoscalingPolicies, the resource name of the  policy has the following format:  projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}\nFor projects.locations.autoscalingPolicies, the resource name of the  policy has the following format:  projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
7862	//       "location": "path",
7863	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7864	//       "required": true,
7865	//       "type": "string"
7866	//     }
7867	//   },
7868	//   "path": "v1/{+name}",
7869	//   "request": {
7870	//     "$ref": "AutoscalingPolicy"
7871	//   },
7872	//   "response": {
7873	//     "$ref": "AutoscalingPolicy"
7874	//   },
7875	//   "scopes": [
7876	//     "https://www.googleapis.com/auth/cloud-platform"
7877	//   ]
7878	// }
7879
7880}
7881
7882// method id "dataproc.projects.regions.clusters.create":
7883
7884type ProjectsRegionsClustersCreateCall struct {
7885	s          *Service
7886	projectId  string
7887	region     string
7888	cluster    *Cluster
7889	urlParams_ gensupport.URLParams
7890	ctx_       context.Context
7891	header_    http.Header
7892}
7893
7894// Create: Creates a cluster in a project. The returned
7895// Operation.metadata will be ClusterOperationMetadata
7896// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
7897// aproc.v1#clusteroperationmetadata).
7898func (r *ProjectsRegionsClustersService) Create(projectId string, region string, cluster *Cluster) *ProjectsRegionsClustersCreateCall {
7899	c := &ProjectsRegionsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7900	c.projectId = projectId
7901	c.region = region
7902	c.cluster = cluster
7903	return c
7904}
7905
7906// RequestId sets the optional parameter "requestId": A unique id used
7907// to identify the request. If the server receives two
7908// CreateClusterRequest requests with the same id, then the second
7909// request will be ignored and the first google.longrunning.Operation
7910// created and stored in the backend is returned.It is recommended to
7911// always set this value to a UUID
7912// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
7913// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
7914// and hyphens (-). The maximum length is 40 characters.
7915func (c *ProjectsRegionsClustersCreateCall) RequestId(requestId string) *ProjectsRegionsClustersCreateCall {
7916	c.urlParams_.Set("requestId", requestId)
7917	return c
7918}
7919
7920// Fields allows partial responses to be retrieved. See
7921// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7922// for more information.
7923func (c *ProjectsRegionsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersCreateCall {
7924	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7925	return c
7926}
7927
7928// Context sets the context to be used in this call's Do method. Any
7929// pending HTTP request will be aborted if the provided context is
7930// canceled.
7931func (c *ProjectsRegionsClustersCreateCall) Context(ctx context.Context) *ProjectsRegionsClustersCreateCall {
7932	c.ctx_ = ctx
7933	return c
7934}
7935
7936// Header returns an http.Header that can be modified by the caller to
7937// add HTTP headers to the request.
7938func (c *ProjectsRegionsClustersCreateCall) Header() http.Header {
7939	if c.header_ == nil {
7940		c.header_ = make(http.Header)
7941	}
7942	return c.header_
7943}
7944
7945func (c *ProjectsRegionsClustersCreateCall) doRequest(alt string) (*http.Response, error) {
7946	reqHeaders := make(http.Header)
7947	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
7948	for k, v := range c.header_ {
7949		reqHeaders[k] = v
7950	}
7951	reqHeaders.Set("User-Agent", c.s.userAgent())
7952	var body io.Reader = nil
7953	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
7954	if err != nil {
7955		return nil, err
7956	}
7957	reqHeaders.Set("Content-Type", "application/json")
7958	c.urlParams_.Set("alt", alt)
7959	c.urlParams_.Set("prettyPrint", "false")
7960	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters")
7961	urls += "?" + c.urlParams_.Encode()
7962	req, err := http.NewRequest("POST", urls, body)
7963	if err != nil {
7964		return nil, err
7965	}
7966	req.Header = reqHeaders
7967	googleapi.Expand(req.URL, map[string]string{
7968		"projectId": c.projectId,
7969		"region":    c.region,
7970	})
7971	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7972}
7973
7974// Do executes the "dataproc.projects.regions.clusters.create" call.
7975// Exactly one of *Operation or error will be non-nil. Any non-2xx
7976// status code is an error. Response headers are in either
7977// *Operation.ServerResponse.Header or (if a response was returned at
7978// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
7979// to check whether the returned error was because
7980// http.StatusNotModified was returned.
7981func (c *ProjectsRegionsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
7982	gensupport.SetOptions(c.urlParams_, opts...)
7983	res, err := c.doRequest("json")
7984	if res != nil && res.StatusCode == http.StatusNotModified {
7985		if res.Body != nil {
7986			res.Body.Close()
7987		}
7988		return nil, &googleapi.Error{
7989			Code:   res.StatusCode,
7990			Header: res.Header,
7991		}
7992	}
7993	if err != nil {
7994		return nil, err
7995	}
7996	defer googleapi.CloseBody(res)
7997	if err := googleapi.CheckResponse(res); err != nil {
7998		return nil, err
7999	}
8000	ret := &Operation{
8001		ServerResponse: googleapi.ServerResponse{
8002			Header:         res.Header,
8003			HTTPStatusCode: res.StatusCode,
8004		},
8005	}
8006	target := &ret
8007	if err := gensupport.DecodeResponse(target, res); err != nil {
8008		return nil, err
8009	}
8010	return ret, nil
8011	// {
8012	//   "description": "Creates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).",
8013	//   "flatPath": "v1/projects/{projectId}/regions/{region}/clusters",
8014	//   "httpMethod": "POST",
8015	//   "id": "dataproc.projects.regions.clusters.create",
8016	//   "parameterOrder": [
8017	//     "projectId",
8018	//     "region"
8019	//   ],
8020	//   "parameters": {
8021	//     "projectId": {
8022	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8023	//       "location": "path",
8024	//       "required": true,
8025	//       "type": "string"
8026	//     },
8027	//     "region": {
8028	//       "description": "Required. The Dataproc region in which to handle the request.",
8029	//       "location": "path",
8030	//       "required": true,
8031	//       "type": "string"
8032	//     },
8033	//     "requestId": {
8034	//       "description": "Optional. A unique id used to identify the request. If the server receives two CreateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.",
8035	//       "location": "query",
8036	//       "type": "string"
8037	//     }
8038	//   },
8039	//   "path": "v1/projects/{projectId}/regions/{region}/clusters",
8040	//   "request": {
8041	//     "$ref": "Cluster"
8042	//   },
8043	//   "response": {
8044	//     "$ref": "Operation"
8045	//   },
8046	//   "scopes": [
8047	//     "https://www.googleapis.com/auth/cloud-platform"
8048	//   ]
8049	// }
8050
8051}
8052
8053// method id "dataproc.projects.regions.clusters.delete":
8054
8055type ProjectsRegionsClustersDeleteCall struct {
8056	s           *Service
8057	projectId   string
8058	region      string
8059	clusterName string
8060	urlParams_  gensupport.URLParams
8061	ctx_        context.Context
8062	header_     http.Header
8063}
8064
8065// Delete: Deletes a cluster in a project. The returned
8066// Operation.metadata will be ClusterOperationMetadata
8067// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
8068// aproc.v1#clusteroperationmetadata).
8069func (r *ProjectsRegionsClustersService) Delete(projectId string, region string, clusterName string) *ProjectsRegionsClustersDeleteCall {
8070	c := &ProjectsRegionsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8071	c.projectId = projectId
8072	c.region = region
8073	c.clusterName = clusterName
8074	return c
8075}
8076
8077// ClusterUuid sets the optional parameter "clusterUuid": Specifying the
8078// cluster_uuid means the RPC should fail (with error NOT_FOUND) if
8079// cluster with specified UUID does not exist.
8080func (c *ProjectsRegionsClustersDeleteCall) ClusterUuid(clusterUuid string) *ProjectsRegionsClustersDeleteCall {
8081	c.urlParams_.Set("clusterUuid", clusterUuid)
8082	return c
8083}
8084
8085// RequestId sets the optional parameter "requestId": A unique id used
8086// to identify the request. If the server receives two
8087// DeleteClusterRequest requests with the same id, then the second
8088// request will be ignored and the first google.longrunning.Operation
8089// created and stored in the backend is returned.It is recommended to
8090// always set this value to a UUID
8091// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
8092// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
8093// and hyphens (-). The maximum length is 40 characters.
8094func (c *ProjectsRegionsClustersDeleteCall) RequestId(requestId string) *ProjectsRegionsClustersDeleteCall {
8095	c.urlParams_.Set("requestId", requestId)
8096	return c
8097}
8098
8099// Fields allows partial responses to be retrieved. See
8100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8101// for more information.
8102func (c *ProjectsRegionsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersDeleteCall {
8103	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8104	return c
8105}
8106
8107// Context sets the context to be used in this call's Do method. Any
8108// pending HTTP request will be aborted if the provided context is
8109// canceled.
8110func (c *ProjectsRegionsClustersDeleteCall) Context(ctx context.Context) *ProjectsRegionsClustersDeleteCall {
8111	c.ctx_ = ctx
8112	return c
8113}
8114
8115// Header returns an http.Header that can be modified by the caller to
8116// add HTTP headers to the request.
8117func (c *ProjectsRegionsClustersDeleteCall) Header() http.Header {
8118	if c.header_ == nil {
8119		c.header_ = make(http.Header)
8120	}
8121	return c.header_
8122}
8123
8124func (c *ProjectsRegionsClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
8125	reqHeaders := make(http.Header)
8126	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8127	for k, v := range c.header_ {
8128		reqHeaders[k] = v
8129	}
8130	reqHeaders.Set("User-Agent", c.s.userAgent())
8131	var body io.Reader = nil
8132	c.urlParams_.Set("alt", alt)
8133	c.urlParams_.Set("prettyPrint", "false")
8134	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}")
8135	urls += "?" + c.urlParams_.Encode()
8136	req, err := http.NewRequest("DELETE", urls, body)
8137	if err != nil {
8138		return nil, err
8139	}
8140	req.Header = reqHeaders
8141	googleapi.Expand(req.URL, map[string]string{
8142		"projectId":   c.projectId,
8143		"region":      c.region,
8144		"clusterName": c.clusterName,
8145	})
8146	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8147}
8148
8149// Do executes the "dataproc.projects.regions.clusters.delete" call.
8150// Exactly one of *Operation or error will be non-nil. Any non-2xx
8151// status code is an error. Response headers are in either
8152// *Operation.ServerResponse.Header or (if a response was returned at
8153// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8154// to check whether the returned error was because
8155// http.StatusNotModified was returned.
8156func (c *ProjectsRegionsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8157	gensupport.SetOptions(c.urlParams_, opts...)
8158	res, err := c.doRequest("json")
8159	if res != nil && res.StatusCode == http.StatusNotModified {
8160		if res.Body != nil {
8161			res.Body.Close()
8162		}
8163		return nil, &googleapi.Error{
8164			Code:   res.StatusCode,
8165			Header: res.Header,
8166		}
8167	}
8168	if err != nil {
8169		return nil, err
8170	}
8171	defer googleapi.CloseBody(res)
8172	if err := googleapi.CheckResponse(res); err != nil {
8173		return nil, err
8174	}
8175	ret := &Operation{
8176		ServerResponse: googleapi.ServerResponse{
8177			Header:         res.Header,
8178			HTTPStatusCode: res.StatusCode,
8179		},
8180	}
8181	target := &ret
8182	if err := gensupport.DecodeResponse(target, res); err != nil {
8183		return nil, err
8184	}
8185	return ret, nil
8186	// {
8187	//   "description": "Deletes a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).",
8188	//   "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}",
8189	//   "httpMethod": "DELETE",
8190	//   "id": "dataproc.projects.regions.clusters.delete",
8191	//   "parameterOrder": [
8192	//     "projectId",
8193	//     "region",
8194	//     "clusterName"
8195	//   ],
8196	//   "parameters": {
8197	//     "clusterName": {
8198	//       "description": "Required. The cluster name.",
8199	//       "location": "path",
8200	//       "required": true,
8201	//       "type": "string"
8202	//     },
8203	//     "clusterUuid": {
8204	//       "description": "Optional. Specifying the cluster_uuid means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist.",
8205	//       "location": "query",
8206	//       "type": "string"
8207	//     },
8208	//     "projectId": {
8209	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8210	//       "location": "path",
8211	//       "required": true,
8212	//       "type": "string"
8213	//     },
8214	//     "region": {
8215	//       "description": "Required. The Dataproc region in which to handle the request.",
8216	//       "location": "path",
8217	//       "required": true,
8218	//       "type": "string"
8219	//     },
8220	//     "requestId": {
8221	//       "description": "Optional. A unique id used to identify the request. If the server receives two DeleteClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.",
8222	//       "location": "query",
8223	//       "type": "string"
8224	//     }
8225	//   },
8226	//   "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}",
8227	//   "response": {
8228	//     "$ref": "Operation"
8229	//   },
8230	//   "scopes": [
8231	//     "https://www.googleapis.com/auth/cloud-platform"
8232	//   ]
8233	// }
8234
8235}
8236
8237// method id "dataproc.projects.regions.clusters.diagnose":
8238
8239type ProjectsRegionsClustersDiagnoseCall struct {
8240	s                      *Service
8241	projectId              string
8242	region                 string
8243	clusterName            string
8244	diagnoseclusterrequest *DiagnoseClusterRequest
8245	urlParams_             gensupport.URLParams
8246	ctx_                   context.Context
8247	header_                http.Header
8248}
8249
8250// Diagnose: Gets cluster diagnostic information. The returned
8251// Operation.metadata will be ClusterOperationMetadata
8252// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
8253// aproc.v1#clusteroperationmetadata). After the operation completes,
8254// Operation.response contains DiagnoseClusterResults
8255// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
8256// aproc.v1#diagnoseclusterresults).
8257func (r *ProjectsRegionsClustersService) Diagnose(projectId string, region string, clusterName string, diagnoseclusterrequest *DiagnoseClusterRequest) *ProjectsRegionsClustersDiagnoseCall {
8258	c := &ProjectsRegionsClustersDiagnoseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8259	c.projectId = projectId
8260	c.region = region
8261	c.clusterName = clusterName
8262	c.diagnoseclusterrequest = diagnoseclusterrequest
8263	return c
8264}
8265
8266// Fields allows partial responses to be retrieved. See
8267// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8268// for more information.
8269func (c *ProjectsRegionsClustersDiagnoseCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersDiagnoseCall {
8270	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8271	return c
8272}
8273
8274// Context sets the context to be used in this call's Do method. Any
8275// pending HTTP request will be aborted if the provided context is
8276// canceled.
8277func (c *ProjectsRegionsClustersDiagnoseCall) Context(ctx context.Context) *ProjectsRegionsClustersDiagnoseCall {
8278	c.ctx_ = ctx
8279	return c
8280}
8281
8282// Header returns an http.Header that can be modified by the caller to
8283// add HTTP headers to the request.
8284func (c *ProjectsRegionsClustersDiagnoseCall) Header() http.Header {
8285	if c.header_ == nil {
8286		c.header_ = make(http.Header)
8287	}
8288	return c.header_
8289}
8290
8291func (c *ProjectsRegionsClustersDiagnoseCall) doRequest(alt string) (*http.Response, error) {
8292	reqHeaders := make(http.Header)
8293	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8294	for k, v := range c.header_ {
8295		reqHeaders[k] = v
8296	}
8297	reqHeaders.Set("User-Agent", c.s.userAgent())
8298	var body io.Reader = nil
8299	body, err := googleapi.WithoutDataWrapper.JSONReader(c.diagnoseclusterrequest)
8300	if err != nil {
8301		return nil, err
8302	}
8303	reqHeaders.Set("Content-Type", "application/json")
8304	c.urlParams_.Set("alt", alt)
8305	c.urlParams_.Set("prettyPrint", "false")
8306	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose")
8307	urls += "?" + c.urlParams_.Encode()
8308	req, err := http.NewRequest("POST", urls, body)
8309	if err != nil {
8310		return nil, err
8311	}
8312	req.Header = reqHeaders
8313	googleapi.Expand(req.URL, map[string]string{
8314		"projectId":   c.projectId,
8315		"region":      c.region,
8316		"clusterName": c.clusterName,
8317	})
8318	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8319}
8320
8321// Do executes the "dataproc.projects.regions.clusters.diagnose" call.
8322// Exactly one of *Operation or error will be non-nil. Any non-2xx
8323// status code is an error. Response headers are in either
8324// *Operation.ServerResponse.Header or (if a response was returned at
8325// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8326// to check whether the returned error was because
8327// http.StatusNotModified was returned.
8328func (c *ProjectsRegionsClustersDiagnoseCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8329	gensupport.SetOptions(c.urlParams_, opts...)
8330	res, err := c.doRequest("json")
8331	if res != nil && res.StatusCode == http.StatusNotModified {
8332		if res.Body != nil {
8333			res.Body.Close()
8334		}
8335		return nil, &googleapi.Error{
8336			Code:   res.StatusCode,
8337			Header: res.Header,
8338		}
8339	}
8340	if err != nil {
8341		return nil, err
8342	}
8343	defer googleapi.CloseBody(res)
8344	if err := googleapi.CheckResponse(res); err != nil {
8345		return nil, err
8346	}
8347	ret := &Operation{
8348		ServerResponse: googleapi.ServerResponse{
8349			Header:         res.Header,
8350			HTTPStatusCode: res.StatusCode,
8351		},
8352	}
8353	target := &ret
8354	if err := gensupport.DecodeResponse(target, res); err != nil {
8355		return nil, err
8356	}
8357	return ret, nil
8358	// {
8359	//   "description": "Gets cluster diagnostic information. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata). After the operation completes, Operation.response contains DiagnoseClusterResults (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#diagnoseclusterresults).",
8360	//   "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose",
8361	//   "httpMethod": "POST",
8362	//   "id": "dataproc.projects.regions.clusters.diagnose",
8363	//   "parameterOrder": [
8364	//     "projectId",
8365	//     "region",
8366	//     "clusterName"
8367	//   ],
8368	//   "parameters": {
8369	//     "clusterName": {
8370	//       "description": "Required. The cluster name.",
8371	//       "location": "path",
8372	//       "required": true,
8373	//       "type": "string"
8374	//     },
8375	//     "projectId": {
8376	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8377	//       "location": "path",
8378	//       "required": true,
8379	//       "type": "string"
8380	//     },
8381	//     "region": {
8382	//       "description": "Required. The Dataproc region in which to handle the request.",
8383	//       "location": "path",
8384	//       "required": true,
8385	//       "type": "string"
8386	//     }
8387	//   },
8388	//   "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose",
8389	//   "request": {
8390	//     "$ref": "DiagnoseClusterRequest"
8391	//   },
8392	//   "response": {
8393	//     "$ref": "Operation"
8394	//   },
8395	//   "scopes": [
8396	//     "https://www.googleapis.com/auth/cloud-platform"
8397	//   ]
8398	// }
8399
8400}
8401
8402// method id "dataproc.projects.regions.clusters.get":
8403
8404type ProjectsRegionsClustersGetCall struct {
8405	s            *Service
8406	projectId    string
8407	region       string
8408	clusterName  string
8409	urlParams_   gensupport.URLParams
8410	ifNoneMatch_ string
8411	ctx_         context.Context
8412	header_      http.Header
8413}
8414
8415// Get: Gets the resource representation for a cluster in a project.
8416func (r *ProjectsRegionsClustersService) Get(projectId string, region string, clusterName string) *ProjectsRegionsClustersGetCall {
8417	c := &ProjectsRegionsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8418	c.projectId = projectId
8419	c.region = region
8420	c.clusterName = clusterName
8421	return c
8422}
8423
8424// Fields allows partial responses to be retrieved. See
8425// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8426// for more information.
8427func (c *ProjectsRegionsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersGetCall {
8428	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8429	return c
8430}
8431
8432// IfNoneMatch sets the optional parameter which makes the operation
8433// fail if the object's ETag matches the given value. This is useful for
8434// getting updates only after the object has changed since the last
8435// request. Use googleapi.IsNotModified to check whether the response
8436// error from Do is the result of In-None-Match.
8437func (c *ProjectsRegionsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersGetCall {
8438	c.ifNoneMatch_ = entityTag
8439	return c
8440}
8441
8442// Context sets the context to be used in this call's Do method. Any
8443// pending HTTP request will be aborted if the provided context is
8444// canceled.
8445func (c *ProjectsRegionsClustersGetCall) Context(ctx context.Context) *ProjectsRegionsClustersGetCall {
8446	c.ctx_ = ctx
8447	return c
8448}
8449
8450// Header returns an http.Header that can be modified by the caller to
8451// add HTTP headers to the request.
8452func (c *ProjectsRegionsClustersGetCall) Header() http.Header {
8453	if c.header_ == nil {
8454		c.header_ = make(http.Header)
8455	}
8456	return c.header_
8457}
8458
8459func (c *ProjectsRegionsClustersGetCall) doRequest(alt string) (*http.Response, error) {
8460	reqHeaders := make(http.Header)
8461	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8462	for k, v := range c.header_ {
8463		reqHeaders[k] = v
8464	}
8465	reqHeaders.Set("User-Agent", c.s.userAgent())
8466	if c.ifNoneMatch_ != "" {
8467		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8468	}
8469	var body io.Reader = nil
8470	c.urlParams_.Set("alt", alt)
8471	c.urlParams_.Set("prettyPrint", "false")
8472	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}")
8473	urls += "?" + c.urlParams_.Encode()
8474	req, err := http.NewRequest("GET", urls, body)
8475	if err != nil {
8476		return nil, err
8477	}
8478	req.Header = reqHeaders
8479	googleapi.Expand(req.URL, map[string]string{
8480		"projectId":   c.projectId,
8481		"region":      c.region,
8482		"clusterName": c.clusterName,
8483	})
8484	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8485}
8486
8487// Do executes the "dataproc.projects.regions.clusters.get" call.
8488// Exactly one of *Cluster or error will be non-nil. Any non-2xx status
8489// code is an error. Response headers are in either
8490// *Cluster.ServerResponse.Header or (if a response was returned at all)
8491// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8492// check whether the returned error was because http.StatusNotModified
8493// was returned.
8494func (c *ProjectsRegionsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) {
8495	gensupport.SetOptions(c.urlParams_, opts...)
8496	res, err := c.doRequest("json")
8497	if res != nil && res.StatusCode == http.StatusNotModified {
8498		if res.Body != nil {
8499			res.Body.Close()
8500		}
8501		return nil, &googleapi.Error{
8502			Code:   res.StatusCode,
8503			Header: res.Header,
8504		}
8505	}
8506	if err != nil {
8507		return nil, err
8508	}
8509	defer googleapi.CloseBody(res)
8510	if err := googleapi.CheckResponse(res); err != nil {
8511		return nil, err
8512	}
8513	ret := &Cluster{
8514		ServerResponse: googleapi.ServerResponse{
8515			Header:         res.Header,
8516			HTTPStatusCode: res.StatusCode,
8517		},
8518	}
8519	target := &ret
8520	if err := gensupport.DecodeResponse(target, res); err != nil {
8521		return nil, err
8522	}
8523	return ret, nil
8524	// {
8525	//   "description": "Gets the resource representation for a cluster in a project.",
8526	//   "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}",
8527	//   "httpMethod": "GET",
8528	//   "id": "dataproc.projects.regions.clusters.get",
8529	//   "parameterOrder": [
8530	//     "projectId",
8531	//     "region",
8532	//     "clusterName"
8533	//   ],
8534	//   "parameters": {
8535	//     "clusterName": {
8536	//       "description": "Required. The cluster name.",
8537	//       "location": "path",
8538	//       "required": true,
8539	//       "type": "string"
8540	//     },
8541	//     "projectId": {
8542	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8543	//       "location": "path",
8544	//       "required": true,
8545	//       "type": "string"
8546	//     },
8547	//     "region": {
8548	//       "description": "Required. The Dataproc region in which to handle the request.",
8549	//       "location": "path",
8550	//       "required": true,
8551	//       "type": "string"
8552	//     }
8553	//   },
8554	//   "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}",
8555	//   "response": {
8556	//     "$ref": "Cluster"
8557	//   },
8558	//   "scopes": [
8559	//     "https://www.googleapis.com/auth/cloud-platform"
8560	//   ]
8561	// }
8562
8563}
8564
8565// method id "dataproc.projects.regions.clusters.getIamPolicy":
8566
8567type ProjectsRegionsClustersGetIamPolicyCall struct {
8568	s                   *Service
8569	resource            string
8570	getiampolicyrequest *GetIamPolicyRequest
8571	urlParams_          gensupport.URLParams
8572	ctx_                context.Context
8573	header_             http.Header
8574}
8575
8576// GetIamPolicy: Gets the access control policy for a resource. Returns
8577// an empty policy if the resource exists and does not have a policy
8578// set.
8579func (r *ProjectsRegionsClustersService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsRegionsClustersGetIamPolicyCall {
8580	c := &ProjectsRegionsClustersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8581	c.resource = resource
8582	c.getiampolicyrequest = getiampolicyrequest
8583	return c
8584}
8585
8586// Fields allows partial responses to be retrieved. See
8587// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8588// for more information.
8589func (c *ProjectsRegionsClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersGetIamPolicyCall {
8590	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8591	return c
8592}
8593
8594// Context sets the context to be used in this call's Do method. Any
8595// pending HTTP request will be aborted if the provided context is
8596// canceled.
8597func (c *ProjectsRegionsClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsClustersGetIamPolicyCall {
8598	c.ctx_ = ctx
8599	return c
8600}
8601
8602// Header returns an http.Header that can be modified by the caller to
8603// add HTTP headers to the request.
8604func (c *ProjectsRegionsClustersGetIamPolicyCall) Header() http.Header {
8605	if c.header_ == nil {
8606		c.header_ = make(http.Header)
8607	}
8608	return c.header_
8609}
8610
8611func (c *ProjectsRegionsClustersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8612	reqHeaders := make(http.Header)
8613	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8614	for k, v := range c.header_ {
8615		reqHeaders[k] = v
8616	}
8617	reqHeaders.Set("User-Agent", c.s.userAgent())
8618	var body io.Reader = nil
8619	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
8620	if err != nil {
8621		return nil, err
8622	}
8623	reqHeaders.Set("Content-Type", "application/json")
8624	c.urlParams_.Set("alt", alt)
8625	c.urlParams_.Set("prettyPrint", "false")
8626	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
8627	urls += "?" + c.urlParams_.Encode()
8628	req, err := http.NewRequest("POST", urls, body)
8629	if err != nil {
8630		return nil, err
8631	}
8632	req.Header = reqHeaders
8633	googleapi.Expand(req.URL, map[string]string{
8634		"resource": c.resource,
8635	})
8636	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8637}
8638
8639// Do executes the "dataproc.projects.regions.clusters.getIamPolicy" call.
8640// Exactly one of *Policy or error will be non-nil. Any non-2xx status
8641// code is an error. Response headers are in either
8642// *Policy.ServerResponse.Header or (if a response was returned at all)
8643// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8644// check whether the returned error was because http.StatusNotModified
8645// was returned.
8646func (c *ProjectsRegionsClustersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8647	gensupport.SetOptions(c.urlParams_, opts...)
8648	res, err := c.doRequest("json")
8649	if res != nil && res.StatusCode == http.StatusNotModified {
8650		if res.Body != nil {
8651			res.Body.Close()
8652		}
8653		return nil, &googleapi.Error{
8654			Code:   res.StatusCode,
8655			Header: res.Header,
8656		}
8657	}
8658	if err != nil {
8659		return nil, err
8660	}
8661	defer googleapi.CloseBody(res)
8662	if err := googleapi.CheckResponse(res); err != nil {
8663		return nil, err
8664	}
8665	ret := &Policy{
8666		ServerResponse: googleapi.ServerResponse{
8667			Header:         res.Header,
8668			HTTPStatusCode: res.StatusCode,
8669		},
8670	}
8671	target := &ret
8672	if err := gensupport.DecodeResponse(target, res); err != nil {
8673		return nil, err
8674	}
8675	return ret, nil
8676	// {
8677	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
8678	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:getIamPolicy",
8679	//   "httpMethod": "POST",
8680	//   "id": "dataproc.projects.regions.clusters.getIamPolicy",
8681	//   "parameterOrder": [
8682	//     "resource"
8683	//   ],
8684	//   "parameters": {
8685	//     "resource": {
8686	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
8687	//       "location": "path",
8688	//       "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$",
8689	//       "required": true,
8690	//       "type": "string"
8691	//     }
8692	//   },
8693	//   "path": "v1/{+resource}:getIamPolicy",
8694	//   "request": {
8695	//     "$ref": "GetIamPolicyRequest"
8696	//   },
8697	//   "response": {
8698	//     "$ref": "Policy"
8699	//   },
8700	//   "scopes": [
8701	//     "https://www.googleapis.com/auth/cloud-platform"
8702	//   ]
8703	// }
8704
8705}
8706
8707// method id "dataproc.projects.regions.clusters.list":
8708
8709type ProjectsRegionsClustersListCall struct {
8710	s            *Service
8711	projectId    string
8712	region       string
8713	urlParams_   gensupport.URLParams
8714	ifNoneMatch_ string
8715	ctx_         context.Context
8716	header_      http.Header
8717}
8718
8719// List: Lists all regions/{region}/clusters in a project
8720// alphabetically.
8721func (r *ProjectsRegionsClustersService) List(projectId string, region string) *ProjectsRegionsClustersListCall {
8722	c := &ProjectsRegionsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8723	c.projectId = projectId
8724	c.region = region
8725	return c
8726}
8727
8728// Filter sets the optional parameter "filter": A filter constraining
8729// the clusters to list. Filters are case-sensitive and have the
8730// following syntax:field = value AND field = value ...where field is
8731// one of status.state, clusterName, or labels.[KEY], and [KEY] is a
8732// label key. value can be * to match all values. status.state can be
8733// one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR,
8734// DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and
8735// RUNNING states. INACTIVE contains the DELETING and ERROR states.
8736// clusterName is the name of the cluster provided at creation time.
8737// Only the logical AND operator is supported; space-separated items are
8738// treated as having an implicit AND operator.Example
8739// filter:status.state = ACTIVE AND clusterName = mycluster AND
8740// labels.env = staging AND labels.starred = *
8741func (c *ProjectsRegionsClustersListCall) Filter(filter string) *ProjectsRegionsClustersListCall {
8742	c.urlParams_.Set("filter", filter)
8743	return c
8744}
8745
8746// PageSize sets the optional parameter "pageSize": The standard List
8747// page size.
8748func (c *ProjectsRegionsClustersListCall) PageSize(pageSize int64) *ProjectsRegionsClustersListCall {
8749	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
8750	return c
8751}
8752
8753// PageToken sets the optional parameter "pageToken": The standard List
8754// page token.
8755func (c *ProjectsRegionsClustersListCall) PageToken(pageToken string) *ProjectsRegionsClustersListCall {
8756	c.urlParams_.Set("pageToken", pageToken)
8757	return c
8758}
8759
8760// Fields allows partial responses to be retrieved. See
8761// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8762// for more information.
8763func (c *ProjectsRegionsClustersListCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersListCall {
8764	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8765	return c
8766}
8767
8768// IfNoneMatch sets the optional parameter which makes the operation
8769// fail if the object's ETag matches the given value. This is useful for
8770// getting updates only after the object has changed since the last
8771// request. Use googleapi.IsNotModified to check whether the response
8772// error from Do is the result of In-None-Match.
8773func (c *ProjectsRegionsClustersListCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersListCall {
8774	c.ifNoneMatch_ = entityTag
8775	return c
8776}
8777
8778// Context sets the context to be used in this call's Do method. Any
8779// pending HTTP request will be aborted if the provided context is
8780// canceled.
8781func (c *ProjectsRegionsClustersListCall) Context(ctx context.Context) *ProjectsRegionsClustersListCall {
8782	c.ctx_ = ctx
8783	return c
8784}
8785
8786// Header returns an http.Header that can be modified by the caller to
8787// add HTTP headers to the request.
8788func (c *ProjectsRegionsClustersListCall) Header() http.Header {
8789	if c.header_ == nil {
8790		c.header_ = make(http.Header)
8791	}
8792	return c.header_
8793}
8794
8795func (c *ProjectsRegionsClustersListCall) doRequest(alt string) (*http.Response, error) {
8796	reqHeaders := make(http.Header)
8797	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
8798	for k, v := range c.header_ {
8799		reqHeaders[k] = v
8800	}
8801	reqHeaders.Set("User-Agent", c.s.userAgent())
8802	if c.ifNoneMatch_ != "" {
8803		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8804	}
8805	var body io.Reader = nil
8806	c.urlParams_.Set("alt", alt)
8807	c.urlParams_.Set("prettyPrint", "false")
8808	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters")
8809	urls += "?" + c.urlParams_.Encode()
8810	req, err := http.NewRequest("GET", urls, body)
8811	if err != nil {
8812		return nil, err
8813	}
8814	req.Header = reqHeaders
8815	googleapi.Expand(req.URL, map[string]string{
8816		"projectId": c.projectId,
8817		"region":    c.region,
8818	})
8819	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8820}
8821
8822// Do executes the "dataproc.projects.regions.clusters.list" call.
8823// Exactly one of *ListClustersResponse or error will be non-nil. Any
8824// non-2xx status code is an error. Response headers are in either
8825// *ListClustersResponse.ServerResponse.Header or (if a response was
8826// returned at all) in error.(*googleapi.Error).Header. Use
8827// googleapi.IsNotModified to check whether the returned error was
8828// because http.StatusNotModified was returned.
8829func (c *ProjectsRegionsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) {
8830	gensupport.SetOptions(c.urlParams_, opts...)
8831	res, err := c.doRequest("json")
8832	if res != nil && res.StatusCode == http.StatusNotModified {
8833		if res.Body != nil {
8834			res.Body.Close()
8835		}
8836		return nil, &googleapi.Error{
8837			Code:   res.StatusCode,
8838			Header: res.Header,
8839		}
8840	}
8841	if err != nil {
8842		return nil, err
8843	}
8844	defer googleapi.CloseBody(res)
8845	if err := googleapi.CheckResponse(res); err != nil {
8846		return nil, err
8847	}
8848	ret := &ListClustersResponse{
8849		ServerResponse: googleapi.ServerResponse{
8850			Header:         res.Header,
8851			HTTPStatusCode: res.StatusCode,
8852		},
8853	}
8854	target := &ret
8855	if err := gensupport.DecodeResponse(target, res); err != nil {
8856		return nil, err
8857	}
8858	return ret, nil
8859	// {
8860	//   "description": "Lists all regions/{region}/clusters in a project alphabetically.",
8861	//   "flatPath": "v1/projects/{projectId}/regions/{region}/clusters",
8862	//   "httpMethod": "GET",
8863	//   "id": "dataproc.projects.regions.clusters.list",
8864	//   "parameterOrder": [
8865	//     "projectId",
8866	//     "region"
8867	//   ],
8868	//   "parameters": {
8869	//     "filter": {
8870	//       "description": "Optional. A filter constraining the clusters to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is one of status.state, clusterName, or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR, DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and RUNNING states. INACTIVE contains the DELETING and ERROR states. clusterName is the name of the cluster provided at creation time. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND clusterName = mycluster AND labels.env = staging AND labels.starred = *",
8871	//       "location": "query",
8872	//       "type": "string"
8873	//     },
8874	//     "pageSize": {
8875	//       "description": "Optional. The standard List page size.",
8876	//       "format": "int32",
8877	//       "location": "query",
8878	//       "type": "integer"
8879	//     },
8880	//     "pageToken": {
8881	//       "description": "Optional. The standard List page token.",
8882	//       "location": "query",
8883	//       "type": "string"
8884	//     },
8885	//     "projectId": {
8886	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8887	//       "location": "path",
8888	//       "required": true,
8889	//       "type": "string"
8890	//     },
8891	//     "region": {
8892	//       "description": "Required. The Dataproc region in which to handle the request.",
8893	//       "location": "path",
8894	//       "required": true,
8895	//       "type": "string"
8896	//     }
8897	//   },
8898	//   "path": "v1/projects/{projectId}/regions/{region}/clusters",
8899	//   "response": {
8900	//     "$ref": "ListClustersResponse"
8901	//   },
8902	//   "scopes": [
8903	//     "https://www.googleapis.com/auth/cloud-platform"
8904	//   ]
8905	// }
8906
8907}
8908
8909// Pages invokes f for each page of results.
8910// A non-nil error returned from f will halt the iteration.
8911// The provided context supersedes any context provided to the Context method.
8912func (c *ProjectsRegionsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) error) error {
8913	c.ctx_ = ctx
8914	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8915	for {
8916		x, err := c.Do()
8917		if err != nil {
8918			return err
8919		}
8920		if err := f(x); err != nil {
8921			return err
8922		}
8923		if x.NextPageToken == "" {
8924			return nil
8925		}
8926		c.PageToken(x.NextPageToken)
8927	}
8928}
8929
8930// method id "dataproc.projects.regions.clusters.patch":
8931
8932type ProjectsRegionsClustersPatchCall struct {
8933	s           *Service
8934	projectId   string
8935	region      string
8936	clusterName string
8937	cluster     *Cluster
8938	urlParams_  gensupport.URLParams
8939	ctx_        context.Context
8940	header_     http.Header
8941}
8942
8943// Patch: Updates a cluster in a project. The returned
8944// Operation.metadata will be ClusterOperationMetadata
8945// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
8946// aproc.v1#clusteroperationmetadata).
8947func (r *ProjectsRegionsClustersService) Patch(projectId string, region string, clusterName string, cluster *Cluster) *ProjectsRegionsClustersPatchCall {
8948	c := &ProjectsRegionsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8949	c.projectId = projectId
8950	c.region = region
8951	c.clusterName = clusterName
8952	c.cluster = cluster
8953	return c
8954}
8955
8956// GracefulDecommissionTimeout sets the optional parameter
8957// "gracefulDecommissionTimeout": Timeout for graceful YARN
8958// decomissioning. Graceful decommissioning allows removing nodes from
8959// the cluster without interrupting jobs in progress. Timeout specifies
8960// how long to wait for jobs in progress to finish before forcefully
8961// removing nodes (and potentially interrupting jobs). Default timeout
8962// is 0 (for forceful decommission), and the maximum allowed timeout is
8963// 1 day. (see JSON representation of Duration
8964// (https://developers.google.com/protocol-buffers/docs/proto3#json)).Onl
8965// y supported on Dataproc image versions 1.2 and higher.
8966func (c *ProjectsRegionsClustersPatchCall) GracefulDecommissionTimeout(gracefulDecommissionTimeout string) *ProjectsRegionsClustersPatchCall {
8967	c.urlParams_.Set("gracefulDecommissionTimeout", gracefulDecommissionTimeout)
8968	return c
8969}
8970
8971// RequestId sets the optional parameter "requestId": A unique id used
8972// to identify the request. If the server receives two
8973// UpdateClusterRequest requests with the same id, then the second
8974// request will be ignored and the first google.longrunning.Operation
8975// created and stored in the backend is returned.It is recommended to
8976// always set this value to a UUID
8977// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
8978// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
8979// and hyphens (-). The maximum length is 40 characters.
8980func (c *ProjectsRegionsClustersPatchCall) RequestId(requestId string) *ProjectsRegionsClustersPatchCall {
8981	c.urlParams_.Set("requestId", requestId)
8982	return c
8983}
8984
8985// UpdateMask sets the optional parameter "updateMask": Required.
8986// Specifies the path, relative to Cluster, of the field to update. For
8987// example, to change the number of workers in a cluster to 5, the
8988// update_mask parameter would be specified as
8989// config.worker_config.num_instances, and the PATCH request body would
8990// specify the new value, as follows:
8991// {
8992//   "config":{
8993//     "workerConfig":{
8994//       "numInstances":"5"
8995//     }
8996//   }
8997// }
8998// Similarly, to change the number of preemptible workers in a cluster
8999// to 5, the update_mask parameter would be
9000// config.secondary_worker_config.num_instances, and the PATCH request
9001// body would be set as follows:
9002// {
9003//   "config":{
9004//     "secondaryWorkerConfig":{
9005//       "numInstances":"5"
9006//     }
9007//   }
9008// }
9009// <strong>Note:</strong> Currently, only the following fields can be
9010// updated:<table>  <tbody>  <tr>  <td><strong>Mask</strong></td>
9011// <td><strong>Purpose</strong></td>  </tr>  <tr>
9012// <td><strong><em>labels</em></strong></td>  <td>Update labels</td>
9013// </tr>  <tr>
9014// <td><strong><em>config.worker_config.num_instances</em></strong></td>
9015//  <td>Resize primary worker group</td>  </tr>  <tr>
9016// <td><strong><em>config.secondary_worker_config.num_instances</em></str
9017// ong></td>  <td>Resize secondary worker group</td>  </tr>  <tr>
9018// <td>config.autoscaling_config.policy_uri</td><td>Use, stop using, or
9019// change autoscaling policies</td>  </tr>  </tbody>  </table>
9020func (c *ProjectsRegionsClustersPatchCall) UpdateMask(updateMask string) *ProjectsRegionsClustersPatchCall {
9021	c.urlParams_.Set("updateMask", updateMask)
9022	return c
9023}
9024
9025// Fields allows partial responses to be retrieved. See
9026// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9027// for more information.
9028func (c *ProjectsRegionsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersPatchCall {
9029	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9030	return c
9031}
9032
9033// Context sets the context to be used in this call's Do method. Any
9034// pending HTTP request will be aborted if the provided context is
9035// canceled.
9036func (c *ProjectsRegionsClustersPatchCall) Context(ctx context.Context) *ProjectsRegionsClustersPatchCall {
9037	c.ctx_ = ctx
9038	return c
9039}
9040
9041// Header returns an http.Header that can be modified by the caller to
9042// add HTTP headers to the request.
9043func (c *ProjectsRegionsClustersPatchCall) Header() http.Header {
9044	if c.header_ == nil {
9045		c.header_ = make(http.Header)
9046	}
9047	return c.header_
9048}
9049
9050func (c *ProjectsRegionsClustersPatchCall) doRequest(alt string) (*http.Response, error) {
9051	reqHeaders := make(http.Header)
9052	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9053	for k, v := range c.header_ {
9054		reqHeaders[k] = v
9055	}
9056	reqHeaders.Set("User-Agent", c.s.userAgent())
9057	var body io.Reader = nil
9058	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
9059	if err != nil {
9060		return nil, err
9061	}
9062	reqHeaders.Set("Content-Type", "application/json")
9063	c.urlParams_.Set("alt", alt)
9064	c.urlParams_.Set("prettyPrint", "false")
9065	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}")
9066	urls += "?" + c.urlParams_.Encode()
9067	req, err := http.NewRequest("PATCH", urls, body)
9068	if err != nil {
9069		return nil, err
9070	}
9071	req.Header = reqHeaders
9072	googleapi.Expand(req.URL, map[string]string{
9073		"projectId":   c.projectId,
9074		"region":      c.region,
9075		"clusterName": c.clusterName,
9076	})
9077	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9078}
9079
9080// Do executes the "dataproc.projects.regions.clusters.patch" call.
9081// Exactly one of *Operation or error will be non-nil. Any non-2xx
9082// status code is an error. Response headers are in either
9083// *Operation.ServerResponse.Header or (if a response was returned at
9084// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9085// to check whether the returned error was because
9086// http.StatusNotModified was returned.
9087func (c *ProjectsRegionsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9088	gensupport.SetOptions(c.urlParams_, opts...)
9089	res, err := c.doRequest("json")
9090	if res != nil && res.StatusCode == http.StatusNotModified {
9091		if res.Body != nil {
9092			res.Body.Close()
9093		}
9094		return nil, &googleapi.Error{
9095			Code:   res.StatusCode,
9096			Header: res.Header,
9097		}
9098	}
9099	if err != nil {
9100		return nil, err
9101	}
9102	defer googleapi.CloseBody(res)
9103	if err := googleapi.CheckResponse(res); err != nil {
9104		return nil, err
9105	}
9106	ret := &Operation{
9107		ServerResponse: googleapi.ServerResponse{
9108			Header:         res.Header,
9109			HTTPStatusCode: res.StatusCode,
9110		},
9111	}
9112	target := &ret
9113	if err := gensupport.DecodeResponse(target, res); err != nil {
9114		return nil, err
9115	}
9116	return ret, nil
9117	// {
9118	//   "description": "Updates a cluster in a project. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#clusteroperationmetadata).",
9119	//   "flatPath": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}",
9120	//   "httpMethod": "PATCH",
9121	//   "id": "dataproc.projects.regions.clusters.patch",
9122	//   "parameterOrder": [
9123	//     "projectId",
9124	//     "region",
9125	//     "clusterName"
9126	//   ],
9127	//   "parameters": {
9128	//     "clusterName": {
9129	//       "description": "Required. The cluster name.",
9130	//       "location": "path",
9131	//       "required": true,
9132	//       "type": "string"
9133	//     },
9134	//     "gracefulDecommissionTimeout": {
9135	//       "description": "Optional. Timeout for graceful YARN decomissioning. Graceful decommissioning allows removing nodes from the cluster without interrupting jobs in progress. Timeout specifies how long to wait for jobs in progress to finish before forcefully removing nodes (and potentially interrupting jobs). Default timeout is 0 (for forceful decommission), and the maximum allowed timeout is 1 day. (see JSON representation of Duration (https://developers.google.com/protocol-buffers/docs/proto3#json)).Only supported on Dataproc image versions 1.2 and higher.",
9136	//       "format": "google-duration",
9137	//       "location": "query",
9138	//       "type": "string"
9139	//     },
9140	//     "projectId": {
9141	//       "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.",
9142	//       "location": "path",
9143	//       "required": true,
9144	//       "type": "string"
9145	//     },
9146	//     "region": {
9147	//       "description": "Required. The Dataproc region in which to handle the request.",
9148	//       "location": "path",
9149	//       "required": true,
9150	//       "type": "string"
9151	//     },
9152	//     "requestId": {
9153	//       "description": "Optional. A unique id used to identify the request. If the server receives two UpdateClusterRequest requests with the same id, then the second request will be ignored and the first google.longrunning.Operation created and stored in the backend is returned.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.",
9154	//       "location": "query",
9155	//       "type": "string"
9156	//     },
9157	//     "updateMask": {
9158	//       "description": "Required. Specifies the path, relative to Cluster, of the field to update. For example, to change the number of workers in a cluster to 5, the update_mask parameter would be specified as config.worker_config.num_instances, and the PATCH request body would specify the new value, as follows:\n{\n  \"config\":{\n    \"workerConfig\":{\n      \"numInstances\":\"5\"\n    }\n  }\n}\nSimilarly, to change the number of preemptible workers in a cluster to 5, the update_mask parameter would be config.secondary_worker_config.num_instances, and the PATCH request body would be set as follows:\n{\n  \"config\":{\n    \"secondaryWorkerConfig\":{\n      \"numInstances\":\"5\"\n    }\n  }\n}\n\u003cstrong\u003eNote:\u003c/strong\u003e Currently, only the following fields can be updated:\u003ctable\u003e  \u003ctbody\u003e  \u003ctr\u003e  \u003ctd\u003e\u003cstrong\u003eMask\u003c/strong\u003e\u003c/td\u003e  \u003ctd\u003e\u003cstrong\u003ePurpose\u003c/strong\u003e\u003c/td\u003e  \u003c/tr\u003e  \u003ctr\u003e  \u003ctd\u003e\u003cstrong\u003e\u003cem\u003elabels\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e  \u003ctd\u003eUpdate labels\u003c/td\u003e  \u003c/tr\u003e  \u003ctr\u003e  \u003ctd\u003e\u003cstrong\u003e\u003cem\u003econfig.worker_config.num_instances\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e  \u003ctd\u003eResize primary worker group\u003c/td\u003e  \u003c/tr\u003e  \u003ctr\u003e  \u003ctd\u003e\u003cstrong\u003e\u003cem\u003econfig.secondary_worker_config.num_instances\u003c/em\u003e\u003c/strong\u003e\u003c/td\u003e  \u003ctd\u003eResize secondary worker group\u003c/td\u003e  \u003c/tr\u003e  \u003ctr\u003e  \u003ctd\u003econfig.autoscaling_config.policy_uri\u003c/td\u003e\u003ctd\u003eUse, stop using, or  change autoscaling policies\u003c/td\u003e  \u003c/tr\u003e  \u003c/tbody\u003e  \u003c/table\u003e",
9159	//       "format": "google-fieldmask",
9160	//       "location": "query",
9161	//       "type": "string"
9162	//     }
9163	//   },
9164	//   "path": "v1/projects/{projectId}/regions/{region}/clusters/{clusterName}",
9165	//   "request": {
9166	//     "$ref": "Cluster"
9167	//   },
9168	//   "response": {
9169	//     "$ref": "Operation"
9170	//   },
9171	//   "scopes": [
9172	//     "https://www.googleapis.com/auth/cloud-platform"
9173	//   ]
9174	// }
9175
9176}
9177
9178// method id "dataproc.projects.regions.clusters.setIamPolicy":
9179
9180type ProjectsRegionsClustersSetIamPolicyCall struct {
9181	s                   *Service
9182	resource            string
9183	setiampolicyrequest *SetIamPolicyRequest
9184	urlParams_          gensupport.URLParams
9185	ctx_                context.Context
9186	header_             http.Header
9187}
9188
9189// SetIamPolicy: Sets the access control policy on the specified
9190// resource. Replaces any existing policy.Can return Public Errors:
9191// NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
9192func (r *ProjectsRegionsClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsClustersSetIamPolicyCall {
9193	c := &ProjectsRegionsClustersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9194	c.resource = resource
9195	c.setiampolicyrequest = setiampolicyrequest
9196	return c
9197}
9198
9199// Fields allows partial responses to be retrieved. See
9200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9201// for more information.
9202func (c *ProjectsRegionsClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersSetIamPolicyCall {
9203	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9204	return c
9205}
9206
9207// Context sets the context to be used in this call's Do method. Any
9208// pending HTTP request will be aborted if the provided context is
9209// canceled.
9210func (c *ProjectsRegionsClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsClustersSetIamPolicyCall {
9211	c.ctx_ = ctx
9212	return c
9213}
9214
9215// Header returns an http.Header that can be modified by the caller to
9216// add HTTP headers to the request.
9217func (c *ProjectsRegionsClustersSetIamPolicyCall) Header() http.Header {
9218	if c.header_ == nil {
9219		c.header_ = make(http.Header)
9220	}
9221	return c.header_
9222}
9223
9224func (c *ProjectsRegionsClustersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9225	reqHeaders := make(http.Header)
9226	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9227	for k, v := range c.header_ {
9228		reqHeaders[k] = v
9229	}
9230	reqHeaders.Set("User-Agent", c.s.userAgent())
9231	var body io.Reader = nil
9232	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
9233	if err != nil {
9234		return nil, err
9235	}
9236	reqHeaders.Set("Content-Type", "application/json")
9237	c.urlParams_.Set("alt", alt)
9238	c.urlParams_.Set("prettyPrint", "false")
9239	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
9240	urls += "?" + c.urlParams_.Encode()
9241	req, err := http.NewRequest("POST", urls, body)
9242	if err != nil {
9243		return nil, err
9244	}
9245	req.Header = reqHeaders
9246	googleapi.Expand(req.URL, map[string]string{
9247		"resource": c.resource,
9248	})
9249	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9250}
9251
9252// Do executes the "dataproc.projects.regions.clusters.setIamPolicy" call.
9253// Exactly one of *Policy or error will be non-nil. Any non-2xx status
9254// code is an error. Response headers are in either
9255// *Policy.ServerResponse.Header or (if a response was returned at all)
9256// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9257// check whether the returned error was because http.StatusNotModified
9258// was returned.
9259func (c *ProjectsRegionsClustersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9260	gensupport.SetOptions(c.urlParams_, opts...)
9261	res, err := c.doRequest("json")
9262	if res != nil && res.StatusCode == http.StatusNotModified {
9263		if res.Body != nil {
9264			res.Body.Close()
9265		}
9266		return nil, &googleapi.Error{
9267			Code:   res.StatusCode,
9268			Header: res.Header,
9269		}
9270	}
9271	if err != nil {
9272		return nil, err
9273	}
9274	defer googleapi.CloseBody(res)
9275	if err := googleapi.CheckResponse(res); err != nil {
9276		return nil, err
9277	}
9278	ret := &Policy{
9279		ServerResponse: googleapi.ServerResponse{
9280			Header:         res.Header,
9281			HTTPStatusCode: res.StatusCode,
9282		},
9283	}
9284	target := &ret
9285	if err := gensupport.DecodeResponse(target, res); err != nil {
9286		return nil, err
9287	}
9288	return ret, nil
9289	// {
9290	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED",
9291	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:setIamPolicy",
9292	//   "httpMethod": "POST",
9293	//   "id": "dataproc.projects.regions.clusters.setIamPolicy",
9294	//   "parameterOrder": [
9295	//     "resource"
9296	//   ],
9297	//   "parameters": {
9298	//     "resource": {
9299	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
9300	//       "location": "path",
9301	//       "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$",
9302	//       "required": true,
9303	//       "type": "string"
9304	//     }
9305	//   },
9306	//   "path": "v1/{+resource}:setIamPolicy",
9307	//   "request": {
9308	//     "$ref": "SetIamPolicyRequest"
9309	//   },
9310	//   "response": {
9311	//     "$ref": "Policy"
9312	//   },
9313	//   "scopes": [
9314	//     "https://www.googleapis.com/auth/cloud-platform"
9315	//   ]
9316	// }
9317
9318}
9319
9320// method id "dataproc.projects.regions.clusters.testIamPermissions":
9321
9322type ProjectsRegionsClustersTestIamPermissionsCall struct {
9323	s                         *Service
9324	resource                  string
9325	testiampermissionsrequest *TestIamPermissionsRequest
9326	urlParams_                gensupport.URLParams
9327	ctx_                      context.Context
9328	header_                   http.Header
9329}
9330
9331// TestIamPermissions: Returns permissions that a caller has on the
9332// specified resource. If the resource does not exist, this will return
9333// an empty set of permissions, not a NOT_FOUND error.Note: This
9334// operation is designed to be used for building permission-aware UIs
9335// and command-line tools, not for authorization checking. This
9336// operation may "fail open" without warning.
9337func (r *ProjectsRegionsClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsClustersTestIamPermissionsCall {
9338	c := &ProjectsRegionsClustersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9339	c.resource = resource
9340	c.testiampermissionsrequest = testiampermissionsrequest
9341	return c
9342}
9343
9344// Fields allows partial responses to be retrieved. See
9345// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9346// for more information.
9347func (c *ProjectsRegionsClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersTestIamPermissionsCall {
9348	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9349	return c
9350}
9351
9352// Context sets the context to be used in this call's Do method. Any
9353// pending HTTP request will be aborted if the provided context is
9354// canceled.
9355func (c *ProjectsRegionsClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsClustersTestIamPermissionsCall {
9356	c.ctx_ = ctx
9357	return c
9358}
9359
9360// Header returns an http.Header that can be modified by the caller to
9361// add HTTP headers to the request.
9362func (c *ProjectsRegionsClustersTestIamPermissionsCall) Header() http.Header {
9363	if c.header_ == nil {
9364		c.header_ = make(http.Header)
9365	}
9366	return c.header_
9367}
9368
9369func (c *ProjectsRegionsClustersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
9370	reqHeaders := make(http.Header)
9371	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9372	for k, v := range c.header_ {
9373		reqHeaders[k] = v
9374	}
9375	reqHeaders.Set("User-Agent", c.s.userAgent())
9376	var body io.Reader = nil
9377	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
9378	if err != nil {
9379		return nil, err
9380	}
9381	reqHeaders.Set("Content-Type", "application/json")
9382	c.urlParams_.Set("alt", alt)
9383	c.urlParams_.Set("prettyPrint", "false")
9384	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
9385	urls += "?" + c.urlParams_.Encode()
9386	req, err := http.NewRequest("POST", urls, body)
9387	if err != nil {
9388		return nil, err
9389	}
9390	req.Header = reqHeaders
9391	googleapi.Expand(req.URL, map[string]string{
9392		"resource": c.resource,
9393	})
9394	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9395}
9396
9397// Do executes the "dataproc.projects.regions.clusters.testIamPermissions" call.
9398// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
9399// Any non-2xx status code is an error. Response headers are in either
9400// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
9401// was returned at all) in error.(*googleapi.Error).Header. Use
9402// googleapi.IsNotModified to check whether the returned error was
9403// because http.StatusNotModified was returned.
9404func (c *ProjectsRegionsClustersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
9405	gensupport.SetOptions(c.urlParams_, opts...)
9406	res, err := c.doRequest("json")
9407	if res != nil && res.StatusCode == http.StatusNotModified {
9408		if res.Body != nil {
9409			res.Body.Close()
9410		}
9411		return nil, &googleapi.Error{
9412			Code:   res.StatusCode,
9413			Header: res.Header,
9414		}
9415	}
9416	if err != nil {
9417		return nil, err
9418	}
9419	defer googleapi.CloseBody(res)
9420	if err := googleapi.CheckResponse(res); err != nil {
9421		return nil, err
9422	}
9423	ret := &TestIamPermissionsResponse{
9424		ServerResponse: googleapi.ServerResponse{
9425			Header:         res.Header,
9426			HTTPStatusCode: res.StatusCode,
9427		},
9428	}
9429	target := &ret
9430	if err := gensupport.DecodeResponse(target, res); err != nil {
9431		return nil, err
9432	}
9433	return ret, nil
9434	// {
9435	//   "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.",
9436	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:testIamPermissions",
9437	//   "httpMethod": "POST",
9438	//   "id": "dataproc.projects.regions.clusters.testIamPermissions",
9439	//   "parameterOrder": [
9440	//     "resource"
9441	//   ],
9442	//   "parameters": {
9443	//     "resource": {
9444	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
9445	//       "location": "path",
9446	//       "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$",
9447	//       "required": true,
9448	//       "type": "string"
9449	//     }
9450	//   },
9451	//   "path": "v1/{+resource}:testIamPermissions",
9452	//   "request": {
9453	//     "$ref": "TestIamPermissionsRequest"
9454	//   },
9455	//   "response": {
9456	//     "$ref": "TestIamPermissionsResponse"
9457	//   },
9458	//   "scopes": [
9459	//     "https://www.googleapis.com/auth/cloud-platform"
9460	//   ]
9461	// }
9462
9463}
9464
9465// method id "dataproc.projects.regions.jobs.cancel":
9466
9467type ProjectsRegionsJobsCancelCall struct {
9468	s                *Service
9469	projectId        string
9470	region           string
9471	jobId            string
9472	canceljobrequest *CancelJobRequest
9473	urlParams_       gensupport.URLParams
9474	ctx_             context.Context
9475	header_          http.Header
9476}
9477
9478// Cancel: Starts a job cancellation request. To access the job resource
9479// after cancellation, call regions/{region}/jobs.list
9480// (https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.reg
9481// ions.jobs/list) or regions/{region}/jobs.get
9482// (https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.reg
9483// ions.jobs/get).
9484func (r *ProjectsRegionsJobsService) Cancel(projectId string, region string, jobId string, canceljobrequest *CancelJobRequest) *ProjectsRegionsJobsCancelCall {
9485	c := &ProjectsRegionsJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9486	c.projectId = projectId
9487	c.region = region
9488	c.jobId = jobId
9489	c.canceljobrequest = canceljobrequest
9490	return c
9491}
9492
9493// Fields allows partial responses to be retrieved. See
9494// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9495// for more information.
9496func (c *ProjectsRegionsJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsCancelCall {
9497	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9498	return c
9499}
9500
9501// Context sets the context to be used in this call's Do method. Any
9502// pending HTTP request will be aborted if the provided context is
9503// canceled.
9504func (c *ProjectsRegionsJobsCancelCall) Context(ctx context.Context) *ProjectsRegionsJobsCancelCall {
9505	c.ctx_ = ctx
9506	return c
9507}
9508
9509// Header returns an http.Header that can be modified by the caller to
9510// add HTTP headers to the request.
9511func (c *ProjectsRegionsJobsCancelCall) Header() http.Header {
9512	if c.header_ == nil {
9513		c.header_ = make(http.Header)
9514	}
9515	return c.header_
9516}
9517
9518func (c *ProjectsRegionsJobsCancelCall) doRequest(alt string) (*http.Response, error) {
9519	reqHeaders := make(http.Header)
9520	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9521	for k, v := range c.header_ {
9522		reqHeaders[k] = v
9523	}
9524	reqHeaders.Set("User-Agent", c.s.userAgent())
9525	var body io.Reader = nil
9526	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceljobrequest)
9527	if err != nil {
9528		return nil, err
9529	}
9530	reqHeaders.Set("Content-Type", "application/json")
9531	c.urlParams_.Set("alt", alt)
9532	c.urlParams_.Set("prettyPrint", "false")
9533	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel")
9534	urls += "?" + c.urlParams_.Encode()
9535	req, err := http.NewRequest("POST", urls, body)
9536	if err != nil {
9537		return nil, err
9538	}
9539	req.Header = reqHeaders
9540	googleapi.Expand(req.URL, map[string]string{
9541		"projectId": c.projectId,
9542		"region":    c.region,
9543		"jobId":     c.jobId,
9544	})
9545	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9546}
9547
9548// Do executes the "dataproc.projects.regions.jobs.cancel" call.
9549// Exactly one of *Job or error will be non-nil. Any non-2xx status code
9550// is an error. Response headers are in either
9551// *Job.ServerResponse.Header or (if a response was returned at all) in
9552// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9553// whether the returned error was because http.StatusNotModified was
9554// returned.
9555func (c *ProjectsRegionsJobsCancelCall) Do(opts ...googleapi.CallOption) (*Job, error) {
9556	gensupport.SetOptions(c.urlParams_, opts...)
9557	res, err := c.doRequest("json")
9558	if res != nil && res.StatusCode == http.StatusNotModified {
9559		if res.Body != nil {
9560			res.Body.Close()
9561		}
9562		return nil, &googleapi.Error{
9563			Code:   res.StatusCode,
9564			Header: res.Header,
9565		}
9566	}
9567	if err != nil {
9568		return nil, err
9569	}
9570	defer googleapi.CloseBody(res)
9571	if err := googleapi.CheckResponse(res); err != nil {
9572		return nil, err
9573	}
9574	ret := &Job{
9575		ServerResponse: googleapi.ServerResponse{
9576			Header:         res.Header,
9577			HTTPStatusCode: res.StatusCode,
9578		},
9579	}
9580	target := &ret
9581	if err := gensupport.DecodeResponse(target, res); err != nil {
9582		return nil, err
9583	}
9584	return ret, nil
9585	// {
9586	//   "description": "Starts a job cancellation request. To access the job resource after cancellation, call regions/{region}/jobs.list (https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/list) or regions/{region}/jobs.get (https://cloud.google.com/dataproc/docs/reference/rest/v1/projects.regions.jobs/get).",
9587	//   "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel",
9588	//   "httpMethod": "POST",
9589	//   "id": "dataproc.projects.regions.jobs.cancel",
9590	//   "parameterOrder": [
9591	//     "projectId",
9592	//     "region",
9593	//     "jobId"
9594	//   ],
9595	//   "parameters": {
9596	//     "jobId": {
9597	//       "description": "Required. The job ID.",
9598	//       "location": "path",
9599	//       "required": true,
9600	//       "type": "string"
9601	//     },
9602	//     "projectId": {
9603	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
9604	//       "location": "path",
9605	//       "required": true,
9606	//       "type": "string"
9607	//     },
9608	//     "region": {
9609	//       "description": "Required. The Dataproc region in which to handle the request.",
9610	//       "location": "path",
9611	//       "required": true,
9612	//       "type": "string"
9613	//     }
9614	//   },
9615	//   "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel",
9616	//   "request": {
9617	//     "$ref": "CancelJobRequest"
9618	//   },
9619	//   "response": {
9620	//     "$ref": "Job"
9621	//   },
9622	//   "scopes": [
9623	//     "https://www.googleapis.com/auth/cloud-platform"
9624	//   ]
9625	// }
9626
9627}
9628
9629// method id "dataproc.projects.regions.jobs.delete":
9630
9631type ProjectsRegionsJobsDeleteCall struct {
9632	s          *Service
9633	projectId  string
9634	region     string
9635	jobId      string
9636	urlParams_ gensupport.URLParams
9637	ctx_       context.Context
9638	header_    http.Header
9639}
9640
9641// Delete: Deletes the job from the project. If the job is active, the
9642// delete fails, and the response returns FAILED_PRECONDITION.
9643func (r *ProjectsRegionsJobsService) Delete(projectId string, region string, jobId string) *ProjectsRegionsJobsDeleteCall {
9644	c := &ProjectsRegionsJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9645	c.projectId = projectId
9646	c.region = region
9647	c.jobId = jobId
9648	return c
9649}
9650
9651// Fields allows partial responses to be retrieved. See
9652// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9653// for more information.
9654func (c *ProjectsRegionsJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsDeleteCall {
9655	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9656	return c
9657}
9658
9659// Context sets the context to be used in this call's Do method. Any
9660// pending HTTP request will be aborted if the provided context is
9661// canceled.
9662func (c *ProjectsRegionsJobsDeleteCall) Context(ctx context.Context) *ProjectsRegionsJobsDeleteCall {
9663	c.ctx_ = ctx
9664	return c
9665}
9666
9667// Header returns an http.Header that can be modified by the caller to
9668// add HTTP headers to the request.
9669func (c *ProjectsRegionsJobsDeleteCall) Header() http.Header {
9670	if c.header_ == nil {
9671		c.header_ = make(http.Header)
9672	}
9673	return c.header_
9674}
9675
9676func (c *ProjectsRegionsJobsDeleteCall) doRequest(alt string) (*http.Response, error) {
9677	reqHeaders := make(http.Header)
9678	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9679	for k, v := range c.header_ {
9680		reqHeaders[k] = v
9681	}
9682	reqHeaders.Set("User-Agent", c.s.userAgent())
9683	var body io.Reader = nil
9684	c.urlParams_.Set("alt", alt)
9685	c.urlParams_.Set("prettyPrint", "false")
9686	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs/{jobId}")
9687	urls += "?" + c.urlParams_.Encode()
9688	req, err := http.NewRequest("DELETE", urls, body)
9689	if err != nil {
9690		return nil, err
9691	}
9692	req.Header = reqHeaders
9693	googleapi.Expand(req.URL, map[string]string{
9694		"projectId": c.projectId,
9695		"region":    c.region,
9696		"jobId":     c.jobId,
9697	})
9698	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9699}
9700
9701// Do executes the "dataproc.projects.regions.jobs.delete" call.
9702// Exactly one of *Empty or error will be non-nil. Any non-2xx status
9703// code is an error. Response headers are in either
9704// *Empty.ServerResponse.Header or (if a response was returned at all)
9705// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9706// check whether the returned error was because http.StatusNotModified
9707// was returned.
9708func (c *ProjectsRegionsJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
9709	gensupport.SetOptions(c.urlParams_, opts...)
9710	res, err := c.doRequest("json")
9711	if res != nil && res.StatusCode == http.StatusNotModified {
9712		if res.Body != nil {
9713			res.Body.Close()
9714		}
9715		return nil, &googleapi.Error{
9716			Code:   res.StatusCode,
9717			Header: res.Header,
9718		}
9719	}
9720	if err != nil {
9721		return nil, err
9722	}
9723	defer googleapi.CloseBody(res)
9724	if err := googleapi.CheckResponse(res); err != nil {
9725		return nil, err
9726	}
9727	ret := &Empty{
9728		ServerResponse: googleapi.ServerResponse{
9729			Header:         res.Header,
9730			HTTPStatusCode: res.StatusCode,
9731		},
9732	}
9733	target := &ret
9734	if err := gensupport.DecodeResponse(target, res); err != nil {
9735		return nil, err
9736	}
9737	return ret, nil
9738	// {
9739	//   "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.",
9740	//   "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}",
9741	//   "httpMethod": "DELETE",
9742	//   "id": "dataproc.projects.regions.jobs.delete",
9743	//   "parameterOrder": [
9744	//     "projectId",
9745	//     "region",
9746	//     "jobId"
9747	//   ],
9748	//   "parameters": {
9749	//     "jobId": {
9750	//       "description": "Required. The job ID.",
9751	//       "location": "path",
9752	//       "required": true,
9753	//       "type": "string"
9754	//     },
9755	//     "projectId": {
9756	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
9757	//       "location": "path",
9758	//       "required": true,
9759	//       "type": "string"
9760	//     },
9761	//     "region": {
9762	//       "description": "Required. The Dataproc region in which to handle the request.",
9763	//       "location": "path",
9764	//       "required": true,
9765	//       "type": "string"
9766	//     }
9767	//   },
9768	//   "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}",
9769	//   "response": {
9770	//     "$ref": "Empty"
9771	//   },
9772	//   "scopes": [
9773	//     "https://www.googleapis.com/auth/cloud-platform"
9774	//   ]
9775	// }
9776
9777}
9778
9779// method id "dataproc.projects.regions.jobs.get":
9780
9781type ProjectsRegionsJobsGetCall struct {
9782	s            *Service
9783	projectId    string
9784	region       string
9785	jobId        string
9786	urlParams_   gensupport.URLParams
9787	ifNoneMatch_ string
9788	ctx_         context.Context
9789	header_      http.Header
9790}
9791
9792// Get: Gets the resource representation for a job in a project.
9793func (r *ProjectsRegionsJobsService) Get(projectId string, region string, jobId string) *ProjectsRegionsJobsGetCall {
9794	c := &ProjectsRegionsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9795	c.projectId = projectId
9796	c.region = region
9797	c.jobId = jobId
9798	return c
9799}
9800
9801// Fields allows partial responses to be retrieved. See
9802// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9803// for more information.
9804func (c *ProjectsRegionsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsGetCall {
9805	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9806	return c
9807}
9808
9809// IfNoneMatch sets the optional parameter which makes the operation
9810// fail if the object's ETag matches the given value. This is useful for
9811// getting updates only after the object has changed since the last
9812// request. Use googleapi.IsNotModified to check whether the response
9813// error from Do is the result of In-None-Match.
9814func (c *ProjectsRegionsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsGetCall {
9815	c.ifNoneMatch_ = entityTag
9816	return c
9817}
9818
9819// Context sets the context to be used in this call's Do method. Any
9820// pending HTTP request will be aborted if the provided context is
9821// canceled.
9822func (c *ProjectsRegionsJobsGetCall) Context(ctx context.Context) *ProjectsRegionsJobsGetCall {
9823	c.ctx_ = ctx
9824	return c
9825}
9826
9827// Header returns an http.Header that can be modified by the caller to
9828// add HTTP headers to the request.
9829func (c *ProjectsRegionsJobsGetCall) Header() http.Header {
9830	if c.header_ == nil {
9831		c.header_ = make(http.Header)
9832	}
9833	return c.header_
9834}
9835
9836func (c *ProjectsRegionsJobsGetCall) doRequest(alt string) (*http.Response, error) {
9837	reqHeaders := make(http.Header)
9838	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9839	for k, v := range c.header_ {
9840		reqHeaders[k] = v
9841	}
9842	reqHeaders.Set("User-Agent", c.s.userAgent())
9843	if c.ifNoneMatch_ != "" {
9844		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9845	}
9846	var body io.Reader = nil
9847	c.urlParams_.Set("alt", alt)
9848	c.urlParams_.Set("prettyPrint", "false")
9849	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs/{jobId}")
9850	urls += "?" + c.urlParams_.Encode()
9851	req, err := http.NewRequest("GET", urls, body)
9852	if err != nil {
9853		return nil, err
9854	}
9855	req.Header = reqHeaders
9856	googleapi.Expand(req.URL, map[string]string{
9857		"projectId": c.projectId,
9858		"region":    c.region,
9859		"jobId":     c.jobId,
9860	})
9861	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9862}
9863
9864// Do executes the "dataproc.projects.regions.jobs.get" call.
9865// Exactly one of *Job or error will be non-nil. Any non-2xx status code
9866// is an error. Response headers are in either
9867// *Job.ServerResponse.Header or (if a response was returned at all) in
9868// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
9869// whether the returned error was because http.StatusNotModified was
9870// returned.
9871func (c *ProjectsRegionsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
9872	gensupport.SetOptions(c.urlParams_, opts...)
9873	res, err := c.doRequest("json")
9874	if res != nil && res.StatusCode == http.StatusNotModified {
9875		if res.Body != nil {
9876			res.Body.Close()
9877		}
9878		return nil, &googleapi.Error{
9879			Code:   res.StatusCode,
9880			Header: res.Header,
9881		}
9882	}
9883	if err != nil {
9884		return nil, err
9885	}
9886	defer googleapi.CloseBody(res)
9887	if err := googleapi.CheckResponse(res); err != nil {
9888		return nil, err
9889	}
9890	ret := &Job{
9891		ServerResponse: googleapi.ServerResponse{
9892			Header:         res.Header,
9893			HTTPStatusCode: res.StatusCode,
9894		},
9895	}
9896	target := &ret
9897	if err := gensupport.DecodeResponse(target, res); err != nil {
9898		return nil, err
9899	}
9900	return ret, nil
9901	// {
9902	//   "description": "Gets the resource representation for a job in a project.",
9903	//   "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}",
9904	//   "httpMethod": "GET",
9905	//   "id": "dataproc.projects.regions.jobs.get",
9906	//   "parameterOrder": [
9907	//     "projectId",
9908	//     "region",
9909	//     "jobId"
9910	//   ],
9911	//   "parameters": {
9912	//     "jobId": {
9913	//       "description": "Required. The job ID.",
9914	//       "location": "path",
9915	//       "required": true,
9916	//       "type": "string"
9917	//     },
9918	//     "projectId": {
9919	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
9920	//       "location": "path",
9921	//       "required": true,
9922	//       "type": "string"
9923	//     },
9924	//     "region": {
9925	//       "description": "Required. The Dataproc region in which to handle the request.",
9926	//       "location": "path",
9927	//       "required": true,
9928	//       "type": "string"
9929	//     }
9930	//   },
9931	//   "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}",
9932	//   "response": {
9933	//     "$ref": "Job"
9934	//   },
9935	//   "scopes": [
9936	//     "https://www.googleapis.com/auth/cloud-platform"
9937	//   ]
9938	// }
9939
9940}
9941
9942// method id "dataproc.projects.regions.jobs.getIamPolicy":
9943
9944type ProjectsRegionsJobsGetIamPolicyCall struct {
9945	s                   *Service
9946	resource            string
9947	getiampolicyrequest *GetIamPolicyRequest
9948	urlParams_          gensupport.URLParams
9949	ctx_                context.Context
9950	header_             http.Header
9951}
9952
9953// GetIamPolicy: Gets the access control policy for a resource. Returns
9954// an empty policy if the resource exists and does not have a policy
9955// set.
9956func (r *ProjectsRegionsJobsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsRegionsJobsGetIamPolicyCall {
9957	c := &ProjectsRegionsJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9958	c.resource = resource
9959	c.getiampolicyrequest = getiampolicyrequest
9960	return c
9961}
9962
9963// Fields allows partial responses to be retrieved. See
9964// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9965// for more information.
9966func (c *ProjectsRegionsJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsGetIamPolicyCall {
9967	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9968	return c
9969}
9970
9971// Context sets the context to be used in this call's Do method. Any
9972// pending HTTP request will be aborted if the provided context is
9973// canceled.
9974func (c *ProjectsRegionsJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsJobsGetIamPolicyCall {
9975	c.ctx_ = ctx
9976	return c
9977}
9978
9979// Header returns an http.Header that can be modified by the caller to
9980// add HTTP headers to the request.
9981func (c *ProjectsRegionsJobsGetIamPolicyCall) Header() http.Header {
9982	if c.header_ == nil {
9983		c.header_ = make(http.Header)
9984	}
9985	return c.header_
9986}
9987
9988func (c *ProjectsRegionsJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9989	reqHeaders := make(http.Header)
9990	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
9991	for k, v := range c.header_ {
9992		reqHeaders[k] = v
9993	}
9994	reqHeaders.Set("User-Agent", c.s.userAgent())
9995	var body io.Reader = nil
9996	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
9997	if err != nil {
9998		return nil, err
9999	}
10000	reqHeaders.Set("Content-Type", "application/json")
10001	c.urlParams_.Set("alt", alt)
10002	c.urlParams_.Set("prettyPrint", "false")
10003	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
10004	urls += "?" + c.urlParams_.Encode()
10005	req, err := http.NewRequest("POST", urls, body)
10006	if err != nil {
10007		return nil, err
10008	}
10009	req.Header = reqHeaders
10010	googleapi.Expand(req.URL, map[string]string{
10011		"resource": c.resource,
10012	})
10013	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10014}
10015
10016// Do executes the "dataproc.projects.regions.jobs.getIamPolicy" call.
10017// Exactly one of *Policy or error will be non-nil. Any non-2xx status
10018// code is an error. Response headers are in either
10019// *Policy.ServerResponse.Header or (if a response was returned at all)
10020// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10021// check whether the returned error was because http.StatusNotModified
10022// was returned.
10023func (c *ProjectsRegionsJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10024	gensupport.SetOptions(c.urlParams_, opts...)
10025	res, err := c.doRequest("json")
10026	if res != nil && res.StatusCode == http.StatusNotModified {
10027		if res.Body != nil {
10028			res.Body.Close()
10029		}
10030		return nil, &googleapi.Error{
10031			Code:   res.StatusCode,
10032			Header: res.Header,
10033		}
10034	}
10035	if err != nil {
10036		return nil, err
10037	}
10038	defer googleapi.CloseBody(res)
10039	if err := googleapi.CheckResponse(res); err != nil {
10040		return nil, err
10041	}
10042	ret := &Policy{
10043		ServerResponse: googleapi.ServerResponse{
10044			Header:         res.Header,
10045			HTTPStatusCode: res.StatusCode,
10046		},
10047	}
10048	target := &ret
10049	if err := gensupport.DecodeResponse(target, res); err != nil {
10050		return nil, err
10051	}
10052	return ret, nil
10053	// {
10054	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
10055	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:getIamPolicy",
10056	//   "httpMethod": "POST",
10057	//   "id": "dataproc.projects.regions.jobs.getIamPolicy",
10058	//   "parameterOrder": [
10059	//     "resource"
10060	//   ],
10061	//   "parameters": {
10062	//     "resource": {
10063	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
10064	//       "location": "path",
10065	//       "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$",
10066	//       "required": true,
10067	//       "type": "string"
10068	//     }
10069	//   },
10070	//   "path": "v1/{+resource}:getIamPolicy",
10071	//   "request": {
10072	//     "$ref": "GetIamPolicyRequest"
10073	//   },
10074	//   "response": {
10075	//     "$ref": "Policy"
10076	//   },
10077	//   "scopes": [
10078	//     "https://www.googleapis.com/auth/cloud-platform"
10079	//   ]
10080	// }
10081
10082}
10083
10084// method id "dataproc.projects.regions.jobs.list":
10085
10086type ProjectsRegionsJobsListCall struct {
10087	s            *Service
10088	projectId    string
10089	region       string
10090	urlParams_   gensupport.URLParams
10091	ifNoneMatch_ string
10092	ctx_         context.Context
10093	header_      http.Header
10094}
10095
10096// List: Lists regions/{region}/jobs in a project.
10097func (r *ProjectsRegionsJobsService) List(projectId string, region string) *ProjectsRegionsJobsListCall {
10098	c := &ProjectsRegionsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10099	c.projectId = projectId
10100	c.region = region
10101	return c
10102}
10103
10104// ClusterName sets the optional parameter "clusterName": If set, the
10105// returned jobs list includes only jobs that were submitted to the
10106// named cluster.
10107func (c *ProjectsRegionsJobsListCall) ClusterName(clusterName string) *ProjectsRegionsJobsListCall {
10108	c.urlParams_.Set("clusterName", clusterName)
10109	return c
10110}
10111
10112// Filter sets the optional parameter "filter": A filter constraining
10113// the jobs to list. Filters are case-sensitive and have the following
10114// syntax:field = value AND field = value ...where field is status.state
10115// or labels.[KEY], and [KEY] is a label key. value can be * to match
10116// all values. status.state can be either ACTIVE or NON_ACTIVE. Only the
10117// logical AND operator is supported; space-separated items are treated
10118// as having an implicit AND operator.Example filter:status.state =
10119// ACTIVE AND labels.env = staging AND labels.starred = *
10120func (c *ProjectsRegionsJobsListCall) Filter(filter string) *ProjectsRegionsJobsListCall {
10121	c.urlParams_.Set("filter", filter)
10122	return c
10123}
10124
10125// JobStateMatcher sets the optional parameter "jobStateMatcher":
10126// Specifies enumerated categories of jobs to list. (default = match ALL
10127// jobs).If filter is provided, jobStateMatcher will be ignored.
10128//
10129// Possible values:
10130//   "ALL"
10131//   "ACTIVE"
10132//   "NON_ACTIVE"
10133func (c *ProjectsRegionsJobsListCall) JobStateMatcher(jobStateMatcher string) *ProjectsRegionsJobsListCall {
10134	c.urlParams_.Set("jobStateMatcher", jobStateMatcher)
10135	return c
10136}
10137
10138// PageSize sets the optional parameter "pageSize": The number of
10139// results to return in each response.
10140func (c *ProjectsRegionsJobsListCall) PageSize(pageSize int64) *ProjectsRegionsJobsListCall {
10141	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10142	return c
10143}
10144
10145// PageToken sets the optional parameter "pageToken": The page token,
10146// returned by a previous call, to request the next page of results.
10147func (c *ProjectsRegionsJobsListCall) PageToken(pageToken string) *ProjectsRegionsJobsListCall {
10148	c.urlParams_.Set("pageToken", pageToken)
10149	return c
10150}
10151
10152// Fields allows partial responses to be retrieved. See
10153// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10154// for more information.
10155func (c *ProjectsRegionsJobsListCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsListCall {
10156	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10157	return c
10158}
10159
10160// IfNoneMatch sets the optional parameter which makes the operation
10161// fail if the object's ETag matches the given value. This is useful for
10162// getting updates only after the object has changed since the last
10163// request. Use googleapi.IsNotModified to check whether the response
10164// error from Do is the result of In-None-Match.
10165func (c *ProjectsRegionsJobsListCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsListCall {
10166	c.ifNoneMatch_ = entityTag
10167	return c
10168}
10169
10170// Context sets the context to be used in this call's Do method. Any
10171// pending HTTP request will be aborted if the provided context is
10172// canceled.
10173func (c *ProjectsRegionsJobsListCall) Context(ctx context.Context) *ProjectsRegionsJobsListCall {
10174	c.ctx_ = ctx
10175	return c
10176}
10177
10178// Header returns an http.Header that can be modified by the caller to
10179// add HTTP headers to the request.
10180func (c *ProjectsRegionsJobsListCall) Header() http.Header {
10181	if c.header_ == nil {
10182		c.header_ = make(http.Header)
10183	}
10184	return c.header_
10185}
10186
10187func (c *ProjectsRegionsJobsListCall) doRequest(alt string) (*http.Response, error) {
10188	reqHeaders := make(http.Header)
10189	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10190	for k, v := range c.header_ {
10191		reqHeaders[k] = v
10192	}
10193	reqHeaders.Set("User-Agent", c.s.userAgent())
10194	if c.ifNoneMatch_ != "" {
10195		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10196	}
10197	var body io.Reader = nil
10198	c.urlParams_.Set("alt", alt)
10199	c.urlParams_.Set("prettyPrint", "false")
10200	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs")
10201	urls += "?" + c.urlParams_.Encode()
10202	req, err := http.NewRequest("GET", urls, body)
10203	if err != nil {
10204		return nil, err
10205	}
10206	req.Header = reqHeaders
10207	googleapi.Expand(req.URL, map[string]string{
10208		"projectId": c.projectId,
10209		"region":    c.region,
10210	})
10211	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10212}
10213
10214// Do executes the "dataproc.projects.regions.jobs.list" call.
10215// Exactly one of *ListJobsResponse or error will be non-nil. Any
10216// non-2xx status code is an error. Response headers are in either
10217// *ListJobsResponse.ServerResponse.Header or (if a response was
10218// returned at all) in error.(*googleapi.Error).Header. Use
10219// googleapi.IsNotModified to check whether the returned error was
10220// because http.StatusNotModified was returned.
10221func (c *ProjectsRegionsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
10222	gensupport.SetOptions(c.urlParams_, opts...)
10223	res, err := c.doRequest("json")
10224	if res != nil && res.StatusCode == http.StatusNotModified {
10225		if res.Body != nil {
10226			res.Body.Close()
10227		}
10228		return nil, &googleapi.Error{
10229			Code:   res.StatusCode,
10230			Header: res.Header,
10231		}
10232	}
10233	if err != nil {
10234		return nil, err
10235	}
10236	defer googleapi.CloseBody(res)
10237	if err := googleapi.CheckResponse(res); err != nil {
10238		return nil, err
10239	}
10240	ret := &ListJobsResponse{
10241		ServerResponse: googleapi.ServerResponse{
10242			Header:         res.Header,
10243			HTTPStatusCode: res.StatusCode,
10244		},
10245	}
10246	target := &ret
10247	if err := gensupport.DecodeResponse(target, res); err != nil {
10248		return nil, err
10249	}
10250	return ret, nil
10251	// {
10252	//   "description": "Lists regions/{region}/jobs in a project.",
10253	//   "flatPath": "v1/projects/{projectId}/regions/{region}/jobs",
10254	//   "httpMethod": "GET",
10255	//   "id": "dataproc.projects.regions.jobs.list",
10256	//   "parameterOrder": [
10257	//     "projectId",
10258	//     "region"
10259	//   ],
10260	//   "parameters": {
10261	//     "clusterName": {
10262	//       "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.",
10263	//       "location": "query",
10264	//       "type": "string"
10265	//     },
10266	//     "filter": {
10267	//       "description": "Optional. A filter constraining the jobs to list. Filters are case-sensitive and have the following syntax:field = value AND field = value ...where field is status.state or labels.[KEY], and [KEY] is a label key. value can be * to match all values. status.state can be either ACTIVE or NON_ACTIVE. Only the logical AND operator is supported; space-separated items are treated as having an implicit AND operator.Example filter:status.state = ACTIVE AND labels.env = staging AND labels.starred = *",
10268	//       "location": "query",
10269	//       "type": "string"
10270	//     },
10271	//     "jobStateMatcher": {
10272	//       "description": "Optional. Specifies enumerated categories of jobs to list. (default = match ALL jobs).If filter is provided, jobStateMatcher will be ignored.",
10273	//       "enum": [
10274	//         "ALL",
10275	//         "ACTIVE",
10276	//         "NON_ACTIVE"
10277	//       ],
10278	//       "location": "query",
10279	//       "type": "string"
10280	//     },
10281	//     "pageSize": {
10282	//       "description": "Optional. The number of results to return in each response.",
10283	//       "format": "int32",
10284	//       "location": "query",
10285	//       "type": "integer"
10286	//     },
10287	//     "pageToken": {
10288	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
10289	//       "location": "query",
10290	//       "type": "string"
10291	//     },
10292	//     "projectId": {
10293	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
10294	//       "location": "path",
10295	//       "required": true,
10296	//       "type": "string"
10297	//     },
10298	//     "region": {
10299	//       "description": "Required. The Dataproc region in which to handle the request.",
10300	//       "location": "path",
10301	//       "required": true,
10302	//       "type": "string"
10303	//     }
10304	//   },
10305	//   "path": "v1/projects/{projectId}/regions/{region}/jobs",
10306	//   "response": {
10307	//     "$ref": "ListJobsResponse"
10308	//   },
10309	//   "scopes": [
10310	//     "https://www.googleapis.com/auth/cloud-platform"
10311	//   ]
10312	// }
10313
10314}
10315
10316// Pages invokes f for each page of results.
10317// A non-nil error returned from f will halt the iteration.
10318// The provided context supersedes any context provided to the Context method.
10319func (c *ProjectsRegionsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
10320	c.ctx_ = ctx
10321	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
10322	for {
10323		x, err := c.Do()
10324		if err != nil {
10325			return err
10326		}
10327		if err := f(x); err != nil {
10328			return err
10329		}
10330		if x.NextPageToken == "" {
10331			return nil
10332		}
10333		c.PageToken(x.NextPageToken)
10334	}
10335}
10336
10337// method id "dataproc.projects.regions.jobs.patch":
10338
10339type ProjectsRegionsJobsPatchCall struct {
10340	s          *Service
10341	projectId  string
10342	region     string
10343	jobId      string
10344	job        *Job
10345	urlParams_ gensupport.URLParams
10346	ctx_       context.Context
10347	header_    http.Header
10348}
10349
10350// Patch: Updates a job in a project.
10351func (r *ProjectsRegionsJobsService) Patch(projectId string, region string, jobId string, job *Job) *ProjectsRegionsJobsPatchCall {
10352	c := &ProjectsRegionsJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10353	c.projectId = projectId
10354	c.region = region
10355	c.jobId = jobId
10356	c.job = job
10357	return c
10358}
10359
10360// UpdateMask sets the optional parameter "updateMask": Required.
10361// Specifies the path, relative to <code>Job</code>, of the field to
10362// update. For example, to update the labels of a Job the
10363// <code>update_mask</code> parameter would be specified as
10364// <code>labels</code>, and the PATCH request body would specify the new
10365// value. <strong>Note:</strong> Currently, <code>labels</code> is the
10366// only field that can be updated.
10367func (c *ProjectsRegionsJobsPatchCall) UpdateMask(updateMask string) *ProjectsRegionsJobsPatchCall {
10368	c.urlParams_.Set("updateMask", updateMask)
10369	return c
10370}
10371
10372// Fields allows partial responses to be retrieved. See
10373// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10374// for more information.
10375func (c *ProjectsRegionsJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsPatchCall {
10376	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10377	return c
10378}
10379
10380// Context sets the context to be used in this call's Do method. Any
10381// pending HTTP request will be aborted if the provided context is
10382// canceled.
10383func (c *ProjectsRegionsJobsPatchCall) Context(ctx context.Context) *ProjectsRegionsJobsPatchCall {
10384	c.ctx_ = ctx
10385	return c
10386}
10387
10388// Header returns an http.Header that can be modified by the caller to
10389// add HTTP headers to the request.
10390func (c *ProjectsRegionsJobsPatchCall) Header() http.Header {
10391	if c.header_ == nil {
10392		c.header_ = make(http.Header)
10393	}
10394	return c.header_
10395}
10396
10397func (c *ProjectsRegionsJobsPatchCall) doRequest(alt string) (*http.Response, error) {
10398	reqHeaders := make(http.Header)
10399	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10400	for k, v := range c.header_ {
10401		reqHeaders[k] = v
10402	}
10403	reqHeaders.Set("User-Agent", c.s.userAgent())
10404	var body io.Reader = nil
10405	body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
10406	if err != nil {
10407		return nil, err
10408	}
10409	reqHeaders.Set("Content-Type", "application/json")
10410	c.urlParams_.Set("alt", alt)
10411	c.urlParams_.Set("prettyPrint", "false")
10412	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs/{jobId}")
10413	urls += "?" + c.urlParams_.Encode()
10414	req, err := http.NewRequest("PATCH", urls, body)
10415	if err != nil {
10416		return nil, err
10417	}
10418	req.Header = reqHeaders
10419	googleapi.Expand(req.URL, map[string]string{
10420		"projectId": c.projectId,
10421		"region":    c.region,
10422		"jobId":     c.jobId,
10423	})
10424	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10425}
10426
10427// Do executes the "dataproc.projects.regions.jobs.patch" call.
10428// Exactly one of *Job or error will be non-nil. Any non-2xx status code
10429// is an error. Response headers are in either
10430// *Job.ServerResponse.Header or (if a response was returned at all) in
10431// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10432// whether the returned error was because http.StatusNotModified was
10433// returned.
10434func (c *ProjectsRegionsJobsPatchCall) Do(opts ...googleapi.CallOption) (*Job, error) {
10435	gensupport.SetOptions(c.urlParams_, opts...)
10436	res, err := c.doRequest("json")
10437	if res != nil && res.StatusCode == http.StatusNotModified {
10438		if res.Body != nil {
10439			res.Body.Close()
10440		}
10441		return nil, &googleapi.Error{
10442			Code:   res.StatusCode,
10443			Header: res.Header,
10444		}
10445	}
10446	if err != nil {
10447		return nil, err
10448	}
10449	defer googleapi.CloseBody(res)
10450	if err := googleapi.CheckResponse(res); err != nil {
10451		return nil, err
10452	}
10453	ret := &Job{
10454		ServerResponse: googleapi.ServerResponse{
10455			Header:         res.Header,
10456			HTTPStatusCode: res.StatusCode,
10457		},
10458	}
10459	target := &ret
10460	if err := gensupport.DecodeResponse(target, res); err != nil {
10461		return nil, err
10462	}
10463	return ret, nil
10464	// {
10465	//   "description": "Updates a job in a project.",
10466	//   "flatPath": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}",
10467	//   "httpMethod": "PATCH",
10468	//   "id": "dataproc.projects.regions.jobs.patch",
10469	//   "parameterOrder": [
10470	//     "projectId",
10471	//     "region",
10472	//     "jobId"
10473	//   ],
10474	//   "parameters": {
10475	//     "jobId": {
10476	//       "description": "Required. The job ID.",
10477	//       "location": "path",
10478	//       "required": true,
10479	//       "type": "string"
10480	//     },
10481	//     "projectId": {
10482	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
10483	//       "location": "path",
10484	//       "required": true,
10485	//       "type": "string"
10486	//     },
10487	//     "region": {
10488	//       "description": "Required. The Dataproc region in which to handle the request.",
10489	//       "location": "path",
10490	//       "required": true,
10491	//       "type": "string"
10492	//     },
10493	//     "updateMask": {
10494	//       "description": "Required. Specifies the path, relative to \u003ccode\u003eJob\u003c/code\u003e, of the field to update. For example, to update the labels of a Job the \u003ccode\u003eupdate_mask\u003c/code\u003e parameter would be specified as \u003ccode\u003elabels\u003c/code\u003e, and the PATCH request body would specify the new value. \u003cstrong\u003eNote:\u003c/strong\u003e Currently, \u003ccode\u003elabels\u003c/code\u003e is the only field that can be updated.",
10495	//       "format": "google-fieldmask",
10496	//       "location": "query",
10497	//       "type": "string"
10498	//     }
10499	//   },
10500	//   "path": "v1/projects/{projectId}/regions/{region}/jobs/{jobId}",
10501	//   "request": {
10502	//     "$ref": "Job"
10503	//   },
10504	//   "response": {
10505	//     "$ref": "Job"
10506	//   },
10507	//   "scopes": [
10508	//     "https://www.googleapis.com/auth/cloud-platform"
10509	//   ]
10510	// }
10511
10512}
10513
10514// method id "dataproc.projects.regions.jobs.setIamPolicy":
10515
10516type ProjectsRegionsJobsSetIamPolicyCall struct {
10517	s                   *Service
10518	resource            string
10519	setiampolicyrequest *SetIamPolicyRequest
10520	urlParams_          gensupport.URLParams
10521	ctx_                context.Context
10522	header_             http.Header
10523}
10524
10525// SetIamPolicy: Sets the access control policy on the specified
10526// resource. Replaces any existing policy.Can return Public Errors:
10527// NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
10528func (r *ProjectsRegionsJobsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsJobsSetIamPolicyCall {
10529	c := &ProjectsRegionsJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10530	c.resource = resource
10531	c.setiampolicyrequest = setiampolicyrequest
10532	return c
10533}
10534
10535// Fields allows partial responses to be retrieved. See
10536// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10537// for more information.
10538func (c *ProjectsRegionsJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSetIamPolicyCall {
10539	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10540	return c
10541}
10542
10543// Context sets the context to be used in this call's Do method. Any
10544// pending HTTP request will be aborted if the provided context is
10545// canceled.
10546func (c *ProjectsRegionsJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsJobsSetIamPolicyCall {
10547	c.ctx_ = ctx
10548	return c
10549}
10550
10551// Header returns an http.Header that can be modified by the caller to
10552// add HTTP headers to the request.
10553func (c *ProjectsRegionsJobsSetIamPolicyCall) Header() http.Header {
10554	if c.header_ == nil {
10555		c.header_ = make(http.Header)
10556	}
10557	return c.header_
10558}
10559
10560func (c *ProjectsRegionsJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
10561	reqHeaders := make(http.Header)
10562	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10563	for k, v := range c.header_ {
10564		reqHeaders[k] = v
10565	}
10566	reqHeaders.Set("User-Agent", c.s.userAgent())
10567	var body io.Reader = nil
10568	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
10569	if err != nil {
10570		return nil, err
10571	}
10572	reqHeaders.Set("Content-Type", "application/json")
10573	c.urlParams_.Set("alt", alt)
10574	c.urlParams_.Set("prettyPrint", "false")
10575	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
10576	urls += "?" + c.urlParams_.Encode()
10577	req, err := http.NewRequest("POST", urls, body)
10578	if err != nil {
10579		return nil, err
10580	}
10581	req.Header = reqHeaders
10582	googleapi.Expand(req.URL, map[string]string{
10583		"resource": c.resource,
10584	})
10585	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10586}
10587
10588// Do executes the "dataproc.projects.regions.jobs.setIamPolicy" call.
10589// Exactly one of *Policy or error will be non-nil. Any non-2xx status
10590// code is an error. Response headers are in either
10591// *Policy.ServerResponse.Header or (if a response was returned at all)
10592// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10593// check whether the returned error was because http.StatusNotModified
10594// was returned.
10595func (c *ProjectsRegionsJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10596	gensupport.SetOptions(c.urlParams_, opts...)
10597	res, err := c.doRequest("json")
10598	if res != nil && res.StatusCode == http.StatusNotModified {
10599		if res.Body != nil {
10600			res.Body.Close()
10601		}
10602		return nil, &googleapi.Error{
10603			Code:   res.StatusCode,
10604			Header: res.Header,
10605		}
10606	}
10607	if err != nil {
10608		return nil, err
10609	}
10610	defer googleapi.CloseBody(res)
10611	if err := googleapi.CheckResponse(res); err != nil {
10612		return nil, err
10613	}
10614	ret := &Policy{
10615		ServerResponse: googleapi.ServerResponse{
10616			Header:         res.Header,
10617			HTTPStatusCode: res.StatusCode,
10618		},
10619	}
10620	target := &ret
10621	if err := gensupport.DecodeResponse(target, res); err != nil {
10622		return nil, err
10623	}
10624	return ret, nil
10625	// {
10626	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED",
10627	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:setIamPolicy",
10628	//   "httpMethod": "POST",
10629	//   "id": "dataproc.projects.regions.jobs.setIamPolicy",
10630	//   "parameterOrder": [
10631	//     "resource"
10632	//   ],
10633	//   "parameters": {
10634	//     "resource": {
10635	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
10636	//       "location": "path",
10637	//       "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$",
10638	//       "required": true,
10639	//       "type": "string"
10640	//     }
10641	//   },
10642	//   "path": "v1/{+resource}:setIamPolicy",
10643	//   "request": {
10644	//     "$ref": "SetIamPolicyRequest"
10645	//   },
10646	//   "response": {
10647	//     "$ref": "Policy"
10648	//   },
10649	//   "scopes": [
10650	//     "https://www.googleapis.com/auth/cloud-platform"
10651	//   ]
10652	// }
10653
10654}
10655
10656// method id "dataproc.projects.regions.jobs.submit":
10657
10658type ProjectsRegionsJobsSubmitCall struct {
10659	s                *Service
10660	projectId        string
10661	region           string
10662	submitjobrequest *SubmitJobRequest
10663	urlParams_       gensupport.URLParams
10664	ctx_             context.Context
10665	header_          http.Header
10666}
10667
10668// Submit: Submits a job to a cluster.
10669func (r *ProjectsRegionsJobsService) Submit(projectId string, region string, submitjobrequest *SubmitJobRequest) *ProjectsRegionsJobsSubmitCall {
10670	c := &ProjectsRegionsJobsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10671	c.projectId = projectId
10672	c.region = region
10673	c.submitjobrequest = submitjobrequest
10674	return c
10675}
10676
10677// Fields allows partial responses to be retrieved. See
10678// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10679// for more information.
10680func (c *ProjectsRegionsJobsSubmitCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSubmitCall {
10681	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10682	return c
10683}
10684
10685// Context sets the context to be used in this call's Do method. Any
10686// pending HTTP request will be aborted if the provided context is
10687// canceled.
10688func (c *ProjectsRegionsJobsSubmitCall) Context(ctx context.Context) *ProjectsRegionsJobsSubmitCall {
10689	c.ctx_ = ctx
10690	return c
10691}
10692
10693// Header returns an http.Header that can be modified by the caller to
10694// add HTTP headers to the request.
10695func (c *ProjectsRegionsJobsSubmitCall) Header() http.Header {
10696	if c.header_ == nil {
10697		c.header_ = make(http.Header)
10698	}
10699	return c.header_
10700}
10701
10702func (c *ProjectsRegionsJobsSubmitCall) doRequest(alt string) (*http.Response, error) {
10703	reqHeaders := make(http.Header)
10704	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10705	for k, v := range c.header_ {
10706		reqHeaders[k] = v
10707	}
10708	reqHeaders.Set("User-Agent", c.s.userAgent())
10709	var body io.Reader = nil
10710	body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitjobrequest)
10711	if err != nil {
10712		return nil, err
10713	}
10714	reqHeaders.Set("Content-Type", "application/json")
10715	c.urlParams_.Set("alt", alt)
10716	c.urlParams_.Set("prettyPrint", "false")
10717	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs:submit")
10718	urls += "?" + c.urlParams_.Encode()
10719	req, err := http.NewRequest("POST", urls, body)
10720	if err != nil {
10721		return nil, err
10722	}
10723	req.Header = reqHeaders
10724	googleapi.Expand(req.URL, map[string]string{
10725		"projectId": c.projectId,
10726		"region":    c.region,
10727	})
10728	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10729}
10730
10731// Do executes the "dataproc.projects.regions.jobs.submit" call.
10732// Exactly one of *Job or error will be non-nil. Any non-2xx status code
10733// is an error. Response headers are in either
10734// *Job.ServerResponse.Header or (if a response was returned at all) in
10735// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10736// whether the returned error was because http.StatusNotModified was
10737// returned.
10738func (c *ProjectsRegionsJobsSubmitCall) Do(opts ...googleapi.CallOption) (*Job, error) {
10739	gensupport.SetOptions(c.urlParams_, opts...)
10740	res, err := c.doRequest("json")
10741	if res != nil && res.StatusCode == http.StatusNotModified {
10742		if res.Body != nil {
10743			res.Body.Close()
10744		}
10745		return nil, &googleapi.Error{
10746			Code:   res.StatusCode,
10747			Header: res.Header,
10748		}
10749	}
10750	if err != nil {
10751		return nil, err
10752	}
10753	defer googleapi.CloseBody(res)
10754	if err := googleapi.CheckResponse(res); err != nil {
10755		return nil, err
10756	}
10757	ret := &Job{
10758		ServerResponse: googleapi.ServerResponse{
10759			Header:         res.Header,
10760			HTTPStatusCode: res.StatusCode,
10761		},
10762	}
10763	target := &ret
10764	if err := gensupport.DecodeResponse(target, res); err != nil {
10765		return nil, err
10766	}
10767	return ret, nil
10768	// {
10769	//   "description": "Submits a job to a cluster.",
10770	//   "flatPath": "v1/projects/{projectId}/regions/{region}/jobs:submit",
10771	//   "httpMethod": "POST",
10772	//   "id": "dataproc.projects.regions.jobs.submit",
10773	//   "parameterOrder": [
10774	//     "projectId",
10775	//     "region"
10776	//   ],
10777	//   "parameters": {
10778	//     "projectId": {
10779	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
10780	//       "location": "path",
10781	//       "required": true,
10782	//       "type": "string"
10783	//     },
10784	//     "region": {
10785	//       "description": "Required. The Dataproc region in which to handle the request.",
10786	//       "location": "path",
10787	//       "required": true,
10788	//       "type": "string"
10789	//     }
10790	//   },
10791	//   "path": "v1/projects/{projectId}/regions/{region}/jobs:submit",
10792	//   "request": {
10793	//     "$ref": "SubmitJobRequest"
10794	//   },
10795	//   "response": {
10796	//     "$ref": "Job"
10797	//   },
10798	//   "scopes": [
10799	//     "https://www.googleapis.com/auth/cloud-platform"
10800	//   ]
10801	// }
10802
10803}
10804
10805// method id "dataproc.projects.regions.jobs.submitAsOperation":
10806
10807type ProjectsRegionsJobsSubmitAsOperationCall struct {
10808	s                *Service
10809	projectId        string
10810	region           string
10811	submitjobrequest *SubmitJobRequest
10812	urlParams_       gensupport.URLParams
10813	ctx_             context.Context
10814	header_          http.Header
10815}
10816
10817// SubmitAsOperation: Submits job to a cluster.
10818func (r *ProjectsRegionsJobsService) SubmitAsOperation(projectId string, region string, submitjobrequest *SubmitJobRequest) *ProjectsRegionsJobsSubmitAsOperationCall {
10819	c := &ProjectsRegionsJobsSubmitAsOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10820	c.projectId = projectId
10821	c.region = region
10822	c.submitjobrequest = submitjobrequest
10823	return c
10824}
10825
10826// Fields allows partial responses to be retrieved. See
10827// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10828// for more information.
10829func (c *ProjectsRegionsJobsSubmitAsOperationCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSubmitAsOperationCall {
10830	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10831	return c
10832}
10833
10834// Context sets the context to be used in this call's Do method. Any
10835// pending HTTP request will be aborted if the provided context is
10836// canceled.
10837func (c *ProjectsRegionsJobsSubmitAsOperationCall) Context(ctx context.Context) *ProjectsRegionsJobsSubmitAsOperationCall {
10838	c.ctx_ = ctx
10839	return c
10840}
10841
10842// Header returns an http.Header that can be modified by the caller to
10843// add HTTP headers to the request.
10844func (c *ProjectsRegionsJobsSubmitAsOperationCall) Header() http.Header {
10845	if c.header_ == nil {
10846		c.header_ = make(http.Header)
10847	}
10848	return c.header_
10849}
10850
10851func (c *ProjectsRegionsJobsSubmitAsOperationCall) doRequest(alt string) (*http.Response, error) {
10852	reqHeaders := make(http.Header)
10853	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
10854	for k, v := range c.header_ {
10855		reqHeaders[k] = v
10856	}
10857	reqHeaders.Set("User-Agent", c.s.userAgent())
10858	var body io.Reader = nil
10859	body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitjobrequest)
10860	if err != nil {
10861		return nil, err
10862	}
10863	reqHeaders.Set("Content-Type", "application/json")
10864	c.urlParams_.Set("alt", alt)
10865	c.urlParams_.Set("prettyPrint", "false")
10866	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/projects/{projectId}/regions/{region}/jobs:submitAsOperation")
10867	urls += "?" + c.urlParams_.Encode()
10868	req, err := http.NewRequest("POST", urls, body)
10869	if err != nil {
10870		return nil, err
10871	}
10872	req.Header = reqHeaders
10873	googleapi.Expand(req.URL, map[string]string{
10874		"projectId": c.projectId,
10875		"region":    c.region,
10876	})
10877	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10878}
10879
10880// Do executes the "dataproc.projects.regions.jobs.submitAsOperation" call.
10881// Exactly one of *Operation or error will be non-nil. Any non-2xx
10882// status code is an error. Response headers are in either
10883// *Operation.ServerResponse.Header or (if a response was returned at
10884// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10885// to check whether the returned error was because
10886// http.StatusNotModified was returned.
10887func (c *ProjectsRegionsJobsSubmitAsOperationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10888	gensupport.SetOptions(c.urlParams_, opts...)
10889	res, err := c.doRequest("json")
10890	if res != nil && res.StatusCode == http.StatusNotModified {
10891		if res.Body != nil {
10892			res.Body.Close()
10893		}
10894		return nil, &googleapi.Error{
10895			Code:   res.StatusCode,
10896			Header: res.Header,
10897		}
10898	}
10899	if err != nil {
10900		return nil, err
10901	}
10902	defer googleapi.CloseBody(res)
10903	if err := googleapi.CheckResponse(res); err != nil {
10904		return nil, err
10905	}
10906	ret := &Operation{
10907		ServerResponse: googleapi.ServerResponse{
10908			Header:         res.Header,
10909			HTTPStatusCode: res.StatusCode,
10910		},
10911	}
10912	target := &ret
10913	if err := gensupport.DecodeResponse(target, res); err != nil {
10914		return nil, err
10915	}
10916	return ret, nil
10917	// {
10918	//   "description": "Submits job to a cluster.",
10919	//   "flatPath": "v1/projects/{projectId}/regions/{region}/jobs:submitAsOperation",
10920	//   "httpMethod": "POST",
10921	//   "id": "dataproc.projects.regions.jobs.submitAsOperation",
10922	//   "parameterOrder": [
10923	//     "projectId",
10924	//     "region"
10925	//   ],
10926	//   "parameters": {
10927	//     "projectId": {
10928	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
10929	//       "location": "path",
10930	//       "required": true,
10931	//       "type": "string"
10932	//     },
10933	//     "region": {
10934	//       "description": "Required. The Dataproc region in which to handle the request.",
10935	//       "location": "path",
10936	//       "required": true,
10937	//       "type": "string"
10938	//     }
10939	//   },
10940	//   "path": "v1/projects/{projectId}/regions/{region}/jobs:submitAsOperation",
10941	//   "request": {
10942	//     "$ref": "SubmitJobRequest"
10943	//   },
10944	//   "response": {
10945	//     "$ref": "Operation"
10946	//   },
10947	//   "scopes": [
10948	//     "https://www.googleapis.com/auth/cloud-platform"
10949	//   ]
10950	// }
10951
10952}
10953
10954// method id "dataproc.projects.regions.jobs.testIamPermissions":
10955
10956type ProjectsRegionsJobsTestIamPermissionsCall struct {
10957	s                         *Service
10958	resource                  string
10959	testiampermissionsrequest *TestIamPermissionsRequest
10960	urlParams_                gensupport.URLParams
10961	ctx_                      context.Context
10962	header_                   http.Header
10963}
10964
10965// TestIamPermissions: Returns permissions that a caller has on the
10966// specified resource. If the resource does not exist, this will return
10967// an empty set of permissions, not a NOT_FOUND error.Note: This
10968// operation is designed to be used for building permission-aware UIs
10969// and command-line tools, not for authorization checking. This
10970// operation may "fail open" without warning.
10971func (r *ProjectsRegionsJobsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsJobsTestIamPermissionsCall {
10972	c := &ProjectsRegionsJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10973	c.resource = resource
10974	c.testiampermissionsrequest = testiampermissionsrequest
10975	return c
10976}
10977
10978// Fields allows partial responses to be retrieved. See
10979// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10980// for more information.
10981func (c *ProjectsRegionsJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsTestIamPermissionsCall {
10982	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10983	return c
10984}
10985
10986// Context sets the context to be used in this call's Do method. Any
10987// pending HTTP request will be aborted if the provided context is
10988// canceled.
10989func (c *ProjectsRegionsJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsJobsTestIamPermissionsCall {
10990	c.ctx_ = ctx
10991	return c
10992}
10993
10994// Header returns an http.Header that can be modified by the caller to
10995// add HTTP headers to the request.
10996func (c *ProjectsRegionsJobsTestIamPermissionsCall) Header() http.Header {
10997	if c.header_ == nil {
10998		c.header_ = make(http.Header)
10999	}
11000	return c.header_
11001}
11002
11003func (c *ProjectsRegionsJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
11004	reqHeaders := make(http.Header)
11005	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
11006	for k, v := range c.header_ {
11007		reqHeaders[k] = v
11008	}
11009	reqHeaders.Set("User-Agent", c.s.userAgent())
11010	var body io.Reader = nil
11011	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
11012	if err != nil {
11013		return nil, err
11014	}
11015	reqHeaders.Set("Content-Type", "application/json")
11016	c.urlParams_.Set("alt", alt)
11017	c.urlParams_.Set("prettyPrint", "false")
11018	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
11019	urls += "?" + c.urlParams_.Encode()
11020	req, err := http.NewRequest("POST", urls, body)
11021	if err != nil {
11022		return nil, err
11023	}
11024	req.Header = reqHeaders
11025	googleapi.Expand(req.URL, map[string]string{
11026		"resource": c.resource,
11027	})
11028	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11029}
11030
11031// Do executes the "dataproc.projects.regions.jobs.testIamPermissions" call.
11032// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
11033// Any non-2xx status code is an error. Response headers are in either
11034// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
11035// was returned at all) in error.(*googleapi.Error).Header. Use
11036// googleapi.IsNotModified to check whether the returned error was
11037// because http.StatusNotModified was returned.
11038func (c *ProjectsRegionsJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
11039	gensupport.SetOptions(c.urlParams_, opts...)
11040	res, err := c.doRequest("json")
11041	if res != nil && res.StatusCode == http.StatusNotModified {
11042		if res.Body != nil {
11043			res.Body.Close()
11044		}
11045		return nil, &googleapi.Error{
11046			Code:   res.StatusCode,
11047			Header: res.Header,
11048		}
11049	}
11050	if err != nil {
11051		return nil, err
11052	}
11053	defer googleapi.CloseBody(res)
11054	if err := googleapi.CheckResponse(res); err != nil {
11055		return nil, err
11056	}
11057	ret := &TestIamPermissionsResponse{
11058		ServerResponse: googleapi.ServerResponse{
11059			Header:         res.Header,
11060			HTTPStatusCode: res.StatusCode,
11061		},
11062	}
11063	target := &ret
11064	if err := gensupport.DecodeResponse(target, res); err != nil {
11065		return nil, err
11066	}
11067	return ret, nil
11068	// {
11069	//   "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.",
11070	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:testIamPermissions",
11071	//   "httpMethod": "POST",
11072	//   "id": "dataproc.projects.regions.jobs.testIamPermissions",
11073	//   "parameterOrder": [
11074	//     "resource"
11075	//   ],
11076	//   "parameters": {
11077	//     "resource": {
11078	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
11079	//       "location": "path",
11080	//       "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$",
11081	//       "required": true,
11082	//       "type": "string"
11083	//     }
11084	//   },
11085	//   "path": "v1/{+resource}:testIamPermissions",
11086	//   "request": {
11087	//     "$ref": "TestIamPermissionsRequest"
11088	//   },
11089	//   "response": {
11090	//     "$ref": "TestIamPermissionsResponse"
11091	//   },
11092	//   "scopes": [
11093	//     "https://www.googleapis.com/auth/cloud-platform"
11094	//   ]
11095	// }
11096
11097}
11098
11099// method id "dataproc.projects.regions.operations.cancel":
11100
11101type ProjectsRegionsOperationsCancelCall struct {
11102	s          *Service
11103	name       string
11104	urlParams_ gensupport.URLParams
11105	ctx_       context.Context
11106	header_    http.Header
11107}
11108
11109// Cancel: Starts asynchronous cancellation on a long-running operation.
11110// The server makes a best effort to cancel the operation, but success
11111// is not guaranteed. If the server doesn't support this method, it
11112// returns google.rpc.Code.UNIMPLEMENTED. Clients can use
11113// Operations.GetOperation or other methods to check whether the
11114// cancellation succeeded or whether the operation completed despite
11115// cancellation. On successful cancellation, the operation is not
11116// deleted; instead, it becomes an operation with an Operation.error
11117// value with a google.rpc.Status.code of 1, corresponding to
11118// Code.CANCELLED.
11119func (r *ProjectsRegionsOperationsService) Cancel(name string) *ProjectsRegionsOperationsCancelCall {
11120	c := &ProjectsRegionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11121	c.name = name
11122	return c
11123}
11124
11125// Fields allows partial responses to be retrieved. See
11126// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11127// for more information.
11128func (c *ProjectsRegionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsCancelCall {
11129	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11130	return c
11131}
11132
11133// Context sets the context to be used in this call's Do method. Any
11134// pending HTTP request will be aborted if the provided context is
11135// canceled.
11136func (c *ProjectsRegionsOperationsCancelCall) Context(ctx context.Context) *ProjectsRegionsOperationsCancelCall {
11137	c.ctx_ = ctx
11138	return c
11139}
11140
11141// Header returns an http.Header that can be modified by the caller to
11142// add HTTP headers to the request.
11143func (c *ProjectsRegionsOperationsCancelCall) Header() http.Header {
11144	if c.header_ == nil {
11145		c.header_ = make(http.Header)
11146	}
11147	return c.header_
11148}
11149
11150func (c *ProjectsRegionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
11151	reqHeaders := make(http.Header)
11152	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
11153	for k, v := range c.header_ {
11154		reqHeaders[k] = v
11155	}
11156	reqHeaders.Set("User-Agent", c.s.userAgent())
11157	var body io.Reader = nil
11158	c.urlParams_.Set("alt", alt)
11159	c.urlParams_.Set("prettyPrint", "false")
11160	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:cancel")
11161	urls += "?" + c.urlParams_.Encode()
11162	req, err := http.NewRequest("POST", urls, body)
11163	if err != nil {
11164		return nil, err
11165	}
11166	req.Header = reqHeaders
11167	googleapi.Expand(req.URL, map[string]string{
11168		"name": c.name,
11169	})
11170	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11171}
11172
11173// Do executes the "dataproc.projects.regions.operations.cancel" call.
11174// Exactly one of *Empty or error will be non-nil. Any non-2xx status
11175// code is an error. Response headers are in either
11176// *Empty.ServerResponse.Header or (if a response was returned at all)
11177// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11178// check whether the returned error was because http.StatusNotModified
11179// was returned.
11180func (c *ProjectsRegionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11181	gensupport.SetOptions(c.urlParams_, opts...)
11182	res, err := c.doRequest("json")
11183	if res != nil && res.StatusCode == http.StatusNotModified {
11184		if res.Body != nil {
11185			res.Body.Close()
11186		}
11187		return nil, &googleapi.Error{
11188			Code:   res.StatusCode,
11189			Header: res.Header,
11190		}
11191	}
11192	if err != nil {
11193		return nil, err
11194	}
11195	defer googleapi.CloseBody(res)
11196	if err := googleapi.CheckResponse(res); err != nil {
11197		return nil, err
11198	}
11199	ret := &Empty{
11200		ServerResponse: googleapi.ServerResponse{
11201			Header:         res.Header,
11202			HTTPStatusCode: res.StatusCode,
11203		},
11204	}
11205	target := &ret
11206	if err := gensupport.DecodeResponse(target, res); err != nil {
11207		return nil, err
11208	}
11209	return ret, nil
11210	// {
11211	//   "description": "Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.",
11212	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel",
11213	//   "httpMethod": "POST",
11214	//   "id": "dataproc.projects.regions.operations.cancel",
11215	//   "parameterOrder": [
11216	//     "name"
11217	//   ],
11218	//   "parameters": {
11219	//     "name": {
11220	//       "description": "The name of the operation resource to be cancelled.",
11221	//       "location": "path",
11222	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
11223	//       "required": true,
11224	//       "type": "string"
11225	//     }
11226	//   },
11227	//   "path": "v1/{+name}:cancel",
11228	//   "response": {
11229	//     "$ref": "Empty"
11230	//   },
11231	//   "scopes": [
11232	//     "https://www.googleapis.com/auth/cloud-platform"
11233	//   ]
11234	// }
11235
11236}
11237
11238// method id "dataproc.projects.regions.operations.delete":
11239
11240type ProjectsRegionsOperationsDeleteCall struct {
11241	s          *Service
11242	name       string
11243	urlParams_ gensupport.URLParams
11244	ctx_       context.Context
11245	header_    http.Header
11246}
11247
11248// Delete: Deletes a long-running operation. This method indicates that
11249// the client is no longer interested in the operation result. It does
11250// not cancel the operation. If the server doesn't support this method,
11251// it returns google.rpc.Code.UNIMPLEMENTED.
11252func (r *ProjectsRegionsOperationsService) Delete(name string) *ProjectsRegionsOperationsDeleteCall {
11253	c := &ProjectsRegionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11254	c.name = name
11255	return c
11256}
11257
11258// Fields allows partial responses to be retrieved. See
11259// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11260// for more information.
11261func (c *ProjectsRegionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsDeleteCall {
11262	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11263	return c
11264}
11265
11266// Context sets the context to be used in this call's Do method. Any
11267// pending HTTP request will be aborted if the provided context is
11268// canceled.
11269func (c *ProjectsRegionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsRegionsOperationsDeleteCall {
11270	c.ctx_ = ctx
11271	return c
11272}
11273
11274// Header returns an http.Header that can be modified by the caller to
11275// add HTTP headers to the request.
11276func (c *ProjectsRegionsOperationsDeleteCall) Header() http.Header {
11277	if c.header_ == nil {
11278		c.header_ = make(http.Header)
11279	}
11280	return c.header_
11281}
11282
11283func (c *ProjectsRegionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
11284	reqHeaders := make(http.Header)
11285	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
11286	for k, v := range c.header_ {
11287		reqHeaders[k] = v
11288	}
11289	reqHeaders.Set("User-Agent", c.s.userAgent())
11290	var body io.Reader = nil
11291	c.urlParams_.Set("alt", alt)
11292	c.urlParams_.Set("prettyPrint", "false")
11293	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11294	urls += "?" + c.urlParams_.Encode()
11295	req, err := http.NewRequest("DELETE", urls, body)
11296	if err != nil {
11297		return nil, err
11298	}
11299	req.Header = reqHeaders
11300	googleapi.Expand(req.URL, map[string]string{
11301		"name": c.name,
11302	})
11303	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11304}
11305
11306// Do executes the "dataproc.projects.regions.operations.delete" call.
11307// Exactly one of *Empty or error will be non-nil. Any non-2xx status
11308// code is an error. Response headers are in either
11309// *Empty.ServerResponse.Header or (if a response was returned at all)
11310// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11311// check whether the returned error was because http.StatusNotModified
11312// was returned.
11313func (c *ProjectsRegionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11314	gensupport.SetOptions(c.urlParams_, opts...)
11315	res, err := c.doRequest("json")
11316	if res != nil && res.StatusCode == http.StatusNotModified {
11317		if res.Body != nil {
11318			res.Body.Close()
11319		}
11320		return nil, &googleapi.Error{
11321			Code:   res.StatusCode,
11322			Header: res.Header,
11323		}
11324	}
11325	if err != nil {
11326		return nil, err
11327	}
11328	defer googleapi.CloseBody(res)
11329	if err := googleapi.CheckResponse(res); err != nil {
11330		return nil, err
11331	}
11332	ret := &Empty{
11333		ServerResponse: googleapi.ServerResponse{
11334			Header:         res.Header,
11335			HTTPStatusCode: res.StatusCode,
11336		},
11337	}
11338	target := &ret
11339	if err := gensupport.DecodeResponse(target, res); err != nil {
11340		return nil, err
11341	}
11342	return ret, nil
11343	// {
11344	//   "description": "Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.",
11345	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}",
11346	//   "httpMethod": "DELETE",
11347	//   "id": "dataproc.projects.regions.operations.delete",
11348	//   "parameterOrder": [
11349	//     "name"
11350	//   ],
11351	//   "parameters": {
11352	//     "name": {
11353	//       "description": "The name of the operation resource to be deleted.",
11354	//       "location": "path",
11355	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
11356	//       "required": true,
11357	//       "type": "string"
11358	//     }
11359	//   },
11360	//   "path": "v1/{+name}",
11361	//   "response": {
11362	//     "$ref": "Empty"
11363	//   },
11364	//   "scopes": [
11365	//     "https://www.googleapis.com/auth/cloud-platform"
11366	//   ]
11367	// }
11368
11369}
11370
11371// method id "dataproc.projects.regions.operations.get":
11372
11373type ProjectsRegionsOperationsGetCall struct {
11374	s            *Service
11375	name         string
11376	urlParams_   gensupport.URLParams
11377	ifNoneMatch_ string
11378	ctx_         context.Context
11379	header_      http.Header
11380}
11381
11382// Get: Gets the latest state of a long-running operation. Clients can
11383// use this method to poll the operation result at intervals as
11384// recommended by the API service.
11385func (r *ProjectsRegionsOperationsService) Get(name string) *ProjectsRegionsOperationsGetCall {
11386	c := &ProjectsRegionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11387	c.name = name
11388	return c
11389}
11390
11391// Fields allows partial responses to be retrieved. See
11392// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11393// for more information.
11394func (c *ProjectsRegionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsGetCall {
11395	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11396	return c
11397}
11398
11399// IfNoneMatch sets the optional parameter which makes the operation
11400// fail if the object's ETag matches the given value. This is useful for
11401// getting updates only after the object has changed since the last
11402// request. Use googleapi.IsNotModified to check whether the response
11403// error from Do is the result of In-None-Match.
11404func (c *ProjectsRegionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsOperationsGetCall {
11405	c.ifNoneMatch_ = entityTag
11406	return c
11407}
11408
11409// Context sets the context to be used in this call's Do method. Any
11410// pending HTTP request will be aborted if the provided context is
11411// canceled.
11412func (c *ProjectsRegionsOperationsGetCall) Context(ctx context.Context) *ProjectsRegionsOperationsGetCall {
11413	c.ctx_ = ctx
11414	return c
11415}
11416
11417// Header returns an http.Header that can be modified by the caller to
11418// add HTTP headers to the request.
11419func (c *ProjectsRegionsOperationsGetCall) Header() http.Header {
11420	if c.header_ == nil {
11421		c.header_ = make(http.Header)
11422	}
11423	return c.header_
11424}
11425
11426func (c *ProjectsRegionsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
11427	reqHeaders := make(http.Header)
11428	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
11429	for k, v := range c.header_ {
11430		reqHeaders[k] = v
11431	}
11432	reqHeaders.Set("User-Agent", c.s.userAgent())
11433	if c.ifNoneMatch_ != "" {
11434		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11435	}
11436	var body io.Reader = nil
11437	c.urlParams_.Set("alt", alt)
11438	c.urlParams_.Set("prettyPrint", "false")
11439	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11440	urls += "?" + c.urlParams_.Encode()
11441	req, err := http.NewRequest("GET", urls, body)
11442	if err != nil {
11443		return nil, err
11444	}
11445	req.Header = reqHeaders
11446	googleapi.Expand(req.URL, map[string]string{
11447		"name": c.name,
11448	})
11449	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11450}
11451
11452// Do executes the "dataproc.projects.regions.operations.get" call.
11453// Exactly one of *Operation or error will be non-nil. Any non-2xx
11454// status code is an error. Response headers are in either
11455// *Operation.ServerResponse.Header or (if a response was returned at
11456// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11457// to check whether the returned error was because
11458// http.StatusNotModified was returned.
11459func (c *ProjectsRegionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11460	gensupport.SetOptions(c.urlParams_, opts...)
11461	res, err := c.doRequest("json")
11462	if res != nil && res.StatusCode == http.StatusNotModified {
11463		if res.Body != nil {
11464			res.Body.Close()
11465		}
11466		return nil, &googleapi.Error{
11467			Code:   res.StatusCode,
11468			Header: res.Header,
11469		}
11470	}
11471	if err != nil {
11472		return nil, err
11473	}
11474	defer googleapi.CloseBody(res)
11475	if err := googleapi.CheckResponse(res); err != nil {
11476		return nil, err
11477	}
11478	ret := &Operation{
11479		ServerResponse: googleapi.ServerResponse{
11480			Header:         res.Header,
11481			HTTPStatusCode: res.StatusCode,
11482		},
11483	}
11484	target := &ret
11485	if err := gensupport.DecodeResponse(target, res); err != nil {
11486		return nil, err
11487	}
11488	return ret, nil
11489	// {
11490	//   "description": "Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.",
11491	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}",
11492	//   "httpMethod": "GET",
11493	//   "id": "dataproc.projects.regions.operations.get",
11494	//   "parameterOrder": [
11495	//     "name"
11496	//   ],
11497	//   "parameters": {
11498	//     "name": {
11499	//       "description": "The name of the operation resource.",
11500	//       "location": "path",
11501	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
11502	//       "required": true,
11503	//       "type": "string"
11504	//     }
11505	//   },
11506	//   "path": "v1/{+name}",
11507	//   "response": {
11508	//     "$ref": "Operation"
11509	//   },
11510	//   "scopes": [
11511	//     "https://www.googleapis.com/auth/cloud-platform"
11512	//   ]
11513	// }
11514
11515}
11516
11517// method id "dataproc.projects.regions.operations.getIamPolicy":
11518
11519type ProjectsRegionsOperationsGetIamPolicyCall struct {
11520	s                   *Service
11521	resource            string
11522	getiampolicyrequest *GetIamPolicyRequest
11523	urlParams_          gensupport.URLParams
11524	ctx_                context.Context
11525	header_             http.Header
11526}
11527
11528// GetIamPolicy: Gets the access control policy for a resource. Returns
11529// an empty policy if the resource exists and does not have a policy
11530// set.
11531func (r *ProjectsRegionsOperationsService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsRegionsOperationsGetIamPolicyCall {
11532	c := &ProjectsRegionsOperationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11533	c.resource = resource
11534	c.getiampolicyrequest = getiampolicyrequest
11535	return c
11536}
11537
11538// Fields allows partial responses to be retrieved. See
11539// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11540// for more information.
11541func (c *ProjectsRegionsOperationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsGetIamPolicyCall {
11542	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11543	return c
11544}
11545
11546// Context sets the context to be used in this call's Do method. Any
11547// pending HTTP request will be aborted if the provided context is
11548// canceled.
11549func (c *ProjectsRegionsOperationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsOperationsGetIamPolicyCall {
11550	c.ctx_ = ctx
11551	return c
11552}
11553
11554// Header returns an http.Header that can be modified by the caller to
11555// add HTTP headers to the request.
11556func (c *ProjectsRegionsOperationsGetIamPolicyCall) Header() http.Header {
11557	if c.header_ == nil {
11558		c.header_ = make(http.Header)
11559	}
11560	return c.header_
11561}
11562
11563func (c *ProjectsRegionsOperationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11564	reqHeaders := make(http.Header)
11565	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
11566	for k, v := range c.header_ {
11567		reqHeaders[k] = v
11568	}
11569	reqHeaders.Set("User-Agent", c.s.userAgent())
11570	var body io.Reader = nil
11571	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
11572	if err != nil {
11573		return nil, err
11574	}
11575	reqHeaders.Set("Content-Type", "application/json")
11576	c.urlParams_.Set("alt", alt)
11577	c.urlParams_.Set("prettyPrint", "false")
11578	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
11579	urls += "?" + c.urlParams_.Encode()
11580	req, err := http.NewRequest("POST", urls, body)
11581	if err != nil {
11582		return nil, err
11583	}
11584	req.Header = reqHeaders
11585	googleapi.Expand(req.URL, map[string]string{
11586		"resource": c.resource,
11587	})
11588	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11589}
11590
11591// Do executes the "dataproc.projects.regions.operations.getIamPolicy" call.
11592// Exactly one of *Policy or error will be non-nil. Any non-2xx status
11593// code is an error. Response headers are in either
11594// *Policy.ServerResponse.Header or (if a response was returned at all)
11595// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11596// check whether the returned error was because http.StatusNotModified
11597// was returned.
11598func (c *ProjectsRegionsOperationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11599	gensupport.SetOptions(c.urlParams_, opts...)
11600	res, err := c.doRequest("json")
11601	if res != nil && res.StatusCode == http.StatusNotModified {
11602		if res.Body != nil {
11603			res.Body.Close()
11604		}
11605		return nil, &googleapi.Error{
11606			Code:   res.StatusCode,
11607			Header: res.Header,
11608		}
11609	}
11610	if err != nil {
11611		return nil, err
11612	}
11613	defer googleapi.CloseBody(res)
11614	if err := googleapi.CheckResponse(res); err != nil {
11615		return nil, err
11616	}
11617	ret := &Policy{
11618		ServerResponse: googleapi.ServerResponse{
11619			Header:         res.Header,
11620			HTTPStatusCode: res.StatusCode,
11621		},
11622	}
11623	target := &ret
11624	if err := gensupport.DecodeResponse(target, res); err != nil {
11625		return nil, err
11626	}
11627	return ret, nil
11628	// {
11629	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
11630	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:getIamPolicy",
11631	//   "httpMethod": "POST",
11632	//   "id": "dataproc.projects.regions.operations.getIamPolicy",
11633	//   "parameterOrder": [
11634	//     "resource"
11635	//   ],
11636	//   "parameters": {
11637	//     "resource": {
11638	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
11639	//       "location": "path",
11640	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
11641	//       "required": true,
11642	//       "type": "string"
11643	//     }
11644	//   },
11645	//   "path": "v1/{+resource}:getIamPolicy",
11646	//   "request": {
11647	//     "$ref": "GetIamPolicyRequest"
11648	//   },
11649	//   "response": {
11650	//     "$ref": "Policy"
11651	//   },
11652	//   "scopes": [
11653	//     "https://www.googleapis.com/auth/cloud-platform"
11654	//   ]
11655	// }
11656
11657}
11658
11659// method id "dataproc.projects.regions.operations.list":
11660
11661type ProjectsRegionsOperationsListCall struct {
11662	s            *Service
11663	name         string
11664	urlParams_   gensupport.URLParams
11665	ifNoneMatch_ string
11666	ctx_         context.Context
11667	header_      http.Header
11668}
11669
11670// List: Lists operations that match the specified filter in the
11671// request. If the server doesn't support this method, it returns
11672// UNIMPLEMENTED.NOTE: the name binding allows API services to override
11673// the binding to use different resource name schemes, such as
11674// users/*/operations. To override the binding, API services can add a
11675// binding such as "/v1/{name=users/*}/operations" to their service
11676// configuration. For backwards compatibility, the default name includes
11677// the operations collection id, however overriding users must ensure
11678// the name binding is the parent resource, without the operations
11679// collection id.
11680func (r *ProjectsRegionsOperationsService) List(name string) *ProjectsRegionsOperationsListCall {
11681	c := &ProjectsRegionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11682	c.name = name
11683	return c
11684}
11685
11686// Filter sets the optional parameter "filter": The standard list
11687// filter.
11688func (c *ProjectsRegionsOperationsListCall) Filter(filter string) *ProjectsRegionsOperationsListCall {
11689	c.urlParams_.Set("filter", filter)
11690	return c
11691}
11692
11693// PageSize sets the optional parameter "pageSize": The standard list
11694// page size.
11695func (c *ProjectsRegionsOperationsListCall) PageSize(pageSize int64) *ProjectsRegionsOperationsListCall {
11696	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11697	return c
11698}
11699
11700// PageToken sets the optional parameter "pageToken": The standard list
11701// page token.
11702func (c *ProjectsRegionsOperationsListCall) PageToken(pageToken string) *ProjectsRegionsOperationsListCall {
11703	c.urlParams_.Set("pageToken", pageToken)
11704	return c
11705}
11706
11707// Fields allows partial responses to be retrieved. See
11708// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11709// for more information.
11710func (c *ProjectsRegionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsListCall {
11711	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11712	return c
11713}
11714
11715// IfNoneMatch sets the optional parameter which makes the operation
11716// fail if the object's ETag matches the given value. This is useful for
11717// getting updates only after the object has changed since the last
11718// request. Use googleapi.IsNotModified to check whether the response
11719// error from Do is the result of In-None-Match.
11720func (c *ProjectsRegionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsRegionsOperationsListCall {
11721	c.ifNoneMatch_ = entityTag
11722	return c
11723}
11724
11725// Context sets the context to be used in this call's Do method. Any
11726// pending HTTP request will be aborted if the provided context is
11727// canceled.
11728func (c *ProjectsRegionsOperationsListCall) Context(ctx context.Context) *ProjectsRegionsOperationsListCall {
11729	c.ctx_ = ctx
11730	return c
11731}
11732
11733// Header returns an http.Header that can be modified by the caller to
11734// add HTTP headers to the request.
11735func (c *ProjectsRegionsOperationsListCall) Header() http.Header {
11736	if c.header_ == nil {
11737		c.header_ = make(http.Header)
11738	}
11739	return c.header_
11740}
11741
11742func (c *ProjectsRegionsOperationsListCall) doRequest(alt string) (*http.Response, error) {
11743	reqHeaders := make(http.Header)
11744	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
11745	for k, v := range c.header_ {
11746		reqHeaders[k] = v
11747	}
11748	reqHeaders.Set("User-Agent", c.s.userAgent())
11749	if c.ifNoneMatch_ != "" {
11750		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11751	}
11752	var body io.Reader = nil
11753	c.urlParams_.Set("alt", alt)
11754	c.urlParams_.Set("prettyPrint", "false")
11755	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
11756	urls += "?" + c.urlParams_.Encode()
11757	req, err := http.NewRequest("GET", urls, body)
11758	if err != nil {
11759		return nil, err
11760	}
11761	req.Header = reqHeaders
11762	googleapi.Expand(req.URL, map[string]string{
11763		"name": c.name,
11764	})
11765	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11766}
11767
11768// Do executes the "dataproc.projects.regions.operations.list" call.
11769// Exactly one of *ListOperationsResponse or error will be non-nil. Any
11770// non-2xx status code is an error. Response headers are in either
11771// *ListOperationsResponse.ServerResponse.Header or (if a response was
11772// returned at all) in error.(*googleapi.Error).Header. Use
11773// googleapi.IsNotModified to check whether the returned error was
11774// because http.StatusNotModified was returned.
11775func (c *ProjectsRegionsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
11776	gensupport.SetOptions(c.urlParams_, opts...)
11777	res, err := c.doRequest("json")
11778	if res != nil && res.StatusCode == http.StatusNotModified {
11779		if res.Body != nil {
11780			res.Body.Close()
11781		}
11782		return nil, &googleapi.Error{
11783			Code:   res.StatusCode,
11784			Header: res.Header,
11785		}
11786	}
11787	if err != nil {
11788		return nil, err
11789	}
11790	defer googleapi.CloseBody(res)
11791	if err := googleapi.CheckResponse(res); err != nil {
11792		return nil, err
11793	}
11794	ret := &ListOperationsResponse{
11795		ServerResponse: googleapi.ServerResponse{
11796			Header:         res.Header,
11797			HTTPStatusCode: res.StatusCode,
11798		},
11799	}
11800	target := &ret
11801	if err := gensupport.DecodeResponse(target, res); err != nil {
11802		return nil, err
11803	}
11804	return ret, nil
11805	// {
11806	//   "description": "Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED.NOTE: the name binding allows API services to override the binding to use different resource name schemes, such as users/*/operations. To override the binding, API services can add a binding such as \"/v1/{name=users/*}/operations\" to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.",
11807	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations",
11808	//   "httpMethod": "GET",
11809	//   "id": "dataproc.projects.regions.operations.list",
11810	//   "parameterOrder": [
11811	//     "name"
11812	//   ],
11813	//   "parameters": {
11814	//     "filter": {
11815	//       "description": "The standard list filter.",
11816	//       "location": "query",
11817	//       "type": "string"
11818	//     },
11819	//     "name": {
11820	//       "description": "The name of the operation's parent resource.",
11821	//       "location": "path",
11822	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations$",
11823	//       "required": true,
11824	//       "type": "string"
11825	//     },
11826	//     "pageSize": {
11827	//       "description": "The standard list page size.",
11828	//       "format": "int32",
11829	//       "location": "query",
11830	//       "type": "integer"
11831	//     },
11832	//     "pageToken": {
11833	//       "description": "The standard list page token.",
11834	//       "location": "query",
11835	//       "type": "string"
11836	//     }
11837	//   },
11838	//   "path": "v1/{+name}",
11839	//   "response": {
11840	//     "$ref": "ListOperationsResponse"
11841	//   },
11842	//   "scopes": [
11843	//     "https://www.googleapis.com/auth/cloud-platform"
11844	//   ]
11845	// }
11846
11847}
11848
11849// Pages invokes f for each page of results.
11850// A non-nil error returned from f will halt the iteration.
11851// The provided context supersedes any context provided to the Context method.
11852func (c *ProjectsRegionsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
11853	c.ctx_ = ctx
11854	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11855	for {
11856		x, err := c.Do()
11857		if err != nil {
11858			return err
11859		}
11860		if err := f(x); err != nil {
11861			return err
11862		}
11863		if x.NextPageToken == "" {
11864			return nil
11865		}
11866		c.PageToken(x.NextPageToken)
11867	}
11868}
11869
11870// method id "dataproc.projects.regions.operations.setIamPolicy":
11871
11872type ProjectsRegionsOperationsSetIamPolicyCall struct {
11873	s                   *Service
11874	resource            string
11875	setiampolicyrequest *SetIamPolicyRequest
11876	urlParams_          gensupport.URLParams
11877	ctx_                context.Context
11878	header_             http.Header
11879}
11880
11881// SetIamPolicy: Sets the access control policy on the specified
11882// resource. Replaces any existing policy.Can return Public Errors:
11883// NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
11884func (r *ProjectsRegionsOperationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsOperationsSetIamPolicyCall {
11885	c := &ProjectsRegionsOperationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11886	c.resource = resource
11887	c.setiampolicyrequest = setiampolicyrequest
11888	return c
11889}
11890
11891// Fields allows partial responses to be retrieved. See
11892// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11893// for more information.
11894func (c *ProjectsRegionsOperationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsSetIamPolicyCall {
11895	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11896	return c
11897}
11898
11899// Context sets the context to be used in this call's Do method. Any
11900// pending HTTP request will be aborted if the provided context is
11901// canceled.
11902func (c *ProjectsRegionsOperationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsOperationsSetIamPolicyCall {
11903	c.ctx_ = ctx
11904	return c
11905}
11906
11907// Header returns an http.Header that can be modified by the caller to
11908// add HTTP headers to the request.
11909func (c *ProjectsRegionsOperationsSetIamPolicyCall) Header() http.Header {
11910	if c.header_ == nil {
11911		c.header_ = make(http.Header)
11912	}
11913	return c.header_
11914}
11915
11916func (c *ProjectsRegionsOperationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11917	reqHeaders := make(http.Header)
11918	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
11919	for k, v := range c.header_ {
11920		reqHeaders[k] = v
11921	}
11922	reqHeaders.Set("User-Agent", c.s.userAgent())
11923	var body io.Reader = nil
11924	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
11925	if err != nil {
11926		return nil, err
11927	}
11928	reqHeaders.Set("Content-Type", "application/json")
11929	c.urlParams_.Set("alt", alt)
11930	c.urlParams_.Set("prettyPrint", "false")
11931	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
11932	urls += "?" + c.urlParams_.Encode()
11933	req, err := http.NewRequest("POST", urls, body)
11934	if err != nil {
11935		return nil, err
11936	}
11937	req.Header = reqHeaders
11938	googleapi.Expand(req.URL, map[string]string{
11939		"resource": c.resource,
11940	})
11941	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11942}
11943
11944// Do executes the "dataproc.projects.regions.operations.setIamPolicy" call.
11945// Exactly one of *Policy or error will be non-nil. Any non-2xx status
11946// code is an error. Response headers are in either
11947// *Policy.ServerResponse.Header or (if a response was returned at all)
11948// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11949// check whether the returned error was because http.StatusNotModified
11950// was returned.
11951func (c *ProjectsRegionsOperationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11952	gensupport.SetOptions(c.urlParams_, opts...)
11953	res, err := c.doRequest("json")
11954	if res != nil && res.StatusCode == http.StatusNotModified {
11955		if res.Body != nil {
11956			res.Body.Close()
11957		}
11958		return nil, &googleapi.Error{
11959			Code:   res.StatusCode,
11960			Header: res.Header,
11961		}
11962	}
11963	if err != nil {
11964		return nil, err
11965	}
11966	defer googleapi.CloseBody(res)
11967	if err := googleapi.CheckResponse(res); err != nil {
11968		return nil, err
11969	}
11970	ret := &Policy{
11971		ServerResponse: googleapi.ServerResponse{
11972			Header:         res.Header,
11973			HTTPStatusCode: res.StatusCode,
11974		},
11975	}
11976	target := &ret
11977	if err := gensupport.DecodeResponse(target, res); err != nil {
11978		return nil, err
11979	}
11980	return ret, nil
11981	// {
11982	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED",
11983	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:setIamPolicy",
11984	//   "httpMethod": "POST",
11985	//   "id": "dataproc.projects.regions.operations.setIamPolicy",
11986	//   "parameterOrder": [
11987	//     "resource"
11988	//   ],
11989	//   "parameters": {
11990	//     "resource": {
11991	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
11992	//       "location": "path",
11993	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
11994	//       "required": true,
11995	//       "type": "string"
11996	//     }
11997	//   },
11998	//   "path": "v1/{+resource}:setIamPolicy",
11999	//   "request": {
12000	//     "$ref": "SetIamPolicyRequest"
12001	//   },
12002	//   "response": {
12003	//     "$ref": "Policy"
12004	//   },
12005	//   "scopes": [
12006	//     "https://www.googleapis.com/auth/cloud-platform"
12007	//   ]
12008	// }
12009
12010}
12011
12012// method id "dataproc.projects.regions.operations.testIamPermissions":
12013
12014type ProjectsRegionsOperationsTestIamPermissionsCall struct {
12015	s                         *Service
12016	resource                  string
12017	testiampermissionsrequest *TestIamPermissionsRequest
12018	urlParams_                gensupport.URLParams
12019	ctx_                      context.Context
12020	header_                   http.Header
12021}
12022
12023// TestIamPermissions: Returns permissions that a caller has on the
12024// specified resource. If the resource does not exist, this will return
12025// an empty set of permissions, not a NOT_FOUND error.Note: This
12026// operation is designed to be used for building permission-aware UIs
12027// and command-line tools, not for authorization checking. This
12028// operation may "fail open" without warning.
12029func (r *ProjectsRegionsOperationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsOperationsTestIamPermissionsCall {
12030	c := &ProjectsRegionsOperationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12031	c.resource = resource
12032	c.testiampermissionsrequest = testiampermissionsrequest
12033	return c
12034}
12035
12036// Fields allows partial responses to be retrieved. See
12037// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12038// for more information.
12039func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsTestIamPermissionsCall {
12040	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12041	return c
12042}
12043
12044// Context sets the context to be used in this call's Do method. Any
12045// pending HTTP request will be aborted if the provided context is
12046// canceled.
12047func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsOperationsTestIamPermissionsCall {
12048	c.ctx_ = ctx
12049	return c
12050}
12051
12052// Header returns an http.Header that can be modified by the caller to
12053// add HTTP headers to the request.
12054func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Header() http.Header {
12055	if c.header_ == nil {
12056		c.header_ = make(http.Header)
12057	}
12058	return c.header_
12059}
12060
12061func (c *ProjectsRegionsOperationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
12062	reqHeaders := make(http.Header)
12063	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
12064	for k, v := range c.header_ {
12065		reqHeaders[k] = v
12066	}
12067	reqHeaders.Set("User-Agent", c.s.userAgent())
12068	var body io.Reader = nil
12069	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
12070	if err != nil {
12071		return nil, err
12072	}
12073	reqHeaders.Set("Content-Type", "application/json")
12074	c.urlParams_.Set("alt", alt)
12075	c.urlParams_.Set("prettyPrint", "false")
12076	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
12077	urls += "?" + c.urlParams_.Encode()
12078	req, err := http.NewRequest("POST", urls, body)
12079	if err != nil {
12080		return nil, err
12081	}
12082	req.Header = reqHeaders
12083	googleapi.Expand(req.URL, map[string]string{
12084		"resource": c.resource,
12085	})
12086	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12087}
12088
12089// Do executes the "dataproc.projects.regions.operations.testIamPermissions" call.
12090// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
12091// Any non-2xx status code is an error. Response headers are in either
12092// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
12093// was returned at all) in error.(*googleapi.Error).Header. Use
12094// googleapi.IsNotModified to check whether the returned error was
12095// because http.StatusNotModified was returned.
12096func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
12097	gensupport.SetOptions(c.urlParams_, opts...)
12098	res, err := c.doRequest("json")
12099	if res != nil && res.StatusCode == http.StatusNotModified {
12100		if res.Body != nil {
12101			res.Body.Close()
12102		}
12103		return nil, &googleapi.Error{
12104			Code:   res.StatusCode,
12105			Header: res.Header,
12106		}
12107	}
12108	if err != nil {
12109		return nil, err
12110	}
12111	defer googleapi.CloseBody(res)
12112	if err := googleapi.CheckResponse(res); err != nil {
12113		return nil, err
12114	}
12115	ret := &TestIamPermissionsResponse{
12116		ServerResponse: googleapi.ServerResponse{
12117			Header:         res.Header,
12118			HTTPStatusCode: res.StatusCode,
12119		},
12120	}
12121	target := &ret
12122	if err := gensupport.DecodeResponse(target, res); err != nil {
12123		return nil, err
12124	}
12125	return ret, nil
12126	// {
12127	//   "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.",
12128	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:testIamPermissions",
12129	//   "httpMethod": "POST",
12130	//   "id": "dataproc.projects.regions.operations.testIamPermissions",
12131	//   "parameterOrder": [
12132	//     "resource"
12133	//   ],
12134	//   "parameters": {
12135	//     "resource": {
12136	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
12137	//       "location": "path",
12138	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
12139	//       "required": true,
12140	//       "type": "string"
12141	//     }
12142	//   },
12143	//   "path": "v1/{+resource}:testIamPermissions",
12144	//   "request": {
12145	//     "$ref": "TestIamPermissionsRequest"
12146	//   },
12147	//   "response": {
12148	//     "$ref": "TestIamPermissionsResponse"
12149	//   },
12150	//   "scopes": [
12151	//     "https://www.googleapis.com/auth/cloud-platform"
12152	//   ]
12153	// }
12154
12155}
12156
12157// method id "dataproc.projects.regions.workflowTemplates.create":
12158
12159type ProjectsRegionsWorkflowTemplatesCreateCall struct {
12160	s                *Service
12161	parent           string
12162	workflowtemplate *WorkflowTemplate
12163	urlParams_       gensupport.URLParams
12164	ctx_             context.Context
12165	header_          http.Header
12166}
12167
12168// Create: Creates new workflow template.
12169func (r *ProjectsRegionsWorkflowTemplatesService) Create(parent string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesCreateCall {
12170	c := &ProjectsRegionsWorkflowTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12171	c.parent = parent
12172	c.workflowtemplate = workflowtemplate
12173	return c
12174}
12175
12176// Fields allows partial responses to be retrieved. See
12177// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12178// for more information.
12179func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesCreateCall {
12180	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12181	return c
12182}
12183
12184// Context sets the context to be used in this call's Do method. Any
12185// pending HTTP request will be aborted if the provided context is
12186// canceled.
12187func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesCreateCall {
12188	c.ctx_ = ctx
12189	return c
12190}
12191
12192// Header returns an http.Header that can be modified by the caller to
12193// add HTTP headers to the request.
12194func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Header() http.Header {
12195	if c.header_ == nil {
12196		c.header_ = make(http.Header)
12197	}
12198	return c.header_
12199}
12200
12201func (c *ProjectsRegionsWorkflowTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
12202	reqHeaders := make(http.Header)
12203	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
12204	for k, v := range c.header_ {
12205		reqHeaders[k] = v
12206	}
12207	reqHeaders.Set("User-Agent", c.s.userAgent())
12208	var body io.Reader = nil
12209	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
12210	if err != nil {
12211		return nil, err
12212	}
12213	reqHeaders.Set("Content-Type", "application/json")
12214	c.urlParams_.Set("alt", alt)
12215	c.urlParams_.Set("prettyPrint", "false")
12216	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates")
12217	urls += "?" + c.urlParams_.Encode()
12218	req, err := http.NewRequest("POST", urls, body)
12219	if err != nil {
12220		return nil, err
12221	}
12222	req.Header = reqHeaders
12223	googleapi.Expand(req.URL, map[string]string{
12224		"parent": c.parent,
12225	})
12226	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12227}
12228
12229// Do executes the "dataproc.projects.regions.workflowTemplates.create" call.
12230// Exactly one of *WorkflowTemplate or error will be non-nil. Any
12231// non-2xx status code is an error. Response headers are in either
12232// *WorkflowTemplate.ServerResponse.Header or (if a response was
12233// returned at all) in error.(*googleapi.Error).Header. Use
12234// googleapi.IsNotModified to check whether the returned error was
12235// because http.StatusNotModified was returned.
12236func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
12237	gensupport.SetOptions(c.urlParams_, opts...)
12238	res, err := c.doRequest("json")
12239	if res != nil && res.StatusCode == http.StatusNotModified {
12240		if res.Body != nil {
12241			res.Body.Close()
12242		}
12243		return nil, &googleapi.Error{
12244			Code:   res.StatusCode,
12245			Header: res.Header,
12246		}
12247	}
12248	if err != nil {
12249		return nil, err
12250	}
12251	defer googleapi.CloseBody(res)
12252	if err := googleapi.CheckResponse(res); err != nil {
12253		return nil, err
12254	}
12255	ret := &WorkflowTemplate{
12256		ServerResponse: googleapi.ServerResponse{
12257			Header:         res.Header,
12258			HTTPStatusCode: res.StatusCode,
12259		},
12260	}
12261	target := &ret
12262	if err := gensupport.DecodeResponse(target, res); err != nil {
12263		return nil, err
12264	}
12265	return ret, nil
12266	// {
12267	//   "description": "Creates new workflow template.",
12268	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates",
12269	//   "httpMethod": "POST",
12270	//   "id": "dataproc.projects.regions.workflowTemplates.create",
12271	//   "parameterOrder": [
12272	//     "parent"
12273	//   ],
12274	//   "parameters": {
12275	//     "parent": {
12276	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates,create, the resource name of the  region has the following format:  projects/{project_id}/regions/{region}\nFor projects.locations.workflowTemplates.create, the resource name of  the location has the following format:  projects/{project_id}/locations/{location}",
12277	//       "location": "path",
12278	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
12279	//       "required": true,
12280	//       "type": "string"
12281	//     }
12282	//   },
12283	//   "path": "v1/{+parent}/workflowTemplates",
12284	//   "request": {
12285	//     "$ref": "WorkflowTemplate"
12286	//   },
12287	//   "response": {
12288	//     "$ref": "WorkflowTemplate"
12289	//   },
12290	//   "scopes": [
12291	//     "https://www.googleapis.com/auth/cloud-platform"
12292	//   ]
12293	// }
12294
12295}
12296
12297// method id "dataproc.projects.regions.workflowTemplates.delete":
12298
12299type ProjectsRegionsWorkflowTemplatesDeleteCall struct {
12300	s          *Service
12301	name       string
12302	urlParams_ gensupport.URLParams
12303	ctx_       context.Context
12304	header_    http.Header
12305}
12306
12307// Delete: Deletes a workflow template. It does not cancel in-progress
12308// workflows.
12309func (r *ProjectsRegionsWorkflowTemplatesService) Delete(name string) *ProjectsRegionsWorkflowTemplatesDeleteCall {
12310	c := &ProjectsRegionsWorkflowTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12311	c.name = name
12312	return c
12313}
12314
12315// Version sets the optional parameter "version": The version of
12316// workflow template to delete. If specified, will only delete the
12317// template if the current server version matches specified version.
12318func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Version(version int64) *ProjectsRegionsWorkflowTemplatesDeleteCall {
12319	c.urlParams_.Set("version", fmt.Sprint(version))
12320	return c
12321}
12322
12323// Fields allows partial responses to be retrieved. See
12324// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12325// for more information.
12326func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesDeleteCall {
12327	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12328	return c
12329}
12330
12331// Context sets the context to be used in this call's Do method. Any
12332// pending HTTP request will be aborted if the provided context is
12333// canceled.
12334func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesDeleteCall {
12335	c.ctx_ = ctx
12336	return c
12337}
12338
12339// Header returns an http.Header that can be modified by the caller to
12340// add HTTP headers to the request.
12341func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Header() http.Header {
12342	if c.header_ == nil {
12343		c.header_ = make(http.Header)
12344	}
12345	return c.header_
12346}
12347
12348func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
12349	reqHeaders := make(http.Header)
12350	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
12351	for k, v := range c.header_ {
12352		reqHeaders[k] = v
12353	}
12354	reqHeaders.Set("User-Agent", c.s.userAgent())
12355	var body io.Reader = nil
12356	c.urlParams_.Set("alt", alt)
12357	c.urlParams_.Set("prettyPrint", "false")
12358	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12359	urls += "?" + c.urlParams_.Encode()
12360	req, err := http.NewRequest("DELETE", urls, body)
12361	if err != nil {
12362		return nil, err
12363	}
12364	req.Header = reqHeaders
12365	googleapi.Expand(req.URL, map[string]string{
12366		"name": c.name,
12367	})
12368	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12369}
12370
12371// Do executes the "dataproc.projects.regions.workflowTemplates.delete" call.
12372// Exactly one of *Empty or error will be non-nil. Any non-2xx status
12373// code is an error. Response headers are in either
12374// *Empty.ServerResponse.Header or (if a response was returned at all)
12375// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12376// check whether the returned error was because http.StatusNotModified
12377// was returned.
12378func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12379	gensupport.SetOptions(c.urlParams_, opts...)
12380	res, err := c.doRequest("json")
12381	if res != nil && res.StatusCode == http.StatusNotModified {
12382		if res.Body != nil {
12383			res.Body.Close()
12384		}
12385		return nil, &googleapi.Error{
12386			Code:   res.StatusCode,
12387			Header: res.Header,
12388		}
12389	}
12390	if err != nil {
12391		return nil, err
12392	}
12393	defer googleapi.CloseBody(res)
12394	if err := googleapi.CheckResponse(res); err != nil {
12395		return nil, err
12396	}
12397	ret := &Empty{
12398		ServerResponse: googleapi.ServerResponse{
12399			Header:         res.Header,
12400			HTTPStatusCode: res.StatusCode,
12401		},
12402	}
12403	target := &ret
12404	if err := gensupport.DecodeResponse(target, res); err != nil {
12405		return nil, err
12406	}
12407	return ret, nil
12408	// {
12409	//   "description": "Deletes a workflow template. It does not cancel in-progress workflows.",
12410	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}",
12411	//   "httpMethod": "DELETE",
12412	//   "id": "dataproc.projects.regions.workflowTemplates.delete",
12413	//   "parameterOrder": [
12414	//     "name"
12415	//   ],
12416	//   "parameters": {
12417	//     "name": {
12418	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates.delete, the resource name of the template has the following format:  projects/{project_id}/regions/{region}/workflowTemplates/{template_id}\nFor projects.locations.workflowTemplates.instantiate, the resource name  of the template has the following format:  projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
12419	//       "location": "path",
12420	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
12421	//       "required": true,
12422	//       "type": "string"
12423	//     },
12424	//     "version": {
12425	//       "description": "Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.",
12426	//       "format": "int32",
12427	//       "location": "query",
12428	//       "type": "integer"
12429	//     }
12430	//   },
12431	//   "path": "v1/{+name}",
12432	//   "response": {
12433	//     "$ref": "Empty"
12434	//   },
12435	//   "scopes": [
12436	//     "https://www.googleapis.com/auth/cloud-platform"
12437	//   ]
12438	// }
12439
12440}
12441
12442// method id "dataproc.projects.regions.workflowTemplates.get":
12443
12444type ProjectsRegionsWorkflowTemplatesGetCall struct {
12445	s            *Service
12446	name         string
12447	urlParams_   gensupport.URLParams
12448	ifNoneMatch_ string
12449	ctx_         context.Context
12450	header_      http.Header
12451}
12452
12453// Get: Retrieves the latest workflow template.Can retrieve previously
12454// instantiated template by specifying optional version parameter.
12455func (r *ProjectsRegionsWorkflowTemplatesService) Get(name string) *ProjectsRegionsWorkflowTemplatesGetCall {
12456	c := &ProjectsRegionsWorkflowTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12457	c.name = name
12458	return c
12459}
12460
12461// Version sets the optional parameter "version": The version of
12462// workflow template to retrieve. Only previously instantiated versions
12463// can be retrieved.If unspecified, retrieves the current version.
12464func (c *ProjectsRegionsWorkflowTemplatesGetCall) Version(version int64) *ProjectsRegionsWorkflowTemplatesGetCall {
12465	c.urlParams_.Set("version", fmt.Sprint(version))
12466	return c
12467}
12468
12469// Fields allows partial responses to be retrieved. See
12470// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12471// for more information.
12472func (c *ProjectsRegionsWorkflowTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesGetCall {
12473	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12474	return c
12475}
12476
12477// IfNoneMatch sets the optional parameter which makes the operation
12478// fail if the object's ETag matches the given value. This is useful for
12479// getting updates only after the object has changed since the last
12480// request. Use googleapi.IsNotModified to check whether the response
12481// error from Do is the result of In-None-Match.
12482func (c *ProjectsRegionsWorkflowTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsWorkflowTemplatesGetCall {
12483	c.ifNoneMatch_ = entityTag
12484	return c
12485}
12486
12487// Context sets the context to be used in this call's Do method. Any
12488// pending HTTP request will be aborted if the provided context is
12489// canceled.
12490func (c *ProjectsRegionsWorkflowTemplatesGetCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesGetCall {
12491	c.ctx_ = ctx
12492	return c
12493}
12494
12495// Header returns an http.Header that can be modified by the caller to
12496// add HTTP headers to the request.
12497func (c *ProjectsRegionsWorkflowTemplatesGetCall) Header() http.Header {
12498	if c.header_ == nil {
12499		c.header_ = make(http.Header)
12500	}
12501	return c.header_
12502}
12503
12504func (c *ProjectsRegionsWorkflowTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
12505	reqHeaders := make(http.Header)
12506	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
12507	for k, v := range c.header_ {
12508		reqHeaders[k] = v
12509	}
12510	reqHeaders.Set("User-Agent", c.s.userAgent())
12511	if c.ifNoneMatch_ != "" {
12512		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12513	}
12514	var body io.Reader = nil
12515	c.urlParams_.Set("alt", alt)
12516	c.urlParams_.Set("prettyPrint", "false")
12517	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
12518	urls += "?" + c.urlParams_.Encode()
12519	req, err := http.NewRequest("GET", urls, body)
12520	if err != nil {
12521		return nil, err
12522	}
12523	req.Header = reqHeaders
12524	googleapi.Expand(req.URL, map[string]string{
12525		"name": c.name,
12526	})
12527	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12528}
12529
12530// Do executes the "dataproc.projects.regions.workflowTemplates.get" call.
12531// Exactly one of *WorkflowTemplate or error will be non-nil. Any
12532// non-2xx status code is an error. Response headers are in either
12533// *WorkflowTemplate.ServerResponse.Header or (if a response was
12534// returned at all) in error.(*googleapi.Error).Header. Use
12535// googleapi.IsNotModified to check whether the returned error was
12536// because http.StatusNotModified was returned.
12537func (c *ProjectsRegionsWorkflowTemplatesGetCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
12538	gensupport.SetOptions(c.urlParams_, opts...)
12539	res, err := c.doRequest("json")
12540	if res != nil && res.StatusCode == http.StatusNotModified {
12541		if res.Body != nil {
12542			res.Body.Close()
12543		}
12544		return nil, &googleapi.Error{
12545			Code:   res.StatusCode,
12546			Header: res.Header,
12547		}
12548	}
12549	if err != nil {
12550		return nil, err
12551	}
12552	defer googleapi.CloseBody(res)
12553	if err := googleapi.CheckResponse(res); err != nil {
12554		return nil, err
12555	}
12556	ret := &WorkflowTemplate{
12557		ServerResponse: googleapi.ServerResponse{
12558			Header:         res.Header,
12559			HTTPStatusCode: res.StatusCode,
12560		},
12561	}
12562	target := &ret
12563	if err := gensupport.DecodeResponse(target, res); err != nil {
12564		return nil, err
12565	}
12566	return ret, nil
12567	// {
12568	//   "description": "Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.",
12569	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}",
12570	//   "httpMethod": "GET",
12571	//   "id": "dataproc.projects.regions.workflowTemplates.get",
12572	//   "parameterOrder": [
12573	//     "name"
12574	//   ],
12575	//   "parameters": {
12576	//     "name": {
12577	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates.get, the resource name of the  template has the following format:  projects/{project_id}/regions/{region}/workflowTemplates/{template_id}\nFor projects.locations.workflowTemplates.get, the resource name of the  template has the following format:  projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
12578	//       "location": "path",
12579	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
12580	//       "required": true,
12581	//       "type": "string"
12582	//     },
12583	//     "version": {
12584	//       "description": "Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.If unspecified, retrieves the current version.",
12585	//       "format": "int32",
12586	//       "location": "query",
12587	//       "type": "integer"
12588	//     }
12589	//   },
12590	//   "path": "v1/{+name}",
12591	//   "response": {
12592	//     "$ref": "WorkflowTemplate"
12593	//   },
12594	//   "scopes": [
12595	//     "https://www.googleapis.com/auth/cloud-platform"
12596	//   ]
12597	// }
12598
12599}
12600
12601// method id "dataproc.projects.regions.workflowTemplates.getIamPolicy":
12602
12603type ProjectsRegionsWorkflowTemplatesGetIamPolicyCall struct {
12604	s                   *Service
12605	resource            string
12606	getiampolicyrequest *GetIamPolicyRequest
12607	urlParams_          gensupport.URLParams
12608	ctx_                context.Context
12609	header_             http.Header
12610}
12611
12612// GetIamPolicy: Gets the access control policy for a resource. Returns
12613// an empty policy if the resource exists and does not have a policy
12614// set.
12615func (r *ProjectsRegionsWorkflowTemplatesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
12616	c := &ProjectsRegionsWorkflowTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12617	c.resource = resource
12618	c.getiampolicyrequest = getiampolicyrequest
12619	return c
12620}
12621
12622// Fields allows partial responses to be retrieved. See
12623// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12624// for more information.
12625func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
12626	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12627	return c
12628}
12629
12630// Context sets the context to be used in this call's Do method. Any
12631// pending HTTP request will be aborted if the provided context is
12632// canceled.
12633func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
12634	c.ctx_ = ctx
12635	return c
12636}
12637
12638// Header returns an http.Header that can be modified by the caller to
12639// add HTTP headers to the request.
12640func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Header() http.Header {
12641	if c.header_ == nil {
12642		c.header_ = make(http.Header)
12643	}
12644	return c.header_
12645}
12646
12647func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
12648	reqHeaders := make(http.Header)
12649	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
12650	for k, v := range c.header_ {
12651		reqHeaders[k] = v
12652	}
12653	reqHeaders.Set("User-Agent", c.s.userAgent())
12654	var body io.Reader = nil
12655	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
12656	if err != nil {
12657		return nil, err
12658	}
12659	reqHeaders.Set("Content-Type", "application/json")
12660	c.urlParams_.Set("alt", alt)
12661	c.urlParams_.Set("prettyPrint", "false")
12662	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:getIamPolicy")
12663	urls += "?" + c.urlParams_.Encode()
12664	req, err := http.NewRequest("POST", urls, body)
12665	if err != nil {
12666		return nil, err
12667	}
12668	req.Header = reqHeaders
12669	googleapi.Expand(req.URL, map[string]string{
12670		"resource": c.resource,
12671	})
12672	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12673}
12674
12675// Do executes the "dataproc.projects.regions.workflowTemplates.getIamPolicy" call.
12676// Exactly one of *Policy or error will be non-nil. Any non-2xx status
12677// code is an error. Response headers are in either
12678// *Policy.ServerResponse.Header or (if a response was returned at all)
12679// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12680// check whether the returned error was because http.StatusNotModified
12681// was returned.
12682func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
12683	gensupport.SetOptions(c.urlParams_, opts...)
12684	res, err := c.doRequest("json")
12685	if res != nil && res.StatusCode == http.StatusNotModified {
12686		if res.Body != nil {
12687			res.Body.Close()
12688		}
12689		return nil, &googleapi.Error{
12690			Code:   res.StatusCode,
12691			Header: res.Header,
12692		}
12693	}
12694	if err != nil {
12695		return nil, err
12696	}
12697	defer googleapi.CloseBody(res)
12698	if err := googleapi.CheckResponse(res); err != nil {
12699		return nil, err
12700	}
12701	ret := &Policy{
12702		ServerResponse: googleapi.ServerResponse{
12703			Header:         res.Header,
12704			HTTPStatusCode: res.StatusCode,
12705		},
12706	}
12707	target := &ret
12708	if err := gensupport.DecodeResponse(target, res); err != nil {
12709		return nil, err
12710	}
12711	return ret, nil
12712	// {
12713	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
12714	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:getIamPolicy",
12715	//   "httpMethod": "POST",
12716	//   "id": "dataproc.projects.regions.workflowTemplates.getIamPolicy",
12717	//   "parameterOrder": [
12718	//     "resource"
12719	//   ],
12720	//   "parameters": {
12721	//     "resource": {
12722	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
12723	//       "location": "path",
12724	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
12725	//       "required": true,
12726	//       "type": "string"
12727	//     }
12728	//   },
12729	//   "path": "v1/{+resource}:getIamPolicy",
12730	//   "request": {
12731	//     "$ref": "GetIamPolicyRequest"
12732	//   },
12733	//   "response": {
12734	//     "$ref": "Policy"
12735	//   },
12736	//   "scopes": [
12737	//     "https://www.googleapis.com/auth/cloud-platform"
12738	//   ]
12739	// }
12740
12741}
12742
12743// method id "dataproc.projects.regions.workflowTemplates.instantiate":
12744
12745type ProjectsRegionsWorkflowTemplatesInstantiateCall struct {
12746	s                                  *Service
12747	name                               string
12748	instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest
12749	urlParams_                         gensupport.URLParams
12750	ctx_                               context.Context
12751	header_                            http.Header
12752}
12753
12754// Instantiate: Instantiates a template and begins execution.The
12755// returned Operation can be used to track execution of workflow by
12756// polling operations.get. The Operation will complete when entire
12757// workflow is finished.The running workflow can be aborted via
12758// operations.cancel. This will cause any inflight jobs to be cancelled
12759// and workflow-owned clusters to be deleted.The Operation.metadata will
12760// be WorkflowMetadata
12761// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
12762// aproc.v1#workflowmetadata). Also see Using WorkflowMetadata
12763// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#u
12764// sing_workflowmetadata).On successful completion, Operation.response
12765// will be Empty.
12766func (r *ProjectsRegionsWorkflowTemplatesService) Instantiate(name string, instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
12767	c := &ProjectsRegionsWorkflowTemplatesInstantiateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12768	c.name = name
12769	c.instantiateworkflowtemplaterequest = instantiateworkflowtemplaterequest
12770	return c
12771}
12772
12773// Fields allows partial responses to be retrieved. See
12774// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12775// for more information.
12776func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
12777	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12778	return c
12779}
12780
12781// Context sets the context to be used in this call's Do method. Any
12782// pending HTTP request will be aborted if the provided context is
12783// canceled.
12784func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
12785	c.ctx_ = ctx
12786	return c
12787}
12788
12789// Header returns an http.Header that can be modified by the caller to
12790// add HTTP headers to the request.
12791func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Header() http.Header {
12792	if c.header_ == nil {
12793		c.header_ = make(http.Header)
12794	}
12795	return c.header_
12796}
12797
12798func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) doRequest(alt string) (*http.Response, error) {
12799	reqHeaders := make(http.Header)
12800	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
12801	for k, v := range c.header_ {
12802		reqHeaders[k] = v
12803	}
12804	reqHeaders.Set("User-Agent", c.s.userAgent())
12805	var body io.Reader = nil
12806	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantiateworkflowtemplaterequest)
12807	if err != nil {
12808		return nil, err
12809	}
12810	reqHeaders.Set("Content-Type", "application/json")
12811	c.urlParams_.Set("alt", alt)
12812	c.urlParams_.Set("prettyPrint", "false")
12813	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}:instantiate")
12814	urls += "?" + c.urlParams_.Encode()
12815	req, err := http.NewRequest("POST", urls, body)
12816	if err != nil {
12817		return nil, err
12818	}
12819	req.Header = reqHeaders
12820	googleapi.Expand(req.URL, map[string]string{
12821		"name": c.name,
12822	})
12823	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12824}
12825
12826// Do executes the "dataproc.projects.regions.workflowTemplates.instantiate" call.
12827// Exactly one of *Operation or error will be non-nil. Any non-2xx
12828// status code is an error. Response headers are in either
12829// *Operation.ServerResponse.Header or (if a response was returned at
12830// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12831// to check whether the returned error was because
12832// http.StatusNotModified was returned.
12833func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12834	gensupport.SetOptions(c.urlParams_, opts...)
12835	res, err := c.doRequest("json")
12836	if res != nil && res.StatusCode == http.StatusNotModified {
12837		if res.Body != nil {
12838			res.Body.Close()
12839		}
12840		return nil, &googleapi.Error{
12841			Code:   res.StatusCode,
12842			Header: res.Header,
12843		}
12844	}
12845	if err != nil {
12846		return nil, err
12847	}
12848	defer googleapi.CloseBody(res)
12849	if err := googleapi.CheckResponse(res); err != nil {
12850		return nil, err
12851	}
12852	ret := &Operation{
12853		ServerResponse: googleapi.ServerResponse{
12854			Header:         res.Header,
12855			HTTPStatusCode: res.StatusCode,
12856		},
12857	}
12858	target := &ret
12859	if err := gensupport.DecodeResponse(target, res); err != nil {
12860		return nil, err
12861	}
12862	return ret, nil
12863	// {
12864	//   "description": "Instantiates a template and begins execution.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.",
12865	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:instantiate",
12866	//   "httpMethod": "POST",
12867	//   "id": "dataproc.projects.regions.workflowTemplates.instantiate",
12868	//   "parameterOrder": [
12869	//     "name"
12870	//   ],
12871	//   "parameters": {
12872	//     "name": {
12873	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format:  projects/{project_id}/regions/{region}/workflowTemplates/{template_id}\nFor projects.locations.workflowTemplates.instantiate, the resource name  of the template has the following format:  projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
12874	//       "location": "path",
12875	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
12876	//       "required": true,
12877	//       "type": "string"
12878	//     }
12879	//   },
12880	//   "path": "v1/{+name}:instantiate",
12881	//   "request": {
12882	//     "$ref": "InstantiateWorkflowTemplateRequest"
12883	//   },
12884	//   "response": {
12885	//     "$ref": "Operation"
12886	//   },
12887	//   "scopes": [
12888	//     "https://www.googleapis.com/auth/cloud-platform"
12889	//   ]
12890	// }
12891
12892}
12893
12894// method id "dataproc.projects.regions.workflowTemplates.instantiateInline":
12895
12896type ProjectsRegionsWorkflowTemplatesInstantiateInlineCall struct {
12897	s                *Service
12898	parent           string
12899	workflowtemplate *WorkflowTemplate
12900	urlParams_       gensupport.URLParams
12901	ctx_             context.Context
12902	header_          http.Header
12903}
12904
12905// InstantiateInline: Instantiates a template and begins execution.This
12906// method is equivalent to executing the sequence
12907// CreateWorkflowTemplate, InstantiateWorkflowTemplate,
12908// DeleteWorkflowTemplate.The returned Operation can be used to track
12909// execution of workflow by polling operations.get. The Operation will
12910// complete when entire workflow is finished.The running workflow can be
12911// aborted via operations.cancel. This will cause any inflight jobs to
12912// be cancelled and workflow-owned clusters to be deleted.The
12913// Operation.metadata will be WorkflowMetadata
12914// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
12915// aproc.v1#workflowmetadata). Also see Using WorkflowMetadata
12916// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#u
12917// sing_workflowmetadata).On successful completion, Operation.response
12918// will be Empty.
12919func (r *ProjectsRegionsWorkflowTemplatesService) InstantiateInline(parent string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
12920	c := &ProjectsRegionsWorkflowTemplatesInstantiateInlineCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12921	c.parent = parent
12922	c.workflowtemplate = workflowtemplate
12923	return c
12924}
12925
12926// RequestId sets the optional parameter "requestId": A tag that
12927// prevents multiple concurrent workflow instances with the same tag
12928// from running. This mitigates risk of concurrent instances started due
12929// to retries.It is recommended to always set this value to a UUID
12930// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag
12931// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
12932// and hyphens (-). The maximum length is 40 characters.
12933func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) RequestId(requestId string) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
12934	c.urlParams_.Set("requestId", requestId)
12935	return c
12936}
12937
12938// Fields allows partial responses to be retrieved. See
12939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12940// for more information.
12941func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
12942	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12943	return c
12944}
12945
12946// Context sets the context to be used in this call's Do method. Any
12947// pending HTTP request will be aborted if the provided context is
12948// canceled.
12949func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
12950	c.ctx_ = ctx
12951	return c
12952}
12953
12954// Header returns an http.Header that can be modified by the caller to
12955// add HTTP headers to the request.
12956func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Header() http.Header {
12957	if c.header_ == nil {
12958		c.header_ = make(http.Header)
12959	}
12960	return c.header_
12961}
12962
12963func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) doRequest(alt string) (*http.Response, error) {
12964	reqHeaders := make(http.Header)
12965	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
12966	for k, v := range c.header_ {
12967		reqHeaders[k] = v
12968	}
12969	reqHeaders.Set("User-Agent", c.s.userAgent())
12970	var body io.Reader = nil
12971	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
12972	if err != nil {
12973		return nil, err
12974	}
12975	reqHeaders.Set("Content-Type", "application/json")
12976	c.urlParams_.Set("alt", alt)
12977	c.urlParams_.Set("prettyPrint", "false")
12978	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates:instantiateInline")
12979	urls += "?" + c.urlParams_.Encode()
12980	req, err := http.NewRequest("POST", urls, body)
12981	if err != nil {
12982		return nil, err
12983	}
12984	req.Header = reqHeaders
12985	googleapi.Expand(req.URL, map[string]string{
12986		"parent": c.parent,
12987	})
12988	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12989}
12990
12991// Do executes the "dataproc.projects.regions.workflowTemplates.instantiateInline" call.
12992// Exactly one of *Operation or error will be non-nil. Any non-2xx
12993// status code is an error. Response headers are in either
12994// *Operation.ServerResponse.Header or (if a response was returned at
12995// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12996// to check whether the returned error was because
12997// http.StatusNotModified was returned.
12998func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12999	gensupport.SetOptions(c.urlParams_, opts...)
13000	res, err := c.doRequest("json")
13001	if res != nil && res.StatusCode == http.StatusNotModified {
13002		if res.Body != nil {
13003			res.Body.Close()
13004		}
13005		return nil, &googleapi.Error{
13006			Code:   res.StatusCode,
13007			Header: res.Header,
13008		}
13009	}
13010	if err != nil {
13011		return nil, err
13012	}
13013	defer googleapi.CloseBody(res)
13014	if err := googleapi.CheckResponse(res); err != nil {
13015		return nil, err
13016	}
13017	ret := &Operation{
13018		ServerResponse: googleapi.ServerResponse{
13019			Header:         res.Header,
13020			HTTPStatusCode: res.StatusCode,
13021		},
13022	}
13023	target := &ret
13024	if err := gensupport.DecodeResponse(target, res); err != nil {
13025		return nil, err
13026	}
13027	return ret, nil
13028	// {
13029	//   "description": "Instantiates a template and begins execution.This method is equivalent to executing the sequence CreateWorkflowTemplate, InstantiateWorkflowTemplate, DeleteWorkflowTemplate.The returned Operation can be used to track execution of workflow by polling operations.get. The Operation will complete when entire workflow is finished.The running workflow can be aborted via operations.cancel. This will cause any inflight jobs to be cancelled and workflow-owned clusters to be deleted.The Operation.metadata will be WorkflowMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.",
13030	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates:instantiateInline",
13031	//   "httpMethod": "POST",
13032	//   "id": "dataproc.projects.regions.workflowTemplates.instantiateInline",
13033	//   "parameterOrder": [
13034	//     "parent"
13035	//   ],
13036	//   "parameters": {
13037	//     "parent": {
13038	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates,instantiateinline, the resource  name of the region has the following format:  projects/{project_id}/regions/{region}\nFor projects.locations.workflowTemplates.instantiateinline, the  resource name of the location has the following format:  projects/{project_id}/locations/{location}",
13039	//       "location": "path",
13040	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
13041	//       "required": true,
13042	//       "type": "string"
13043	//     },
13044	//     "requestId": {
13045	//       "description": "Optional. A tag that prevents multiple concurrent workflow instances with the same tag from running. This mitigates risk of concurrent instances started due to retries.It is recommended to always set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.",
13046	//       "location": "query",
13047	//       "type": "string"
13048	//     }
13049	//   },
13050	//   "path": "v1/{+parent}/workflowTemplates:instantiateInline",
13051	//   "request": {
13052	//     "$ref": "WorkflowTemplate"
13053	//   },
13054	//   "response": {
13055	//     "$ref": "Operation"
13056	//   },
13057	//   "scopes": [
13058	//     "https://www.googleapis.com/auth/cloud-platform"
13059	//   ]
13060	// }
13061
13062}
13063
13064// method id "dataproc.projects.regions.workflowTemplates.list":
13065
13066type ProjectsRegionsWorkflowTemplatesListCall struct {
13067	s            *Service
13068	parent       string
13069	urlParams_   gensupport.URLParams
13070	ifNoneMatch_ string
13071	ctx_         context.Context
13072	header_      http.Header
13073}
13074
13075// List: Lists workflows that match the specified filter in the request.
13076func (r *ProjectsRegionsWorkflowTemplatesService) List(parent string) *ProjectsRegionsWorkflowTemplatesListCall {
13077	c := &ProjectsRegionsWorkflowTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13078	c.parent = parent
13079	return c
13080}
13081
13082// PageSize sets the optional parameter "pageSize": The maximum number
13083// of results to return in each response.
13084func (c *ProjectsRegionsWorkflowTemplatesListCall) PageSize(pageSize int64) *ProjectsRegionsWorkflowTemplatesListCall {
13085	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13086	return c
13087}
13088
13089// PageToken sets the optional parameter "pageToken": The page token,
13090// returned by a previous call, to request the next page of results.
13091func (c *ProjectsRegionsWorkflowTemplatesListCall) PageToken(pageToken string) *ProjectsRegionsWorkflowTemplatesListCall {
13092	c.urlParams_.Set("pageToken", pageToken)
13093	return c
13094}
13095
13096// Fields allows partial responses to be retrieved. See
13097// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13098// for more information.
13099func (c *ProjectsRegionsWorkflowTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesListCall {
13100	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13101	return c
13102}
13103
13104// IfNoneMatch sets the optional parameter which makes the operation
13105// fail if the object's ETag matches the given value. This is useful for
13106// getting updates only after the object has changed since the last
13107// request. Use googleapi.IsNotModified to check whether the response
13108// error from Do is the result of In-None-Match.
13109func (c *ProjectsRegionsWorkflowTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsRegionsWorkflowTemplatesListCall {
13110	c.ifNoneMatch_ = entityTag
13111	return c
13112}
13113
13114// Context sets the context to be used in this call's Do method. Any
13115// pending HTTP request will be aborted if the provided context is
13116// canceled.
13117func (c *ProjectsRegionsWorkflowTemplatesListCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesListCall {
13118	c.ctx_ = ctx
13119	return c
13120}
13121
13122// Header returns an http.Header that can be modified by the caller to
13123// add HTTP headers to the request.
13124func (c *ProjectsRegionsWorkflowTemplatesListCall) Header() http.Header {
13125	if c.header_ == nil {
13126		c.header_ = make(http.Header)
13127	}
13128	return c.header_
13129}
13130
13131func (c *ProjectsRegionsWorkflowTemplatesListCall) doRequest(alt string) (*http.Response, error) {
13132	reqHeaders := make(http.Header)
13133	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
13134	for k, v := range c.header_ {
13135		reqHeaders[k] = v
13136	}
13137	reqHeaders.Set("User-Agent", c.s.userAgent())
13138	if c.ifNoneMatch_ != "" {
13139		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13140	}
13141	var body io.Reader = nil
13142	c.urlParams_.Set("alt", alt)
13143	c.urlParams_.Set("prettyPrint", "false")
13144	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+parent}/workflowTemplates")
13145	urls += "?" + c.urlParams_.Encode()
13146	req, err := http.NewRequest("GET", urls, body)
13147	if err != nil {
13148		return nil, err
13149	}
13150	req.Header = reqHeaders
13151	googleapi.Expand(req.URL, map[string]string{
13152		"parent": c.parent,
13153	})
13154	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13155}
13156
13157// Do executes the "dataproc.projects.regions.workflowTemplates.list" call.
13158// Exactly one of *ListWorkflowTemplatesResponse or error will be
13159// non-nil. Any non-2xx status code is an error. Response headers are in
13160// either *ListWorkflowTemplatesResponse.ServerResponse.Header or (if a
13161// response was returned at all) in error.(*googleapi.Error).Header. Use
13162// googleapi.IsNotModified to check whether the returned error was
13163// because http.StatusNotModified was returned.
13164func (c *ProjectsRegionsWorkflowTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListWorkflowTemplatesResponse, error) {
13165	gensupport.SetOptions(c.urlParams_, opts...)
13166	res, err := c.doRequest("json")
13167	if res != nil && res.StatusCode == http.StatusNotModified {
13168		if res.Body != nil {
13169			res.Body.Close()
13170		}
13171		return nil, &googleapi.Error{
13172			Code:   res.StatusCode,
13173			Header: res.Header,
13174		}
13175	}
13176	if err != nil {
13177		return nil, err
13178	}
13179	defer googleapi.CloseBody(res)
13180	if err := googleapi.CheckResponse(res); err != nil {
13181		return nil, err
13182	}
13183	ret := &ListWorkflowTemplatesResponse{
13184		ServerResponse: googleapi.ServerResponse{
13185			Header:         res.Header,
13186			HTTPStatusCode: res.StatusCode,
13187		},
13188	}
13189	target := &ret
13190	if err := gensupport.DecodeResponse(target, res); err != nil {
13191		return nil, err
13192	}
13193	return ret, nil
13194	// {
13195	//   "description": "Lists workflows that match the specified filter in the request.",
13196	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates",
13197	//   "httpMethod": "GET",
13198	//   "id": "dataproc.projects.regions.workflowTemplates.list",
13199	//   "parameterOrder": [
13200	//     "parent"
13201	//   ],
13202	//   "parameters": {
13203	//     "pageSize": {
13204	//       "description": "Optional. The maximum number of results to return in each response.",
13205	//       "format": "int32",
13206	//       "location": "query",
13207	//       "type": "integer"
13208	//     },
13209	//     "pageToken": {
13210	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
13211	//       "location": "query",
13212	//       "type": "string"
13213	//     },
13214	//     "parent": {
13215	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates,list, the resource  name of the region has the following format:  projects/{project_id}/regions/{region}\nFor projects.locations.workflowTemplates.list, the  resource name of the location has the following format:  projects/{project_id}/locations/{location}",
13216	//       "location": "path",
13217	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
13218	//       "required": true,
13219	//       "type": "string"
13220	//     }
13221	//   },
13222	//   "path": "v1/{+parent}/workflowTemplates",
13223	//   "response": {
13224	//     "$ref": "ListWorkflowTemplatesResponse"
13225	//   },
13226	//   "scopes": [
13227	//     "https://www.googleapis.com/auth/cloud-platform"
13228	//   ]
13229	// }
13230
13231}
13232
13233// Pages invokes f for each page of results.
13234// A non-nil error returned from f will halt the iteration.
13235// The provided context supersedes any context provided to the Context method.
13236func (c *ProjectsRegionsWorkflowTemplatesListCall) Pages(ctx context.Context, f func(*ListWorkflowTemplatesResponse) error) error {
13237	c.ctx_ = ctx
13238	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13239	for {
13240		x, err := c.Do()
13241		if err != nil {
13242			return err
13243		}
13244		if err := f(x); err != nil {
13245			return err
13246		}
13247		if x.NextPageToken == "" {
13248			return nil
13249		}
13250		c.PageToken(x.NextPageToken)
13251	}
13252}
13253
13254// method id "dataproc.projects.regions.workflowTemplates.setIamPolicy":
13255
13256type ProjectsRegionsWorkflowTemplatesSetIamPolicyCall struct {
13257	s                   *Service
13258	resource            string
13259	setiampolicyrequest *SetIamPolicyRequest
13260	urlParams_          gensupport.URLParams
13261	ctx_                context.Context
13262	header_             http.Header
13263}
13264
13265// SetIamPolicy: Sets the access control policy on the specified
13266// resource. Replaces any existing policy.Can return Public Errors:
13267// NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED
13268func (r *ProjectsRegionsWorkflowTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
13269	c := &ProjectsRegionsWorkflowTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13270	c.resource = resource
13271	c.setiampolicyrequest = setiampolicyrequest
13272	return c
13273}
13274
13275// Fields allows partial responses to be retrieved. See
13276// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13277// for more information.
13278func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
13279	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13280	return c
13281}
13282
13283// Context sets the context to be used in this call's Do method. Any
13284// pending HTTP request will be aborted if the provided context is
13285// canceled.
13286func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
13287	c.ctx_ = ctx
13288	return c
13289}
13290
13291// Header returns an http.Header that can be modified by the caller to
13292// add HTTP headers to the request.
13293func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Header() http.Header {
13294	if c.header_ == nil {
13295		c.header_ = make(http.Header)
13296	}
13297	return c.header_
13298}
13299
13300func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13301	reqHeaders := make(http.Header)
13302	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
13303	for k, v := range c.header_ {
13304		reqHeaders[k] = v
13305	}
13306	reqHeaders.Set("User-Agent", c.s.userAgent())
13307	var body io.Reader = nil
13308	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
13309	if err != nil {
13310		return nil, err
13311	}
13312	reqHeaders.Set("Content-Type", "application/json")
13313	c.urlParams_.Set("alt", alt)
13314	c.urlParams_.Set("prettyPrint", "false")
13315	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:setIamPolicy")
13316	urls += "?" + c.urlParams_.Encode()
13317	req, err := http.NewRequest("POST", urls, body)
13318	if err != nil {
13319		return nil, err
13320	}
13321	req.Header = reqHeaders
13322	googleapi.Expand(req.URL, map[string]string{
13323		"resource": c.resource,
13324	})
13325	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13326}
13327
13328// Do executes the "dataproc.projects.regions.workflowTemplates.setIamPolicy" call.
13329// Exactly one of *Policy or error will be non-nil. Any non-2xx status
13330// code is an error. Response headers are in either
13331// *Policy.ServerResponse.Header or (if a response was returned at all)
13332// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13333// check whether the returned error was because http.StatusNotModified
13334// was returned.
13335func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13336	gensupport.SetOptions(c.urlParams_, opts...)
13337	res, err := c.doRequest("json")
13338	if res != nil && res.StatusCode == http.StatusNotModified {
13339		if res.Body != nil {
13340			res.Body.Close()
13341		}
13342		return nil, &googleapi.Error{
13343			Code:   res.StatusCode,
13344			Header: res.Header,
13345		}
13346	}
13347	if err != nil {
13348		return nil, err
13349	}
13350	defer googleapi.CloseBody(res)
13351	if err := googleapi.CheckResponse(res); err != nil {
13352		return nil, err
13353	}
13354	ret := &Policy{
13355		ServerResponse: googleapi.ServerResponse{
13356			Header:         res.Header,
13357			HTTPStatusCode: res.StatusCode,
13358		},
13359	}
13360	target := &ret
13361	if err := gensupport.DecodeResponse(target, res); err != nil {
13362		return nil, err
13363	}
13364	return ret, nil
13365	// {
13366	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and PERMISSION_DENIED",
13367	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:setIamPolicy",
13368	//   "httpMethod": "POST",
13369	//   "id": "dataproc.projects.regions.workflowTemplates.setIamPolicy",
13370	//   "parameterOrder": [
13371	//     "resource"
13372	//   ],
13373	//   "parameters": {
13374	//     "resource": {
13375	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
13376	//       "location": "path",
13377	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
13378	//       "required": true,
13379	//       "type": "string"
13380	//     }
13381	//   },
13382	//   "path": "v1/{+resource}:setIamPolicy",
13383	//   "request": {
13384	//     "$ref": "SetIamPolicyRequest"
13385	//   },
13386	//   "response": {
13387	//     "$ref": "Policy"
13388	//   },
13389	//   "scopes": [
13390	//     "https://www.googleapis.com/auth/cloud-platform"
13391	//   ]
13392	// }
13393
13394}
13395
13396// method id "dataproc.projects.regions.workflowTemplates.testIamPermissions":
13397
13398type ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall struct {
13399	s                         *Service
13400	resource                  string
13401	testiampermissionsrequest *TestIamPermissionsRequest
13402	urlParams_                gensupport.URLParams
13403	ctx_                      context.Context
13404	header_                   http.Header
13405}
13406
13407// TestIamPermissions: Returns permissions that a caller has on the
13408// specified resource. If the resource does not exist, this will return
13409// an empty set of permissions, not a NOT_FOUND error.Note: This
13410// operation is designed to be used for building permission-aware UIs
13411// and command-line tools, not for authorization checking. This
13412// operation may "fail open" without warning.
13413func (r *ProjectsRegionsWorkflowTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
13414	c := &ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13415	c.resource = resource
13416	c.testiampermissionsrequest = testiampermissionsrequest
13417	return c
13418}
13419
13420// Fields allows partial responses to be retrieved. See
13421// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13422// for more information.
13423func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
13424	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13425	return c
13426}
13427
13428// Context sets the context to be used in this call's Do method. Any
13429// pending HTTP request will be aborted if the provided context is
13430// canceled.
13431func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
13432	c.ctx_ = ctx
13433	return c
13434}
13435
13436// Header returns an http.Header that can be modified by the caller to
13437// add HTTP headers to the request.
13438func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Header() http.Header {
13439	if c.header_ == nil {
13440		c.header_ = make(http.Header)
13441	}
13442	return c.header_
13443}
13444
13445func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
13446	reqHeaders := make(http.Header)
13447	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
13448	for k, v := range c.header_ {
13449		reqHeaders[k] = v
13450	}
13451	reqHeaders.Set("User-Agent", c.s.userAgent())
13452	var body io.Reader = nil
13453	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
13454	if err != nil {
13455		return nil, err
13456	}
13457	reqHeaders.Set("Content-Type", "application/json")
13458	c.urlParams_.Set("alt", alt)
13459	c.urlParams_.Set("prettyPrint", "false")
13460	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+resource}:testIamPermissions")
13461	urls += "?" + c.urlParams_.Encode()
13462	req, err := http.NewRequest("POST", urls, body)
13463	if err != nil {
13464		return nil, err
13465	}
13466	req.Header = reqHeaders
13467	googleapi.Expand(req.URL, map[string]string{
13468		"resource": c.resource,
13469	})
13470	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13471}
13472
13473// Do executes the "dataproc.projects.regions.workflowTemplates.testIamPermissions" call.
13474// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
13475// Any non-2xx status code is an error. Response headers are in either
13476// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
13477// was returned at all) in error.(*googleapi.Error).Header. Use
13478// googleapi.IsNotModified to check whether the returned error was
13479// because http.StatusNotModified was returned.
13480func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
13481	gensupport.SetOptions(c.urlParams_, opts...)
13482	res, err := c.doRequest("json")
13483	if res != nil && res.StatusCode == http.StatusNotModified {
13484		if res.Body != nil {
13485			res.Body.Close()
13486		}
13487		return nil, &googleapi.Error{
13488			Code:   res.StatusCode,
13489			Header: res.Header,
13490		}
13491	}
13492	if err != nil {
13493		return nil, err
13494	}
13495	defer googleapi.CloseBody(res)
13496	if err := googleapi.CheckResponse(res); err != nil {
13497		return nil, err
13498	}
13499	ret := &TestIamPermissionsResponse{
13500		ServerResponse: googleapi.ServerResponse{
13501			Header:         res.Header,
13502			HTTPStatusCode: res.StatusCode,
13503		},
13504	}
13505	target := &ret
13506	if err := gensupport.DecodeResponse(target, res); err != nil {
13507		return nil, err
13508	}
13509	return ret, nil
13510	// {
13511	//   "description": "Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may \"fail open\" without warning.",
13512	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:testIamPermissions",
13513	//   "httpMethod": "POST",
13514	//   "id": "dataproc.projects.regions.workflowTemplates.testIamPermissions",
13515	//   "parameterOrder": [
13516	//     "resource"
13517	//   ],
13518	//   "parameters": {
13519	//     "resource": {
13520	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
13521	//       "location": "path",
13522	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
13523	//       "required": true,
13524	//       "type": "string"
13525	//     }
13526	//   },
13527	//   "path": "v1/{+resource}:testIamPermissions",
13528	//   "request": {
13529	//     "$ref": "TestIamPermissionsRequest"
13530	//   },
13531	//   "response": {
13532	//     "$ref": "TestIamPermissionsResponse"
13533	//   },
13534	//   "scopes": [
13535	//     "https://www.googleapis.com/auth/cloud-platform"
13536	//   ]
13537	// }
13538
13539}
13540
13541// method id "dataproc.projects.regions.workflowTemplates.update":
13542
13543type ProjectsRegionsWorkflowTemplatesUpdateCall struct {
13544	s                *Service
13545	name             string
13546	workflowtemplate *WorkflowTemplate
13547	urlParams_       gensupport.URLParams
13548	ctx_             context.Context
13549	header_          http.Header
13550}
13551
13552// Update: Updates (replaces) workflow template. The updated template
13553// must contain version that matches the current server version.
13554func (r *ProjectsRegionsWorkflowTemplatesService) Update(name string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesUpdateCall {
13555	c := &ProjectsRegionsWorkflowTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13556	c.name = name
13557	c.workflowtemplate = workflowtemplate
13558	return c
13559}
13560
13561// Fields allows partial responses to be retrieved. See
13562// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13563// for more information.
13564func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesUpdateCall {
13565	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13566	return c
13567}
13568
13569// Context sets the context to be used in this call's Do method. Any
13570// pending HTTP request will be aborted if the provided context is
13571// canceled.
13572func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesUpdateCall {
13573	c.ctx_ = ctx
13574	return c
13575}
13576
13577// Header returns an http.Header that can be modified by the caller to
13578// add HTTP headers to the request.
13579func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Header() http.Header {
13580	if c.header_ == nil {
13581		c.header_ = make(http.Header)
13582	}
13583	return c.header_
13584}
13585
13586func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
13587	reqHeaders := make(http.Header)
13588	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20200503")
13589	for k, v := range c.header_ {
13590		reqHeaders[k] = v
13591	}
13592	reqHeaders.Set("User-Agent", c.s.userAgent())
13593	var body io.Reader = nil
13594	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
13595	if err != nil {
13596		return nil, err
13597	}
13598	reqHeaders.Set("Content-Type", "application/json")
13599	c.urlParams_.Set("alt", alt)
13600	c.urlParams_.Set("prettyPrint", "false")
13601	urls := googleapi.ResolveRelative(c.s.BasePath, "v1/{+name}")
13602	urls += "?" + c.urlParams_.Encode()
13603	req, err := http.NewRequest("PUT", urls, body)
13604	if err != nil {
13605		return nil, err
13606	}
13607	req.Header = reqHeaders
13608	googleapi.Expand(req.URL, map[string]string{
13609		"name": c.name,
13610	})
13611	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13612}
13613
13614// Do executes the "dataproc.projects.regions.workflowTemplates.update" call.
13615// Exactly one of *WorkflowTemplate or error will be non-nil. Any
13616// non-2xx status code is an error. Response headers are in either
13617// *WorkflowTemplate.ServerResponse.Header or (if a response was
13618// returned at all) in error.(*googleapi.Error).Header. Use
13619// googleapi.IsNotModified to check whether the returned error was
13620// because http.StatusNotModified was returned.
13621func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
13622	gensupport.SetOptions(c.urlParams_, opts...)
13623	res, err := c.doRequest("json")
13624	if res != nil && res.StatusCode == http.StatusNotModified {
13625		if res.Body != nil {
13626			res.Body.Close()
13627		}
13628		return nil, &googleapi.Error{
13629			Code:   res.StatusCode,
13630			Header: res.Header,
13631		}
13632	}
13633	if err != nil {
13634		return nil, err
13635	}
13636	defer googleapi.CloseBody(res)
13637	if err := googleapi.CheckResponse(res); err != nil {
13638		return nil, err
13639	}
13640	ret := &WorkflowTemplate{
13641		ServerResponse: googleapi.ServerResponse{
13642			Header:         res.Header,
13643			HTTPStatusCode: res.StatusCode,
13644		},
13645	}
13646	target := &ret
13647	if err := gensupport.DecodeResponse(target, res); err != nil {
13648		return nil, err
13649	}
13650	return ret, nil
13651	// {
13652	//   "description": "Updates (replaces) workflow template. The updated template must contain version that matches the current server version.",
13653	//   "flatPath": "v1/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}",
13654	//   "httpMethod": "PUT",
13655	//   "id": "dataproc.projects.regions.workflowTemplates.update",
13656	//   "parameterOrder": [
13657	//     "name"
13658	//   ],
13659	//   "parameters": {
13660	//     "name": {
13661	//       "description": "Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names.\nFor projects.regions.workflowTemplates, the resource name of the  template has the following format:  projects/{project_id}/regions/{region}/workflowTemplates/{template_id}\nFor projects.locations.workflowTemplates, the resource name of the  template has the following format:  projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
13662	//       "location": "path",
13663	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
13664	//       "required": true,
13665	//       "type": "string"
13666	//     }
13667	//   },
13668	//   "path": "v1/{+name}",
13669	//   "request": {
13670	//     "$ref": "WorkflowTemplate"
13671	//   },
13672	//   "response": {
13673	//     "$ref": "WorkflowTemplate"
13674	//   },
13675	//   "scopes": [
13676	//     "https://www.googleapis.com/auth/cloud-platform"
13677	//   ]
13678	// }
13679
13680}
13681