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/v1beta2"
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/v1beta2"
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:v1beta2"
77const apiName = "dataproc"
78const apiVersion = "v1beta2"
79const basePath = "https://dataproc.googleapis.com/"
80const mtlsBasePath = "https://dataproc.mtls.googleapis.com/"
81
82// OAuth2 scopes used by this API.
83const (
84	// View and manage your data across Google Cloud Platform services
85	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
86)
87
88// NewService creates a new Service.
89func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
90	scopesOption := option.WithScopes(
91		"https://www.googleapis.com/auth/cloud-platform",
92	)
93	// NOTE: prepend, so we don't override user-specified scopes.
94	opts = append([]option.ClientOption{scopesOption}, opts...)
95	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
96	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
97	client, endpoint, err := htransport.NewClient(ctx, opts...)
98	if err != nil {
99		return nil, err
100	}
101	s, err := New(client)
102	if err != nil {
103		return nil, err
104	}
105	if endpoint != "" {
106		s.BasePath = endpoint
107	}
108	return s, nil
109}
110
111// New creates a new Service. It uses the provided http.Client for requests.
112//
113// Deprecated: please use NewService instead.
114// To provide a custom HTTP client, use option.WithHTTPClient.
115// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
116func New(client *http.Client) (*Service, error) {
117	if client == nil {
118		return nil, errors.New("client is nil")
119	}
120	s := &Service{client: client, BasePath: basePath}
121	s.Projects = NewProjectsService(s)
122	return s, nil
123}
124
125type Service struct {
126	client    *http.Client
127	BasePath  string // API endpoint base URL
128	UserAgent string // optional additional User-Agent fragment
129
130	Projects *ProjectsService
131}
132
133func (s *Service) userAgent() string {
134	if s.UserAgent == "" {
135		return googleapi.UserAgent
136	}
137	return googleapi.UserAgent + " " + s.UserAgent
138}
139
140func NewProjectsService(s *Service) *ProjectsService {
141	rs := &ProjectsService{s: s}
142	rs.Locations = NewProjectsLocationsService(s)
143	rs.Regions = NewProjectsRegionsService(s)
144	return rs
145}
146
147type ProjectsService struct {
148	s *Service
149
150	Locations *ProjectsLocationsService
151
152	Regions *ProjectsRegionsService
153}
154
155func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
156	rs := &ProjectsLocationsService{s: s}
157	rs.AutoscalingPolicies = NewProjectsLocationsAutoscalingPoliciesService(s)
158	rs.WorkflowTemplates = NewProjectsLocationsWorkflowTemplatesService(s)
159	return rs
160}
161
162type ProjectsLocationsService struct {
163	s *Service
164
165	AutoscalingPolicies *ProjectsLocationsAutoscalingPoliciesService
166
167	WorkflowTemplates *ProjectsLocationsWorkflowTemplatesService
168}
169
170func NewProjectsLocationsAutoscalingPoliciesService(s *Service) *ProjectsLocationsAutoscalingPoliciesService {
171	rs := &ProjectsLocationsAutoscalingPoliciesService{s: s}
172	return rs
173}
174
175type ProjectsLocationsAutoscalingPoliciesService struct {
176	s *Service
177}
178
179func NewProjectsLocationsWorkflowTemplatesService(s *Service) *ProjectsLocationsWorkflowTemplatesService {
180	rs := &ProjectsLocationsWorkflowTemplatesService{s: s}
181	return rs
182}
183
184type ProjectsLocationsWorkflowTemplatesService struct {
185	s *Service
186}
187
188func NewProjectsRegionsService(s *Service) *ProjectsRegionsService {
189	rs := &ProjectsRegionsService{s: s}
190	rs.AutoscalingPolicies = NewProjectsRegionsAutoscalingPoliciesService(s)
191	rs.Clusters = NewProjectsRegionsClustersService(s)
192	rs.Jobs = NewProjectsRegionsJobsService(s)
193	rs.Operations = NewProjectsRegionsOperationsService(s)
194	rs.WorkflowTemplates = NewProjectsRegionsWorkflowTemplatesService(s)
195	return rs
196}
197
198type ProjectsRegionsService struct {
199	s *Service
200
201	AutoscalingPolicies *ProjectsRegionsAutoscalingPoliciesService
202
203	Clusters *ProjectsRegionsClustersService
204
205	Jobs *ProjectsRegionsJobsService
206
207	Operations *ProjectsRegionsOperationsService
208
209	WorkflowTemplates *ProjectsRegionsWorkflowTemplatesService
210}
211
212func NewProjectsRegionsAutoscalingPoliciesService(s *Service) *ProjectsRegionsAutoscalingPoliciesService {
213	rs := &ProjectsRegionsAutoscalingPoliciesService{s: s}
214	return rs
215}
216
217type ProjectsRegionsAutoscalingPoliciesService struct {
218	s *Service
219}
220
221func NewProjectsRegionsClustersService(s *Service) *ProjectsRegionsClustersService {
222	rs := &ProjectsRegionsClustersService{s: s}
223	return rs
224}
225
226type ProjectsRegionsClustersService struct {
227	s *Service
228}
229
230func NewProjectsRegionsJobsService(s *Service) *ProjectsRegionsJobsService {
231	rs := &ProjectsRegionsJobsService{s: s}
232	return rs
233}
234
235type ProjectsRegionsJobsService struct {
236	s *Service
237}
238
239func NewProjectsRegionsOperationsService(s *Service) *ProjectsRegionsOperationsService {
240	rs := &ProjectsRegionsOperationsService{s: s}
241	return rs
242}
243
244type ProjectsRegionsOperationsService struct {
245	s *Service
246}
247
248func NewProjectsRegionsWorkflowTemplatesService(s *Service) *ProjectsRegionsWorkflowTemplatesService {
249	rs := &ProjectsRegionsWorkflowTemplatesService{s: s}
250	return rs
251}
252
253type ProjectsRegionsWorkflowTemplatesService struct {
254	s *Service
255}
256
257// AcceleratorConfig: Specifies the type and number of accelerator cards
258// attached to the instances of an instance group (see GPUs on Compute
259// Engine (https://cloud.google.com/compute/docs/gpus/)).
260type AcceleratorConfig struct {
261	// AcceleratorCount: The number of the accelerator cards of this type
262	// exposed to this instance.
263	AcceleratorCount int64 `json:"acceleratorCount,omitempty"`
264
265	// AcceleratorTypeUri: Full URL, partial URI, or short name of the
266	// accelerator type resource to expose to this instance. See Compute
267	// Engine AcceleratorTypes
268	// (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes
269	// )Examples *
270	// https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80 * nvidia-tesla-k80Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the accelerator type resource, for example,
271	// nvidia-tesla-k80.
272	AcceleratorTypeUri string `json:"acceleratorTypeUri,omitempty"`
273
274	// ForceSendFields is a list of field names (e.g. "AcceleratorCount") to
275	// unconditionally include in API requests. By default, fields with
276	// empty values are omitted from API requests. However, any non-pointer,
277	// non-interface field appearing in ForceSendFields will be sent to the
278	// server regardless of whether the field is empty or not. This may be
279	// used to include empty fields in Patch requests.
280	ForceSendFields []string `json:"-"`
281
282	// NullFields is a list of field names (e.g. "AcceleratorCount") to
283	// include in API requests with the JSON null value. By default, fields
284	// with empty values are omitted from API requests. However, any field
285	// with an empty value appearing in NullFields will be sent to the
286	// server as null. It is an error if a field in this list has a
287	// non-empty value. This may be used to include null fields in Patch
288	// requests.
289	NullFields []string `json:"-"`
290}
291
292func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) {
293	type NoMethod AcceleratorConfig
294	raw := NoMethod(*s)
295	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
296}
297
298// AutoscalingConfig: Autoscaling Policy config associated with the
299// cluster.
300type AutoscalingConfig struct {
301	// PolicyUri: Optional. The autoscaling policy used by the cluster.Only
302	// resource names including projectid and location (region) are valid.
303	// Examples:
304	// https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id] projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]Note that the policy must be in the same project and Dataproc
305	// region.
306	PolicyUri string `json:"policyUri,omitempty"`
307
308	// ForceSendFields is a list of field names (e.g. "PolicyUri") to
309	// unconditionally include in API requests. By default, fields with
310	// empty values are omitted from API requests. However, any non-pointer,
311	// non-interface field appearing in ForceSendFields will be sent to the
312	// server regardless of whether the field is empty or not. This may be
313	// used to include empty fields in Patch requests.
314	ForceSendFields []string `json:"-"`
315
316	// NullFields is a list of field names (e.g. "PolicyUri") to include in
317	// API requests with the JSON null value. By default, fields with empty
318	// values are omitted from API requests. However, any field with an
319	// empty value appearing in NullFields will be sent to the server as
320	// null. It is an error if a field in this list has a non-empty value.
321	// This may be used to include null fields in Patch requests.
322	NullFields []string `json:"-"`
323}
324
325func (s *AutoscalingConfig) MarshalJSON() ([]byte, error) {
326	type NoMethod AutoscalingConfig
327	raw := NoMethod(*s)
328	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
329}
330
331// AutoscalingPolicy: Describes an autoscaling policy for Dataproc
332// cluster autoscaler.
333type AutoscalingPolicy struct {
334	BasicAlgorithm *BasicAutoscalingAlgorithm `json:"basicAlgorithm,omitempty"`
335
336	// Id: Required. The policy id.The id must contain only letters (a-z,
337	// A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin
338	// or end with underscore or hyphen. Must consist of between 3 and 50
339	// characters.
340	Id string `json:"id,omitempty"`
341
342	// Name: Output only. The "resource name" of the autoscaling policy, as
343	// described in https://cloud.google.com/apis/design/resource_names. For
344	// projects.regions.autoscalingPolicies, the resource name of the policy
345	// has the following format:
346	// projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
347	//  For projects.locations.autoscalingPolicies, the resource name of the
348	// policy has the following format:
349	// projects/{project_id}/locations/{location}/autoscalingPolicies/{policy
350	// _id}
351	Name string `json:"name,omitempty"`
352
353	// SecondaryWorkerConfig: Optional. Describes how the autoscaler will
354	// operate for secondary workers.
355	SecondaryWorkerConfig *InstanceGroupAutoscalingPolicyConfig `json:"secondaryWorkerConfig,omitempty"`
356
357	// WorkerConfig: Required. Describes how the autoscaler will operate for
358	// primary workers.
359	WorkerConfig *InstanceGroupAutoscalingPolicyConfig `json:"workerConfig,omitempty"`
360
361	// ServerResponse contains the HTTP response code and headers from the
362	// server.
363	googleapi.ServerResponse `json:"-"`
364
365	// ForceSendFields is a list of field names (e.g. "BasicAlgorithm") to
366	// unconditionally include in API requests. By default, fields with
367	// empty values are omitted from API requests. However, any non-pointer,
368	// non-interface field appearing in ForceSendFields will be sent to the
369	// server regardless of whether the field is empty or not. This may be
370	// used to include empty fields in Patch requests.
371	ForceSendFields []string `json:"-"`
372
373	// NullFields is a list of field names (e.g. "BasicAlgorithm") to
374	// include in API requests with the JSON null value. By default, fields
375	// with empty values are omitted from API requests. However, any field
376	// with an empty value appearing in NullFields will be sent to the
377	// server as null. It is an error if a field in this list has a
378	// non-empty value. This may be used to include null fields in Patch
379	// requests.
380	NullFields []string `json:"-"`
381}
382
383func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) {
384	type NoMethod AutoscalingPolicy
385	raw := NoMethod(*s)
386	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
387}
388
389// BasicAutoscalingAlgorithm: Basic algorithm for autoscaling.
390type BasicAutoscalingAlgorithm struct {
391	// CooldownPeriod: Optional. Duration between scaling events. A scaling
392	// period starts after the update operation from the previous event has
393	// completed.Bounds: 2m, 1d. Default: 2m.
394	CooldownPeriod string `json:"cooldownPeriod,omitempty"`
395
396	// YarnConfig: Required. YARN autoscaling configuration.
397	YarnConfig *BasicYarnAutoscalingConfig `json:"yarnConfig,omitempty"`
398
399	// ForceSendFields is a list of field names (e.g. "CooldownPeriod") to
400	// unconditionally include in API requests. By default, fields with
401	// empty values are omitted from API requests. However, any non-pointer,
402	// non-interface field appearing in ForceSendFields will be sent to the
403	// server regardless of whether the field is empty or not. This may be
404	// used to include empty fields in Patch requests.
405	ForceSendFields []string `json:"-"`
406
407	// NullFields is a list of field names (e.g. "CooldownPeriod") to
408	// include in API requests with the JSON null value. By default, fields
409	// with empty values are omitted from API requests. However, any field
410	// with an empty value appearing in NullFields will be sent to the
411	// server as null. It is an error if a field in this list has a
412	// non-empty value. This may be used to include null fields in Patch
413	// requests.
414	NullFields []string `json:"-"`
415}
416
417func (s *BasicAutoscalingAlgorithm) MarshalJSON() ([]byte, error) {
418	type NoMethod BasicAutoscalingAlgorithm
419	raw := NoMethod(*s)
420	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
421}
422
423// BasicYarnAutoscalingConfig: Basic autoscaling configurations for
424// YARN.
425type BasicYarnAutoscalingConfig struct {
426	// GracefulDecommissionTimeout: Required. Timeout for YARN graceful
427	// decommissioning of Node Managers. Specifies the duration to wait for
428	// jobs to complete before forcefully removing workers (and potentially
429	// interrupting jobs). Only applicable to downscaling operations.Bounds:
430	// 0s, 1d.
431	GracefulDecommissionTimeout string `json:"gracefulDecommissionTimeout,omitempty"`
432
433	// ScaleDownFactor: Required. Fraction of average YARN pending memory in
434	// the last cooldown period for which to remove workers. A scale-down
435	// factor of 1 will result in scaling down so that there is no available
436	// memory remaining after the update (more aggressive scaling). A
437	// scale-down factor of 0 disables removing workers, which can be
438	// beneficial for autoscaling a single job. See How autoscaling works
439	// for more information.Bounds: 0.0, 1.0.
440	ScaleDownFactor float64 `json:"scaleDownFactor,omitempty"`
441
442	// ScaleDownMinWorkerFraction: Optional. Minimum scale-down threshold as
443	// a fraction of total cluster size before scaling occurs. For example,
444	// in a 20-worker cluster, a threshold of 0.1 means the autoscaler must
445	// recommend at least a 2 worker scale-down for the cluster to scale. A
446	// threshold of 0 means the autoscaler will scale down on any
447	// recommended change.Bounds: 0.0, 1.0. Default: 0.0.
448	ScaleDownMinWorkerFraction float64 `json:"scaleDownMinWorkerFraction,omitempty"`
449
450	// ScaleUpFactor: Required. Fraction of average YARN pending memory in
451	// the last cooldown period for which to add workers. A scale-up factor
452	// of 1.0 will result in scaling up so that there is no pending memory
453	// remaining after the update (more aggressive scaling). A scale-up
454	// factor closer to 0 will result in a smaller magnitude of scaling up
455	// (less aggressive scaling). See How autoscaling works for more
456	// information.Bounds: 0.0, 1.0.
457	ScaleUpFactor float64 `json:"scaleUpFactor,omitempty"`
458
459	// ScaleUpMinWorkerFraction: Optional. Minimum scale-up threshold as a
460	// fraction of total cluster size before scaling occurs. For example, in
461	// a 20-worker cluster, a threshold of 0.1 means the autoscaler must
462	// recommend at least a 2-worker scale-up for the cluster to scale. A
463	// threshold of 0 means the autoscaler will scale up on any recommended
464	// change.Bounds: 0.0, 1.0. Default: 0.0.
465	ScaleUpMinWorkerFraction float64 `json:"scaleUpMinWorkerFraction,omitempty"`
466
467	// ForceSendFields is a list of field names (e.g.
468	// "GracefulDecommissionTimeout") to unconditionally include in API
469	// requests. By default, fields with empty values are omitted from API
470	// requests. However, any non-pointer, non-interface field appearing in
471	// ForceSendFields will be sent to the server regardless of whether the
472	// field is empty or not. This may be used to include empty fields in
473	// Patch requests.
474	ForceSendFields []string `json:"-"`
475
476	// NullFields is a list of field names (e.g.
477	// "GracefulDecommissionTimeout") to include in API requests with the
478	// JSON null value. By default, fields with empty values are omitted
479	// from API requests. However, any field with an empty value appearing
480	// in NullFields will be sent to the server as null. It is an error if a
481	// field in this list has a non-empty value. This may be used to include
482	// null fields in Patch requests.
483	NullFields []string `json:"-"`
484}
485
486func (s *BasicYarnAutoscalingConfig) MarshalJSON() ([]byte, error) {
487	type NoMethod BasicYarnAutoscalingConfig
488	raw := NoMethod(*s)
489	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
490}
491
492func (s *BasicYarnAutoscalingConfig) UnmarshalJSON(data []byte) error {
493	type NoMethod BasicYarnAutoscalingConfig
494	var s1 struct {
495		ScaleDownFactor            gensupport.JSONFloat64 `json:"scaleDownFactor"`
496		ScaleDownMinWorkerFraction gensupport.JSONFloat64 `json:"scaleDownMinWorkerFraction"`
497		ScaleUpFactor              gensupport.JSONFloat64 `json:"scaleUpFactor"`
498		ScaleUpMinWorkerFraction   gensupport.JSONFloat64 `json:"scaleUpMinWorkerFraction"`
499		*NoMethod
500	}
501	s1.NoMethod = (*NoMethod)(s)
502	if err := json.Unmarshal(data, &s1); err != nil {
503		return err
504	}
505	s.ScaleDownFactor = float64(s1.ScaleDownFactor)
506	s.ScaleDownMinWorkerFraction = float64(s1.ScaleDownMinWorkerFraction)
507	s.ScaleUpFactor = float64(s1.ScaleUpFactor)
508	s.ScaleUpMinWorkerFraction = float64(s1.ScaleUpMinWorkerFraction)
509	return nil
510}
511
512// Binding: Associates members with a role.
513type Binding struct {
514	BindingId string `json:"bindingId,omitempty"`
515
516	// Condition: The condition that is associated with this binding.If the
517	// condition evaluates to true, then this binding applies to the current
518	// request.If the condition evaluates to false, then this binding does
519	// not apply to the current request. However, a different role binding
520	// might grant the same role to one or more of the members in this
521	// binding.To learn which resources support conditions in their IAM
522	// policies, see the IAM documentation
523	// (https://cloud.google.com/iam/help/conditions/resource-policies).
524	Condition *Expr `json:"condition,omitempty"`
525
526	// Members: Specifies the identities requesting access for a Cloud
527	// Platform resource. members can have the following values: allUsers: A
528	// special identifier that represents anyone who is on the internet;
529	// with or without a Google account. allAuthenticatedUsers: A special
530	// identifier that represents anyone who is authenticated with a Google
531	// account or a service account. user:{emailid}: An email address that
532	// represents a specific Google account. For example, alice@example.com
533	// . serviceAccount:{emailid}: An email address that represents a
534	// service account. For example,
535	// my-other-app@appspot.gserviceaccount.com. group:{emailid}: An email
536	// address that represents a Google group. For example,
537	// admins@example.com. deleted:user:{emailid}?uid={uniqueid}: An email
538	// address (plus unique identifier) representing a user that has been
539	// recently deleted. For example,
540	// alice@example.com?uid=123456789012345678901. If the user is
541	// recovered, this value reverts to user:{emailid} and the recovered
542	// user retains the role in the binding.
543	// deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address
544	// (plus unique identifier) representing a service account that has been
545	// recently deleted. For example,
546	// my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901.
547	// If the service account is undeleted, this value reverts to
548	// serviceAccount:{emailid} and the undeleted service account retains
549	// the role in the binding. deleted:group:{emailid}?uid={uniqueid}: An
550	// email address (plus unique identifier) representing a Google group
551	// that has been recently deleted. For example,
552	// admins@example.com?uid=123456789012345678901. If the group is
553	// recovered, this value reverts to group:{emailid} and the recovered
554	// group retains the role in the binding. domain:{domain}: The G Suite
555	// domain (primary) that represents all the users of that domain. For
556	// example, google.com or example.com.
557	Members []string `json:"members,omitempty"`
558
559	// Role: Role that is assigned to members. For example, roles/viewer,
560	// roles/editor, or roles/owner.
561	Role string `json:"role,omitempty"`
562
563	// ForceSendFields is a list of field names (e.g. "BindingId") to
564	// unconditionally include in API requests. By default, fields with
565	// empty values are omitted from API requests. However, any non-pointer,
566	// non-interface field appearing in ForceSendFields will be sent to the
567	// server regardless of whether the field is empty or not. This may be
568	// used to include empty fields in Patch requests.
569	ForceSendFields []string `json:"-"`
570
571	// NullFields is a list of field names (e.g. "BindingId") to include in
572	// API requests with the JSON null value. By default, fields with empty
573	// values are omitted from API requests. However, any field with an
574	// empty value appearing in NullFields will be sent to the server as
575	// null. It is an error if a field in this list has a non-empty value.
576	// This may be used to include null fields in Patch requests.
577	NullFields []string `json:"-"`
578}
579
580func (s *Binding) MarshalJSON() ([]byte, error) {
581	type NoMethod Binding
582	raw := NoMethod(*s)
583	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
584}
585
586// CancelJobRequest: A request to cancel a job.
587type CancelJobRequest struct {
588}
589
590// Cluster: Describes the identifying information, config, and status of
591// a cluster of Compute Engine instances.
592type Cluster struct {
593	// ClusterName: Required. The cluster name. Cluster names within a
594	// project must be unique. Names of deleted clusters can be reused.
595	ClusterName string `json:"clusterName,omitempty"`
596
597	// ClusterUuid: Output only. A cluster UUID (Unique Universal
598	// Identifier). Dataproc generates this value when it creates the
599	// cluster.
600	ClusterUuid string `json:"clusterUuid,omitempty"`
601
602	// Config: Required. The cluster config. Note that Dataproc may set
603	// default values, and values may change when clusters are updated.
604	Config *ClusterConfig `json:"config,omitempty"`
605
606	// Labels: Optional. The labels to associate with this cluster. Label
607	// keys must contain 1 to 63 characters, and must conform to RFC 1035
608	// (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty,
609	// but, if present, must contain 1 to 63 characters, and must conform to
610	// RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32
611	// labels can be associated with a cluster.
612	Labels map[string]string `json:"labels,omitempty"`
613
614	// Metrics: Output only. Contains cluster daemon metrics such as HDFS
615	// and YARN stats.Beta Feature: This report is available for testing
616	// purposes only. It may be changed before final release.
617	Metrics *ClusterMetrics `json:"metrics,omitempty"`
618
619	// ProjectId: Required. The Google Cloud Platform project ID that the
620	// cluster belongs to.
621	ProjectId string `json:"projectId,omitempty"`
622
623	// Status: Output only. Cluster status.
624	Status *ClusterStatus `json:"status,omitempty"`
625
626	// StatusHistory: Output only. The previous cluster status.
627	StatusHistory []*ClusterStatus `json:"statusHistory,omitempty"`
628
629	// ServerResponse contains the HTTP response code and headers from the
630	// server.
631	googleapi.ServerResponse `json:"-"`
632
633	// ForceSendFields is a list of field names (e.g. "ClusterName") to
634	// unconditionally include in API requests. By default, fields with
635	// empty values are omitted from API requests. However, any non-pointer,
636	// non-interface field appearing in ForceSendFields will be sent to the
637	// server regardless of whether the field is empty or not. This may be
638	// used to include empty fields in Patch requests.
639	ForceSendFields []string `json:"-"`
640
641	// NullFields is a list of field names (e.g. "ClusterName") to include
642	// in API requests with the JSON null value. By default, fields with
643	// empty values are omitted from API requests. However, any field with
644	// an empty value appearing in NullFields will be sent to the server as
645	// null. It is an error if a field in this list has a non-empty value.
646	// This may be used to include null fields in Patch requests.
647	NullFields []string `json:"-"`
648}
649
650func (s *Cluster) MarshalJSON() ([]byte, error) {
651	type NoMethod Cluster
652	raw := NoMethod(*s)
653	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
654}
655
656// ClusterConfig: The cluster config.
657type ClusterConfig struct {
658	// AutoscalingConfig: Optional. Autoscaling config for the policy
659	// associated with the cluster. Cluster does not autoscale if this field
660	// is unset.
661	AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"`
662
663	// ConfigBucket: Optional. A Cloud Storage bucket used to stage job
664	// dependencies, config files, and job driver console output. If you do
665	// not specify a staging bucket, Cloud Dataproc will determine a Cloud
666	// Storage location (US, ASIA, or EU) for your cluster's staging bucket
667	// according to the Compute Engine zone where your cluster is deployed,
668	// and then create and manage this project-level, per-location bucket
669	// (see Dataproc staging bucket
670	// (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/
671	// staging-bucket)).
672	ConfigBucket string `json:"configBucket,omitempty"`
673
674	// EncryptionConfig: Optional. Encryption settings for the cluster.
675	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
676
677	// EndpointConfig: Optional. Port/endpoint configuration for this
678	// cluster
679	EndpointConfig *EndpointConfig `json:"endpointConfig,omitempty"`
680
681	// GceClusterConfig: Optional. The shared Compute Engine config settings
682	// for all instances in a cluster.
683	GceClusterConfig *GceClusterConfig `json:"gceClusterConfig,omitempty"`
684
685	// GkeClusterConfig: Optional. The Kubernetes Engine config for Dataproc
686	// clusters deployed to Kubernetes. Setting this is considered mutually
687	// exclusive with Compute Engine-based options such as
688	// gce_cluster_config, master_config, worker_config,
689	// secondary_worker_config, and autoscaling_config.
690	GkeClusterConfig *GkeClusterConfig `json:"gkeClusterConfig,omitempty"`
691
692	// InitializationActions: Optional. Commands to execute on each node
693	// after config is completed. By default, executables are run on master
694	// and all worker nodes. You can test a node's role metadata to run an
695	// executable on a master or worker node, as shown below using curl (you
696	// can also use wget): ROLE=$(curl -H Metadata-Flavor:Google
697	// http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role) if [[ "${ROLE}" == 'Master' ]]; then ... master specific actions ... else ... worker specific actions ... fi
698	InitializationActions []*NodeInitializationAction `json:"initializationActions,omitempty"`
699
700	// LifecycleConfig: Optional. The config setting for auto delete cluster
701	// schedule.
702	LifecycleConfig *LifecycleConfig `json:"lifecycleConfig,omitempty"`
703
704	// MasterConfig: Optional. The Compute Engine config settings for the
705	// master instance in a cluster.
706	MasterConfig *InstanceGroupConfig `json:"masterConfig,omitempty"`
707
708	// MetastoreConfig: Optional. Metastore configuration.
709	MetastoreConfig *MetastoreConfig `json:"metastoreConfig,omitempty"`
710
711	// SecondaryWorkerConfig: Optional. The Compute Engine config settings
712	// for additional worker instances in a cluster.
713	SecondaryWorkerConfig *InstanceGroupConfig `json:"secondaryWorkerConfig,omitempty"`
714
715	// SecurityConfig: Optional. Security related configuration.
716	SecurityConfig *SecurityConfig `json:"securityConfig,omitempty"`
717
718	// SoftwareConfig: Optional. The config settings for software inside the
719	// cluster.
720	SoftwareConfig *SoftwareConfig `json:"softwareConfig,omitempty"`
721
722	// TempBucket: Optional. A Cloud Storage bucket used to store ephemeral
723	// cluster and jobs data, such as Spark and MapReduce history files. If
724	// you do not specify a temp bucket, Dataproc will determine a Cloud
725	// Storage location (US, ASIA, or EU) for your cluster's temp bucket
726	// according to the Compute Engine zone where your cluster is deployed,
727	// and then create and manage this project-level, per-location bucket.
728	// The default bucket has a TTL of 90 days, but you can use any TTL (or
729	// none) if you specify a bucket.
730	TempBucket string `json:"tempBucket,omitempty"`
731
732	// WorkerConfig: Optional. The Compute Engine config settings for worker
733	// instances in a cluster.
734	WorkerConfig *InstanceGroupConfig `json:"workerConfig,omitempty"`
735
736	// ForceSendFields is a list of field names (e.g. "AutoscalingConfig")
737	// to unconditionally include in API requests. By default, fields with
738	// empty values are omitted from API requests. However, any non-pointer,
739	// non-interface field appearing in ForceSendFields will be sent to the
740	// server regardless of whether the field is empty or not. This may be
741	// used to include empty fields in Patch requests.
742	ForceSendFields []string `json:"-"`
743
744	// NullFields is a list of field names (e.g. "AutoscalingConfig") to
745	// include in API requests with the JSON null value. By default, fields
746	// with empty values are omitted from API requests. However, any field
747	// with an empty value appearing in NullFields will be sent to the
748	// server as null. It is an error if a field in this list has a
749	// non-empty value. This may be used to include null fields in Patch
750	// requests.
751	NullFields []string `json:"-"`
752}
753
754func (s *ClusterConfig) MarshalJSON() ([]byte, error) {
755	type NoMethod ClusterConfig
756	raw := NoMethod(*s)
757	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
758}
759
760// ClusterMetrics: Contains cluster daemon metrics, such as HDFS and
761// YARN stats.Beta Feature: This report is available for testing
762// purposes only. It may be changed before final release.
763type ClusterMetrics struct {
764	// HdfsMetrics: The HDFS metrics.
765	HdfsMetrics map[string]string `json:"hdfsMetrics,omitempty"`
766
767	// YarnMetrics: The YARN metrics.
768	YarnMetrics map[string]string `json:"yarnMetrics,omitempty"`
769
770	// ForceSendFields is a list of field names (e.g. "HdfsMetrics") to
771	// unconditionally include in API requests. By default, fields with
772	// empty values are omitted from API requests. However, any non-pointer,
773	// non-interface field appearing in ForceSendFields will be sent to the
774	// server regardless of whether the field is empty or not. This may be
775	// used to include empty fields in Patch requests.
776	ForceSendFields []string `json:"-"`
777
778	// NullFields is a list of field names (e.g. "HdfsMetrics") to include
779	// in API requests with the JSON null value. By default, fields with
780	// empty values are omitted from API requests. However, any field with
781	// an empty value appearing in NullFields will be sent to the server as
782	// null. It is an error if a field in this list has a non-empty value.
783	// This may be used to include null fields in Patch requests.
784	NullFields []string `json:"-"`
785}
786
787func (s *ClusterMetrics) MarshalJSON() ([]byte, error) {
788	type NoMethod ClusterMetrics
789	raw := NoMethod(*s)
790	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
791}
792
793// ClusterOperation: The cluster operation triggered by a workflow.
794type ClusterOperation struct {
795	// Done: Output only. Indicates the operation is done.
796	Done bool `json:"done,omitempty"`
797
798	// Error: Output only. Error, if operation failed.
799	Error string `json:"error,omitempty"`
800
801	// OperationId: Output only. The id of the cluster operation.
802	OperationId string `json:"operationId,omitempty"`
803
804	// ForceSendFields is a list of field names (e.g. "Done") to
805	// unconditionally include in API requests. By default, fields with
806	// empty values are omitted from API requests. However, any non-pointer,
807	// non-interface field appearing in ForceSendFields will be sent to the
808	// server regardless of whether the field is empty or not. This may be
809	// used to include empty fields in Patch requests.
810	ForceSendFields []string `json:"-"`
811
812	// NullFields is a list of field names (e.g. "Done") to include in API
813	// requests with the JSON null value. By default, fields with empty
814	// values are omitted from API requests. However, any field with an
815	// empty value appearing in NullFields will be sent to the server as
816	// null. It is an error if a field in this list has a non-empty value.
817	// This may be used to include null fields in Patch requests.
818	NullFields []string `json:"-"`
819}
820
821func (s *ClusterOperation) MarshalJSON() ([]byte, error) {
822	type NoMethod ClusterOperation
823	raw := NoMethod(*s)
824	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
825}
826
827// ClusterOperationMetadata: Metadata describing the operation.
828type ClusterOperationMetadata struct {
829	// ClusterName: Output only. Name of the cluster for the operation.
830	ClusterName string `json:"clusterName,omitempty"`
831
832	// ClusterUuid: Output only. Cluster UUID for the operation.
833	ClusterUuid string `json:"clusterUuid,omitempty"`
834
835	// Description: Output only. Short description of operation.
836	Description string `json:"description,omitempty"`
837
838	// Labels: Output only. Labels associated with the operation
839	Labels map[string]string `json:"labels,omitempty"`
840
841	// OperationType: Output only. The operation type.
842	OperationType string `json:"operationType,omitempty"`
843
844	// Status: Output only. Current operation status.
845	Status *ClusterOperationStatus `json:"status,omitempty"`
846
847	// StatusHistory: Output only. The previous operation status.
848	StatusHistory []*ClusterOperationStatus `json:"statusHistory,omitempty"`
849
850	// Warnings: Output only. Errors encountered during operation execution.
851	Warnings []string `json:"warnings,omitempty"`
852
853	// ForceSendFields is a list of field names (e.g. "ClusterName") to
854	// unconditionally include in API requests. By default, fields with
855	// empty values are omitted from API requests. However, any non-pointer,
856	// non-interface field appearing in ForceSendFields will be sent to the
857	// server regardless of whether the field is empty or not. This may be
858	// used to include empty fields in Patch requests.
859	ForceSendFields []string `json:"-"`
860
861	// NullFields is a list of field names (e.g. "ClusterName") to include
862	// in API requests with the JSON null value. By default, fields with
863	// empty values are omitted from API requests. However, any field with
864	// an empty value appearing in NullFields will be sent to the server as
865	// null. It is an error if a field in this list has a non-empty value.
866	// This may be used to include null fields in Patch requests.
867	NullFields []string `json:"-"`
868}
869
870func (s *ClusterOperationMetadata) MarshalJSON() ([]byte, error) {
871	type NoMethod ClusterOperationMetadata
872	raw := NoMethod(*s)
873	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
874}
875
876// ClusterOperationStatus: The status of the operation.
877type ClusterOperationStatus struct {
878	// Details: Output only. A message containing any operation metadata
879	// details.
880	Details string `json:"details,omitempty"`
881
882	// InnerState: Output only. A message containing the detailed operation
883	// state.
884	InnerState string `json:"innerState,omitempty"`
885
886	// State: Output only. A message containing the operation state.
887	//
888	// Possible values:
889	//   "UNKNOWN" - Unused.
890	//   "PENDING" - The operation has been created.
891	//   "RUNNING" - The operation is running.
892	//   "DONE" - The operation is done; either cancelled or completed.
893	State string `json:"state,omitempty"`
894
895	// StateStartTime: Output only. The time this state was entered.
896	StateStartTime string `json:"stateStartTime,omitempty"`
897
898	// ForceSendFields is a list of field names (e.g. "Details") to
899	// unconditionally include in API requests. By default, fields with
900	// empty values are omitted from API requests. However, any non-pointer,
901	// non-interface field appearing in ForceSendFields will be sent to the
902	// server regardless of whether the field is empty or not. This may be
903	// used to include empty fields in Patch requests.
904	ForceSendFields []string `json:"-"`
905
906	// NullFields is a list of field names (e.g. "Details") to include in
907	// API requests with the JSON null value. By default, fields with empty
908	// values are omitted from API requests. However, any field with an
909	// empty value appearing in NullFields will be sent to the server as
910	// null. It is an error if a field in this list has a non-empty value.
911	// This may be used to include null fields in Patch requests.
912	NullFields []string `json:"-"`
913}
914
915func (s *ClusterOperationStatus) MarshalJSON() ([]byte, error) {
916	type NoMethod ClusterOperationStatus
917	raw := NoMethod(*s)
918	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
919}
920
921// ClusterSelector: A selector that chooses target cluster for jobs
922// based on metadata.
923type ClusterSelector struct {
924	// ClusterLabels: Required. The cluster labels. Cluster must have all
925	// labels to match.
926	ClusterLabels map[string]string `json:"clusterLabels,omitempty"`
927
928	// Zone: Optional. The zone where workflow process executes. This
929	// parameter does not affect the selection of the cluster.If
930	// unspecified, the zone of the first cluster matching the selector is
931	// used.
932	Zone string `json:"zone,omitempty"`
933
934	// ForceSendFields is a list of field names (e.g. "ClusterLabels") to
935	// unconditionally include in API requests. By default, fields with
936	// empty values are omitted from API requests. However, any non-pointer,
937	// non-interface field appearing in ForceSendFields will be sent to the
938	// server regardless of whether the field is empty or not. This may be
939	// used to include empty fields in Patch requests.
940	ForceSendFields []string `json:"-"`
941
942	// NullFields is a list of field names (e.g. "ClusterLabels") to include
943	// in API requests with the JSON null value. By default, fields with
944	// empty values are omitted from API requests. However, any field with
945	// an empty value appearing in NullFields will be sent to the server as
946	// null. It is an error if a field in this list has a non-empty value.
947	// This may be used to include null fields in Patch requests.
948	NullFields []string `json:"-"`
949}
950
951func (s *ClusterSelector) MarshalJSON() ([]byte, error) {
952	type NoMethod ClusterSelector
953	raw := NoMethod(*s)
954	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
955}
956
957// ClusterStatus: The status of a cluster and its instances.
958type ClusterStatus struct {
959	// Detail: Output only. Optional details of cluster's state.
960	Detail string `json:"detail,omitempty"`
961
962	// State: Output only. The cluster's state.
963	//
964	// Possible values:
965	//   "UNKNOWN" - The cluster state is unknown.
966	//   "CREATING" - The cluster is being created and set up. It is not
967	// ready for use.
968	//   "RUNNING" - The cluster is currently running and healthy. It is
969	// ready for use.
970	//   "ERROR" - The cluster encountered an error. It is not ready for
971	// use.
972	//   "DELETING" - The cluster is being deleted. It cannot be used.
973	//   "UPDATING" - The cluster is being updated. It continues to accept
974	// and process jobs.
975	//   "STOPPING" - The cluster is being stopped. It cannot be used.
976	//   "STOPPED" - The cluster is currently stopped. It is not ready for
977	// use.
978	//   "STARTING" - The cluster is being started. It is not ready for use.
979	State string `json:"state,omitempty"`
980
981	// StateStartTime: Output only. Time when this state was entered (see
982	// JSON representation of Timestamp
983	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
984	StateStartTime string `json:"stateStartTime,omitempty"`
985
986	// Substate: Output only. Additional state information that includes
987	// status reported by the agent.
988	//
989	// Possible values:
990	//   "UNSPECIFIED" - The cluster substate is unknown.
991	//   "UNHEALTHY" - The cluster is known to be in an unhealthy state (for
992	// example, critical daemons are not running or HDFS capacity is
993	// exhausted).Applies to RUNNING state.
994	//   "STALE_STATUS" - The agent-reported status is out of date (may
995	// occur if Dataproc loses communication with Agent).Applies to RUNNING
996	// state.
997	Substate string `json:"substate,omitempty"`
998
999	// ForceSendFields is a list of field names (e.g. "Detail") to
1000	// unconditionally include in API requests. By default, fields with
1001	// empty values are omitted from API requests. However, any non-pointer,
1002	// non-interface field appearing in ForceSendFields will be sent to the
1003	// server regardless of whether the field is empty or not. This may be
1004	// used to include empty fields in Patch requests.
1005	ForceSendFields []string `json:"-"`
1006
1007	// NullFields is a list of field names (e.g. "Detail") to include in API
1008	// requests with the JSON null value. By default, fields with empty
1009	// values are omitted from API requests. However, any field with an
1010	// empty value appearing in NullFields will be sent to the server as
1011	// null. It is an error if a field in this list has a non-empty value.
1012	// This may be used to include null fields in Patch requests.
1013	NullFields []string `json:"-"`
1014}
1015
1016func (s *ClusterStatus) MarshalJSON() ([]byte, error) {
1017	type NoMethod ClusterStatus
1018	raw := NoMethod(*s)
1019	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1020}
1021
1022// DiagnoseClusterRequest: A request to collect cluster diagnostic
1023// information.
1024type DiagnoseClusterRequest struct {
1025}
1026
1027// DiagnoseClusterResults: The location of diagnostic output.
1028type DiagnoseClusterResults struct {
1029	// OutputUri: Output only. The Cloud Storage URI of the diagnostic
1030	// output. The output report is a plain text file with a summary of
1031	// collected diagnostics.
1032	OutputUri string `json:"outputUri,omitempty"`
1033
1034	// ForceSendFields is a list of field names (e.g. "OutputUri") to
1035	// unconditionally include in API requests. By default, fields with
1036	// empty values are omitted from API requests. However, any non-pointer,
1037	// non-interface field appearing in ForceSendFields will be sent to the
1038	// server regardless of whether the field is empty or not. This may be
1039	// used to include empty fields in Patch requests.
1040	ForceSendFields []string `json:"-"`
1041
1042	// NullFields is a list of field names (e.g. "OutputUri") to include in
1043	// API requests with the JSON null value. By default, fields with empty
1044	// values are omitted from API requests. However, any field with an
1045	// empty value appearing in NullFields will be sent to the server as
1046	// null. It is an error if a field in this list has a non-empty value.
1047	// This may be used to include null fields in Patch requests.
1048	NullFields []string `json:"-"`
1049}
1050
1051func (s *DiagnoseClusterResults) MarshalJSON() ([]byte, error) {
1052	type NoMethod DiagnoseClusterResults
1053	raw := NoMethod(*s)
1054	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1055}
1056
1057// DiskConfig: Specifies the config of disk options for a group of VM
1058// instances.
1059type DiskConfig struct {
1060	// BootDiskSizeGb: Optional. Size in GB of the boot disk (default is
1061	// 500GB).
1062	BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"`
1063
1064	// BootDiskType: Optional. Type of the boot disk (default is
1065	// "pd-standard"). Valid values: "pd-ssd" (Persistent Disk Solid State
1066	// Drive) or "pd-standard" (Persistent Disk Hard Disk Drive).
1067	BootDiskType string `json:"bootDiskType,omitempty"`
1068
1069	// NumLocalSsds: Number of attached SSDs, from 0 to 4 (default is 0). If
1070	// SSDs are not attached, the boot disk is used to store runtime logs
1071	// and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html)
1072	// data. If one or more SSDs are attached, this runtime bulk data is
1073	// spread across them, and the boot disk contains only basic config and
1074	// installed binaries.
1075	NumLocalSsds int64 `json:"numLocalSsds,omitempty"`
1076
1077	// ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") to
1078	// unconditionally include in API requests. By default, fields with
1079	// empty values are omitted from API requests. However, any non-pointer,
1080	// non-interface field appearing in ForceSendFields will be sent to the
1081	// server regardless of whether the field is empty or not. This may be
1082	// used to include empty fields in Patch requests.
1083	ForceSendFields []string `json:"-"`
1084
1085	// NullFields is a list of field names (e.g. "BootDiskSizeGb") to
1086	// include in API requests with the JSON null value. By default, fields
1087	// with empty values are omitted from API requests. However, any field
1088	// with an empty value appearing in NullFields will be sent to the
1089	// server as null. It is an error if a field in this list has a
1090	// non-empty value. This may be used to include null fields in Patch
1091	// requests.
1092	NullFields []string `json:"-"`
1093}
1094
1095func (s *DiskConfig) MarshalJSON() ([]byte, error) {
1096	type NoMethod DiskConfig
1097	raw := NoMethod(*s)
1098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1099}
1100
1101// Empty: A generic empty message that you can re-use to avoid defining
1102// duplicated empty messages in your APIs. A typical example is to use
1103// it as the request or the response type of an API method. For
1104// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
1105// (google.protobuf.Empty); } The JSON representation for Empty is empty
1106// JSON object {}.
1107type Empty struct {
1108	// ServerResponse contains the HTTP response code and headers from the
1109	// server.
1110	googleapi.ServerResponse `json:"-"`
1111}
1112
1113// EncryptionConfig: Encryption settings for the cluster.
1114type EncryptionConfig struct {
1115	// GcePdKmsKeyName: Optional. The Cloud KMS key name to use for PD disk
1116	// encryption for all instances in the cluster.
1117	GcePdKmsKeyName string `json:"gcePdKmsKeyName,omitempty"`
1118
1119	// ForceSendFields is a list of field names (e.g. "GcePdKmsKeyName") to
1120	// unconditionally include in API requests. By default, fields with
1121	// empty values are omitted from API requests. However, any non-pointer,
1122	// non-interface field appearing in ForceSendFields will be sent to the
1123	// server regardless of whether the field is empty or not. This may be
1124	// used to include empty fields in Patch requests.
1125	ForceSendFields []string `json:"-"`
1126
1127	// NullFields is a list of field names (e.g. "GcePdKmsKeyName") to
1128	// include in API requests with the JSON null value. By default, fields
1129	// with empty values are omitted from API requests. However, any field
1130	// with an empty value appearing in NullFields will be sent to the
1131	// server as null. It is an error if a field in this list has a
1132	// non-empty value. This may be used to include null fields in Patch
1133	// requests.
1134	NullFields []string `json:"-"`
1135}
1136
1137func (s *EncryptionConfig) MarshalJSON() ([]byte, error) {
1138	type NoMethod EncryptionConfig
1139	raw := NoMethod(*s)
1140	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1141}
1142
1143// EndpointConfig: Endpoint config for this cluster
1144type EndpointConfig struct {
1145	// EnableHttpPortAccess: Optional. If true, enable http access to
1146	// specific ports on the cluster from external sources. Defaults to
1147	// false.
1148	EnableHttpPortAccess bool `json:"enableHttpPortAccess,omitempty"`
1149
1150	// HttpPorts: Output only. The map of port descriptions to URLs. Will
1151	// only be populated if enable_http_port_access is true.
1152	HttpPorts map[string]string `json:"httpPorts,omitempty"`
1153
1154	// ForceSendFields is a list of field names (e.g.
1155	// "EnableHttpPortAccess") to unconditionally include in API requests.
1156	// By default, fields with empty values are omitted from API requests.
1157	// However, any non-pointer, non-interface field appearing in
1158	// ForceSendFields will be sent to the server regardless of whether the
1159	// field is empty or not. This may be used to include empty fields in
1160	// Patch requests.
1161	ForceSendFields []string `json:"-"`
1162
1163	// NullFields is a list of field names (e.g. "EnableHttpPortAccess") to
1164	// include in API requests with the JSON null value. By default, fields
1165	// with empty values are omitted from API requests. However, any field
1166	// with an empty value appearing in NullFields will be sent to the
1167	// server as null. It is an error if a field in this list has a
1168	// non-empty value. This may be used to include null fields in Patch
1169	// requests.
1170	NullFields []string `json:"-"`
1171}
1172
1173func (s *EndpointConfig) MarshalJSON() ([]byte, error) {
1174	type NoMethod EndpointConfig
1175	raw := NoMethod(*s)
1176	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1177}
1178
1179// Expr: Represents a textual expression in the Common Expression
1180// Language (CEL) syntax. CEL is a C-like expression language. The
1181// syntax and semantics of CEL are documented at
1182// https://github.com/google/cel-spec.Example (Comparison): title:
1183// "Summary size limit" description: "Determines if a summary is less
1184// than 100 chars" expression: "document.summary.size() < 100" Example
1185// (Equality): title: "Requestor is owner" description: "Determines if
1186// requestor is the document owner" expression: "document.owner ==
1187// request.auth.claims.email" Example (Logic): title: "Public documents"
1188// description: "Determine whether the document should be publicly
1189// visible" expression: "document.type != 'private' && document.type !=
1190// 'internal'" Example (Data Manipulation): title: "Notification string"
1191// description: "Create a notification string with a timestamp."
1192// expression: "'New message received at ' +
1193// string(document.create_time)" The exact variables and functions that
1194// may be referenced within an expression are determined by the service
1195// that evaluates it. See the service documentation for additional
1196// information.
1197type Expr struct {
1198	// Description: Optional. Description of the expression. This is a
1199	// longer text which describes the expression, e.g. when hovered over it
1200	// in a UI.
1201	Description string `json:"description,omitempty"`
1202
1203	// Expression: Textual representation of an expression in Common
1204	// Expression Language syntax.
1205	Expression string `json:"expression,omitempty"`
1206
1207	// Location: Optional. String indicating the location of the expression
1208	// for error reporting, e.g. a file name and a position in the file.
1209	Location string `json:"location,omitempty"`
1210
1211	// Title: Optional. Title for the expression, i.e. a short string
1212	// describing its purpose. This can be used e.g. in UIs which allow to
1213	// enter the expression.
1214	Title string `json:"title,omitempty"`
1215
1216	// ForceSendFields is a list of field names (e.g. "Description") to
1217	// unconditionally include in API requests. By default, fields with
1218	// empty values are omitted from API requests. However, any non-pointer,
1219	// non-interface field appearing in ForceSendFields will be sent to the
1220	// server regardless of whether the field is empty or not. This may be
1221	// used to include empty fields in Patch requests.
1222	ForceSendFields []string `json:"-"`
1223
1224	// NullFields is a list of field names (e.g. "Description") to include
1225	// in API requests with the JSON null value. By default, fields with
1226	// empty values are omitted from API requests. However, any field with
1227	// an empty value appearing in NullFields will be sent to the server as
1228	// null. It is an error if a field in this list has a non-empty value.
1229	// This may be used to include null fields in Patch requests.
1230	NullFields []string `json:"-"`
1231}
1232
1233func (s *Expr) MarshalJSON() ([]byte, error) {
1234	type NoMethod Expr
1235	raw := NoMethod(*s)
1236	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1237}
1238
1239// GceClusterConfig: Common config settings for resources of Compute
1240// Engine cluster instances, applicable to all instances in the cluster.
1241type GceClusterConfig struct {
1242	// InternalIpOnly: Optional. If true, all instances in the cluster will
1243	// only have internal IP addresses. By default, clusters are not
1244	// restricted to internal IP addresses, and will have ephemeral external
1245	// IP addresses assigned to each instance. This internal_ip_only
1246	// restriction can only be enabled for subnetwork enabled networks, and
1247	// all off-cluster dependencies must be configured to be accessible
1248	// without external IP addresses.
1249	InternalIpOnly bool `json:"internalIpOnly,omitempty"`
1250
1251	// Metadata: The Compute Engine metadata entries to add to all instances
1252	// (see Project and instance metadata
1253	// (https://cloud.google.com/compute/docs/storing-retrieving-metadata#pro
1254	// ject_and_instance_metadata)).
1255	Metadata map[string]string `json:"metadata,omitempty"`
1256
1257	// NetworkUri: Optional. The Compute Engine network to be used for
1258	// machine communications. Cannot be specified with subnetwork_uri. If
1259	// neither network_uri nor subnetwork_uri is specified, the "default"
1260	// network of the project is used, if it exists. Cannot be a "Custom
1261	// Subnet Network" (see Using Subnetworks
1262	// (https://cloud.google.com/compute/docs/subnetworks) for more
1263	// information).A full URL, partial URI, or short name are valid.
1264	// Examples:
1265	// https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default projects/[project_id]/regions/global/default
1266	// default
1267	NetworkUri string `json:"networkUri,omitempty"`
1268
1269	// NodeGroupAffinity: Optional. Node Group Affinity for sole-tenant
1270	// clusters.
1271	NodeGroupAffinity *NodeGroupAffinity `json:"nodeGroupAffinity,omitempty"`
1272
1273	// PrivateIpv6GoogleAccess: Optional. The type of IPv6 access for a
1274	// cluster.
1275	//
1276	// Possible values:
1277	//   "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" - If unspecified, Compute
1278	// Engine default behavior will apply, which is the same as
1279	// INHERIT_FROM_SUBNETWORK.
1280	//   "INHERIT_FROM_SUBNETWORK" - Private access to and from Google
1281	// Services configuration inherited from the subnetwork configuration.
1282	// This is the default Compute Engine behavior.
1283	//   "OUTBOUND" - Enables outbound private IPv6 access to Google
1284	// Services from the Dataproc cluster.
1285	//   "BIDIRECTIONAL" - Enables bidirectional private IPv6 access between
1286	// Google Services and the Dataproc cluster.
1287	PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"`
1288
1289	// ReservationAffinity: Optional. Reservation Affinity for consuming
1290	// Zonal reservation.
1291	ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"`
1292
1293	// ServiceAccount: Optional. The Dataproc service account
1294	// (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/
1295	// service-accounts#service_accounts_in_dataproc) (also see VM Data
1296	// Plane identity
1297	// (https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principa
1298	// ls#vm_service_account_data_plane_identity)) used by Dataproc cluster
1299	// VM instances to access Google Cloud Platform services.If not
1300	// specified, the Compute Engine default service account
1301	// (https://cloud.google.com/compute/docs/access/service-accounts#default
1302	// _service_account) is used.
1303	ServiceAccount string `json:"serviceAccount,omitempty"`
1304
1305	// ServiceAccountScopes: Optional. The URIs of service account scopes to
1306	// be included in Compute Engine instances. The following base set of
1307	// scopes is always included:
1308	// https://www.googleapis.com/auth/cloud.useraccounts.readonly
1309	// https://www.googleapis.com/auth/devstorage.read_write
1310	// https://www.googleapis.com/auth/logging.writeIf no scopes are
1311	// specified, the following defaults are also provided:
1312	// https://www.googleapis.com/auth/bigquery
1313	// https://www.googleapis.com/auth/bigtable.admin.table
1314	// https://www.googleapis.com/auth/bigtable.data
1315	// https://www.googleapis.com/auth/devstorage.full_control
1316	ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"`
1317
1318	// SubnetworkUri: Optional. The Compute Engine subnetwork to be used for
1319	// machine communications. Cannot be specified with network_uri.A full
1320	// URL, partial URI, or short name are valid. Examples:
1321	// https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0 projects/[project_id]/regions/us-east1/subnetworks/sub0
1322	// sub0
1323	SubnetworkUri string `json:"subnetworkUri,omitempty"`
1324
1325	// Tags: The Compute Engine tags to add to all instances (see Tagging
1326	// instances
1327	// (https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
1328	Tags []string `json:"tags,omitempty"`
1329
1330	// ZoneUri: Optional. The zone where the Compute Engine cluster will be
1331	// located. On a create request, it is required in the "global" region.
1332	// If omitted in a non-global Dataproc region, the service will pick a
1333	// zone in the corresponding Compute Engine region. On a get request,
1334	// zone will always be present.A full URL, partial URI, or short name
1335	// are valid. Examples:
1336	// https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone] projects/[project_id]/zones/[zone]
1337	// us-central1-f
1338	ZoneUri string `json:"zoneUri,omitempty"`
1339
1340	// ForceSendFields is a list of field names (e.g. "InternalIpOnly") to
1341	// unconditionally include in API requests. By default, fields with
1342	// empty values are omitted from API requests. However, any non-pointer,
1343	// non-interface field appearing in ForceSendFields will be sent to the
1344	// server regardless of whether the field is empty or not. This may be
1345	// used to include empty fields in Patch requests.
1346	ForceSendFields []string `json:"-"`
1347
1348	// NullFields is a list of field names (e.g. "InternalIpOnly") to
1349	// include in API requests with the JSON null value. By default, fields
1350	// with empty values are omitted from API requests. However, any field
1351	// with an empty value appearing in NullFields will be sent to the
1352	// server as null. It is an error if a field in this list has a
1353	// non-empty value. This may be used to include null fields in Patch
1354	// requests.
1355	NullFields []string `json:"-"`
1356}
1357
1358func (s *GceClusterConfig) MarshalJSON() ([]byte, error) {
1359	type NoMethod GceClusterConfig
1360	raw := NoMethod(*s)
1361	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1362}
1363
1364// GetIamPolicyRequest: Request message for GetIamPolicy method.
1365type GetIamPolicyRequest struct {
1366	// Options: OPTIONAL: A GetPolicyOptions object for specifying options
1367	// to GetIamPolicy.
1368	Options *GetPolicyOptions `json:"options,omitempty"`
1369
1370	// ForceSendFields is a list of field names (e.g. "Options") to
1371	// unconditionally include in API requests. By default, fields with
1372	// empty values are omitted from API requests. However, any non-pointer,
1373	// non-interface field appearing in ForceSendFields will be sent to the
1374	// server regardless of whether the field is empty or not. This may be
1375	// used to include empty fields in Patch requests.
1376	ForceSendFields []string `json:"-"`
1377
1378	// NullFields is a list of field names (e.g. "Options") to include in
1379	// API requests with the JSON null value. By default, fields with empty
1380	// values are omitted from API requests. However, any field with an
1381	// empty value appearing in NullFields will be sent to the server as
1382	// null. It is an error if a field in this list has a non-empty value.
1383	// This may be used to include null fields in Patch requests.
1384	NullFields []string `json:"-"`
1385}
1386
1387func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1388	type NoMethod GetIamPolicyRequest
1389	raw := NoMethod(*s)
1390	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1391}
1392
1393// GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
1394type GetPolicyOptions struct {
1395	// RequestedPolicyVersion: Optional. The policy format version to be
1396	// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
1397	// value will be rejected.Requests for policies with any conditional
1398	// bindings must specify version 3. Policies without any conditional
1399	// bindings may specify any valid value or leave the field unset.To
1400	// learn which resources support conditions in their IAM policies, see
1401	// the IAM documentation
1402	// (https://cloud.google.com/iam/help/conditions/resource-policies).
1403	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
1404
1405	// ForceSendFields is a list of field names (e.g.
1406	// "RequestedPolicyVersion") to unconditionally include in API requests.
1407	// By default, fields with empty values are omitted from API requests.
1408	// However, any non-pointer, non-interface field appearing in
1409	// ForceSendFields will be sent to the server regardless of whether the
1410	// field is empty or not. This may be used to include empty fields in
1411	// Patch requests.
1412	ForceSendFields []string `json:"-"`
1413
1414	// NullFields is a list of field names (e.g. "RequestedPolicyVersion")
1415	// to include in API requests with the JSON null value. By default,
1416	// fields with empty values are omitted from API requests. However, any
1417	// field with an empty value appearing in NullFields will be sent to the
1418	// server as null. It is an error if a field in this list has a
1419	// non-empty value. This may be used to include null fields in Patch
1420	// requests.
1421	NullFields []string `json:"-"`
1422}
1423
1424func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
1425	type NoMethod GetPolicyOptions
1426	raw := NoMethod(*s)
1427	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1428}
1429
1430// GkeClusterConfig: The GKE config for this cluster.
1431type GkeClusterConfig struct {
1432	// NamespacedGkeDeploymentTarget: Optional. A target for the deployment.
1433	NamespacedGkeDeploymentTarget *NamespacedGkeDeploymentTarget `json:"namespacedGkeDeploymentTarget,omitempty"`
1434
1435	// ForceSendFields is a list of field names (e.g.
1436	// "NamespacedGkeDeploymentTarget") to unconditionally include in API
1437	// requests. By default, fields with empty values are omitted from API
1438	// requests. However, any non-pointer, non-interface field appearing in
1439	// ForceSendFields will be sent to the server regardless of whether the
1440	// field is empty or not. This may be used to include empty fields in
1441	// Patch requests.
1442	ForceSendFields []string `json:"-"`
1443
1444	// NullFields is a list of field names (e.g.
1445	// "NamespacedGkeDeploymentTarget") to include in API requests with the
1446	// JSON null value. By default, fields with empty values are omitted
1447	// from API requests. However, any field with an empty value appearing
1448	// in NullFields will be sent to the server as null. It is an error if a
1449	// field in this list has a non-empty value. This may be used to include
1450	// null fields in Patch requests.
1451	NullFields []string `json:"-"`
1452}
1453
1454func (s *GkeClusterConfig) MarshalJSON() ([]byte, error) {
1455	type NoMethod GkeClusterConfig
1456	raw := NoMethod(*s)
1457	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1458}
1459
1460// HadoopJob: A Dataproc job for running Apache Hadoop MapReduce
1461// (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop
1462// -mapreduce-client-core/MapReduceTutorial.html) jobs on Apache Hadoop
1463// YARN
1464// (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YA
1465// RN.html).
1466type HadoopJob struct {
1467	// ArchiveUris: Optional. HCFS URIs of archives to be extracted in the
1468	// working directory of Hadoop drivers and tasks. Supported file types:
1469	// .jar, .tar, .tar.gz, .tgz, or .zip.
1470	ArchiveUris []string `json:"archiveUris,omitempty"`
1471
1472	// Args: Optional. The arguments to pass to the driver. Do not include
1473	// arguments, such as -libjars or -Dfoo=bar, that can be set as job
1474	// properties, since a collision may occur that causes an incorrect job
1475	// submission.
1476	Args []string `json:"args,omitempty"`
1477
1478	// FileUris: Optional. HCFS (Hadoop Compatible Filesystem) URIs of files
1479	// to be copied to the working directory of Hadoop drivers and
1480	// distributed tasks. Useful for naively parallel tasks.
1481	FileUris []string `json:"fileUris,omitempty"`
1482
1483	// JarFileUris: Optional. Jar file URIs to add to the CLASSPATHs of the
1484	// Hadoop driver and tasks.
1485	JarFileUris []string `json:"jarFileUris,omitempty"`
1486
1487	// LoggingConfig: Optional. The runtime log config for job execution.
1488	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
1489
1490	// MainClass: The name of the driver's main class. The jar file
1491	// containing the class must be in the default CLASSPATH or specified in
1492	// jar_file_uris.
1493	MainClass string `json:"mainClass,omitempty"`
1494
1495	// MainJarFileUri: The HCFS URI of the jar file containing the main
1496	// class. Examples:
1497	// 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
1498	// 'hdfs:/tmp/test-samples/custom-wordcount.jar'
1499	// 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
1500	MainJarFileUri string `json:"mainJarFileUri,omitempty"`
1501
1502	// Properties: Optional. A mapping of property names to values, used to
1503	// configure Hadoop. Properties that conflict with values set by the
1504	// Dataproc API may be overwritten. Can include properties set in
1505	// /etc/hadoop/conf/*-site and classes in user code.
1506	Properties map[string]string `json:"properties,omitempty"`
1507
1508	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
1509	// unconditionally include in API requests. By default, fields with
1510	// empty values are omitted from API requests. However, any non-pointer,
1511	// non-interface field appearing in ForceSendFields will be sent to the
1512	// server regardless of whether the field is empty or not. This may be
1513	// used to include empty fields in Patch requests.
1514	ForceSendFields []string `json:"-"`
1515
1516	// NullFields is a list of field names (e.g. "ArchiveUris") to include
1517	// in API requests with the JSON null value. By default, fields with
1518	// empty values are omitted from API requests. However, any field with
1519	// an empty value appearing in NullFields will be sent to the server as
1520	// null. It is an error if a field in this list has a non-empty value.
1521	// This may be used to include null fields in Patch requests.
1522	NullFields []string `json:"-"`
1523}
1524
1525func (s *HadoopJob) MarshalJSON() ([]byte, error) {
1526	type NoMethod HadoopJob
1527	raw := NoMethod(*s)
1528	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1529}
1530
1531// HiveJob: A Dataproc job for running Apache Hive
1532// (https://hive.apache.org/) queries on YARN.
1533type HiveJob struct {
1534	// ContinueOnFailure: Optional. Whether to continue executing queries if
1535	// a query fails. The default value is false. Setting to true can be
1536	// useful when executing independent parallel queries.
1537	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
1538
1539	// JarFileUris: Optional. HCFS URIs of jar files to add to the CLASSPATH
1540	// of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive
1541	// SerDes and UDFs.
1542	JarFileUris []string `json:"jarFileUris,omitempty"`
1543
1544	// Properties: Optional. A mapping of property names and values, used to
1545	// configure Hive. Properties that conflict with values set by the
1546	// Dataproc API may be overwritten. Can include properties set in
1547	// /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and
1548	// classes in user code.
1549	Properties map[string]string `json:"properties,omitempty"`
1550
1551	// QueryFileUri: The HCFS URI of the script that contains Hive queries.
1552	QueryFileUri string `json:"queryFileUri,omitempty"`
1553
1554	// QueryList: A list of queries.
1555	QueryList *QueryList `json:"queryList,omitempty"`
1556
1557	// ScriptVariables: Optional. Mapping of query variable names to values
1558	// (equivalent to the Hive command: SET name="value";).
1559	ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
1560
1561	// ForceSendFields is a list of field names (e.g. "ContinueOnFailure")
1562	// to unconditionally include in API requests. By default, fields with
1563	// empty values are omitted from API requests. However, any non-pointer,
1564	// non-interface field appearing in ForceSendFields will be sent to the
1565	// server regardless of whether the field is empty or not. This may be
1566	// used to include empty fields in Patch requests.
1567	ForceSendFields []string `json:"-"`
1568
1569	// NullFields is a list of field names (e.g. "ContinueOnFailure") to
1570	// include in API requests with the JSON null value. By default, fields
1571	// with empty values are omitted from API requests. However, any field
1572	// with an empty value appearing in NullFields will be sent to the
1573	// server as null. It is an error if a field in this list has a
1574	// non-empty value. This may be used to include null fields in Patch
1575	// requests.
1576	NullFields []string `json:"-"`
1577}
1578
1579func (s *HiveJob) MarshalJSON() ([]byte, error) {
1580	type NoMethod HiveJob
1581	raw := NoMethod(*s)
1582	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1583}
1584
1585// InstanceGroupAutoscalingPolicyConfig: Configuration for the size
1586// bounds of an instance group, including its proportional size to other
1587// groups.
1588type InstanceGroupAutoscalingPolicyConfig struct {
1589	// MaxInstances: Optional. Maximum number of instances for this group.
1590	// Required for primary workers. Note that by default, clusters will not
1591	// use secondary workers. Required for secondary workers if the minimum
1592	// secondary instances is set.Primary workers - Bounds: [min_instances,
1593	// ). Required. Secondary workers - Bounds: [min_instances, ). Default:
1594	// 0.
1595	MaxInstances int64 `json:"maxInstances,omitempty"`
1596
1597	// MinInstances: Optional. Minimum number of instances for this
1598	// group.Primary workers - Bounds: 2, max_instances. Default: 2.
1599	// Secondary workers - Bounds: 0, max_instances. Default: 0.
1600	MinInstances int64 `json:"minInstances,omitempty"`
1601
1602	// Weight: Optional. Weight for the instance group, which is used to
1603	// determine the fraction of total workers in the cluster from this
1604	// instance group. For example, if primary workers have weight 2, and
1605	// secondary workers have weight 1, the cluster will have approximately
1606	// 2 primary workers for each secondary worker.The cluster may not reach
1607	// the specified balance if constrained by min/max bounds or other
1608	// autoscaling settings. For example, if max_instances for secondary
1609	// workers is 0, then only primary workers will be added. The cluster
1610	// can also be out of balance when created.If weight is not set on any
1611	// instance group, the cluster will default to equal weight for all
1612	// groups: the cluster will attempt to maintain an equal number of
1613	// workers in each group within the configured size bounds for each
1614	// group. If weight is set for one group only, the cluster will default
1615	// to zero weight on the unset group. For example if weight is set only
1616	// on primary workers, the cluster will use primary workers only and no
1617	// secondary workers.
1618	Weight int64 `json:"weight,omitempty"`
1619
1620	// ForceSendFields is a list of field names (e.g. "MaxInstances") to
1621	// unconditionally include in API requests. By default, fields with
1622	// empty values are omitted from API requests. However, any non-pointer,
1623	// non-interface field appearing in ForceSendFields will be sent to the
1624	// server regardless of whether the field is empty or not. This may be
1625	// used to include empty fields in Patch requests.
1626	ForceSendFields []string `json:"-"`
1627
1628	// NullFields is a list of field names (e.g. "MaxInstances") to include
1629	// in API requests with the JSON null value. By default, fields with
1630	// empty values are omitted from API requests. However, any field with
1631	// an empty value appearing in NullFields will be sent to the server as
1632	// null. It is an error if a field in this list has a non-empty value.
1633	// This may be used to include null fields in Patch requests.
1634	NullFields []string `json:"-"`
1635}
1636
1637func (s *InstanceGroupAutoscalingPolicyConfig) MarshalJSON() ([]byte, error) {
1638	type NoMethod InstanceGroupAutoscalingPolicyConfig
1639	raw := NoMethod(*s)
1640	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1641}
1642
1643// InstanceGroupConfig: The config settings for Compute Engine resources
1644// in an instance group, such as a master or worker group.
1645type InstanceGroupConfig struct {
1646	// Accelerators: Optional. The Compute Engine accelerator configuration
1647	// for these instances.
1648	Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"`
1649
1650	// DiskConfig: Optional. Disk option config settings.
1651	DiskConfig *DiskConfig `json:"diskConfig,omitempty"`
1652
1653	// ImageUri: Optional. The Compute Engine image resource used for
1654	// cluster instances.The URI can represent an image or image
1655	// family.Image examples:
1656	// https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id] projects/[project_id]/global/images/[image-id] image-idImage family examples. Dataproc will use the most recent image from the family: https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name] projects/[project_id]/global/images/family/[custom-image-family-name]If the URI is unspecified, it will be inferred from SoftwareConfig.image_version or the system
1657	// default.
1658	ImageUri string `json:"imageUri,omitempty"`
1659
1660	// InstanceNames: Output only. The list of instance names. Dataproc
1661	// derives the names from cluster_name, num_instances, and the instance
1662	// group.
1663	InstanceNames []string `json:"instanceNames,omitempty"`
1664
1665	// InstanceReferences: Output only. List of references to Compute Engine
1666	// instances.
1667	InstanceReferences []*InstanceReference `json:"instanceReferences,omitempty"`
1668
1669	// IsPreemptible: Output only. Specifies that this instance group
1670	// contains preemptible instances.
1671	IsPreemptible bool `json:"isPreemptible,omitempty"`
1672
1673	// MachineTypeUri: Optional. The Compute Engine machine type used for
1674	// cluster instances.A full URL, partial URI, or short name are valid.
1675	// Examples:
1676	// https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2 n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto Zone Placement (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement) feature, you must use the short name of the machine type resource, for example,
1677	// n1-standard-2.
1678	MachineTypeUri string `json:"machineTypeUri,omitempty"`
1679
1680	// ManagedGroupConfig: Output only. The config for Compute Engine
1681	// Instance Group Manager that manages this group. This is only used for
1682	// preemptible instance groups.
1683	ManagedGroupConfig *ManagedGroupConfig `json:"managedGroupConfig,omitempty"`
1684
1685	// MinCpuPlatform: Specifies the minimum cpu platform for the Instance
1686	// Group. See Dataproc -> Minimum CPU Platform
1687	// (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-
1688	// cpu).
1689	MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
1690
1691	// NumInstances: Optional. The number of VM instances in the instance
1692	// group. For master instance groups, must be set to 1.
1693	NumInstances int64 `json:"numInstances,omitempty"`
1694
1695	// Preemptibility: Optional. Specifies the preemptibility of the
1696	// instance group.The default value for master and worker groups is
1697	// NON_PREEMPTIBLE. This default cannot be changed.The default value for
1698	// secondary instances is PREEMPTIBLE.
1699	//
1700	// Possible values:
1701	//   "PREEMPTIBILITY_UNSPECIFIED" - Preemptibility is unspecified, the
1702	// system will choose the appropriate setting for each instance group.
1703	//   "NON_PREEMPTIBLE" - Instances are non-preemptible.This option is
1704	// allowed for all instance groups and is the only valid value for
1705	// Master and Worker instance groups.
1706	//   "PREEMPTIBLE" - Instances are preemptible.This option is allowed
1707	// only for secondary worker groups.
1708	Preemptibility string `json:"preemptibility,omitempty"`
1709
1710	// ForceSendFields is a list of field names (e.g. "Accelerators") to
1711	// unconditionally include in API requests. By default, fields with
1712	// empty values are omitted from API requests. However, any non-pointer,
1713	// non-interface field appearing in ForceSendFields will be sent to the
1714	// server regardless of whether the field is empty or not. This may be
1715	// used to include empty fields in Patch requests.
1716	ForceSendFields []string `json:"-"`
1717
1718	// NullFields is a list of field names (e.g. "Accelerators") to include
1719	// in API requests with the JSON null value. By default, fields with
1720	// empty values are omitted from API requests. However, any field with
1721	// an empty value appearing in NullFields will be sent to the server as
1722	// null. It is an error if a field in this list has a non-empty value.
1723	// This may be used to include null fields in Patch requests.
1724	NullFields []string `json:"-"`
1725}
1726
1727func (s *InstanceGroupConfig) MarshalJSON() ([]byte, error) {
1728	type NoMethod InstanceGroupConfig
1729	raw := NoMethod(*s)
1730	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1731}
1732
1733// InstanceReference: A reference to a Compute Engine instance.
1734type InstanceReference struct {
1735	// InstanceId: The unique identifier of the Compute Engine instance.
1736	InstanceId string `json:"instanceId,omitempty"`
1737
1738	// InstanceName: The user-friendly name of the Compute Engine instance.
1739	InstanceName string `json:"instanceName,omitempty"`
1740
1741	// ForceSendFields is a list of field names (e.g. "InstanceId") to
1742	// unconditionally include in API requests. By default, fields with
1743	// empty values are omitted from API requests. However, any non-pointer,
1744	// non-interface field appearing in ForceSendFields will be sent to the
1745	// server regardless of whether the field is empty or not. This may be
1746	// used to include empty fields in Patch requests.
1747	ForceSendFields []string `json:"-"`
1748
1749	// NullFields is a list of field names (e.g. "InstanceId") to include in
1750	// API requests with the JSON null value. By default, fields with empty
1751	// values are omitted from API requests. However, any field with an
1752	// empty value appearing in NullFields will be sent to the server as
1753	// null. It is an error if a field in this list has a non-empty value.
1754	// This may be used to include null fields in Patch requests.
1755	NullFields []string `json:"-"`
1756}
1757
1758func (s *InstanceReference) MarshalJSON() ([]byte, error) {
1759	type NoMethod InstanceReference
1760	raw := NoMethod(*s)
1761	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1762}
1763
1764// InstantiateWorkflowTemplateRequest: A request to instantiate a
1765// workflow template.
1766type InstantiateWorkflowTemplateRequest struct {
1767	// InstanceId: Deprecated. Please use request_id field instead.
1768	InstanceId string `json:"instanceId,omitempty"`
1769
1770	// Parameters: Optional. Map from parameter names to values that should
1771	// be used for those parameters. Values may not exceed 1000 characters.
1772	Parameters map[string]string `json:"parameters,omitempty"`
1773
1774	// RequestId: Optional. A tag that prevents multiple concurrent workflow
1775	// instances with the same tag from running. This mitigates risk of
1776	// concurrent instances started due to retries.It is recommended to
1777	// always set this value to a UUID
1778	// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag
1779	// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
1780	// and hyphens (-). The maximum length is 40 characters.
1781	RequestId string `json:"requestId,omitempty"`
1782
1783	// Version: Optional. The version of workflow template to instantiate.
1784	// If specified, the workflow will be instantiated only if the current
1785	// version of the workflow template has the supplied version.This option
1786	// cannot be used to instantiate a previous version of workflow
1787	// template.
1788	Version int64 `json:"version,omitempty"`
1789
1790	// ForceSendFields is a list of field names (e.g. "InstanceId") to
1791	// unconditionally include in API requests. By default, fields with
1792	// empty values are omitted from API requests. However, any non-pointer,
1793	// non-interface field appearing in ForceSendFields will be sent to the
1794	// server regardless of whether the field is empty or not. This may be
1795	// used to include empty fields in Patch requests.
1796	ForceSendFields []string `json:"-"`
1797
1798	// NullFields is a list of field names (e.g. "InstanceId") to include in
1799	// API requests with the JSON null value. By default, fields with empty
1800	// values are omitted from API requests. However, any field with an
1801	// empty value appearing in NullFields will be sent to the server as
1802	// null. It is an error if a field in this list has a non-empty value.
1803	// This may be used to include null fields in Patch requests.
1804	NullFields []string `json:"-"`
1805}
1806
1807func (s *InstantiateWorkflowTemplateRequest) MarshalJSON() ([]byte, error) {
1808	type NoMethod InstantiateWorkflowTemplateRequest
1809	raw := NoMethod(*s)
1810	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1811}
1812
1813// Job: A Dataproc job resource.
1814type Job struct {
1815	// Done: Output only. Indicates whether the job is completed. If the
1816	// value is false, the job is still in progress. If true, the job is
1817	// completed, and status.state field will indicate if it was successful,
1818	// failed, or cancelled.
1819	Done bool `json:"done,omitempty"`
1820
1821	// DriverControlFilesUri: Output only. If present, the location of
1822	// miscellaneous control files which may be used as part of job setup
1823	// and handling. If not present, control files may be placed in the same
1824	// location as driver_output_uri.
1825	DriverControlFilesUri string `json:"driverControlFilesUri,omitempty"`
1826
1827	// DriverOutputResourceUri: Output only. A URI pointing to the location
1828	// of the stdout of the job's driver program.
1829	DriverOutputResourceUri string `json:"driverOutputResourceUri,omitempty"`
1830
1831	// HadoopJob: Optional. Job is a Hadoop job.
1832	HadoopJob *HadoopJob `json:"hadoopJob,omitempty"`
1833
1834	// HiveJob: Optional. Job is a Hive job.
1835	HiveJob *HiveJob `json:"hiveJob,omitempty"`
1836
1837	// JobUuid: Output only. A UUID that uniquely identifies a job within
1838	// the project over time. This is in contrast to a user-settable
1839	// reference.job_id that may be reused over time.
1840	JobUuid string `json:"jobUuid,omitempty"`
1841
1842	// Labels: Optional. The labels to associate with this job. Label keys
1843	// must contain 1 to 63 characters, and must conform to RFC 1035
1844	// (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty,
1845	// but, if present, must contain 1 to 63 characters, and must conform to
1846	// RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32
1847	// labels can be associated with a job.
1848	Labels map[string]string `json:"labels,omitempty"`
1849
1850	// PigJob: Optional. Job is a Pig job.
1851	PigJob *PigJob `json:"pigJob,omitempty"`
1852
1853	// Placement: Required. Job information, including how, when, and where
1854	// to run the job.
1855	Placement *JobPlacement `json:"placement,omitempty"`
1856
1857	// PrestoJob: Optional. Job is a Presto job.
1858	PrestoJob *PrestoJob `json:"prestoJob,omitempty"`
1859
1860	// PysparkJob: Optional. Job is a PySpark job.
1861	PysparkJob *PySparkJob `json:"pysparkJob,omitempty"`
1862
1863	// Reference: Optional. The fully qualified reference to the job, which
1864	// can be used to obtain the equivalent REST path of the job resource.
1865	// If this property is not specified when a job is created, the server
1866	// generates a job_id.
1867	Reference *JobReference `json:"reference,omitempty"`
1868
1869	// Scheduling: Optional. Job scheduling configuration.
1870	Scheduling *JobScheduling `json:"scheduling,omitempty"`
1871
1872	// SparkJob: Optional. Job is a Spark job.
1873	SparkJob *SparkJob `json:"sparkJob,omitempty"`
1874
1875	// SparkRJob: Optional. Job is a SparkR job.
1876	SparkRJob *SparkRJob `json:"sparkRJob,omitempty"`
1877
1878	// SparkSqlJob: Optional. Job is a SparkSql job.
1879	SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"`
1880
1881	// Status: Output only. The job status. Additional application-specific
1882	// status information may be contained in the type_job and
1883	// yarn_applications fields.
1884	Status *JobStatus `json:"status,omitempty"`
1885
1886	// StatusHistory: Output only. The previous job status.
1887	StatusHistory []*JobStatus `json:"statusHistory,omitempty"`
1888
1889	// SubmittedBy: Output only. The email address of the user submitting
1890	// the job. For jobs submitted on the cluster, the address is
1891	// username@hostname.
1892	SubmittedBy string `json:"submittedBy,omitempty"`
1893
1894	// YarnApplications: Output only. The collection of YARN applications
1895	// spun up by this job.Beta Feature: This report is available for
1896	// testing purposes only. It may be changed before final release.
1897	YarnApplications []*YarnApplication `json:"yarnApplications,omitempty"`
1898
1899	// ServerResponse contains the HTTP response code and headers from the
1900	// server.
1901	googleapi.ServerResponse `json:"-"`
1902
1903	// ForceSendFields is a list of field names (e.g. "Done") to
1904	// unconditionally include in API requests. By default, fields with
1905	// empty values are omitted from API requests. However, any non-pointer,
1906	// non-interface field appearing in ForceSendFields will be sent to the
1907	// server regardless of whether the field is empty or not. This may be
1908	// used to include empty fields in Patch requests.
1909	ForceSendFields []string `json:"-"`
1910
1911	// NullFields is a list of field names (e.g. "Done") to include in API
1912	// requests with the JSON null value. By default, fields with empty
1913	// values are omitted from API requests. However, any field with an
1914	// empty value appearing in NullFields will be sent to the server as
1915	// null. It is an error if a field in this list has a non-empty value.
1916	// This may be used to include null fields in Patch requests.
1917	NullFields []string `json:"-"`
1918}
1919
1920func (s *Job) MarshalJSON() ([]byte, error) {
1921	type NoMethod Job
1922	raw := NoMethod(*s)
1923	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1924}
1925
1926// JobMetadata: Job Operation metadata.
1927type JobMetadata struct {
1928	// JobId: Output only. The job id.
1929	JobId string `json:"jobId,omitempty"`
1930
1931	// OperationType: Output only. Operation type.
1932	OperationType string `json:"operationType,omitempty"`
1933
1934	// StartTime: Output only. Job submission time.
1935	StartTime string `json:"startTime,omitempty"`
1936
1937	// Status: Output only. Most recent job status.
1938	Status *JobStatus `json:"status,omitempty"`
1939
1940	// ForceSendFields is a list of field names (e.g. "JobId") to
1941	// unconditionally include in API requests. By default, fields with
1942	// empty values are omitted from API requests. However, any non-pointer,
1943	// non-interface field appearing in ForceSendFields will be sent to the
1944	// server regardless of whether the field is empty or not. This may be
1945	// used to include empty fields in Patch requests.
1946	ForceSendFields []string `json:"-"`
1947
1948	// NullFields is a list of field names (e.g. "JobId") to include in API
1949	// requests with the JSON null value. By default, fields with empty
1950	// values are omitted from API requests. However, any field with an
1951	// empty value appearing in NullFields will be sent to the server as
1952	// null. It is an error if a field in this list has a non-empty value.
1953	// This may be used to include null fields in Patch requests.
1954	NullFields []string `json:"-"`
1955}
1956
1957func (s *JobMetadata) MarshalJSON() ([]byte, error) {
1958	type NoMethod JobMetadata
1959	raw := NoMethod(*s)
1960	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1961}
1962
1963// JobPlacement: Dataproc job config.
1964type JobPlacement struct {
1965	// ClusterName: Required. The name of the cluster where the job will be
1966	// submitted.
1967	ClusterName string `json:"clusterName,omitempty"`
1968
1969	// ClusterUuid: Output only. A cluster UUID generated by the Dataproc
1970	// service when the job is submitted.
1971	ClusterUuid string `json:"clusterUuid,omitempty"`
1972
1973	// ForceSendFields is a list of field names (e.g. "ClusterName") to
1974	// unconditionally include in API requests. By default, fields with
1975	// empty values are omitted from API requests. However, any non-pointer,
1976	// non-interface field appearing in ForceSendFields will be sent to the
1977	// server regardless of whether the field is empty or not. This may be
1978	// used to include empty fields in Patch requests.
1979	ForceSendFields []string `json:"-"`
1980
1981	// NullFields is a list of field names (e.g. "ClusterName") to include
1982	// in API requests with the JSON null value. By default, fields with
1983	// empty values are omitted from API requests. However, any field with
1984	// an empty value appearing in NullFields will be sent to the server as
1985	// null. It is an error if a field in this list has a non-empty value.
1986	// This may be used to include null fields in Patch requests.
1987	NullFields []string `json:"-"`
1988}
1989
1990func (s *JobPlacement) MarshalJSON() ([]byte, error) {
1991	type NoMethod JobPlacement
1992	raw := NoMethod(*s)
1993	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1994}
1995
1996// JobReference: Encapsulates the full scoping used to reference a job.
1997type JobReference struct {
1998	// JobId: Optional. The job ID, which must be unique within the project.
1999	// The ID must contain only letters (a-z, A-Z), numbers (0-9),
2000	// underscores (_), or hyphens (-). The maximum length is 100
2001	// characters.If not specified by the caller, the job ID will be
2002	// provided by the server.
2003	JobId string `json:"jobId,omitempty"`
2004
2005	// ProjectId: Optional. The ID of the Google Cloud Platform project that
2006	// the job belongs to. If specified, must match the request project ID.
2007	ProjectId string `json:"projectId,omitempty"`
2008
2009	// ForceSendFields is a list of field names (e.g. "JobId") to
2010	// unconditionally include in API requests. By default, fields with
2011	// empty values are omitted from API requests. However, any non-pointer,
2012	// non-interface field appearing in ForceSendFields will be sent to the
2013	// server regardless of whether the field is empty or not. This may be
2014	// used to include empty fields in Patch requests.
2015	ForceSendFields []string `json:"-"`
2016
2017	// NullFields is a list of field names (e.g. "JobId") to include in API
2018	// requests with the JSON null value. By default, fields with empty
2019	// values are omitted from API requests. However, any field with an
2020	// empty value appearing in NullFields will be sent to the server as
2021	// null. It is an error if a field in this list has a non-empty value.
2022	// This may be used to include null fields in Patch requests.
2023	NullFields []string `json:"-"`
2024}
2025
2026func (s *JobReference) MarshalJSON() ([]byte, error) {
2027	type NoMethod JobReference
2028	raw := NoMethod(*s)
2029	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2030}
2031
2032// JobScheduling: Job scheduling options.
2033type JobScheduling struct {
2034	// MaxFailuresPerHour: Optional. Maximum number of times per hour a
2035	// driver may be restarted as a result of driver terminating with
2036	// non-zero code before job is reported failed.A job may be reported as
2037	// thrashing if driver exits with non-zero code 4 times within 10 minute
2038	// window.Maximum value is 10.
2039	MaxFailuresPerHour int64 `json:"maxFailuresPerHour,omitempty"`
2040
2041	// MaxFailuresTotal: Optional. Maximum number of times in total a driver
2042	// may be restarted as a result of driver exiting with non-zero code
2043	// before job is reported failed. Maximum value is 240
2044	MaxFailuresTotal int64 `json:"maxFailuresTotal,omitempty"`
2045
2046	// ForceSendFields is a list of field names (e.g. "MaxFailuresPerHour")
2047	// to unconditionally include in API requests. By default, fields with
2048	// empty values are omitted from API requests. However, any non-pointer,
2049	// non-interface field appearing in ForceSendFields will be sent to the
2050	// server regardless of whether the field is empty or not. This may be
2051	// used to include empty fields in Patch requests.
2052	ForceSendFields []string `json:"-"`
2053
2054	// NullFields is a list of field names (e.g. "MaxFailuresPerHour") to
2055	// include in API requests with the JSON null value. By default, fields
2056	// with empty values are omitted from API requests. However, any field
2057	// with an empty value appearing in NullFields will be sent to the
2058	// server as null. It is an error if a field in this list has a
2059	// non-empty value. This may be used to include null fields in Patch
2060	// requests.
2061	NullFields []string `json:"-"`
2062}
2063
2064func (s *JobScheduling) MarshalJSON() ([]byte, error) {
2065	type NoMethod JobScheduling
2066	raw := NoMethod(*s)
2067	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2068}
2069
2070// JobStatus: Dataproc job status.
2071type JobStatus struct {
2072	// Details: Output only. Optional Job state details, such as an error
2073	// description if the state is ERROR.
2074	Details string `json:"details,omitempty"`
2075
2076	// State: Output only. A state message specifying the overall job state.
2077	//
2078	// Possible values:
2079	//   "STATE_UNSPECIFIED" - The job state is unknown.
2080	//   "PENDING" - The job is pending; it has been submitted, but is not
2081	// yet running.
2082	//   "SETUP_DONE" - Job has been received by the service and completed
2083	// initial setup; it will soon be submitted to the cluster.
2084	//   "RUNNING" - The job is running on the cluster.
2085	//   "CANCEL_PENDING" - A CancelJob request has been received, but is
2086	// pending.
2087	//   "CANCEL_STARTED" - Transient in-flight resources have been
2088	// canceled, and the request to cancel the running job has been issued
2089	// to the cluster.
2090	//   "CANCELLED" - The job cancellation was successful.
2091	//   "DONE" - The job has completed successfully.
2092	//   "ERROR" - The job has completed, but encountered an error.
2093	//   "ATTEMPT_FAILURE" - Job attempt has failed. The detail field
2094	// contains failure details for this attempt.Applies to restartable jobs
2095	// only.
2096	State string `json:"state,omitempty"`
2097
2098	// StateStartTime: Output only. The time when this state was entered.
2099	StateStartTime string `json:"stateStartTime,omitempty"`
2100
2101	// Substate: Output only. Additional state information, which includes
2102	// status reported by the agent.
2103	//
2104	// Possible values:
2105	//   "UNSPECIFIED" - The job substate is unknown.
2106	//   "SUBMITTED" - The Job is submitted to the agent.Applies to RUNNING
2107	// state.
2108	//   "QUEUED" - The Job has been received and is awaiting execution (it
2109	// may be waiting for a condition to be met). See the "details" field
2110	// for the reason for the delay.Applies to RUNNING state.
2111	//   "STALE_STATUS" - The agent-reported status is out of date, which
2112	// may be caused by a loss of communication between the agent and
2113	// Dataproc. If the agent does not send a timely update, the job will
2114	// fail.Applies to RUNNING state.
2115	Substate string `json:"substate,omitempty"`
2116
2117	// ForceSendFields is a list of field names (e.g. "Details") to
2118	// unconditionally include in API requests. By default, fields with
2119	// empty values are omitted from API requests. However, any non-pointer,
2120	// non-interface field appearing in ForceSendFields will be sent to the
2121	// server regardless of whether the field is empty or not. This may be
2122	// used to include empty fields in Patch requests.
2123	ForceSendFields []string `json:"-"`
2124
2125	// NullFields is a list of field names (e.g. "Details") to include in
2126	// API requests with the JSON null value. By default, fields with empty
2127	// values are omitted from API requests. However, any field with an
2128	// empty value appearing in NullFields will be sent to the server as
2129	// null. It is an error if a field in this list has a non-empty value.
2130	// This may be used to include null fields in Patch requests.
2131	NullFields []string `json:"-"`
2132}
2133
2134func (s *JobStatus) MarshalJSON() ([]byte, error) {
2135	type NoMethod JobStatus
2136	raw := NoMethod(*s)
2137	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2138}
2139
2140// KerberosConfig: Specifies Kerberos related configuration.
2141type KerberosConfig struct {
2142	// CrossRealmTrustAdminServer: Optional. The admin server (IP or
2143	// hostname) for the remote trusted realm in a cross realm trust
2144	// relationship.
2145	CrossRealmTrustAdminServer string `json:"crossRealmTrustAdminServer,omitempty"`
2146
2147	// CrossRealmTrustKdc: Optional. The KDC (IP or hostname) for the remote
2148	// trusted realm in a cross realm trust relationship.
2149	CrossRealmTrustKdc string `json:"crossRealmTrustKdc,omitempty"`
2150
2151	// CrossRealmTrustRealm: Optional. The remote realm the Dataproc
2152	// on-cluster KDC will trust, should the user enable cross realm trust.
2153	CrossRealmTrustRealm string `json:"crossRealmTrustRealm,omitempty"`
2154
2155	// CrossRealmTrustSharedPasswordUri: Optional. The Cloud Storage URI of
2156	// a KMS encrypted file containing the shared password between the
2157	// on-cluster Kerberos realm and the remote trusted realm, in a cross
2158	// realm trust relationship.
2159	CrossRealmTrustSharedPasswordUri string `json:"crossRealmTrustSharedPasswordUri,omitempty"`
2160
2161	// EnableKerberos: Optional. Flag to indicate whether to Kerberize the
2162	// cluster (default: false). Set this field to true to enable Kerberos
2163	// on a cluster.
2164	EnableKerberos bool `json:"enableKerberos,omitempty"`
2165
2166	// KdcDbKeyUri: Optional. The Cloud Storage URI of a KMS encrypted file
2167	// containing the master key of the KDC database.
2168	KdcDbKeyUri string `json:"kdcDbKeyUri,omitempty"`
2169
2170	// KeyPasswordUri: Optional. The Cloud Storage URI of a KMS encrypted
2171	// file containing the password to the user provided key. For the
2172	// self-signed certificate, this password is generated by Dataproc.
2173	KeyPasswordUri string `json:"keyPasswordUri,omitempty"`
2174
2175	// KeystorePasswordUri: Optional. The Cloud Storage URI of a KMS
2176	// encrypted file containing the password to the user provided keystore.
2177	// For the self-signed certificate, this password is generated by
2178	// Dataproc.
2179	KeystorePasswordUri string `json:"keystorePasswordUri,omitempty"`
2180
2181	// KeystoreUri: Optional. The Cloud Storage URI of the keystore file
2182	// used for SSL encryption. If not provided, Dataproc will provide a
2183	// self-signed certificate.
2184	KeystoreUri string `json:"keystoreUri,omitempty"`
2185
2186	// KmsKeyUri: Optional. The uri of the KMS key used to encrypt various
2187	// sensitive files.
2188	KmsKeyUri string `json:"kmsKeyUri,omitempty"`
2189
2190	// Realm: Optional. The name of the on-cluster Kerberos realm. If not
2191	// specified, the uppercased domain of hostnames will be the realm.
2192	Realm string `json:"realm,omitempty"`
2193
2194	// RootPrincipalPasswordUri: Optional. The Cloud Storage URI of a KMS
2195	// encrypted file containing the root principal password.
2196	RootPrincipalPasswordUri string `json:"rootPrincipalPasswordUri,omitempty"`
2197
2198	// TgtLifetimeHours: Optional. The lifetime of the ticket granting
2199	// ticket, in hours. If not specified, or user specifies 0, then default
2200	// value 10 will be used.
2201	TgtLifetimeHours int64 `json:"tgtLifetimeHours,omitempty"`
2202
2203	// TruststorePasswordUri: Optional. The Cloud Storage URI of a KMS
2204	// encrypted file containing the password to the user provided
2205	// truststore. For the self-signed certificate, this password is
2206	// generated by Dataproc.
2207	TruststorePasswordUri string `json:"truststorePasswordUri,omitempty"`
2208
2209	// TruststoreUri: Optional. The Cloud Storage URI of the truststore file
2210	// used for SSL encryption. If not provided, Dataproc will provide a
2211	// self-signed certificate.
2212	TruststoreUri string `json:"truststoreUri,omitempty"`
2213
2214	// ForceSendFields is a list of field names (e.g.
2215	// "CrossRealmTrustAdminServer") to unconditionally include in API
2216	// requests. By default, fields with empty values are omitted from API
2217	// requests. However, any non-pointer, non-interface field appearing in
2218	// ForceSendFields will be sent to the server regardless of whether the
2219	// field is empty or not. This may be used to include empty fields in
2220	// Patch requests.
2221	ForceSendFields []string `json:"-"`
2222
2223	// NullFields is a list of field names (e.g.
2224	// "CrossRealmTrustAdminServer") to include in API requests with the
2225	// JSON null value. By default, fields with empty values are omitted
2226	// from API requests. However, any field with an empty value appearing
2227	// in NullFields will be sent to the server as null. It is an error if a
2228	// field in this list has a non-empty value. This may be used to include
2229	// null fields in Patch requests.
2230	NullFields []string `json:"-"`
2231}
2232
2233func (s *KerberosConfig) MarshalJSON() ([]byte, error) {
2234	type NoMethod KerberosConfig
2235	raw := NoMethod(*s)
2236	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2237}
2238
2239// LifecycleConfig: Specifies the cluster auto-delete schedule
2240// configuration.
2241type LifecycleConfig struct {
2242	// AutoDeleteTime: Optional. The time when cluster will be auto-deleted.
2243	// (see JSON representation of Timestamp
2244	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
2245	AutoDeleteTime string `json:"autoDeleteTime,omitempty"`
2246
2247	// AutoDeleteTtl: Optional. The lifetime duration of cluster. The
2248	// cluster will be auto-deleted at the end of this period. Minimum value
2249	// is 10 minutes; maximum value is 14 days (see JSON representation of
2250	// Duration
2251	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
2252	AutoDeleteTtl string `json:"autoDeleteTtl,omitempty"`
2253
2254	// IdleDeleteTtl: Optional. The duration to keep the cluster alive while
2255	// idling (when no jobs are running). Passing this threshold will cause
2256	// the cluster to be deleted. Minimum value is 5 minutes; maximum value
2257	// is 14 days (see JSON representation of Duration
2258	// (https://developers.google.com/protocol-buffers/docs/proto3#json).
2259	IdleDeleteTtl string `json:"idleDeleteTtl,omitempty"`
2260
2261	// IdleStartTime: Output only. The time when cluster became idle (most
2262	// recent job finished) and became eligible for deletion due to idleness
2263	// (see JSON representation of Timestamp
2264	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
2265	IdleStartTime string `json:"idleStartTime,omitempty"`
2266
2267	// ForceSendFields is a list of field names (e.g. "AutoDeleteTime") to
2268	// unconditionally include in API requests. By default, fields with
2269	// empty values are omitted from API requests. However, any non-pointer,
2270	// non-interface field appearing in ForceSendFields will be sent to the
2271	// server regardless of whether the field is empty or not. This may be
2272	// used to include empty fields in Patch requests.
2273	ForceSendFields []string `json:"-"`
2274
2275	// NullFields is a list of field names (e.g. "AutoDeleteTime") to
2276	// include in API requests with the JSON null value. By default, fields
2277	// with empty values are omitted from API requests. However, any field
2278	// with an empty value appearing in NullFields will be sent to the
2279	// server as null. It is an error if a field in this list has a
2280	// non-empty value. This may be used to include null fields in Patch
2281	// requests.
2282	NullFields []string `json:"-"`
2283}
2284
2285func (s *LifecycleConfig) MarshalJSON() ([]byte, error) {
2286	type NoMethod LifecycleConfig
2287	raw := NoMethod(*s)
2288	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2289}
2290
2291// ListAutoscalingPoliciesResponse: A response to a request to list
2292// autoscaling policies in a project.
2293type ListAutoscalingPoliciesResponse struct {
2294	// NextPageToken: Output only. This token is included in the response if
2295	// there are more results to fetch.
2296	NextPageToken string `json:"nextPageToken,omitempty"`
2297
2298	// Policies: Output only. Autoscaling policies list.
2299	Policies []*AutoscalingPolicy `json:"policies,omitempty"`
2300
2301	// ServerResponse contains the HTTP response code and headers from the
2302	// server.
2303	googleapi.ServerResponse `json:"-"`
2304
2305	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2306	// unconditionally include in API requests. By default, fields with
2307	// empty values are omitted from API requests. However, any non-pointer,
2308	// non-interface field appearing in ForceSendFields will be sent to the
2309	// server regardless of whether the field is empty or not. This may be
2310	// used to include empty fields in Patch requests.
2311	ForceSendFields []string `json:"-"`
2312
2313	// NullFields is a list of field names (e.g. "NextPageToken") to include
2314	// in API requests with the JSON null value. By default, fields with
2315	// empty values are omitted from API requests. However, any field with
2316	// an empty value appearing in NullFields will be sent to the server as
2317	// null. It is an error if a field in this list has a non-empty value.
2318	// This may be used to include null fields in Patch requests.
2319	NullFields []string `json:"-"`
2320}
2321
2322func (s *ListAutoscalingPoliciesResponse) MarshalJSON() ([]byte, error) {
2323	type NoMethod ListAutoscalingPoliciesResponse
2324	raw := NoMethod(*s)
2325	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2326}
2327
2328// ListClustersResponse: The list of all clusters in a project.
2329type ListClustersResponse struct {
2330	// Clusters: Output only. The clusters in the project.
2331	Clusters []*Cluster `json:"clusters,omitempty"`
2332
2333	// NextPageToken: Output only. This token is included in the response if
2334	// there are more results to fetch. To fetch additional results, provide
2335	// this value as the page_token in a subsequent ListClustersRequest.
2336	NextPageToken string `json:"nextPageToken,omitempty"`
2337
2338	// ServerResponse contains the HTTP response code and headers from the
2339	// server.
2340	googleapi.ServerResponse `json:"-"`
2341
2342	// ForceSendFields is a list of field names (e.g. "Clusters") to
2343	// unconditionally include in API requests. By default, fields with
2344	// empty values are omitted from API requests. However, any non-pointer,
2345	// non-interface field appearing in ForceSendFields will be sent to the
2346	// server regardless of whether the field is empty or not. This may be
2347	// used to include empty fields in Patch requests.
2348	ForceSendFields []string `json:"-"`
2349
2350	// NullFields is a list of field names (e.g. "Clusters") to include in
2351	// API requests with the JSON null value. By default, fields with empty
2352	// values are omitted from API requests. However, any field with an
2353	// empty value appearing in NullFields will be sent to the server as
2354	// null. It is an error if a field in this list has a non-empty value.
2355	// This may be used to include null fields in Patch requests.
2356	NullFields []string `json:"-"`
2357}
2358
2359func (s *ListClustersResponse) MarshalJSON() ([]byte, error) {
2360	type NoMethod ListClustersResponse
2361	raw := NoMethod(*s)
2362	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2363}
2364
2365// ListJobsResponse: A list of jobs in a project.
2366type ListJobsResponse struct {
2367	// Jobs: Output only. Jobs list.
2368	Jobs []*Job `json:"jobs,omitempty"`
2369
2370	// NextPageToken: Optional. This token is included in the response if
2371	// there are more results to fetch. To fetch additional results, provide
2372	// this value as the page_token in a subsequent ListJobsRequest.
2373	NextPageToken string `json:"nextPageToken,omitempty"`
2374
2375	// ServerResponse contains the HTTP response code and headers from the
2376	// server.
2377	googleapi.ServerResponse `json:"-"`
2378
2379	// ForceSendFields is a list of field names (e.g. "Jobs") to
2380	// unconditionally include in API requests. By default, fields with
2381	// empty values are omitted from API requests. However, any non-pointer,
2382	// non-interface field appearing in ForceSendFields will be sent to the
2383	// server regardless of whether the field is empty or not. This may be
2384	// used to include empty fields in Patch requests.
2385	ForceSendFields []string `json:"-"`
2386
2387	// NullFields is a list of field names (e.g. "Jobs") to include in API
2388	// requests with the JSON null value. By default, fields with empty
2389	// values are omitted from API requests. However, any field with an
2390	// empty value appearing in NullFields will be sent to the server as
2391	// null. It is an error if a field in this list has a non-empty value.
2392	// This may be used to include null fields in Patch requests.
2393	NullFields []string `json:"-"`
2394}
2395
2396func (s *ListJobsResponse) MarshalJSON() ([]byte, error) {
2397	type NoMethod ListJobsResponse
2398	raw := NoMethod(*s)
2399	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2400}
2401
2402// ListOperationsResponse: The response message for
2403// Operations.ListOperations.
2404type ListOperationsResponse struct {
2405	// NextPageToken: The standard List next-page token.
2406	NextPageToken string `json:"nextPageToken,omitempty"`
2407
2408	// Operations: A list of operations that matches the specified filter in
2409	// the request.
2410	Operations []*Operation `json:"operations,omitempty"`
2411
2412	// ServerResponse contains the HTTP response code and headers from the
2413	// server.
2414	googleapi.ServerResponse `json:"-"`
2415
2416	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2417	// unconditionally include in API requests. By default, fields with
2418	// empty values are omitted from API requests. However, any non-pointer,
2419	// non-interface field appearing in ForceSendFields will be sent to the
2420	// server regardless of whether the field is empty or not. This may be
2421	// used to include empty fields in Patch requests.
2422	ForceSendFields []string `json:"-"`
2423
2424	// NullFields is a list of field names (e.g. "NextPageToken") to include
2425	// in API requests with the JSON null value. By default, fields with
2426	// empty values are omitted from API requests. However, any field with
2427	// an empty value appearing in NullFields will be sent to the server as
2428	// null. It is an error if a field in this list has a non-empty value.
2429	// This may be used to include null fields in Patch requests.
2430	NullFields []string `json:"-"`
2431}
2432
2433func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
2434	type NoMethod ListOperationsResponse
2435	raw := NoMethod(*s)
2436	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2437}
2438
2439// ListWorkflowTemplatesResponse: A response to a request to list
2440// workflow templates in a project.
2441type ListWorkflowTemplatesResponse struct {
2442	// NextPageToken: Output only. This token is included in the response if
2443	// there are more results to fetch. To fetch additional results, provide
2444	// this value as the page_token in a subsequent
2445	// ListWorkflowTemplatesRequest.
2446	NextPageToken string `json:"nextPageToken,omitempty"`
2447
2448	// Templates: Output only. WorkflowTemplates list.
2449	Templates []*WorkflowTemplate `json:"templates,omitempty"`
2450
2451	// ServerResponse contains the HTTP response code and headers from the
2452	// server.
2453	googleapi.ServerResponse `json:"-"`
2454
2455	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2456	// unconditionally include in API requests. By default, fields with
2457	// empty values are omitted from API requests. However, any non-pointer,
2458	// non-interface field appearing in ForceSendFields will be sent to the
2459	// server regardless of whether the field is empty or not. This may be
2460	// used to include empty fields in Patch requests.
2461	ForceSendFields []string `json:"-"`
2462
2463	// NullFields is a list of field names (e.g. "NextPageToken") to include
2464	// in API requests with the JSON null value. By default, fields with
2465	// empty values are omitted from API requests. However, any field with
2466	// an empty value appearing in NullFields will be sent to the server as
2467	// null. It is an error if a field in this list has a non-empty value.
2468	// This may be used to include null fields in Patch requests.
2469	NullFields []string `json:"-"`
2470}
2471
2472func (s *ListWorkflowTemplatesResponse) MarshalJSON() ([]byte, error) {
2473	type NoMethod ListWorkflowTemplatesResponse
2474	raw := NoMethod(*s)
2475	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2476}
2477
2478// LoggingConfig: The runtime logging config of the job.
2479type LoggingConfig struct {
2480	// DriverLogLevels: The per-package log levels for the driver. This may
2481	// include "root" package name to configure rootLogger. Examples:
2482	// 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
2483	DriverLogLevels map[string]string `json:"driverLogLevels,omitempty"`
2484
2485	// ForceSendFields is a list of field names (e.g. "DriverLogLevels") to
2486	// unconditionally include in API requests. By default, fields with
2487	// empty values are omitted from API requests. However, any non-pointer,
2488	// non-interface field appearing in ForceSendFields will be sent to the
2489	// server regardless of whether the field is empty or not. This may be
2490	// used to include empty fields in Patch requests.
2491	ForceSendFields []string `json:"-"`
2492
2493	// NullFields is a list of field names (e.g. "DriverLogLevels") to
2494	// include in API requests with the JSON null value. By default, fields
2495	// with empty values are omitted from API requests. However, any field
2496	// with an empty value appearing in NullFields will be sent to the
2497	// server as null. It is an error if a field in this list has a
2498	// non-empty value. This may be used to include null fields in Patch
2499	// requests.
2500	NullFields []string `json:"-"`
2501}
2502
2503func (s *LoggingConfig) MarshalJSON() ([]byte, error) {
2504	type NoMethod LoggingConfig
2505	raw := NoMethod(*s)
2506	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2507}
2508
2509// ManagedCluster: Cluster that is managed by the workflow.
2510type ManagedCluster struct {
2511	// ClusterName: Required. The cluster name prefix. A unique cluster name
2512	// will be formed by appending a random suffix.The name must contain
2513	// only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must
2514	// begin with a letter. Cannot begin or end with hyphen. Must consist of
2515	// between 2 and 35 characters.
2516	ClusterName string `json:"clusterName,omitempty"`
2517
2518	// Config: Required. The cluster configuration.
2519	Config *ClusterConfig `json:"config,omitempty"`
2520
2521	// Labels: Optional. The labels to associate with this cluster.Label
2522	// keys must be between 1 and 63 characters long, and must conform to
2523	// the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}Label values
2524	// must be between 1 and 63 characters long, and must conform to the
2525	// following PCRE regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more
2526	// than 32 labels can be associated with a given cluster.
2527	Labels map[string]string `json:"labels,omitempty"`
2528
2529	// ForceSendFields is a list of field names (e.g. "ClusterName") to
2530	// unconditionally include in API requests. By default, fields with
2531	// empty values are omitted from API requests. However, any non-pointer,
2532	// non-interface field appearing in ForceSendFields will be sent to the
2533	// server regardless of whether the field is empty or not. This may be
2534	// used to include empty fields in Patch requests.
2535	ForceSendFields []string `json:"-"`
2536
2537	// NullFields is a list of field names (e.g. "ClusterName") to include
2538	// in API requests with the JSON null value. By default, fields with
2539	// empty values are omitted from API requests. However, any field with
2540	// an empty value appearing in NullFields will be sent to the server as
2541	// null. It is an error if a field in this list has a non-empty value.
2542	// This may be used to include null fields in Patch requests.
2543	NullFields []string `json:"-"`
2544}
2545
2546func (s *ManagedCluster) MarshalJSON() ([]byte, error) {
2547	type NoMethod ManagedCluster
2548	raw := NoMethod(*s)
2549	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2550}
2551
2552// ManagedGroupConfig: Specifies the resources used to actively manage
2553// an instance group.
2554type ManagedGroupConfig struct {
2555	// InstanceGroupManagerName: Output only. The name of the Instance Group
2556	// Manager for this group.
2557	InstanceGroupManagerName string `json:"instanceGroupManagerName,omitempty"`
2558
2559	// InstanceTemplateName: Output only. The name of the Instance Template
2560	// used for the Managed Instance Group.
2561	InstanceTemplateName string `json:"instanceTemplateName,omitempty"`
2562
2563	// ForceSendFields is a list of field names (e.g.
2564	// "InstanceGroupManagerName") to unconditionally include in API
2565	// requests. By default, fields with empty values are omitted from API
2566	// requests. However, any non-pointer, non-interface field appearing in
2567	// ForceSendFields will be sent to the server regardless of whether the
2568	// field is empty or not. This may be used to include empty fields in
2569	// Patch requests.
2570	ForceSendFields []string `json:"-"`
2571
2572	// NullFields is a list of field names (e.g. "InstanceGroupManagerName")
2573	// to include in API requests with the JSON null value. By default,
2574	// fields with empty values are omitted from API requests. However, any
2575	// field with an empty value appearing in NullFields will be sent to the
2576	// server as null. It is an error if a field in this list has a
2577	// non-empty value. This may be used to include null fields in Patch
2578	// requests.
2579	NullFields []string `json:"-"`
2580}
2581
2582func (s *ManagedGroupConfig) MarshalJSON() ([]byte, error) {
2583	type NoMethod ManagedGroupConfig
2584	raw := NoMethod(*s)
2585	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2586}
2587
2588// MetastoreConfig: Specifies a Metastore configuration.
2589type MetastoreConfig struct {
2590	// DataprocMetastoreService: Required. Resource name of an existing
2591	// Dataproc Metastore service.Example:
2592	// projects/[project_id]/locations/[dataproc_region]/services/[service-na
2593	// me]
2594	DataprocMetastoreService string `json:"dataprocMetastoreService,omitempty"`
2595
2596	// ForceSendFields is a list of field names (e.g.
2597	// "DataprocMetastoreService") to unconditionally include in API
2598	// requests. By default, fields with empty values are omitted from API
2599	// requests. However, any non-pointer, non-interface field appearing in
2600	// ForceSendFields will be sent to the server regardless of whether the
2601	// field is empty or not. This may be used to include empty fields in
2602	// Patch requests.
2603	ForceSendFields []string `json:"-"`
2604
2605	// NullFields is a list of field names (e.g. "DataprocMetastoreService")
2606	// to include in API requests with the JSON null value. By default,
2607	// fields with empty values are omitted from API requests. However, any
2608	// field with an empty value appearing in NullFields will be sent to the
2609	// server as null. It is an error if a field in this list has a
2610	// non-empty value. This may be used to include null fields in Patch
2611	// requests.
2612	NullFields []string `json:"-"`
2613}
2614
2615func (s *MetastoreConfig) MarshalJSON() ([]byte, error) {
2616	type NoMethod MetastoreConfig
2617	raw := NoMethod(*s)
2618	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2619}
2620
2621// NamespacedGkeDeploymentTarget: A full, namespace-isolated deployment
2622// target for an existing GKE cluster.
2623type NamespacedGkeDeploymentTarget struct {
2624	// ClusterNamespace: Optional. A namespace within the GKE cluster to
2625	// deploy into.
2626	ClusterNamespace string `json:"clusterNamespace,omitempty"`
2627
2628	// TargetGkeCluster: Optional. The target GKE cluster to deploy to.
2629	// Format:
2630	// 'projects/{project}/locations/{location}/clusters/{cluster_id}'
2631	TargetGkeCluster string `json:"targetGkeCluster,omitempty"`
2632
2633	// ForceSendFields is a list of field names (e.g. "ClusterNamespace") to
2634	// unconditionally include in API requests. By default, fields with
2635	// empty values are omitted from API requests. However, any non-pointer,
2636	// non-interface field appearing in ForceSendFields will be sent to the
2637	// server regardless of whether the field is empty or not. This may be
2638	// used to include empty fields in Patch requests.
2639	ForceSendFields []string `json:"-"`
2640
2641	// NullFields is a list of field names (e.g. "ClusterNamespace") to
2642	// include in API requests with the JSON null value. By default, fields
2643	// with empty values are omitted from API requests. However, any field
2644	// with an empty value appearing in NullFields will be sent to the
2645	// server as null. It is an error if a field in this list has a
2646	// non-empty value. This may be used to include null fields in Patch
2647	// requests.
2648	NullFields []string `json:"-"`
2649}
2650
2651func (s *NamespacedGkeDeploymentTarget) MarshalJSON() ([]byte, error) {
2652	type NoMethod NamespacedGkeDeploymentTarget
2653	raw := NoMethod(*s)
2654	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2655}
2656
2657// NodeGroupAffinity: Node Group Affinity for clusters using sole-tenant
2658// node groups.
2659type NodeGroupAffinity struct {
2660	// NodeGroupUri: Required. The URI of a sole-tenant node group resource
2661	// (https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
2662	// that the cluster will be created on.A full URL, partial URI, or node
2663	// group name are valid. Examples:
2664	// https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1 projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1
2665	// node-group-1
2666	NodeGroupUri string `json:"nodeGroupUri,omitempty"`
2667
2668	// ForceSendFields is a list of field names (e.g. "NodeGroupUri") to
2669	// unconditionally include in API requests. By default, fields with
2670	// empty values are omitted from API requests. However, any non-pointer,
2671	// non-interface field appearing in ForceSendFields will be sent to the
2672	// server regardless of whether the field is empty or not. This may be
2673	// used to include empty fields in Patch requests.
2674	ForceSendFields []string `json:"-"`
2675
2676	// NullFields is a list of field names (e.g. "NodeGroupUri") to include
2677	// in API requests with the JSON null value. By default, fields with
2678	// empty values are omitted from API requests. However, any field with
2679	// an empty value appearing in NullFields will be sent to the server as
2680	// null. It is an error if a field in this list has a non-empty value.
2681	// This may be used to include null fields in Patch requests.
2682	NullFields []string `json:"-"`
2683}
2684
2685func (s *NodeGroupAffinity) MarshalJSON() ([]byte, error) {
2686	type NoMethod NodeGroupAffinity
2687	raw := NoMethod(*s)
2688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2689}
2690
2691// NodeInitializationAction: Specifies an executable to run on a fully
2692// configured node and a timeout period for executable completion.
2693type NodeInitializationAction struct {
2694	// ExecutableFile: Required. Cloud Storage URI of executable file.
2695	ExecutableFile string `json:"executableFile,omitempty"`
2696
2697	// ExecutionTimeout: Optional. Amount of time executable has to
2698	// complete. Default is 10 minutes (see JSON representation of Duration
2699	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).Clu
2700	// ster creation fails with an explanatory error message (the name of
2701	// the executable that caused the error and the exceeded timeout period)
2702	// if the executable is not completed at end of the timeout period.
2703	ExecutionTimeout string `json:"executionTimeout,omitempty"`
2704
2705	// ForceSendFields is a list of field names (e.g. "ExecutableFile") to
2706	// unconditionally include in API requests. By default, fields with
2707	// empty values are omitted from API requests. However, any non-pointer,
2708	// non-interface field appearing in ForceSendFields will be sent to the
2709	// server regardless of whether the field is empty or not. This may be
2710	// used to include empty fields in Patch requests.
2711	ForceSendFields []string `json:"-"`
2712
2713	// NullFields is a list of field names (e.g. "ExecutableFile") to
2714	// include in API requests with the JSON null value. By default, fields
2715	// with empty values are omitted from API requests. However, any field
2716	// with an empty value appearing in NullFields will be sent to the
2717	// server as null. It is an error if a field in this list has a
2718	// non-empty value. This may be used to include null fields in Patch
2719	// requests.
2720	NullFields []string `json:"-"`
2721}
2722
2723func (s *NodeInitializationAction) MarshalJSON() ([]byte, error) {
2724	type NoMethod NodeInitializationAction
2725	raw := NoMethod(*s)
2726	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2727}
2728
2729// Operation: This resource represents a long-running operation that is
2730// the result of a network API call.
2731type Operation struct {
2732	// Done: If the value is false, it means the operation is still in
2733	// progress. If true, the operation is completed, and either error or
2734	// response is available.
2735	Done bool `json:"done,omitempty"`
2736
2737	// Error: The error result of the operation in case of failure or
2738	// cancellation.
2739	Error *Status `json:"error,omitempty"`
2740
2741	// Metadata: Service-specific metadata associated with the operation. It
2742	// typically contains progress information and common metadata such as
2743	// create time. Some services might not provide such metadata. Any
2744	// method that returns a long-running operation should document the
2745	// metadata type, if any.
2746	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2747
2748	// Name: The server-assigned name, which is only unique within the same
2749	// service that originally returns it. If you use the default HTTP
2750	// mapping, the name should be a resource name ending with
2751	// operations/{unique_id}.
2752	Name string `json:"name,omitempty"`
2753
2754	// Response: The normal response of the operation in case of success. If
2755	// the original method returns no data on success, such as Delete, the
2756	// response is google.protobuf.Empty. If the original method is standard
2757	// Get/Create/Update, the response should be the resource. For other
2758	// methods, the response should have the type XxxResponse, where Xxx is
2759	// the original method name. For example, if the original method name is
2760	// TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
2761	Response googleapi.RawMessage `json:"response,omitempty"`
2762
2763	// ServerResponse contains the HTTP response code and headers from the
2764	// server.
2765	googleapi.ServerResponse `json:"-"`
2766
2767	// ForceSendFields is a list of field names (e.g. "Done") to
2768	// unconditionally include in API requests. By default, fields with
2769	// empty values are omitted from API requests. However, any non-pointer,
2770	// non-interface field appearing in ForceSendFields will be sent to the
2771	// server regardless of whether the field is empty or not. This may be
2772	// used to include empty fields in Patch requests.
2773	ForceSendFields []string `json:"-"`
2774
2775	// NullFields is a list of field names (e.g. "Done") to include in API
2776	// requests with the JSON null value. By default, fields with empty
2777	// values are omitted from API requests. However, any field with an
2778	// empty value appearing in NullFields will be sent to the server as
2779	// null. It is an error if a field in this list has a non-empty value.
2780	// This may be used to include null fields in Patch requests.
2781	NullFields []string `json:"-"`
2782}
2783
2784func (s *Operation) MarshalJSON() ([]byte, error) {
2785	type NoMethod Operation
2786	raw := NoMethod(*s)
2787	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2788}
2789
2790// OrderedJob: A job executed by the workflow.
2791type OrderedJob struct {
2792	// HadoopJob: Optional. Job is a Hadoop job.
2793	HadoopJob *HadoopJob `json:"hadoopJob,omitempty"`
2794
2795	// HiveJob: Optional. Job is a Hive job.
2796	HiveJob *HiveJob `json:"hiveJob,omitempty"`
2797
2798	// Labels: Optional. The labels to associate with this job.Label keys
2799	// must be between 1 and 63 characters long, and must conform to the
2800	// following regular expression: \p{Ll}\p{Lo}{0,62}Label values must be
2801	// between 1 and 63 characters long, and must conform to the following
2802	// regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 32 labels
2803	// can be associated with a given job.
2804	Labels map[string]string `json:"labels,omitempty"`
2805
2806	// PigJob: Optional. Job is a Pig job.
2807	PigJob *PigJob `json:"pigJob,omitempty"`
2808
2809	// PrerequisiteStepIds: Optional. The optional list of prerequisite job
2810	// step_ids. If not specified, the job will start at the beginning of
2811	// workflow.
2812	PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"`
2813
2814	// PrestoJob: Optional. Job is a Presto job.
2815	PrestoJob *PrestoJob `json:"prestoJob,omitempty"`
2816
2817	// PysparkJob: Optional. Job is a PySpark job.
2818	PysparkJob *PySparkJob `json:"pysparkJob,omitempty"`
2819
2820	// Scheduling: Optional. Job scheduling configuration.
2821	Scheduling *JobScheduling `json:"scheduling,omitempty"`
2822
2823	// SparkJob: Optional. Job is a Spark job.
2824	SparkJob *SparkJob `json:"sparkJob,omitempty"`
2825
2826	// SparkRJob: Optional. Job is a SparkR job.
2827	SparkRJob *SparkRJob `json:"sparkRJob,omitempty"`
2828
2829	// SparkSqlJob: Optional. Job is a SparkSql job.
2830	SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"`
2831
2832	// StepId: Required. The step id. The id must be unique among all jobs
2833	// within the template.The step id is used as prefix for job id, as job
2834	// goog-dataproc-workflow-step-id label, and in prerequisiteStepIds
2835	// field from other steps.The id must contain only letters (a-z, A-Z),
2836	// numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end
2837	// with underscore or hyphen. Must consist of between 3 and 50
2838	// characters.
2839	StepId string `json:"stepId,omitempty"`
2840
2841	// ForceSendFields is a list of field names (e.g. "HadoopJob") to
2842	// unconditionally include in API requests. By default, fields with
2843	// empty values are omitted from API requests. However, any non-pointer,
2844	// non-interface field appearing in ForceSendFields will be sent to the
2845	// server regardless of whether the field is empty or not. This may be
2846	// used to include empty fields in Patch requests.
2847	ForceSendFields []string `json:"-"`
2848
2849	// NullFields is a list of field names (e.g. "HadoopJob") to include in
2850	// API requests with the JSON null value. By default, fields with empty
2851	// values are omitted from API requests. However, any field with an
2852	// empty value appearing in NullFields will be sent to the server as
2853	// null. It is an error if a field in this list has a non-empty value.
2854	// This may be used to include null fields in Patch requests.
2855	NullFields []string `json:"-"`
2856}
2857
2858func (s *OrderedJob) MarshalJSON() ([]byte, error) {
2859	type NoMethod OrderedJob
2860	raw := NoMethod(*s)
2861	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2862}
2863
2864// ParameterValidation: Configuration for parameter validation.
2865type ParameterValidation struct {
2866	// Regex: Validation based on regular expressions.
2867	Regex *RegexValidation `json:"regex,omitempty"`
2868
2869	// Values: Validation based on a list of allowed values.
2870	Values *ValueValidation `json:"values,omitempty"`
2871
2872	// ForceSendFields is a list of field names (e.g. "Regex") to
2873	// unconditionally include in API requests. By default, fields with
2874	// empty values are omitted from API requests. However, any non-pointer,
2875	// non-interface field appearing in ForceSendFields will be sent to the
2876	// server regardless of whether the field is empty or not. This may be
2877	// used to include empty fields in Patch requests.
2878	ForceSendFields []string `json:"-"`
2879
2880	// NullFields is a list of field names (e.g. "Regex") to include in API
2881	// requests with the JSON null value. By default, fields with empty
2882	// values are omitted from API requests. However, any field with an
2883	// empty value appearing in NullFields will be sent to the server as
2884	// null. It is an error if a field in this list has a non-empty value.
2885	// This may be used to include null fields in Patch requests.
2886	NullFields []string `json:"-"`
2887}
2888
2889func (s *ParameterValidation) MarshalJSON() ([]byte, error) {
2890	type NoMethod ParameterValidation
2891	raw := NoMethod(*s)
2892	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2893}
2894
2895// PigJob: A Dataproc job for running Apache Pig
2896// (https://pig.apache.org/) queries on YARN.
2897type PigJob struct {
2898	// ContinueOnFailure: Optional. Whether to continue executing queries if
2899	// a query fails. The default value is false. Setting to true can be
2900	// useful when executing independent parallel queries.
2901	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
2902
2903	// JarFileUris: Optional. HCFS URIs of jar files to add to the CLASSPATH
2904	// of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig
2905	// UDFs.
2906	JarFileUris []string `json:"jarFileUris,omitempty"`
2907
2908	// LoggingConfig: Optional. The runtime log config for job execution.
2909	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
2910
2911	// Properties: Optional. A mapping of property names to values, used to
2912	// configure Pig. Properties that conflict with values set by the
2913	// Dataproc API may be overwritten. Can include properties set in
2914	// /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and
2915	// classes in user code.
2916	Properties map[string]string `json:"properties,omitempty"`
2917
2918	// QueryFileUri: The HCFS URI of the script that contains the Pig
2919	// queries.
2920	QueryFileUri string `json:"queryFileUri,omitempty"`
2921
2922	// QueryList: A list of queries.
2923	QueryList *QueryList `json:"queryList,omitempty"`
2924
2925	// ScriptVariables: Optional. Mapping of query variable names to values
2926	// (equivalent to the Pig command: name=[value]).
2927	ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
2928
2929	// ForceSendFields is a list of field names (e.g. "ContinueOnFailure")
2930	// to unconditionally include in API requests. By default, fields with
2931	// empty values are omitted from API requests. However, any non-pointer,
2932	// non-interface field appearing in ForceSendFields will be sent to the
2933	// server regardless of whether the field is empty or not. This may be
2934	// used to include empty fields in Patch requests.
2935	ForceSendFields []string `json:"-"`
2936
2937	// NullFields is a list of field names (e.g. "ContinueOnFailure") to
2938	// include in API requests with the JSON null value. By default, fields
2939	// with empty values are omitted from API requests. However, any field
2940	// with an empty value appearing in NullFields will be sent to the
2941	// server as null. It is an error if a field in this list has a
2942	// non-empty value. This may be used to include null fields in Patch
2943	// requests.
2944	NullFields []string `json:"-"`
2945}
2946
2947func (s *PigJob) MarshalJSON() ([]byte, error) {
2948	type NoMethod PigJob
2949	raw := NoMethod(*s)
2950	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2951}
2952
2953// Policy: An Identity and Access Management (IAM) policy, which
2954// specifies access controls for Google Cloud resources.A Policy is a
2955// collection of bindings. A binding binds one or more members to a
2956// single role. Members can be user accounts, service accounts, Google
2957// groups, and domains (such as G Suite). A role is a named list of
2958// permissions; each role can be an IAM predefined role or a
2959// user-created custom role.For some types of Google Cloud resources, a
2960// binding can also specify a condition, which is a logical expression
2961// that allows access to a resource only if the expression evaluates to
2962// true. A condition can add constraints based on attributes of the
2963// request, the resource, or both. To learn which resources support
2964// conditions in their IAM policies, see the IAM documentation
2965// (https://cloud.google.com/iam/help/conditions/resource-policies).JSON
2966// example: { "bindings": [ { "role":
2967// "roles/resourcemanager.organizationAdmin", "members": [
2968// "user:mike@example.com", "group:admins@example.com",
2969// "domain:google.com",
2970// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, {
2971// "role": "roles/resourcemanager.organizationViewer", "members": [
2972// "user:eve@example.com" ], "condition": { "title": "expirable access",
2973// "description": "Does not grant access after Sep 2020", "expression":
2974// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ],
2975// "etag": "BwWWja0YfJA=", "version": 3 } YAML example: bindings: -
2976// members: - user:mike@example.com - group:admins@example.com -
2977// domain:google.com -
2978// serviceAccount:my-project-id@appspot.gserviceaccount.com role:
2979// roles/resourcemanager.organizationAdmin - members: -
2980// user:eve@example.com role: roles/resourcemanager.organizationViewer
2981// condition: title: expirable access description: Does not grant access
2982// after Sep 2020 expression: request.time <
2983// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version:
2984// 3 For a description of IAM and its features, see the IAM
2985// documentation (https://cloud.google.com/iam/docs/).
2986type Policy struct {
2987	// Bindings: Associates a list of members to a role. Optionally, may
2988	// specify a condition that determines how and when the bindings are
2989	// applied. Each of the bindings must contain at least one member.
2990	Bindings []*Binding `json:"bindings,omitempty"`
2991
2992	// Etag: etag is used for optimistic concurrency control as a way to
2993	// help prevent simultaneous updates of a policy from overwriting each
2994	// other. It is strongly suggested that systems make use of the etag in
2995	// the read-modify-write cycle to perform policy updates in order to
2996	// avoid race conditions: An etag is returned in the response to
2997	// getIamPolicy, and systems are expected to put that etag in the
2998	// request to setIamPolicy to ensure that their change will be applied
2999	// to the same version of the policy.Important: If you use IAM
3000	// Conditions, you must include the etag field whenever you call
3001	// setIamPolicy. If you omit this field, then IAM allows you to
3002	// overwrite a version 3 policy with a version 1 policy, and all of the
3003	// conditions in the version 3 policy are lost.
3004	Etag string `json:"etag,omitempty"`
3005
3006	// Version: Specifies the format of the policy.Valid values are 0, 1,
3007	// and 3. Requests that specify an invalid value are rejected.Any
3008	// operation that affects conditional role bindings must specify version
3009	// 3. This requirement applies to the following operations: Getting a
3010	// policy that includes a conditional role binding Adding a conditional
3011	// role binding to a policy Changing a conditional role binding in a
3012	// policy Removing any role binding, with or without a condition, from a
3013	// policy that includes conditionsImportant: If you use IAM Conditions,
3014	// you must include the etag field whenever you call setIamPolicy. If
3015	// you omit this field, then IAM allows you to overwrite a version 3
3016	// policy with a version 1 policy, and all of the conditions in the
3017	// version 3 policy are lost.If a policy does not include any
3018	// conditions, operations on that policy may specify any valid version
3019	// or leave the field unset.To learn which resources support conditions
3020	// in their IAM policies, see the IAM documentation
3021	// (https://cloud.google.com/iam/help/conditions/resource-policies).
3022	Version int64 `json:"version,omitempty"`
3023
3024	// ServerResponse contains the HTTP response code and headers from the
3025	// server.
3026	googleapi.ServerResponse `json:"-"`
3027
3028	// ForceSendFields is a list of field names (e.g. "Bindings") to
3029	// unconditionally include in API requests. By default, fields with
3030	// empty values are omitted from API requests. However, any non-pointer,
3031	// non-interface field appearing in ForceSendFields will be sent to the
3032	// server regardless of whether the field is empty or not. This may be
3033	// used to include empty fields in Patch requests.
3034	ForceSendFields []string `json:"-"`
3035
3036	// NullFields is a list of field names (e.g. "Bindings") to include in
3037	// API requests with the JSON null value. By default, fields with empty
3038	// values are omitted from API requests. However, any field with an
3039	// empty value appearing in NullFields will be sent to the server as
3040	// null. It is an error if a field in this list has a non-empty value.
3041	// This may be used to include null fields in Patch requests.
3042	NullFields []string `json:"-"`
3043}
3044
3045func (s *Policy) MarshalJSON() ([]byte, error) {
3046	type NoMethod Policy
3047	raw := NoMethod(*s)
3048	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3049}
3050
3051// PrestoJob: A Dataproc job for running Presto (https://prestosql.io/)
3052// queries. IMPORTANT: The Dataproc Presto Optional Component
3053// (https://cloud.google.com/dataproc/docs/concepts/components/presto)
3054// must be enabled when the cluster is created to submit a Presto job to
3055// the cluster.
3056type PrestoJob struct {
3057	// ClientTags: Optional. Presto client tags to attach to this query
3058	ClientTags []string `json:"clientTags,omitempty"`
3059
3060	// ContinueOnFailure: Optional. Whether to continue executing queries if
3061	// a query fails. The default value is false. Setting to true can be
3062	// useful when executing independent parallel queries.
3063	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
3064
3065	// LoggingConfig: Optional. The runtime log config for job execution.
3066	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3067
3068	// OutputFormat: Optional. The format in which query output will be
3069	// displayed. See the Presto documentation for supported output formats
3070	OutputFormat string `json:"outputFormat,omitempty"`
3071
3072	// Properties: Optional. A mapping of property names to values. Used to
3073	// set Presto session properties
3074	// (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to
3075	// using the --session flag in the Presto CLI
3076	Properties map[string]string `json:"properties,omitempty"`
3077
3078	// QueryFileUri: The HCFS URI of the script that contains SQL queries.
3079	QueryFileUri string `json:"queryFileUri,omitempty"`
3080
3081	// QueryList: A list of queries.
3082	QueryList *QueryList `json:"queryList,omitempty"`
3083
3084	// ForceSendFields is a list of field names (e.g. "ClientTags") to
3085	// unconditionally include in API requests. By default, fields with
3086	// empty values are omitted from API requests. However, any non-pointer,
3087	// non-interface field appearing in ForceSendFields will be sent to the
3088	// server regardless of whether the field is empty or not. This may be
3089	// used to include empty fields in Patch requests.
3090	ForceSendFields []string `json:"-"`
3091
3092	// NullFields is a list of field names (e.g. "ClientTags") to include in
3093	// API requests with the JSON null value. By default, fields with empty
3094	// values are omitted from API requests. However, any field with an
3095	// empty value appearing in NullFields will be sent to the server as
3096	// null. It is an error if a field in this list has a non-empty value.
3097	// This may be used to include null fields in Patch requests.
3098	NullFields []string `json:"-"`
3099}
3100
3101func (s *PrestoJob) MarshalJSON() ([]byte, error) {
3102	type NoMethod PrestoJob
3103	raw := NoMethod(*s)
3104	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3105}
3106
3107// PySparkJob: A Dataproc job for running Apache PySpark
3108// (https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
3109// applications on YARN.
3110type PySparkJob struct {
3111	// ArchiveUris: Optional. HCFS URIs of archives to be extracted into the
3112	// working directory of each executor. Supported file types: .jar, .tar,
3113	// .tar.gz, .tgz, and .zip.
3114	ArchiveUris []string `json:"archiveUris,omitempty"`
3115
3116	// Args: Optional. The arguments to pass to the driver. Do not include
3117	// arguments, such as --conf, that can be set as job properties, since a
3118	// collision may occur that causes an incorrect job submission.
3119	Args []string `json:"args,omitempty"`
3120
3121	// FileUris: Optional. HCFS URIs of files to be placed in the working
3122	// directory of each executor. Useful for naively parallel tasks.
3123	FileUris []string `json:"fileUris,omitempty"`
3124
3125	// JarFileUris: Optional. HCFS URIs of jar files to add to the
3126	// CLASSPATHs of the Python driver and tasks.
3127	JarFileUris []string `json:"jarFileUris,omitempty"`
3128
3129	// LoggingConfig: Optional. The runtime log config for job execution.
3130	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3131
3132	// MainPythonFileUri: Required. The HCFS URI of the main Python file to
3133	// use as the driver. Must be a .py file.
3134	MainPythonFileUri string `json:"mainPythonFileUri,omitempty"`
3135
3136	// Properties: Optional. A mapping of property names to values, used to
3137	// configure PySpark. Properties that conflict with values set by the
3138	// Dataproc API may be overwritten. Can include properties set in
3139	// /etc/spark/conf/spark-defaults.conf and classes in user code.
3140	Properties map[string]string `json:"properties,omitempty"`
3141
3142	// PythonFileUris: Optional. HCFS file URIs of Python files to pass to
3143	// the PySpark framework. Supported file types: .py, .egg, and .zip.
3144	PythonFileUris []string `json:"pythonFileUris,omitempty"`
3145
3146	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
3147	// unconditionally include in API requests. By default, fields with
3148	// empty values are omitted from API requests. However, any non-pointer,
3149	// non-interface field appearing in ForceSendFields will be sent to the
3150	// server regardless of whether the field is empty or not. This may be
3151	// used to include empty fields in Patch requests.
3152	ForceSendFields []string `json:"-"`
3153
3154	// NullFields is a list of field names (e.g. "ArchiveUris") to include
3155	// in API requests with the JSON null value. By default, fields with
3156	// empty values are omitted from API requests. However, any field with
3157	// an empty value appearing in NullFields will be sent to the server as
3158	// null. It is an error if a field in this list has a non-empty value.
3159	// This may be used to include null fields in Patch requests.
3160	NullFields []string `json:"-"`
3161}
3162
3163func (s *PySparkJob) MarshalJSON() ([]byte, error) {
3164	type NoMethod PySparkJob
3165	raw := NoMethod(*s)
3166	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3167}
3168
3169// QueryList: A list of queries to run on a cluster.
3170type QueryList struct {
3171	// Queries: Required. The queries to execute. You do not need to end a
3172	// query expression with a semicolon. Multiple queries can be specified
3173	// in one string by separating each with a semicolon. Here is an example
3174	// of a Dataproc API snippet that uses a QueryList to specify a HiveJob:
3175	// "hiveJob": { "queryList": { "queries": [ "query1", "query2",
3176	// "query3;query4", ] } }
3177	Queries []string `json:"queries,omitempty"`
3178
3179	// ForceSendFields is a list of field names (e.g. "Queries") to
3180	// unconditionally include in API requests. By default, fields with
3181	// empty values are omitted from API requests. However, any non-pointer,
3182	// non-interface field appearing in ForceSendFields will be sent to the
3183	// server regardless of whether the field is empty or not. This may be
3184	// used to include empty fields in Patch requests.
3185	ForceSendFields []string `json:"-"`
3186
3187	// NullFields is a list of field names (e.g. "Queries") to include in
3188	// API requests with the JSON null value. By default, fields with empty
3189	// values are omitted from API requests. However, any field with an
3190	// empty value appearing in NullFields will be sent to the server as
3191	// null. It is an error if a field in this list has a non-empty value.
3192	// This may be used to include null fields in Patch requests.
3193	NullFields []string `json:"-"`
3194}
3195
3196func (s *QueryList) MarshalJSON() ([]byte, error) {
3197	type NoMethod QueryList
3198	raw := NoMethod(*s)
3199	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3200}
3201
3202// RegexValidation: Validation based on regular expressions.
3203type RegexValidation struct {
3204	// Regexes: Required. RE2 regular expressions used to validate the
3205	// parameter's value. The value must match the regex in its entirety
3206	// (substring matches are not sufficient).
3207	Regexes []string `json:"regexes,omitempty"`
3208
3209	// ForceSendFields is a list of field names (e.g. "Regexes") to
3210	// unconditionally include in API requests. By default, fields with
3211	// empty values are omitted from API requests. However, any non-pointer,
3212	// non-interface field appearing in ForceSendFields will be sent to the
3213	// server regardless of whether the field is empty or not. This may be
3214	// used to include empty fields in Patch requests.
3215	ForceSendFields []string `json:"-"`
3216
3217	// NullFields is a list of field names (e.g. "Regexes") to include in
3218	// API requests with the JSON null value. By default, fields with empty
3219	// values are omitted from API requests. However, any field with an
3220	// empty value appearing in NullFields will be sent to the server as
3221	// null. It is an error if a field in this list has a non-empty value.
3222	// This may be used to include null fields in Patch requests.
3223	NullFields []string `json:"-"`
3224}
3225
3226func (s *RegexValidation) MarshalJSON() ([]byte, error) {
3227	type NoMethod RegexValidation
3228	raw := NoMethod(*s)
3229	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3230}
3231
3232// ReservationAffinity: Reservation Affinity for consuming Zonal
3233// reservation.
3234type ReservationAffinity struct {
3235	// ConsumeReservationType: Optional. Type of reservation to consume
3236	//
3237	// Possible values:
3238	//   "TYPE_UNSPECIFIED"
3239	//   "NO_RESERVATION" - Do not consume from any allocated capacity.
3240	//   "ANY_RESERVATION" - Consume any reservation available.
3241	//   "SPECIFIC_RESERVATION" - Must consume from a specific reservation.
3242	// Must specify key value fields for specifying the reservations.
3243	ConsumeReservationType string `json:"consumeReservationType,omitempty"`
3244
3245	// Key: Optional. Corresponds to the label key of reservation resource.
3246	Key string `json:"key,omitempty"`
3247
3248	// Values: Optional. Corresponds to the label values of reservation
3249	// resource.
3250	Values []string `json:"values,omitempty"`
3251
3252	// ForceSendFields is a list of field names (e.g.
3253	// "ConsumeReservationType") to unconditionally include in API requests.
3254	// By default, fields with empty values are omitted from API requests.
3255	// However, any non-pointer, non-interface field appearing in
3256	// ForceSendFields will be sent to the server regardless of whether the
3257	// field is empty or not. This may be used to include empty fields in
3258	// Patch requests.
3259	ForceSendFields []string `json:"-"`
3260
3261	// NullFields is a list of field names (e.g. "ConsumeReservationType")
3262	// to include in API requests with the JSON null value. By default,
3263	// fields with empty values are omitted from API requests. However, any
3264	// field with an empty value appearing in NullFields will be sent to the
3265	// server as null. It is an error if a field in this list has a
3266	// non-empty value. This may be used to include null fields in Patch
3267	// requests.
3268	NullFields []string `json:"-"`
3269}
3270
3271func (s *ReservationAffinity) MarshalJSON() ([]byte, error) {
3272	type NoMethod ReservationAffinity
3273	raw := NoMethod(*s)
3274	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3275}
3276
3277// SecurityConfig: Security related configuration, including encryption,
3278// Kerberos, etc.
3279type SecurityConfig struct {
3280	// KerberosConfig: Kerberos related configuration.
3281	KerberosConfig *KerberosConfig `json:"kerberosConfig,omitempty"`
3282
3283	// ForceSendFields is a list of field names (e.g. "KerberosConfig") to
3284	// unconditionally include in API requests. By default, fields with
3285	// empty values are omitted from API requests. However, any non-pointer,
3286	// non-interface field appearing in ForceSendFields will be sent to the
3287	// server regardless of whether the field is empty or not. This may be
3288	// used to include empty fields in Patch requests.
3289	ForceSendFields []string `json:"-"`
3290
3291	// NullFields is a list of field names (e.g. "KerberosConfig") to
3292	// include in API requests with the JSON null value. By default, fields
3293	// with empty values are omitted from API requests. However, any field
3294	// with an empty value appearing in NullFields will be sent to the
3295	// server as null. It is an error if a field in this list has a
3296	// non-empty value. This may be used to include null fields in Patch
3297	// requests.
3298	NullFields []string `json:"-"`
3299}
3300
3301func (s *SecurityConfig) MarshalJSON() ([]byte, error) {
3302	type NoMethod SecurityConfig
3303	raw := NoMethod(*s)
3304	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3305}
3306
3307// SetIamPolicyRequest: Request message for SetIamPolicy method.
3308type SetIamPolicyRequest struct {
3309	// Policy: REQUIRED: The complete policy to be applied to the resource.
3310	// The size of the policy is limited to a few 10s of KB. An empty policy
3311	// is a valid policy but certain Cloud Platform services (such as
3312	// Projects) might reject them.
3313	Policy *Policy `json:"policy,omitempty"`
3314
3315	// ForceSendFields is a list of field names (e.g. "Policy") to
3316	// unconditionally include in API requests. By default, fields with
3317	// empty values are omitted from API requests. However, any non-pointer,
3318	// non-interface field appearing in ForceSendFields will be sent to the
3319	// server regardless of whether the field is empty or not. This may be
3320	// used to include empty fields in Patch requests.
3321	ForceSendFields []string `json:"-"`
3322
3323	// NullFields is a list of field names (e.g. "Policy") to include in API
3324	// requests with the JSON null value. By default, fields with empty
3325	// values are omitted from API requests. However, any field with an
3326	// empty value appearing in NullFields will be sent to the server as
3327	// null. It is an error if a field in this list has a non-empty value.
3328	// This may be used to include null fields in Patch requests.
3329	NullFields []string `json:"-"`
3330}
3331
3332func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
3333	type NoMethod SetIamPolicyRequest
3334	raw := NoMethod(*s)
3335	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3336}
3337
3338// SoftwareConfig: Specifies the selection and config of software inside
3339// the cluster.
3340type SoftwareConfig struct {
3341	// ImageVersion: Optional. The version of software inside the cluster.
3342	// It must be one of the supported Dataproc Versions
3343	// (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-v
3344	// ersions#supported_dataproc_versions), such as "1.2" (including a
3345	// subminor version, such as "1.2.29"), or the "preview" version
3346	// (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-v
3347	// ersions#other_versions). If unspecified, it defaults to the latest
3348	// Debian version.
3349	ImageVersion string `json:"imageVersion,omitempty"`
3350
3351	// OptionalComponents: The set of optional components to activate on the
3352	// cluster.
3353	//
3354	// Possible values:
3355	//   "COMPONENT_UNSPECIFIED" - Unspecified component. Specifying this
3356	// will cause Cluster creation to fail.
3357	//   "ANACONDA" - The Anaconda python distribution. The Anaconda
3358	// component is not supported in the Dataproc preview 2.0 image. The 2.0
3359	// preview image is pre-installed with Miniconda.
3360	//   "DOCKER" - Docker
3361	//   "DRUID" - The Druid query engine.
3362	//   "FLINK" - Flink
3363	//   "HBASE" - HBase.
3364	//   "HIVE_WEBHCAT" - The Hive Web HCatalog (the REST service for
3365	// accessing HCatalog).
3366	//   "JUPYTER" - The Jupyter Notebook.
3367	//   "KERBEROS" - The Kerberos security feature.
3368	//   "PRESTO" - The Presto query engine.
3369	//   "RANGER" - The Ranger service.
3370	//   "SOLR" - The Solr service.
3371	//   "ZEPPELIN" - The Zeppelin notebook.
3372	//   "ZOOKEEPER" - The Zookeeper service.
3373	OptionalComponents []string `json:"optionalComponents,omitempty"`
3374
3375	// Properties: Optional. The properties to set on daemon config
3376	// files.Property keys are specified in prefix:property format, for
3377	// example core:hadoop.tmp.dir. The following are supported prefixes and
3378	// their mappings: capacity-scheduler: capacity-scheduler.xml core:
3379	// core-site.xml distcp: distcp-default.xml hdfs: hdfs-site.xml hive:
3380	// hive-site.xml mapred: mapred-site.xml pig: pig.properties spark:
3381	// spark-defaults.conf yarn: yarn-site.xmlFor more information, see
3382	// Cluster properties
3383	// (https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
3384	Properties map[string]string `json:"properties,omitempty"`
3385
3386	// ForceSendFields is a list of field names (e.g. "ImageVersion") to
3387	// unconditionally include in API requests. By default, fields with
3388	// empty values are omitted from API requests. However, any non-pointer,
3389	// non-interface field appearing in ForceSendFields will be sent to the
3390	// server regardless of whether the field is empty or not. This may be
3391	// used to include empty fields in Patch requests.
3392	ForceSendFields []string `json:"-"`
3393
3394	// NullFields is a list of field names (e.g. "ImageVersion") to include
3395	// in API requests with the JSON null value. By default, fields with
3396	// empty values are omitted from API requests. However, any field with
3397	// an empty value appearing in NullFields will be sent to the server as
3398	// null. It is an error if a field in this list has a non-empty value.
3399	// This may be used to include null fields in Patch requests.
3400	NullFields []string `json:"-"`
3401}
3402
3403func (s *SoftwareConfig) MarshalJSON() ([]byte, error) {
3404	type NoMethod SoftwareConfig
3405	raw := NoMethod(*s)
3406	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3407}
3408
3409// SparkJob: A Dataproc job for running Apache Spark
3410// (http://spark.apache.org/) applications on YARN. The specification of
3411// the main method to call to drive the job. Specify either the jar file
3412// that contains the main class or the main class name. To pass both a
3413// main jar and a main class in that jar, add the jar to
3414// CommonJob.jar_file_uris, and then specify the main class name in
3415// main_class.
3416type SparkJob struct {
3417	// ArchiveUris: Optional. HCFS URIs of archives to be extracted into the
3418	// working directory of each executor. Supported file types: .jar, .tar,
3419	// .tar.gz, .tgz, and .zip.
3420	ArchiveUris []string `json:"archiveUris,omitempty"`
3421
3422	// Args: Optional. The arguments to pass to the driver. Do not include
3423	// arguments, such as --conf, that can be set as job properties, since a
3424	// collision may occur that causes an incorrect job submission.
3425	Args []string `json:"args,omitempty"`
3426
3427	// FileUris: Optional. HCFS URIs of files to be placed in the working
3428	// directory of each executor. Useful for naively parallel tasks.
3429	FileUris []string `json:"fileUris,omitempty"`
3430
3431	// JarFileUris: Optional. HCFS URIs of jar files to add to the
3432	// CLASSPATHs of the Spark driver and tasks.
3433	JarFileUris []string `json:"jarFileUris,omitempty"`
3434
3435	// LoggingConfig: Optional. The runtime log config for job execution.
3436	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3437
3438	// MainClass: The name of the driver's main class. The jar file that
3439	// contains the class must be in the default CLASSPATH or specified in
3440	// jar_file_uris.
3441	MainClass string `json:"mainClass,omitempty"`
3442
3443	// MainJarFileUri: The HCFS URI of the jar file that contains the main
3444	// class.
3445	MainJarFileUri string `json:"mainJarFileUri,omitempty"`
3446
3447	// Properties: Optional. A mapping of property names to values, used to
3448	// configure Spark. Properties that conflict with values set by the
3449	// Dataproc API may be overwritten. Can include properties set in
3450	// /etc/spark/conf/spark-defaults.conf and classes in user code.
3451	Properties map[string]string `json:"properties,omitempty"`
3452
3453	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
3454	// unconditionally include in API requests. By default, fields with
3455	// empty values are omitted from API requests. However, any non-pointer,
3456	// non-interface field appearing in ForceSendFields will be sent to the
3457	// server regardless of whether the field is empty or not. This may be
3458	// used to include empty fields in Patch requests.
3459	ForceSendFields []string `json:"-"`
3460
3461	// NullFields is a list of field names (e.g. "ArchiveUris") to include
3462	// in API requests with the JSON null value. By default, fields with
3463	// empty values are omitted from API requests. However, any field with
3464	// an empty value appearing in NullFields will be sent to the server as
3465	// null. It is an error if a field in this list has a non-empty value.
3466	// This may be used to include null fields in Patch requests.
3467	NullFields []string `json:"-"`
3468}
3469
3470func (s *SparkJob) MarshalJSON() ([]byte, error) {
3471	type NoMethod SparkJob
3472	raw := NoMethod(*s)
3473	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3474}
3475
3476// SparkRJob: A Dataproc job for running Apache SparkR
3477// (https://spark.apache.org/docs/latest/sparkr.html) applications on
3478// YARN.
3479type SparkRJob struct {
3480	// ArchiveUris: Optional. HCFS URIs of archives to be extracted into the
3481	// working directory of each executor. Supported file types: .jar, .tar,
3482	// .tar.gz, .tgz, and .zip.
3483	ArchiveUris []string `json:"archiveUris,omitempty"`
3484
3485	// Args: Optional. The arguments to pass to the driver. Do not include
3486	// arguments, such as --conf, that can be set as job properties, since a
3487	// collision may occur that causes an incorrect job submission.
3488	Args []string `json:"args,omitempty"`
3489
3490	// FileUris: Optional. HCFS URIs of files to be placed in the working
3491	// directory of each executor. Useful for naively parallel tasks.
3492	FileUris []string `json:"fileUris,omitempty"`
3493
3494	// LoggingConfig: Optional. The runtime log config for job execution.
3495	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3496
3497	// MainRFileUri: Required. The HCFS URI of the main R file to use as the
3498	// driver. Must be a .R file.
3499	MainRFileUri string `json:"mainRFileUri,omitempty"`
3500
3501	// Properties: Optional. A mapping of property names to values, used to
3502	// configure SparkR. Properties that conflict with values set by the
3503	// Dataproc API may be overwritten. Can include properties set in
3504	// /etc/spark/conf/spark-defaults.conf and classes in user code.
3505	Properties map[string]string `json:"properties,omitempty"`
3506
3507	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
3508	// unconditionally include in API requests. By default, fields with
3509	// empty values are omitted from API requests. However, any non-pointer,
3510	// non-interface field appearing in ForceSendFields will be sent to the
3511	// server regardless of whether the field is empty or not. This may be
3512	// used to include empty fields in Patch requests.
3513	ForceSendFields []string `json:"-"`
3514
3515	// NullFields is a list of field names (e.g. "ArchiveUris") to include
3516	// in API requests with the JSON null value. By default, fields with
3517	// empty values are omitted from API requests. However, any field with
3518	// an empty value appearing in NullFields will be sent to the server as
3519	// null. It is an error if a field in this list has a non-empty value.
3520	// This may be used to include null fields in Patch requests.
3521	NullFields []string `json:"-"`
3522}
3523
3524func (s *SparkRJob) MarshalJSON() ([]byte, error) {
3525	type NoMethod SparkRJob
3526	raw := NoMethod(*s)
3527	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3528}
3529
3530// SparkSqlJob: A Dataproc job for running Apache Spark SQL
3531// (http://spark.apache.org/sql/) queries.
3532type SparkSqlJob struct {
3533	// JarFileUris: Optional. HCFS URIs of jar files to be added to the
3534	// Spark CLASSPATH.
3535	JarFileUris []string `json:"jarFileUris,omitempty"`
3536
3537	// LoggingConfig: Optional. The runtime log config for job execution.
3538	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3539
3540	// Properties: Optional. A mapping of property names to values, used to
3541	// configure Spark SQL's SparkConf. Properties that conflict with values
3542	// set by the Dataproc API may be overwritten.
3543	Properties map[string]string `json:"properties,omitempty"`
3544
3545	// QueryFileUri: The HCFS URI of the script that contains SQL queries.
3546	QueryFileUri string `json:"queryFileUri,omitempty"`
3547
3548	// QueryList: A list of queries.
3549	QueryList *QueryList `json:"queryList,omitempty"`
3550
3551	// ScriptVariables: Optional. Mapping of query variable names to values
3552	// (equivalent to the Spark SQL command: SET name="value";).
3553	ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
3554
3555	// ForceSendFields is a list of field names (e.g. "JarFileUris") to
3556	// unconditionally include in API requests. By default, fields with
3557	// empty values are omitted from API requests. However, any non-pointer,
3558	// non-interface field appearing in ForceSendFields will be sent to the
3559	// server regardless of whether the field is empty or not. This may be
3560	// used to include empty fields in Patch requests.
3561	ForceSendFields []string `json:"-"`
3562
3563	// NullFields is a list of field names (e.g. "JarFileUris") to include
3564	// in API requests with the JSON null value. By default, fields with
3565	// empty values are omitted from API requests. However, any field with
3566	// an empty value appearing in NullFields will be sent to the server as
3567	// null. It is an error if a field in this list has a non-empty value.
3568	// This may be used to include null fields in Patch requests.
3569	NullFields []string `json:"-"`
3570}
3571
3572func (s *SparkSqlJob) MarshalJSON() ([]byte, error) {
3573	type NoMethod SparkSqlJob
3574	raw := NoMethod(*s)
3575	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3576}
3577
3578// StartClusterRequest: A request to start a cluster.
3579type StartClusterRequest struct {
3580	// ClusterUuid: Optional. Specifying the cluster_uuid means the RPC
3581	// should fail (with error NOT_FOUND) if cluster with specified UUID
3582	// does not exist.
3583	ClusterUuid string `json:"clusterUuid,omitempty"`
3584
3585	// RequestId: Optional. A unique id used to identify the request. If the
3586	// server receives two StartClusterRequest requests with the same id,
3587	// then the second request will be ignored and the first
3588	// google.longrunning.Operation created and stored in the backend is
3589	// returned.It is recommended to always set this value to a UUID
3590	// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
3591	// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
3592	// and hyphens (-). The maximum length is 40 characters.
3593	RequestId string `json:"requestId,omitempty"`
3594
3595	// ForceSendFields is a list of field names (e.g. "ClusterUuid") to
3596	// unconditionally include in API requests. By default, fields with
3597	// empty values are omitted from API requests. However, any non-pointer,
3598	// non-interface field appearing in ForceSendFields will be sent to the
3599	// server regardless of whether the field is empty or not. This may be
3600	// used to include empty fields in Patch requests.
3601	ForceSendFields []string `json:"-"`
3602
3603	// NullFields is a list of field names (e.g. "ClusterUuid") to include
3604	// in API requests with the JSON null value. By default, fields with
3605	// empty values are omitted from API requests. However, any field with
3606	// an empty value appearing in NullFields will be sent to the server as
3607	// null. It is an error if a field in this list has a non-empty value.
3608	// This may be used to include null fields in Patch requests.
3609	NullFields []string `json:"-"`
3610}
3611
3612func (s *StartClusterRequest) MarshalJSON() ([]byte, error) {
3613	type NoMethod StartClusterRequest
3614	raw := NoMethod(*s)
3615	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3616}
3617
3618// Status: The Status type defines a logical error model that is
3619// suitable for different programming environments, including REST APIs
3620// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
3621// Status message contains three pieces of data: error code, error
3622// message, and error details.You can find out more about this error
3623// model and how to work with it in the API Design Guide
3624// (https://cloud.google.com/apis/design/errors).
3625type Status struct {
3626	// Code: The status code, which should be an enum value of
3627	// google.rpc.Code.
3628	Code int64 `json:"code,omitempty"`
3629
3630	// Details: A list of messages that carry the error details. There is a
3631	// common set of message types for APIs to use.
3632	Details []googleapi.RawMessage `json:"details,omitempty"`
3633
3634	// Message: A developer-facing error message, which should be in
3635	// English. Any user-facing error message should be localized and sent
3636	// in the google.rpc.Status.details field, or localized by the client.
3637	Message string `json:"message,omitempty"`
3638
3639	// ForceSendFields is a list of field names (e.g. "Code") to
3640	// unconditionally include in API requests. By default, fields with
3641	// empty values are omitted from API requests. However, any non-pointer,
3642	// non-interface field appearing in ForceSendFields will be sent to the
3643	// server regardless of whether the field is empty or not. This may be
3644	// used to include empty fields in Patch requests.
3645	ForceSendFields []string `json:"-"`
3646
3647	// NullFields is a list of field names (e.g. "Code") to include in API
3648	// requests with the JSON null value. By default, fields with empty
3649	// values are omitted from API requests. However, any field with an
3650	// empty value appearing in NullFields will be sent to the server as
3651	// null. It is an error if a field in this list has a non-empty value.
3652	// This may be used to include null fields in Patch requests.
3653	NullFields []string `json:"-"`
3654}
3655
3656func (s *Status) MarshalJSON() ([]byte, error) {
3657	type NoMethod Status
3658	raw := NoMethod(*s)
3659	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3660}
3661
3662// StopClusterRequest: A request to stop a cluster.
3663type StopClusterRequest struct {
3664	// ClusterUuid: Optional. Specifying the cluster_uuid means the RPC
3665	// should fail (with error NOT_FOUND) if cluster with specified UUID
3666	// does not exist.
3667	ClusterUuid string `json:"clusterUuid,omitempty"`
3668
3669	// RequestId: Optional. A unique id used to identify the request. If the
3670	// server receives two StopClusterRequest requests with the same id,
3671	// then the second request will be ignored and the first
3672	// google.longrunning.Operation created and stored in the backend is
3673	// returned.It is recommended to always set this value to a UUID
3674	// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
3675	// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
3676	// and hyphens (-). The maximum length is 40 characters.
3677	RequestId string `json:"requestId,omitempty"`
3678
3679	// ForceSendFields is a list of field names (e.g. "ClusterUuid") to
3680	// unconditionally include in API requests. By default, fields with
3681	// empty values are omitted from API requests. However, any non-pointer,
3682	// non-interface field appearing in ForceSendFields will be sent to the
3683	// server regardless of whether the field is empty or not. This may be
3684	// used to include empty fields in Patch requests.
3685	ForceSendFields []string `json:"-"`
3686
3687	// NullFields is a list of field names (e.g. "ClusterUuid") to include
3688	// in API requests with the JSON null value. By default, fields with
3689	// empty values are omitted from API requests. However, any field with
3690	// an empty value appearing in NullFields will be sent to the server as
3691	// null. It is an error if a field in this list has a non-empty value.
3692	// This may be used to include null fields in Patch requests.
3693	NullFields []string `json:"-"`
3694}
3695
3696func (s *StopClusterRequest) MarshalJSON() ([]byte, error) {
3697	type NoMethod StopClusterRequest
3698	raw := NoMethod(*s)
3699	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3700}
3701
3702// SubmitJobRequest: A request to submit a job.
3703type SubmitJobRequest struct {
3704	// Job: Required. The job resource.
3705	Job *Job `json:"job,omitempty"`
3706
3707	// RequestId: Optional. A unique id used to identify the request. If the
3708	// server receives two SubmitJobRequest requests with the same id, then
3709	// the second request will be ignored and the first Job created and
3710	// stored in the backend is returned.It is recommended to always set
3711	// this value to a UUID
3712	// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
3713	// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
3714	// and hyphens (-). The maximum length is 40 characters.
3715	RequestId string `json:"requestId,omitempty"`
3716
3717	// ForceSendFields is a list of field names (e.g. "Job") to
3718	// unconditionally include in API requests. By default, fields with
3719	// empty values are omitted from API requests. However, any non-pointer,
3720	// non-interface field appearing in ForceSendFields will be sent to the
3721	// server regardless of whether the field is empty or not. This may be
3722	// used to include empty fields in Patch requests.
3723	ForceSendFields []string `json:"-"`
3724
3725	// NullFields is a list of field names (e.g. "Job") to include in API
3726	// requests with the JSON null value. By default, fields with empty
3727	// values are omitted from API requests. However, any field with an
3728	// empty value appearing in NullFields will be sent to the server as
3729	// null. It is an error if a field in this list has a non-empty value.
3730	// This may be used to include null fields in Patch requests.
3731	NullFields []string `json:"-"`
3732}
3733
3734func (s *SubmitJobRequest) MarshalJSON() ([]byte, error) {
3735	type NoMethod SubmitJobRequest
3736	raw := NoMethod(*s)
3737	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3738}
3739
3740// TemplateParameter: A configurable parameter that replaces one or more
3741// fields in the template. Parameterizable fields: - Labels - File uris
3742// - Job properties - Job arguments - Script variables - Main class (in
3743// HadoopJob and SparkJob) - Zone (in ClusterSelector)
3744type TemplateParameter struct {
3745	// Description: Optional. Brief description of the parameter. Must not
3746	// exceed 1024 characters.
3747	Description string `json:"description,omitempty"`
3748
3749	// Fields: Required. Paths to all fields that the parameter replaces. A
3750	// field is allowed to appear in at most one parameter's list of field
3751	// paths.A field path is similar in syntax to a
3752	// google.protobuf.FieldMask. For example, a field path that references
3753	// the zone field of a workflow template's cluster selector would be
3754	// specified as placement.clusterSelector.zone.Also, field paths can
3755	// reference fields using the following syntax: Values in maps can be
3756	// referenced by key: labels'key'
3757	// placement.clusterSelector.clusterLabels'key'
3758	// placement.managedCluster.labels'key'
3759	// placement.clusterSelector.clusterLabels'key'
3760	// jobs'step-id'.labels'key' Jobs in the jobs list can be referenced by
3761	// step-id: jobs'step-id'.hadoopJob.mainJarFileUri
3762	// jobs'step-id'.hiveJob.queryFileUri
3763	// jobs'step-id'.pySparkJob.mainPythonFileUri
3764	// jobs'step-id'.hadoopJob.jarFileUris0
3765	// jobs'step-id'.hadoopJob.archiveUris0
3766	// jobs'step-id'.hadoopJob.fileUris0
3767	// jobs'step-id'.pySparkJob.pythonFileUris0 Items in repeated fields can
3768	// be referenced by a zero-based index: jobs'step-id'.sparkJob.args0
3769	// Other examples: jobs'step-id'.hadoopJob.properties'key'
3770	// jobs'step-id'.hadoopJob.args0
3771	// jobs'step-id'.hiveJob.scriptVariables'key'
3772	// jobs'step-id'.hadoopJob.mainJarFileUri
3773	// placement.clusterSelector.zoneIt may not be possible to parameterize
3774	// maps and repeated fields in their entirety since only individual map
3775	// values and individual items in repeated fields can be referenced. For
3776	// example, the following field paths are invalid:
3777	// placement.clusterSelector.clusterLabels jobs'step-id'.sparkJob.args
3778	Fields []string `json:"fields,omitempty"`
3779
3780	// Name: Required. Parameter name. The parameter name is used as the
3781	// key, and paired with the parameter value, which are passed to the
3782	// template when the template is instantiated. The name must contain
3783	// only capital letters (A-Z), numbers (0-9), and underscores (_), and
3784	// must not start with a number. The maximum length is 40 characters.
3785	Name string `json:"name,omitempty"`
3786
3787	// Validation: Optional. Validation rules to be applied to this
3788	// parameter's value.
3789	Validation *ParameterValidation `json:"validation,omitempty"`
3790
3791	// ForceSendFields is a list of field names (e.g. "Description") to
3792	// unconditionally include in API requests. By default, fields with
3793	// empty values are omitted from API requests. However, any non-pointer,
3794	// non-interface field appearing in ForceSendFields will be sent to the
3795	// server regardless of whether the field is empty or not. This may be
3796	// used to include empty fields in Patch requests.
3797	ForceSendFields []string `json:"-"`
3798
3799	// NullFields is a list of field names (e.g. "Description") to include
3800	// in API requests with the JSON null value. By default, fields with
3801	// empty values are omitted from API requests. However, any field with
3802	// an empty value appearing in NullFields will be sent to the server as
3803	// null. It is an error if a field in this list has a non-empty value.
3804	// This may be used to include null fields in Patch requests.
3805	NullFields []string `json:"-"`
3806}
3807
3808func (s *TemplateParameter) MarshalJSON() ([]byte, error) {
3809	type NoMethod TemplateParameter
3810	raw := NoMethod(*s)
3811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3812}
3813
3814// TestIamPermissionsRequest: Request message for TestIamPermissions
3815// method.
3816type TestIamPermissionsRequest struct {
3817	// Permissions: The set of permissions to check for the resource.
3818	// Permissions with wildcards (such as '*' or 'storage.*') are not
3819	// allowed. For more information see IAM Overview
3820	// (https://cloud.google.com/iam/docs/overview#permissions).
3821	Permissions []string `json:"permissions,omitempty"`
3822
3823	// ForceSendFields is a list of field names (e.g. "Permissions") to
3824	// unconditionally include in API requests. By default, fields with
3825	// empty values are omitted from API requests. However, any non-pointer,
3826	// non-interface field appearing in ForceSendFields will be sent to the
3827	// server regardless of whether the field is empty or not. This may be
3828	// used to include empty fields in Patch requests.
3829	ForceSendFields []string `json:"-"`
3830
3831	// NullFields is a list of field names (e.g. "Permissions") to include
3832	// in API requests with the JSON null value. By default, fields with
3833	// empty values are omitted from API requests. However, any field with
3834	// an empty value appearing in NullFields will be sent to the server as
3835	// null. It is an error if a field in this list has a non-empty value.
3836	// This may be used to include null fields in Patch requests.
3837	NullFields []string `json:"-"`
3838}
3839
3840func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
3841	type NoMethod TestIamPermissionsRequest
3842	raw := NoMethod(*s)
3843	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3844}
3845
3846// TestIamPermissionsResponse: Response message for TestIamPermissions
3847// method.
3848type TestIamPermissionsResponse struct {
3849	// Permissions: A subset of TestPermissionsRequest.permissions that the
3850	// caller is allowed.
3851	Permissions []string `json:"permissions,omitempty"`
3852
3853	// ServerResponse contains the HTTP response code and headers from the
3854	// server.
3855	googleapi.ServerResponse `json:"-"`
3856
3857	// ForceSendFields is a list of field names (e.g. "Permissions") to
3858	// unconditionally include in API requests. By default, fields with
3859	// empty values are omitted from API requests. However, any non-pointer,
3860	// non-interface field appearing in ForceSendFields will be sent to the
3861	// server regardless of whether the field is empty or not. This may be
3862	// used to include empty fields in Patch requests.
3863	ForceSendFields []string `json:"-"`
3864
3865	// NullFields is a list of field names (e.g. "Permissions") to include
3866	// in API requests with the JSON null value. By default, fields with
3867	// empty values are omitted from API requests. However, any field with
3868	// an empty value appearing in NullFields will be sent to the server as
3869	// null. It is an error if a field in this list has a non-empty value.
3870	// This may be used to include null fields in Patch requests.
3871	NullFields []string `json:"-"`
3872}
3873
3874func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
3875	type NoMethod TestIamPermissionsResponse
3876	raw := NoMethod(*s)
3877	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3878}
3879
3880// ValueValidation: Validation based on a list of allowed values.
3881type ValueValidation struct {
3882	// Values: Required. List of allowed values for the parameter.
3883	Values []string `json:"values,omitempty"`
3884
3885	// ForceSendFields is a list of field names (e.g. "Values") to
3886	// unconditionally include in API requests. By default, fields with
3887	// empty values are omitted from API requests. However, any non-pointer,
3888	// non-interface field appearing in ForceSendFields will be sent to the
3889	// server regardless of whether the field is empty or not. This may be
3890	// used to include empty fields in Patch requests.
3891	ForceSendFields []string `json:"-"`
3892
3893	// NullFields is a list of field names (e.g. "Values") to include in API
3894	// requests with the JSON null value. By default, fields with empty
3895	// values are omitted from API requests. However, any field with an
3896	// empty value appearing in NullFields will be sent to the server as
3897	// null. It is an error if a field in this list has a non-empty value.
3898	// This may be used to include null fields in Patch requests.
3899	NullFields []string `json:"-"`
3900}
3901
3902func (s *ValueValidation) MarshalJSON() ([]byte, error) {
3903	type NoMethod ValueValidation
3904	raw := NoMethod(*s)
3905	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3906}
3907
3908// WorkflowGraph: The workflow graph.
3909type WorkflowGraph struct {
3910	// Nodes: Output only. The workflow nodes.
3911	Nodes []*WorkflowNode `json:"nodes,omitempty"`
3912
3913	// ForceSendFields is a list of field names (e.g. "Nodes") to
3914	// unconditionally include in API requests. By default, fields with
3915	// empty values are omitted from API requests. However, any non-pointer,
3916	// non-interface field appearing in ForceSendFields will be sent to the
3917	// server regardless of whether the field is empty or not. This may be
3918	// used to include empty fields in Patch requests.
3919	ForceSendFields []string `json:"-"`
3920
3921	// NullFields is a list of field names (e.g. "Nodes") to include in API
3922	// requests with the JSON null value. By default, fields with empty
3923	// values are omitted from API requests. However, any field with an
3924	// empty value appearing in NullFields will be sent to the server as
3925	// null. It is an error if a field in this list has a non-empty value.
3926	// This may be used to include null fields in Patch requests.
3927	NullFields []string `json:"-"`
3928}
3929
3930func (s *WorkflowGraph) MarshalJSON() ([]byte, error) {
3931	type NoMethod WorkflowGraph
3932	raw := NoMethod(*s)
3933	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3934}
3935
3936// WorkflowMetadata: A Dataproc workflow template resource.
3937type WorkflowMetadata struct {
3938	// ClusterName: Output only. The name of the target cluster.
3939	ClusterName string `json:"clusterName,omitempty"`
3940
3941	// ClusterUuid: Output only. The UUID of target cluster.
3942	ClusterUuid string `json:"clusterUuid,omitempty"`
3943
3944	// CreateCluster: Output only. The create cluster operation metadata.
3945	CreateCluster *ClusterOperation `json:"createCluster,omitempty"`
3946
3947	// DagEndTime: Output only. DAG end time, which is only set for
3948	// workflows with dag_timeout when the DAG ends.
3949	DagEndTime string `json:"dagEndTime,omitempty"`
3950
3951	// DagStartTime: Output only. DAG start time, which is only set for
3952	// workflows with dag_timeout when the DAG begins.
3953	DagStartTime string `json:"dagStartTime,omitempty"`
3954
3955	// DagTimeout: Output only. The timeout duration for the DAG of jobs.
3956	// Minimum timeout duration is 10 minutes and maximum is 24 hours,
3957	// expressed as a google.protobuf.Duration. For example, "1800" = 1800
3958	// seconds/30 minutes duration.
3959	DagTimeout string `json:"dagTimeout,omitempty"`
3960
3961	// DeleteCluster: Output only. The delete cluster operation metadata.
3962	DeleteCluster *ClusterOperation `json:"deleteCluster,omitempty"`
3963
3964	// EndTime: Output only. Workflow end time.
3965	EndTime string `json:"endTime,omitempty"`
3966
3967	// Graph: Output only. The workflow graph.
3968	Graph *WorkflowGraph `json:"graph,omitempty"`
3969
3970	// Parameters: Map from parameter names to values that were used for
3971	// those parameters.
3972	Parameters map[string]string `json:"parameters,omitempty"`
3973
3974	// StartTime: Output only. Workflow start time.
3975	StartTime string `json:"startTime,omitempty"`
3976
3977	// State: Output only. The workflow state.
3978	//
3979	// Possible values:
3980	//   "UNKNOWN" - Unused.
3981	//   "PENDING" - The operation has been created.
3982	//   "RUNNING" - The operation is running.
3983	//   "DONE" - The operation is done; either cancelled or completed.
3984	State string `json:"state,omitempty"`
3985
3986	// Template: Output only. The resource name of the workflow template as
3987	// described in https://cloud.google.com/apis/design/resource_names. For
3988	// projects.regions.workflowTemplates, the resource name of the template
3989	// has the following format:
3990	// projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
3991	//  For projects.locations.workflowTemplates, the resource name of the
3992	// template has the following format:
3993	// projects/{project_id}/locations/{location}/workflowTemplates/{template
3994	// _id}
3995	Template string `json:"template,omitempty"`
3996
3997	// Version: Output only. The version of template at the time of workflow
3998	// instantiation.
3999	Version int64 `json:"version,omitempty"`
4000
4001	// ForceSendFields is a list of field names (e.g. "ClusterName") to
4002	// unconditionally include in API requests. By default, fields with
4003	// empty values are omitted from API requests. However, any non-pointer,
4004	// non-interface field appearing in ForceSendFields will be sent to the
4005	// server regardless of whether the field is empty or not. This may be
4006	// used to include empty fields in Patch requests.
4007	ForceSendFields []string `json:"-"`
4008
4009	// NullFields is a list of field names (e.g. "ClusterName") to include
4010	// in API requests with the JSON null value. By default, fields with
4011	// empty values are omitted from API requests. However, any field with
4012	// an empty value appearing in NullFields will be sent to the server as
4013	// null. It is an error if a field in this list has a non-empty value.
4014	// This may be used to include null fields in Patch requests.
4015	NullFields []string `json:"-"`
4016}
4017
4018func (s *WorkflowMetadata) MarshalJSON() ([]byte, error) {
4019	type NoMethod WorkflowMetadata
4020	raw := NoMethod(*s)
4021	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4022}
4023
4024// WorkflowNode: The workflow node.
4025type WorkflowNode struct {
4026	// Error: Output only. The error detail.
4027	Error string `json:"error,omitempty"`
4028
4029	// JobId: Output only. The job id; populated after the node enters
4030	// RUNNING state.
4031	JobId string `json:"jobId,omitempty"`
4032
4033	// PrerequisiteStepIds: Output only. Node's prerequisite nodes.
4034	PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"`
4035
4036	// State: Output only. The node state.
4037	//
4038	// Possible values:
4039	//   "NODE_STATUS_UNSPECIFIED" - State is unspecified.
4040	//   "BLOCKED" - The node is awaiting prerequisite node to finish.
4041	//   "RUNNABLE" - The node is runnable but not running.
4042	//   "RUNNING" - The node is running.
4043	//   "COMPLETED" - The node completed successfully.
4044	//   "FAILED" - The node failed. A node can be marked FAILED because its
4045	// ancestor or peer failed.
4046	State string `json:"state,omitempty"`
4047
4048	// StepId: Output only. The name of the node.
4049	StepId string `json:"stepId,omitempty"`
4050
4051	// ForceSendFields is a list of field names (e.g. "Error") to
4052	// unconditionally include in API requests. By default, fields with
4053	// empty values are omitted from API requests. However, any non-pointer,
4054	// non-interface field appearing in ForceSendFields will be sent to the
4055	// server regardless of whether the field is empty or not. This may be
4056	// used to include empty fields in Patch requests.
4057	ForceSendFields []string `json:"-"`
4058
4059	// NullFields is a list of field names (e.g. "Error") to include in API
4060	// requests with the JSON null value. By default, fields with empty
4061	// values are omitted from API requests. However, any field with an
4062	// empty value appearing in NullFields will be sent to the server as
4063	// null. It is an error if a field in this list has a non-empty value.
4064	// This may be used to include null fields in Patch requests.
4065	NullFields []string `json:"-"`
4066}
4067
4068func (s *WorkflowNode) MarshalJSON() ([]byte, error) {
4069	type NoMethod WorkflowNode
4070	raw := NoMethod(*s)
4071	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4072}
4073
4074// WorkflowTemplate: A Dataproc workflow template resource.
4075type WorkflowTemplate struct {
4076	// CreateTime: Output only. The time template was created.
4077	CreateTime string `json:"createTime,omitempty"`
4078
4079	// DagTimeout: Optional. Timeout duration for the DAG of jobs. You can
4080	// use "s", "m", "h", and "d" suffixes for second, minute, hour, and day
4081	// duration values, respectively. The timeout duration must be from 10
4082	// minutes ("10m") to 24 hours ("24h" or "1d"). The timer begins when
4083	// the first job is submitted. If the workflow is running at the end of
4084	// the timeout period, any remaining jobs are cancelled, the workflow is
4085	// ended, and if the workflow was running on a managed cluster, the
4086	// cluster is deleted.
4087	DagTimeout string `json:"dagTimeout,omitempty"`
4088
4089	// Id: Required. The template id.The id must contain only letters (a-z,
4090	// A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin
4091	// or end with underscore or hyphen. Must consist of between 3 and 50
4092	// characters..
4093	Id string `json:"id,omitempty"`
4094
4095	// Jobs: Required. The Directed Acyclic Graph of Jobs to submit.
4096	Jobs []*OrderedJob `json:"jobs,omitempty"`
4097
4098	// Labels: Optional. The labels to associate with this template. These
4099	// labels will be propagated to all jobs and clusters created by the
4100	// workflow instance.Label keys must contain 1 to 63 characters, and
4101	// must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label
4102	// values may be empty, but, if present, must contain 1 to 63
4103	// characters, and must conform to RFC 1035
4104	// (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be
4105	// associated with a template.
4106	Labels map[string]string `json:"labels,omitempty"`
4107
4108	// Name: Output only. The resource name of the workflow template, as
4109	// described in https://cloud.google.com/apis/design/resource_names. For
4110	// projects.regions.workflowTemplates, the resource name of the template
4111	// has the following format:
4112	// projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
4113	//  For projects.locations.workflowTemplates, the resource name of the
4114	// template has the following format:
4115	// projects/{project_id}/locations/{location}/workflowTemplates/{template
4116	// _id}
4117	Name string `json:"name,omitempty"`
4118
4119	// Parameters: Optional. Template parameters whose values are
4120	// substituted into the template. Values for parameters must be provided
4121	// when the template is instantiated.
4122	Parameters []*TemplateParameter `json:"parameters,omitempty"`
4123
4124	// Placement: Required. WorkflowTemplate scheduling information.
4125	Placement *WorkflowTemplatePlacement `json:"placement,omitempty"`
4126
4127	// UpdateTime: Output only. The time template was last updated.
4128	UpdateTime string `json:"updateTime,omitempty"`
4129
4130	// Version: Optional. Used to perform a consistent
4131	// read-modify-write.This field should be left blank for a
4132	// CreateWorkflowTemplate request. It is required for an
4133	// UpdateWorkflowTemplate request, and must match the current server
4134	// version. A typical update template flow would fetch the current
4135	// template with a GetWorkflowTemplate request, which will return the
4136	// current template with the version field filled in with the current
4137	// server version. The user updates other fields in the template, then
4138	// returns it as part of the UpdateWorkflowTemplate request.
4139	Version int64 `json:"version,omitempty"`
4140
4141	// ServerResponse contains the HTTP response code and headers from the
4142	// server.
4143	googleapi.ServerResponse `json:"-"`
4144
4145	// ForceSendFields is a list of field names (e.g. "CreateTime") to
4146	// unconditionally include in API requests. By default, fields with
4147	// empty values are omitted from API requests. However, any non-pointer,
4148	// non-interface field appearing in ForceSendFields will be sent to the
4149	// server regardless of whether the field is empty or not. This may be
4150	// used to include empty fields in Patch requests.
4151	ForceSendFields []string `json:"-"`
4152
4153	// NullFields is a list of field names (e.g. "CreateTime") to include in
4154	// API requests with the JSON null value. By default, fields with empty
4155	// values are omitted from API requests. However, any field with an
4156	// empty value appearing in NullFields will be sent to the server as
4157	// null. It is an error if a field in this list has a non-empty value.
4158	// This may be used to include null fields in Patch requests.
4159	NullFields []string `json:"-"`
4160}
4161
4162func (s *WorkflowTemplate) MarshalJSON() ([]byte, error) {
4163	type NoMethod WorkflowTemplate
4164	raw := NoMethod(*s)
4165	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4166}
4167
4168// WorkflowTemplatePlacement: Specifies workflow execution target.Either
4169// managed_cluster or cluster_selector is required.
4170type WorkflowTemplatePlacement struct {
4171	// ClusterSelector: Optional. A selector that chooses target cluster for
4172	// jobs based on metadata.The selector is evaluated at the time each job
4173	// is submitted.
4174	ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"`
4175
4176	// ManagedCluster: Optional. A cluster that is managed by the workflow.
4177	ManagedCluster *ManagedCluster `json:"managedCluster,omitempty"`
4178
4179	// ForceSendFields is a list of field names (e.g. "ClusterSelector") to
4180	// unconditionally include in API requests. By default, fields with
4181	// empty values are omitted from API requests. However, any non-pointer,
4182	// non-interface field appearing in ForceSendFields will be sent to the
4183	// server regardless of whether the field is empty or not. This may be
4184	// used to include empty fields in Patch requests.
4185	ForceSendFields []string `json:"-"`
4186
4187	// NullFields is a list of field names (e.g. "ClusterSelector") to
4188	// include in API requests with the JSON null value. By default, fields
4189	// with empty values are omitted from API requests. However, any field
4190	// with an empty value appearing in NullFields will be sent to the
4191	// server as null. It is an error if a field in this list has a
4192	// non-empty value. This may be used to include null fields in Patch
4193	// requests.
4194	NullFields []string `json:"-"`
4195}
4196
4197func (s *WorkflowTemplatePlacement) MarshalJSON() ([]byte, error) {
4198	type NoMethod WorkflowTemplatePlacement
4199	raw := NoMethod(*s)
4200	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4201}
4202
4203// YarnApplication: A YARN application created by a job. Application
4204// information is a subset of
4205// org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta
4206// Feature: This report is available for testing purposes only. It may
4207// be changed before final release.
4208type YarnApplication struct {
4209	// Name: Output only. The application name.
4210	Name string `json:"name,omitempty"`
4211
4212	// Progress: Output only. The numerical progress of the application,
4213	// from 1 to 100.
4214	Progress float64 `json:"progress,omitempty"`
4215
4216	// State: Output only. The application state.
4217	//
4218	// Possible values:
4219	//   "STATE_UNSPECIFIED" - Status is unspecified.
4220	//   "NEW" - Status is NEW.
4221	//   "NEW_SAVING" - Status is NEW_SAVING.
4222	//   "SUBMITTED" - Status is SUBMITTED.
4223	//   "ACCEPTED" - Status is ACCEPTED.
4224	//   "RUNNING" - Status is RUNNING.
4225	//   "FINISHED" - Status is FINISHED.
4226	//   "FAILED" - Status is FAILED.
4227	//   "KILLED" - Status is KILLED.
4228	State string `json:"state,omitempty"`
4229
4230	// TrackingUrl: Output only. The HTTP URL of the ApplicationMaster,
4231	// HistoryServer, or TimelineServer that provides application-specific
4232	// information. The URL uses the internal hostname, and requires a proxy
4233	// server for resolution and, possibly, access.
4234	TrackingUrl string `json:"trackingUrl,omitempty"`
4235
4236	// ForceSendFields is a list of field names (e.g. "Name") to
4237	// unconditionally include in API requests. By default, fields with
4238	// empty values are omitted from API requests. However, any non-pointer,
4239	// non-interface field appearing in ForceSendFields will be sent to the
4240	// server regardless of whether the field is empty or not. This may be
4241	// used to include empty fields in Patch requests.
4242	ForceSendFields []string `json:"-"`
4243
4244	// NullFields is a list of field names (e.g. "Name") to include in API
4245	// requests with the JSON null value. By default, fields with empty
4246	// values are omitted from API requests. However, any field with an
4247	// empty value appearing in NullFields will be sent to the server as
4248	// null. It is an error if a field in this list has a non-empty value.
4249	// This may be used to include null fields in Patch requests.
4250	NullFields []string `json:"-"`
4251}
4252
4253func (s *YarnApplication) MarshalJSON() ([]byte, error) {
4254	type NoMethod YarnApplication
4255	raw := NoMethod(*s)
4256	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4257}
4258
4259func (s *YarnApplication) UnmarshalJSON(data []byte) error {
4260	type NoMethod YarnApplication
4261	var s1 struct {
4262		Progress gensupport.JSONFloat64 `json:"progress"`
4263		*NoMethod
4264	}
4265	s1.NoMethod = (*NoMethod)(s)
4266	if err := json.Unmarshal(data, &s1); err != nil {
4267		return err
4268	}
4269	s.Progress = float64(s1.Progress)
4270	return nil
4271}
4272
4273// method id "dataproc.projects.locations.autoscalingPolicies.create":
4274
4275type ProjectsLocationsAutoscalingPoliciesCreateCall struct {
4276	s                 *Service
4277	parent            string
4278	autoscalingpolicy *AutoscalingPolicy
4279	urlParams_        gensupport.URLParams
4280	ctx_              context.Context
4281	header_           http.Header
4282}
4283
4284// Create: Creates new autoscaling policy.
4285func (r *ProjectsLocationsAutoscalingPoliciesService) Create(parent string, autoscalingpolicy *AutoscalingPolicy) *ProjectsLocationsAutoscalingPoliciesCreateCall {
4286	c := &ProjectsLocationsAutoscalingPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4287	c.parent = parent
4288	c.autoscalingpolicy = autoscalingpolicy
4289	return c
4290}
4291
4292// Fields allows partial responses to be retrieved. See
4293// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4294// for more information.
4295func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesCreateCall {
4296	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4297	return c
4298}
4299
4300// Context sets the context to be used in this call's Do method. Any
4301// pending HTTP request will be aborted if the provided context is
4302// canceled.
4303func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesCreateCall {
4304	c.ctx_ = ctx
4305	return c
4306}
4307
4308// Header returns an http.Header that can be modified by the caller to
4309// add HTTP headers to the request.
4310func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Header() http.Header {
4311	if c.header_ == nil {
4312		c.header_ = make(http.Header)
4313	}
4314	return c.header_
4315}
4316
4317func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
4318	reqHeaders := make(http.Header)
4319	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4320	for k, v := range c.header_ {
4321		reqHeaders[k] = v
4322	}
4323	reqHeaders.Set("User-Agent", c.s.userAgent())
4324	var body io.Reader = nil
4325	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
4326	if err != nil {
4327		return nil, err
4328	}
4329	reqHeaders.Set("Content-Type", "application/json")
4330	c.urlParams_.Set("alt", alt)
4331	c.urlParams_.Set("prettyPrint", "false")
4332	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/autoscalingPolicies")
4333	urls += "?" + c.urlParams_.Encode()
4334	req, err := http.NewRequest("POST", urls, body)
4335	if err != nil {
4336		return nil, err
4337	}
4338	req.Header = reqHeaders
4339	googleapi.Expand(req.URL, map[string]string{
4340		"parent": c.parent,
4341	})
4342	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4343}
4344
4345// Do executes the "dataproc.projects.locations.autoscalingPolicies.create" call.
4346// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
4347// non-2xx status code is an error. Response headers are in either
4348// *AutoscalingPolicy.ServerResponse.Header or (if a response was
4349// returned at all) in error.(*googleapi.Error).Header. Use
4350// googleapi.IsNotModified to check whether the returned error was
4351// because http.StatusNotModified was returned.
4352func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
4353	gensupport.SetOptions(c.urlParams_, opts...)
4354	res, err := c.doRequest("json")
4355	if res != nil && res.StatusCode == http.StatusNotModified {
4356		if res.Body != nil {
4357			res.Body.Close()
4358		}
4359		return nil, &googleapi.Error{
4360			Code:   res.StatusCode,
4361			Header: res.Header,
4362		}
4363	}
4364	if err != nil {
4365		return nil, err
4366	}
4367	defer googleapi.CloseBody(res)
4368	if err := googleapi.CheckResponse(res); err != nil {
4369		return nil, err
4370	}
4371	ret := &AutoscalingPolicy{
4372		ServerResponse: googleapi.ServerResponse{
4373			Header:         res.Header,
4374			HTTPStatusCode: res.StatusCode,
4375		},
4376	}
4377	target := &ret
4378	if err := gensupport.DecodeResponse(target, res); err != nil {
4379		return nil, err
4380	}
4381	return ret, nil
4382	// {
4383	//   "description": "Creates new autoscaling policy.",
4384	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies",
4385	//   "httpMethod": "POST",
4386	//   "id": "dataproc.projects.locations.autoscalingPolicies.create",
4387	//   "parameterOrder": [
4388	//     "parent"
4389	//   ],
4390	//   "parameters": {
4391	//     "parent": {
4392	//       "description": "Required. The \"resource name\" of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/regions/{region} For projects.locations.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/locations/{location}",
4393	//       "location": "path",
4394	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4395	//       "required": true,
4396	//       "type": "string"
4397	//     }
4398	//   },
4399	//   "path": "v1beta2/{+parent}/autoscalingPolicies",
4400	//   "request": {
4401	//     "$ref": "AutoscalingPolicy"
4402	//   },
4403	//   "response": {
4404	//     "$ref": "AutoscalingPolicy"
4405	//   },
4406	//   "scopes": [
4407	//     "https://www.googleapis.com/auth/cloud-platform"
4408	//   ]
4409	// }
4410
4411}
4412
4413// method id "dataproc.projects.locations.autoscalingPolicies.delete":
4414
4415type ProjectsLocationsAutoscalingPoliciesDeleteCall struct {
4416	s          *Service
4417	name       string
4418	urlParams_ gensupport.URLParams
4419	ctx_       context.Context
4420	header_    http.Header
4421}
4422
4423// Delete: Deletes an autoscaling policy. It is an error to delete an
4424// autoscaling policy that is in use by one or more clusters.
4425func (r *ProjectsLocationsAutoscalingPoliciesService) Delete(name string) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
4426	c := &ProjectsLocationsAutoscalingPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4427	c.name = name
4428	return c
4429}
4430
4431// Fields allows partial responses to be retrieved. See
4432// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4433// for more information.
4434func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
4435	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4436	return c
4437}
4438
4439// Context sets the context to be used in this call's Do method. Any
4440// pending HTTP request will be aborted if the provided context is
4441// canceled.
4442func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
4443	c.ctx_ = ctx
4444	return c
4445}
4446
4447// Header returns an http.Header that can be modified by the caller to
4448// add HTTP headers to the request.
4449func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Header() http.Header {
4450	if c.header_ == nil {
4451		c.header_ = make(http.Header)
4452	}
4453	return c.header_
4454}
4455
4456func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
4457	reqHeaders := make(http.Header)
4458	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4459	for k, v := range c.header_ {
4460		reqHeaders[k] = v
4461	}
4462	reqHeaders.Set("User-Agent", c.s.userAgent())
4463	var body io.Reader = nil
4464	c.urlParams_.Set("alt", alt)
4465	c.urlParams_.Set("prettyPrint", "false")
4466	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
4467	urls += "?" + c.urlParams_.Encode()
4468	req, err := http.NewRequest("DELETE", urls, body)
4469	if err != nil {
4470		return nil, err
4471	}
4472	req.Header = reqHeaders
4473	googleapi.Expand(req.URL, map[string]string{
4474		"name": c.name,
4475	})
4476	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4477}
4478
4479// Do executes the "dataproc.projects.locations.autoscalingPolicies.delete" call.
4480// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4481// code is an error. Response headers are in either
4482// *Empty.ServerResponse.Header or (if a response was returned at all)
4483// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4484// check whether the returned error was because http.StatusNotModified
4485// was returned.
4486func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4487	gensupport.SetOptions(c.urlParams_, opts...)
4488	res, err := c.doRequest("json")
4489	if res != nil && res.StatusCode == http.StatusNotModified {
4490		if res.Body != nil {
4491			res.Body.Close()
4492		}
4493		return nil, &googleapi.Error{
4494			Code:   res.StatusCode,
4495			Header: res.Header,
4496		}
4497	}
4498	if err != nil {
4499		return nil, err
4500	}
4501	defer googleapi.CloseBody(res)
4502	if err := googleapi.CheckResponse(res); err != nil {
4503		return nil, err
4504	}
4505	ret := &Empty{
4506		ServerResponse: googleapi.ServerResponse{
4507			Header:         res.Header,
4508			HTTPStatusCode: res.StatusCode,
4509		},
4510	}
4511	target := &ret
4512	if err := gensupport.DecodeResponse(target, res); err != nil {
4513		return nil, err
4514	}
4515	return ret, nil
4516	// {
4517	//   "description": "Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.",
4518	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}",
4519	//   "httpMethod": "DELETE",
4520	//   "id": "dataproc.projects.locations.autoscalingPolicies.delete",
4521	//   "parameterOrder": [
4522	//     "name"
4523	//   ],
4524	//   "parameters": {
4525	//     "name": {
4526	//       "description": "Required. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
4527	//       "location": "path",
4528	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
4529	//       "required": true,
4530	//       "type": "string"
4531	//     }
4532	//   },
4533	//   "path": "v1beta2/{+name}",
4534	//   "response": {
4535	//     "$ref": "Empty"
4536	//   },
4537	//   "scopes": [
4538	//     "https://www.googleapis.com/auth/cloud-platform"
4539	//   ]
4540	// }
4541
4542}
4543
4544// method id "dataproc.projects.locations.autoscalingPolicies.get":
4545
4546type ProjectsLocationsAutoscalingPoliciesGetCall struct {
4547	s            *Service
4548	name         string
4549	urlParams_   gensupport.URLParams
4550	ifNoneMatch_ string
4551	ctx_         context.Context
4552	header_      http.Header
4553}
4554
4555// Get: Retrieves autoscaling policy.
4556func (r *ProjectsLocationsAutoscalingPoliciesService) Get(name string) *ProjectsLocationsAutoscalingPoliciesGetCall {
4557	c := &ProjectsLocationsAutoscalingPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4558	c.name = name
4559	return c
4560}
4561
4562// Fields allows partial responses to be retrieved. See
4563// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4564// for more information.
4565func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesGetCall {
4566	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4567	return c
4568}
4569
4570// IfNoneMatch sets the optional parameter which makes the operation
4571// fail if the object's ETag matches the given value. This is useful for
4572// getting updates only after the object has changed since the last
4573// request. Use googleapi.IsNotModified to check whether the response
4574// error from Do is the result of In-None-Match.
4575func (c *ProjectsLocationsAutoscalingPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutoscalingPoliciesGetCall {
4576	c.ifNoneMatch_ = entityTag
4577	return c
4578}
4579
4580// Context sets the context to be used in this call's Do method. Any
4581// pending HTTP request will be aborted if the provided context is
4582// canceled.
4583func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesGetCall {
4584	c.ctx_ = ctx
4585	return c
4586}
4587
4588// Header returns an http.Header that can be modified by the caller to
4589// add HTTP headers to the request.
4590func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Header() http.Header {
4591	if c.header_ == nil {
4592		c.header_ = make(http.Header)
4593	}
4594	return c.header_
4595}
4596
4597func (c *ProjectsLocationsAutoscalingPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
4598	reqHeaders := make(http.Header)
4599	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4600	for k, v := range c.header_ {
4601		reqHeaders[k] = v
4602	}
4603	reqHeaders.Set("User-Agent", c.s.userAgent())
4604	if c.ifNoneMatch_ != "" {
4605		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4606	}
4607	var body io.Reader = nil
4608	c.urlParams_.Set("alt", alt)
4609	c.urlParams_.Set("prettyPrint", "false")
4610	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
4611	urls += "?" + c.urlParams_.Encode()
4612	req, err := http.NewRequest("GET", urls, body)
4613	if err != nil {
4614		return nil, err
4615	}
4616	req.Header = reqHeaders
4617	googleapi.Expand(req.URL, map[string]string{
4618		"name": c.name,
4619	})
4620	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4621}
4622
4623// Do executes the "dataproc.projects.locations.autoscalingPolicies.get" call.
4624// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
4625// non-2xx status code is an error. Response headers are in either
4626// *AutoscalingPolicy.ServerResponse.Header or (if a response was
4627// returned at all) in error.(*googleapi.Error).Header. Use
4628// googleapi.IsNotModified to check whether the returned error was
4629// because http.StatusNotModified was returned.
4630func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
4631	gensupport.SetOptions(c.urlParams_, opts...)
4632	res, err := c.doRequest("json")
4633	if res != nil && res.StatusCode == http.StatusNotModified {
4634		if res.Body != nil {
4635			res.Body.Close()
4636		}
4637		return nil, &googleapi.Error{
4638			Code:   res.StatusCode,
4639			Header: res.Header,
4640		}
4641	}
4642	if err != nil {
4643		return nil, err
4644	}
4645	defer googleapi.CloseBody(res)
4646	if err := googleapi.CheckResponse(res); err != nil {
4647		return nil, err
4648	}
4649	ret := &AutoscalingPolicy{
4650		ServerResponse: googleapi.ServerResponse{
4651			Header:         res.Header,
4652			HTTPStatusCode: res.StatusCode,
4653		},
4654	}
4655	target := &ret
4656	if err := gensupport.DecodeResponse(target, res); err != nil {
4657		return nil, err
4658	}
4659	return ret, nil
4660	// {
4661	//   "description": "Retrieves autoscaling policy.",
4662	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}",
4663	//   "httpMethod": "GET",
4664	//   "id": "dataproc.projects.locations.autoscalingPolicies.get",
4665	//   "parameterOrder": [
4666	//     "name"
4667	//   ],
4668	//   "parameters": {
4669	//     "name": {
4670	//       "description": "Required. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
4671	//       "location": "path",
4672	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
4673	//       "required": true,
4674	//       "type": "string"
4675	//     }
4676	//   },
4677	//   "path": "v1beta2/{+name}",
4678	//   "response": {
4679	//     "$ref": "AutoscalingPolicy"
4680	//   },
4681	//   "scopes": [
4682	//     "https://www.googleapis.com/auth/cloud-platform"
4683	//   ]
4684	// }
4685
4686}
4687
4688// method id "dataproc.projects.locations.autoscalingPolicies.getIamPolicy":
4689
4690type ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall struct {
4691	s            *Service
4692	resource     string
4693	urlParams_   gensupport.URLParams
4694	ifNoneMatch_ string
4695	ctx_         context.Context
4696	header_      http.Header
4697}
4698
4699// GetIamPolicy: Gets the access control policy for a resource. Returns
4700// an empty policy if the resource exists and does not have a policy
4701// set.
4702func (r *ProjectsLocationsAutoscalingPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4703	c := &ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4704	c.resource = resource
4705	return c
4706}
4707
4708// OptionsRequestedPolicyVersion sets the optional parameter
4709// "options.requestedPolicyVersion": The policy format version to be
4710// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
4711// value will be rejected.Requests for policies with any conditional
4712// bindings must specify version 3. Policies without any conditional
4713// bindings may specify any valid value or leave the field unset.To
4714// learn which resources support conditions in their IAM policies, see
4715// the IAM documentation
4716// (https://cloud.google.com/iam/help/conditions/resource-policies).
4717func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4718	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
4719	return c
4720}
4721
4722// Fields allows partial responses to be retrieved. See
4723// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4724// for more information.
4725func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4726	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4727	return c
4728}
4729
4730// IfNoneMatch sets the optional parameter which makes the operation
4731// fail if the object's ETag matches the given value. This is useful for
4732// getting updates only after the object has changed since the last
4733// request. Use googleapi.IsNotModified to check whether the response
4734// error from Do is the result of In-None-Match.
4735func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4736	c.ifNoneMatch_ = entityTag
4737	return c
4738}
4739
4740// Context sets the context to be used in this call's Do method. Any
4741// pending HTTP request will be aborted if the provided context is
4742// canceled.
4743func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4744	c.ctx_ = ctx
4745	return c
4746}
4747
4748// Header returns an http.Header that can be modified by the caller to
4749// add HTTP headers to the request.
4750func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Header() http.Header {
4751	if c.header_ == nil {
4752		c.header_ = make(http.Header)
4753	}
4754	return c.header_
4755}
4756
4757func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4758	reqHeaders := make(http.Header)
4759	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4760	for k, v := range c.header_ {
4761		reqHeaders[k] = v
4762	}
4763	reqHeaders.Set("User-Agent", c.s.userAgent())
4764	if c.ifNoneMatch_ != "" {
4765		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4766	}
4767	var body io.Reader = nil
4768	c.urlParams_.Set("alt", alt)
4769	c.urlParams_.Set("prettyPrint", "false")
4770	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
4771	urls += "?" + c.urlParams_.Encode()
4772	req, err := http.NewRequest("GET", urls, body)
4773	if err != nil {
4774		return nil, err
4775	}
4776	req.Header = reqHeaders
4777	googleapi.Expand(req.URL, map[string]string{
4778		"resource": c.resource,
4779	})
4780	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4781}
4782
4783// Do executes the "dataproc.projects.locations.autoscalingPolicies.getIamPolicy" call.
4784// Exactly one of *Policy or error will be non-nil. Any non-2xx status
4785// code is an error. Response headers are in either
4786// *Policy.ServerResponse.Header or (if a response was returned at all)
4787// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4788// check whether the returned error was because http.StatusNotModified
4789// was returned.
4790func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4791	gensupport.SetOptions(c.urlParams_, opts...)
4792	res, err := c.doRequest("json")
4793	if res != nil && res.StatusCode == http.StatusNotModified {
4794		if res.Body != nil {
4795			res.Body.Close()
4796		}
4797		return nil, &googleapi.Error{
4798			Code:   res.StatusCode,
4799			Header: res.Header,
4800		}
4801	}
4802	if err != nil {
4803		return nil, err
4804	}
4805	defer googleapi.CloseBody(res)
4806	if err := googleapi.CheckResponse(res); err != nil {
4807		return nil, err
4808	}
4809	ret := &Policy{
4810		ServerResponse: googleapi.ServerResponse{
4811			Header:         res.Header,
4812			HTTPStatusCode: res.StatusCode,
4813		},
4814	}
4815	target := &ret
4816	if err := gensupport.DecodeResponse(target, res); err != nil {
4817		return nil, err
4818	}
4819	return ret, nil
4820	// {
4821	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
4822	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}:getIamPolicy",
4823	//   "httpMethod": "GET",
4824	//   "id": "dataproc.projects.locations.autoscalingPolicies.getIamPolicy",
4825	//   "parameterOrder": [
4826	//     "resource"
4827	//   ],
4828	//   "parameters": {
4829	//     "options.requestedPolicyVersion": {
4830	//       "description": "Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).",
4831	//       "format": "int32",
4832	//       "location": "query",
4833	//       "type": "integer"
4834	//     },
4835	//     "resource": {
4836	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
4837	//       "location": "path",
4838	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
4839	//       "required": true,
4840	//       "type": "string"
4841	//     }
4842	//   },
4843	//   "path": "v1beta2/{+resource}:getIamPolicy",
4844	//   "response": {
4845	//     "$ref": "Policy"
4846	//   },
4847	//   "scopes": [
4848	//     "https://www.googleapis.com/auth/cloud-platform"
4849	//   ]
4850	// }
4851
4852}
4853
4854// method id "dataproc.projects.locations.autoscalingPolicies.list":
4855
4856type ProjectsLocationsAutoscalingPoliciesListCall struct {
4857	s            *Service
4858	parent       string
4859	urlParams_   gensupport.URLParams
4860	ifNoneMatch_ string
4861	ctx_         context.Context
4862	header_      http.Header
4863}
4864
4865// List: Lists autoscaling policies in the project.
4866func (r *ProjectsLocationsAutoscalingPoliciesService) List(parent string) *ProjectsLocationsAutoscalingPoliciesListCall {
4867	c := &ProjectsLocationsAutoscalingPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4868	c.parent = parent
4869	return c
4870}
4871
4872// PageSize sets the optional parameter "pageSize": The maximum number
4873// of results to return in each response. Must be less than or equal to
4874// 1000. Defaults to 100.
4875func (c *ProjectsLocationsAutoscalingPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsAutoscalingPoliciesListCall {
4876	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4877	return c
4878}
4879
4880// PageToken sets the optional parameter "pageToken": The page token,
4881// returned by a previous call, to request the next page of results.
4882func (c *ProjectsLocationsAutoscalingPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsAutoscalingPoliciesListCall {
4883	c.urlParams_.Set("pageToken", pageToken)
4884	return c
4885}
4886
4887// Fields allows partial responses to be retrieved. See
4888// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4889// for more information.
4890func (c *ProjectsLocationsAutoscalingPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesListCall {
4891	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4892	return c
4893}
4894
4895// IfNoneMatch sets the optional parameter which makes the operation
4896// fail if the object's ETag matches the given value. This is useful for
4897// getting updates only after the object has changed since the last
4898// request. Use googleapi.IsNotModified to check whether the response
4899// error from Do is the result of In-None-Match.
4900func (c *ProjectsLocationsAutoscalingPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutoscalingPoliciesListCall {
4901	c.ifNoneMatch_ = entityTag
4902	return c
4903}
4904
4905// Context sets the context to be used in this call's Do method. Any
4906// pending HTTP request will be aborted if the provided context is
4907// canceled.
4908func (c *ProjectsLocationsAutoscalingPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesListCall {
4909	c.ctx_ = ctx
4910	return c
4911}
4912
4913// Header returns an http.Header that can be modified by the caller to
4914// add HTTP headers to the request.
4915func (c *ProjectsLocationsAutoscalingPoliciesListCall) Header() http.Header {
4916	if c.header_ == nil {
4917		c.header_ = make(http.Header)
4918	}
4919	return c.header_
4920}
4921
4922func (c *ProjectsLocationsAutoscalingPoliciesListCall) doRequest(alt string) (*http.Response, error) {
4923	reqHeaders := make(http.Header)
4924	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
4925	for k, v := range c.header_ {
4926		reqHeaders[k] = v
4927	}
4928	reqHeaders.Set("User-Agent", c.s.userAgent())
4929	if c.ifNoneMatch_ != "" {
4930		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4931	}
4932	var body io.Reader = nil
4933	c.urlParams_.Set("alt", alt)
4934	c.urlParams_.Set("prettyPrint", "false")
4935	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/autoscalingPolicies")
4936	urls += "?" + c.urlParams_.Encode()
4937	req, err := http.NewRequest("GET", urls, body)
4938	if err != nil {
4939		return nil, err
4940	}
4941	req.Header = reqHeaders
4942	googleapi.Expand(req.URL, map[string]string{
4943		"parent": c.parent,
4944	})
4945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4946}
4947
4948// Do executes the "dataproc.projects.locations.autoscalingPolicies.list" call.
4949// Exactly one of *ListAutoscalingPoliciesResponse or error will be
4950// non-nil. Any non-2xx status code is an error. Response headers are in
4951// either *ListAutoscalingPoliciesResponse.ServerResponse.Header or (if
4952// a response was returned at all) in error.(*googleapi.Error).Header.
4953// Use googleapi.IsNotModified to check whether the returned error was
4954// because http.StatusNotModified was returned.
4955func (c *ProjectsLocationsAutoscalingPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListAutoscalingPoliciesResponse, error) {
4956	gensupport.SetOptions(c.urlParams_, opts...)
4957	res, err := c.doRequest("json")
4958	if res != nil && res.StatusCode == http.StatusNotModified {
4959		if res.Body != nil {
4960			res.Body.Close()
4961		}
4962		return nil, &googleapi.Error{
4963			Code:   res.StatusCode,
4964			Header: res.Header,
4965		}
4966	}
4967	if err != nil {
4968		return nil, err
4969	}
4970	defer googleapi.CloseBody(res)
4971	if err := googleapi.CheckResponse(res); err != nil {
4972		return nil, err
4973	}
4974	ret := &ListAutoscalingPoliciesResponse{
4975		ServerResponse: googleapi.ServerResponse{
4976			Header:         res.Header,
4977			HTTPStatusCode: res.StatusCode,
4978		},
4979	}
4980	target := &ret
4981	if err := gensupport.DecodeResponse(target, res); err != nil {
4982		return nil, err
4983	}
4984	return ret, nil
4985	// {
4986	//   "description": "Lists autoscaling policies in the project.",
4987	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies",
4988	//   "httpMethod": "GET",
4989	//   "id": "dataproc.projects.locations.autoscalingPolicies.list",
4990	//   "parameterOrder": [
4991	//     "parent"
4992	//   ],
4993	//   "parameters": {
4994	//     "pageSize": {
4995	//       "description": "Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.",
4996	//       "format": "int32",
4997	//       "location": "query",
4998	//       "type": "integer"
4999	//     },
5000	//     "pageToken": {
5001	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
5002	//       "location": "query",
5003	//       "type": "string"
5004	//     },
5005	//     "parent": {
5006	//       "description": "Required. The \"resource name\" of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region} For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}",
5007	//       "location": "path",
5008	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
5009	//       "required": true,
5010	//       "type": "string"
5011	//     }
5012	//   },
5013	//   "path": "v1beta2/{+parent}/autoscalingPolicies",
5014	//   "response": {
5015	//     "$ref": "ListAutoscalingPoliciesResponse"
5016	//   },
5017	//   "scopes": [
5018	//     "https://www.googleapis.com/auth/cloud-platform"
5019	//   ]
5020	// }
5021
5022}
5023
5024// Pages invokes f for each page of results.
5025// A non-nil error returned from f will halt the iteration.
5026// The provided context supersedes any context provided to the Context method.
5027func (c *ProjectsLocationsAutoscalingPoliciesListCall) Pages(ctx context.Context, f func(*ListAutoscalingPoliciesResponse) error) error {
5028	c.ctx_ = ctx
5029	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5030	for {
5031		x, err := c.Do()
5032		if err != nil {
5033			return err
5034		}
5035		if err := f(x); err != nil {
5036			return err
5037		}
5038		if x.NextPageToken == "" {
5039			return nil
5040		}
5041		c.PageToken(x.NextPageToken)
5042	}
5043}
5044
5045// method id "dataproc.projects.locations.autoscalingPolicies.setIamPolicy":
5046
5047type ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall struct {
5048	s                   *Service
5049	resource            string
5050	setiampolicyrequest *SetIamPolicyRequest
5051	urlParams_          gensupport.URLParams
5052	ctx_                context.Context
5053	header_             http.Header
5054}
5055
5056// SetIamPolicy: Sets the access control policy on the specified
5057// resource. Replaces any existing policy.Can return NOT_FOUND,
5058// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
5059func (r *ProjectsLocationsAutoscalingPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
5060	c := &ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5061	c.resource = resource
5062	c.setiampolicyrequest = setiampolicyrequest
5063	return c
5064}
5065
5066// Fields allows partial responses to be retrieved. See
5067// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5068// for more information.
5069func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
5070	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5071	return c
5072}
5073
5074// Context sets the context to be used in this call's Do method. Any
5075// pending HTTP request will be aborted if the provided context is
5076// canceled.
5077func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
5078	c.ctx_ = ctx
5079	return c
5080}
5081
5082// Header returns an http.Header that can be modified by the caller to
5083// add HTTP headers to the request.
5084func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Header() http.Header {
5085	if c.header_ == nil {
5086		c.header_ = make(http.Header)
5087	}
5088	return c.header_
5089}
5090
5091func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5092	reqHeaders := make(http.Header)
5093	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5094	for k, v := range c.header_ {
5095		reqHeaders[k] = v
5096	}
5097	reqHeaders.Set("User-Agent", c.s.userAgent())
5098	var body io.Reader = nil
5099	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
5100	if err != nil {
5101		return nil, err
5102	}
5103	reqHeaders.Set("Content-Type", "application/json")
5104	c.urlParams_.Set("alt", alt)
5105	c.urlParams_.Set("prettyPrint", "false")
5106	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
5107	urls += "?" + c.urlParams_.Encode()
5108	req, err := http.NewRequest("POST", urls, body)
5109	if err != nil {
5110		return nil, err
5111	}
5112	req.Header = reqHeaders
5113	googleapi.Expand(req.URL, map[string]string{
5114		"resource": c.resource,
5115	})
5116	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5117}
5118
5119// Do executes the "dataproc.projects.locations.autoscalingPolicies.setIamPolicy" call.
5120// Exactly one of *Policy or error will be non-nil. Any non-2xx status
5121// code is an error. Response headers are in either
5122// *Policy.ServerResponse.Header or (if a response was returned at all)
5123// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5124// check whether the returned error was because http.StatusNotModified
5125// was returned.
5126func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5127	gensupport.SetOptions(c.urlParams_, opts...)
5128	res, err := c.doRequest("json")
5129	if res != nil && res.StatusCode == http.StatusNotModified {
5130		if res.Body != nil {
5131			res.Body.Close()
5132		}
5133		return nil, &googleapi.Error{
5134			Code:   res.StatusCode,
5135			Header: res.Header,
5136		}
5137	}
5138	if err != nil {
5139		return nil, err
5140	}
5141	defer googleapi.CloseBody(res)
5142	if err := googleapi.CheckResponse(res); err != nil {
5143		return nil, err
5144	}
5145	ret := &Policy{
5146		ServerResponse: googleapi.ServerResponse{
5147			Header:         res.Header,
5148			HTTPStatusCode: res.StatusCode,
5149		},
5150	}
5151	target := &ret
5152	if err := gensupport.DecodeResponse(target, res); err != nil {
5153		return nil, err
5154	}
5155	return ret, nil
5156	// {
5157	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
5158	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}:setIamPolicy",
5159	//   "httpMethod": "POST",
5160	//   "id": "dataproc.projects.locations.autoscalingPolicies.setIamPolicy",
5161	//   "parameterOrder": [
5162	//     "resource"
5163	//   ],
5164	//   "parameters": {
5165	//     "resource": {
5166	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
5167	//       "location": "path",
5168	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
5169	//       "required": true,
5170	//       "type": "string"
5171	//     }
5172	//   },
5173	//   "path": "v1beta2/{+resource}:setIamPolicy",
5174	//   "request": {
5175	//     "$ref": "SetIamPolicyRequest"
5176	//   },
5177	//   "response": {
5178	//     "$ref": "Policy"
5179	//   },
5180	//   "scopes": [
5181	//     "https://www.googleapis.com/auth/cloud-platform"
5182	//   ]
5183	// }
5184
5185}
5186
5187// method id "dataproc.projects.locations.autoscalingPolicies.testIamPermissions":
5188
5189type ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall struct {
5190	s                         *Service
5191	resource                  string
5192	testiampermissionsrequest *TestIamPermissionsRequest
5193	urlParams_                gensupport.URLParams
5194	ctx_                      context.Context
5195	header_                   http.Header
5196}
5197
5198// TestIamPermissions: Returns permissions that a caller has on the
5199// specified resource. If the resource does not exist, this will return
5200// an empty set of permissions, not a NOT_FOUND error.Note: This
5201// operation is designed to be used for building permission-aware UIs
5202// and command-line tools, not for authorization checking. This
5203// operation may "fail open" without warning.
5204func (r *ProjectsLocationsAutoscalingPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
5205	c := &ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5206	c.resource = resource
5207	c.testiampermissionsrequest = testiampermissionsrequest
5208	return c
5209}
5210
5211// Fields allows partial responses to be retrieved. See
5212// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5213// for more information.
5214func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
5215	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5216	return c
5217}
5218
5219// Context sets the context to be used in this call's Do method. Any
5220// pending HTTP request will be aborted if the provided context is
5221// canceled.
5222func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
5223	c.ctx_ = ctx
5224	return c
5225}
5226
5227// Header returns an http.Header that can be modified by the caller to
5228// add HTTP headers to the request.
5229func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Header() http.Header {
5230	if c.header_ == nil {
5231		c.header_ = make(http.Header)
5232	}
5233	return c.header_
5234}
5235
5236func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5237	reqHeaders := make(http.Header)
5238	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5239	for k, v := range c.header_ {
5240		reqHeaders[k] = v
5241	}
5242	reqHeaders.Set("User-Agent", c.s.userAgent())
5243	var body io.Reader = nil
5244	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
5245	if err != nil {
5246		return nil, err
5247	}
5248	reqHeaders.Set("Content-Type", "application/json")
5249	c.urlParams_.Set("alt", alt)
5250	c.urlParams_.Set("prettyPrint", "false")
5251	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
5252	urls += "?" + c.urlParams_.Encode()
5253	req, err := http.NewRequest("POST", urls, body)
5254	if err != nil {
5255		return nil, err
5256	}
5257	req.Header = reqHeaders
5258	googleapi.Expand(req.URL, map[string]string{
5259		"resource": c.resource,
5260	})
5261	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5262}
5263
5264// Do executes the "dataproc.projects.locations.autoscalingPolicies.testIamPermissions" call.
5265// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
5266// Any non-2xx status code is an error. Response headers are in either
5267// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
5268// was returned at all) in error.(*googleapi.Error).Header. Use
5269// googleapi.IsNotModified to check whether the returned error was
5270// because http.StatusNotModified was returned.
5271func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
5272	gensupport.SetOptions(c.urlParams_, opts...)
5273	res, err := c.doRequest("json")
5274	if res != nil && res.StatusCode == http.StatusNotModified {
5275		if res.Body != nil {
5276			res.Body.Close()
5277		}
5278		return nil, &googleapi.Error{
5279			Code:   res.StatusCode,
5280			Header: res.Header,
5281		}
5282	}
5283	if err != nil {
5284		return nil, err
5285	}
5286	defer googleapi.CloseBody(res)
5287	if err := googleapi.CheckResponse(res); err != nil {
5288		return nil, err
5289	}
5290	ret := &TestIamPermissionsResponse{
5291		ServerResponse: googleapi.ServerResponse{
5292			Header:         res.Header,
5293			HTTPStatusCode: res.StatusCode,
5294		},
5295	}
5296	target := &ret
5297	if err := gensupport.DecodeResponse(target, res); err != nil {
5298		return nil, err
5299	}
5300	return ret, nil
5301	// {
5302	//   "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.",
5303	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}:testIamPermissions",
5304	//   "httpMethod": "POST",
5305	//   "id": "dataproc.projects.locations.autoscalingPolicies.testIamPermissions",
5306	//   "parameterOrder": [
5307	//     "resource"
5308	//   ],
5309	//   "parameters": {
5310	//     "resource": {
5311	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
5312	//       "location": "path",
5313	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
5314	//       "required": true,
5315	//       "type": "string"
5316	//     }
5317	//   },
5318	//   "path": "v1beta2/{+resource}:testIamPermissions",
5319	//   "request": {
5320	//     "$ref": "TestIamPermissionsRequest"
5321	//   },
5322	//   "response": {
5323	//     "$ref": "TestIamPermissionsResponse"
5324	//   },
5325	//   "scopes": [
5326	//     "https://www.googleapis.com/auth/cloud-platform"
5327	//   ]
5328	// }
5329
5330}
5331
5332// method id "dataproc.projects.locations.autoscalingPolicies.update":
5333
5334type ProjectsLocationsAutoscalingPoliciesUpdateCall struct {
5335	s                 *Service
5336	name              string
5337	autoscalingpolicy *AutoscalingPolicy
5338	urlParams_        gensupport.URLParams
5339	ctx_              context.Context
5340	header_           http.Header
5341}
5342
5343// Update: Updates (replaces) autoscaling policy.Disabled check for
5344// update_mask, because all updates will be full replacements.
5345func (r *ProjectsLocationsAutoscalingPoliciesService) Update(name string, autoscalingpolicy *AutoscalingPolicy) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
5346	c := &ProjectsLocationsAutoscalingPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5347	c.name = name
5348	c.autoscalingpolicy = autoscalingpolicy
5349	return c
5350}
5351
5352// Fields allows partial responses to be retrieved. See
5353// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5354// for more information.
5355func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
5356	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5357	return c
5358}
5359
5360// Context sets the context to be used in this call's Do method. Any
5361// pending HTTP request will be aborted if the provided context is
5362// canceled.
5363func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
5364	c.ctx_ = ctx
5365	return c
5366}
5367
5368// Header returns an http.Header that can be modified by the caller to
5369// add HTTP headers to the request.
5370func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Header() http.Header {
5371	if c.header_ == nil {
5372		c.header_ = make(http.Header)
5373	}
5374	return c.header_
5375}
5376
5377func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
5378	reqHeaders := make(http.Header)
5379	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5380	for k, v := range c.header_ {
5381		reqHeaders[k] = v
5382	}
5383	reqHeaders.Set("User-Agent", c.s.userAgent())
5384	var body io.Reader = nil
5385	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
5386	if err != nil {
5387		return nil, err
5388	}
5389	reqHeaders.Set("Content-Type", "application/json")
5390	c.urlParams_.Set("alt", alt)
5391	c.urlParams_.Set("prettyPrint", "false")
5392	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
5393	urls += "?" + c.urlParams_.Encode()
5394	req, err := http.NewRequest("PUT", urls, body)
5395	if err != nil {
5396		return nil, err
5397	}
5398	req.Header = reqHeaders
5399	googleapi.Expand(req.URL, map[string]string{
5400		"name": c.name,
5401	})
5402	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5403}
5404
5405// Do executes the "dataproc.projects.locations.autoscalingPolicies.update" call.
5406// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
5407// non-2xx status code is an error. Response headers are in either
5408// *AutoscalingPolicy.ServerResponse.Header or (if a response was
5409// returned at all) in error.(*googleapi.Error).Header. Use
5410// googleapi.IsNotModified to check whether the returned error was
5411// because http.StatusNotModified was returned.
5412func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
5413	gensupport.SetOptions(c.urlParams_, opts...)
5414	res, err := c.doRequest("json")
5415	if res != nil && res.StatusCode == http.StatusNotModified {
5416		if res.Body != nil {
5417			res.Body.Close()
5418		}
5419		return nil, &googleapi.Error{
5420			Code:   res.StatusCode,
5421			Header: res.Header,
5422		}
5423	}
5424	if err != nil {
5425		return nil, err
5426	}
5427	defer googleapi.CloseBody(res)
5428	if err := googleapi.CheckResponse(res); err != nil {
5429		return nil, err
5430	}
5431	ret := &AutoscalingPolicy{
5432		ServerResponse: googleapi.ServerResponse{
5433			Header:         res.Header,
5434			HTTPStatusCode: res.StatusCode,
5435		},
5436	}
5437	target := &ret
5438	if err := gensupport.DecodeResponse(target, res); err != nil {
5439		return nil, err
5440	}
5441	return ret, nil
5442	// {
5443	//   "description": "Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.",
5444	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}",
5445	//   "httpMethod": "PUT",
5446	//   "id": "dataproc.projects.locations.autoscalingPolicies.update",
5447	//   "parameterOrder": [
5448	//     "name"
5449	//   ],
5450	//   "parameters": {
5451	//     "name": {
5452	//       "description": "Output only. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
5453	//       "location": "path",
5454	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
5455	//       "required": true,
5456	//       "type": "string"
5457	//     }
5458	//   },
5459	//   "path": "v1beta2/{+name}",
5460	//   "request": {
5461	//     "$ref": "AutoscalingPolicy"
5462	//   },
5463	//   "response": {
5464	//     "$ref": "AutoscalingPolicy"
5465	//   },
5466	//   "scopes": [
5467	//     "https://www.googleapis.com/auth/cloud-platform"
5468	//   ]
5469	// }
5470
5471}
5472
5473// method id "dataproc.projects.locations.workflowTemplates.create":
5474
5475type ProjectsLocationsWorkflowTemplatesCreateCall struct {
5476	s                *Service
5477	parent           string
5478	workflowtemplate *WorkflowTemplate
5479	urlParams_       gensupport.URLParams
5480	ctx_             context.Context
5481	header_          http.Header
5482}
5483
5484// Create: Creates new workflow template.
5485func (r *ProjectsLocationsWorkflowTemplatesService) Create(parent string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesCreateCall {
5486	c := &ProjectsLocationsWorkflowTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5487	c.parent = parent
5488	c.workflowtemplate = workflowtemplate
5489	return c
5490}
5491
5492// Fields allows partial responses to be retrieved. See
5493// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5494// for more information.
5495func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesCreateCall {
5496	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5497	return c
5498}
5499
5500// Context sets the context to be used in this call's Do method. Any
5501// pending HTTP request will be aborted if the provided context is
5502// canceled.
5503func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesCreateCall {
5504	c.ctx_ = ctx
5505	return c
5506}
5507
5508// Header returns an http.Header that can be modified by the caller to
5509// add HTTP headers to the request.
5510func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Header() http.Header {
5511	if c.header_ == nil {
5512		c.header_ = make(http.Header)
5513	}
5514	return c.header_
5515}
5516
5517func (c *ProjectsLocationsWorkflowTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
5518	reqHeaders := make(http.Header)
5519	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5520	for k, v := range c.header_ {
5521		reqHeaders[k] = v
5522	}
5523	reqHeaders.Set("User-Agent", c.s.userAgent())
5524	var body io.Reader = nil
5525	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
5526	if err != nil {
5527		return nil, err
5528	}
5529	reqHeaders.Set("Content-Type", "application/json")
5530	c.urlParams_.Set("alt", alt)
5531	c.urlParams_.Set("prettyPrint", "false")
5532	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates")
5533	urls += "?" + c.urlParams_.Encode()
5534	req, err := http.NewRequest("POST", urls, body)
5535	if err != nil {
5536		return nil, err
5537	}
5538	req.Header = reqHeaders
5539	googleapi.Expand(req.URL, map[string]string{
5540		"parent": c.parent,
5541	})
5542	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5543}
5544
5545// Do executes the "dataproc.projects.locations.workflowTemplates.create" call.
5546// Exactly one of *WorkflowTemplate or error will be non-nil. Any
5547// non-2xx status code is an error. Response headers are in either
5548// *WorkflowTemplate.ServerResponse.Header or (if a response was
5549// returned at all) in error.(*googleapi.Error).Header. Use
5550// googleapi.IsNotModified to check whether the returned error was
5551// because http.StatusNotModified was returned.
5552func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
5553	gensupport.SetOptions(c.urlParams_, opts...)
5554	res, err := c.doRequest("json")
5555	if res != nil && res.StatusCode == http.StatusNotModified {
5556		if res.Body != nil {
5557			res.Body.Close()
5558		}
5559		return nil, &googleapi.Error{
5560			Code:   res.StatusCode,
5561			Header: res.Header,
5562		}
5563	}
5564	if err != nil {
5565		return nil, err
5566	}
5567	defer googleapi.CloseBody(res)
5568	if err := googleapi.CheckResponse(res); err != nil {
5569		return nil, err
5570	}
5571	ret := &WorkflowTemplate{
5572		ServerResponse: googleapi.ServerResponse{
5573			Header:         res.Header,
5574			HTTPStatusCode: res.StatusCode,
5575		},
5576	}
5577	target := &ret
5578	if err := gensupport.DecodeResponse(target, res); err != nil {
5579		return nil, err
5580	}
5581	return ret, nil
5582	// {
5583	//   "description": "Creates new workflow template.",
5584	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates",
5585	//   "httpMethod": "POST",
5586	//   "id": "dataproc.projects.locations.workflowTemplates.create",
5587	//   "parameterOrder": [
5588	//     "parent"
5589	//   ],
5590	//   "parameters": {
5591	//     "parent": {
5592	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates,create, the resource name of the region has the following format: projects/{project_id}/regions/{region} For projects.locations.workflowTemplates.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}",
5593	//       "location": "path",
5594	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
5595	//       "required": true,
5596	//       "type": "string"
5597	//     }
5598	//   },
5599	//   "path": "v1beta2/{+parent}/workflowTemplates",
5600	//   "request": {
5601	//     "$ref": "WorkflowTemplate"
5602	//   },
5603	//   "response": {
5604	//     "$ref": "WorkflowTemplate"
5605	//   },
5606	//   "scopes": [
5607	//     "https://www.googleapis.com/auth/cloud-platform"
5608	//   ]
5609	// }
5610
5611}
5612
5613// method id "dataproc.projects.locations.workflowTemplates.delete":
5614
5615type ProjectsLocationsWorkflowTemplatesDeleteCall struct {
5616	s          *Service
5617	name       string
5618	urlParams_ gensupport.URLParams
5619	ctx_       context.Context
5620	header_    http.Header
5621}
5622
5623// Delete: Deletes a workflow template. It does not cancel in-progress
5624// workflows.
5625func (r *ProjectsLocationsWorkflowTemplatesService) Delete(name string) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5626	c := &ProjectsLocationsWorkflowTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5627	c.name = name
5628	return c
5629}
5630
5631// Version sets the optional parameter "version": The version of
5632// workflow template to delete. If specified, will only delete the
5633// template if the current server version matches specified version.
5634func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Version(version int64) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5635	c.urlParams_.Set("version", fmt.Sprint(version))
5636	return c
5637}
5638
5639// Fields allows partial responses to be retrieved. See
5640// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5641// for more information.
5642func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5643	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5644	return c
5645}
5646
5647// Context sets the context to be used in this call's Do method. Any
5648// pending HTTP request will be aborted if the provided context is
5649// canceled.
5650func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5651	c.ctx_ = ctx
5652	return c
5653}
5654
5655// Header returns an http.Header that can be modified by the caller to
5656// add HTTP headers to the request.
5657func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Header() http.Header {
5658	if c.header_ == nil {
5659		c.header_ = make(http.Header)
5660	}
5661	return c.header_
5662}
5663
5664func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
5665	reqHeaders := make(http.Header)
5666	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5667	for k, v := range c.header_ {
5668		reqHeaders[k] = v
5669	}
5670	reqHeaders.Set("User-Agent", c.s.userAgent())
5671	var body io.Reader = nil
5672	c.urlParams_.Set("alt", alt)
5673	c.urlParams_.Set("prettyPrint", "false")
5674	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
5675	urls += "?" + c.urlParams_.Encode()
5676	req, err := http.NewRequest("DELETE", urls, body)
5677	if err != nil {
5678		return nil, err
5679	}
5680	req.Header = reqHeaders
5681	googleapi.Expand(req.URL, map[string]string{
5682		"name": c.name,
5683	})
5684	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5685}
5686
5687// Do executes the "dataproc.projects.locations.workflowTemplates.delete" call.
5688// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5689// code is an error. Response headers are in either
5690// *Empty.ServerResponse.Header or (if a response was returned at all)
5691// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5692// check whether the returned error was because http.StatusNotModified
5693// was returned.
5694func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5695	gensupport.SetOptions(c.urlParams_, opts...)
5696	res, err := c.doRequest("json")
5697	if res != nil && res.StatusCode == http.StatusNotModified {
5698		if res.Body != nil {
5699			res.Body.Close()
5700		}
5701		return nil, &googleapi.Error{
5702			Code:   res.StatusCode,
5703			Header: res.Header,
5704		}
5705	}
5706	if err != nil {
5707		return nil, err
5708	}
5709	defer googleapi.CloseBody(res)
5710	if err := googleapi.CheckResponse(res); err != nil {
5711		return nil, err
5712	}
5713	ret := &Empty{
5714		ServerResponse: googleapi.ServerResponse{
5715			Header:         res.Header,
5716			HTTPStatusCode: res.StatusCode,
5717		},
5718	}
5719	target := &ret
5720	if err := gensupport.DecodeResponse(target, res); err != nil {
5721		return nil, err
5722	}
5723	return ret, nil
5724	// {
5725	//   "description": "Deletes a workflow template. It does not cancel in-progress workflows.",
5726	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}",
5727	//   "httpMethod": "DELETE",
5728	//   "id": "dataproc.projects.locations.workflowTemplates.delete",
5729	//   "parameterOrder": [
5730	//     "name"
5731	//   ],
5732	//   "parameters": {
5733	//     "name": {
5734	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates.delete, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id} For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
5735	//       "location": "path",
5736	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
5737	//       "required": true,
5738	//       "type": "string"
5739	//     },
5740	//     "version": {
5741	//       "description": "Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.",
5742	//       "format": "int32",
5743	//       "location": "query",
5744	//       "type": "integer"
5745	//     }
5746	//   },
5747	//   "path": "v1beta2/{+name}",
5748	//   "response": {
5749	//     "$ref": "Empty"
5750	//   },
5751	//   "scopes": [
5752	//     "https://www.googleapis.com/auth/cloud-platform"
5753	//   ]
5754	// }
5755
5756}
5757
5758// method id "dataproc.projects.locations.workflowTemplates.get":
5759
5760type ProjectsLocationsWorkflowTemplatesGetCall struct {
5761	s            *Service
5762	name         string
5763	urlParams_   gensupport.URLParams
5764	ifNoneMatch_ string
5765	ctx_         context.Context
5766	header_      http.Header
5767}
5768
5769// Get: Retrieves the latest workflow template.Can retrieve previously
5770// instantiated template by specifying optional version parameter.
5771func (r *ProjectsLocationsWorkflowTemplatesService) Get(name string) *ProjectsLocationsWorkflowTemplatesGetCall {
5772	c := &ProjectsLocationsWorkflowTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5773	c.name = name
5774	return c
5775}
5776
5777// Version sets the optional parameter "version": The version of
5778// workflow template to retrieve. Only previously instantiated versions
5779// can be retrieved.If unspecified, retrieves the current version.
5780func (c *ProjectsLocationsWorkflowTemplatesGetCall) Version(version int64) *ProjectsLocationsWorkflowTemplatesGetCall {
5781	c.urlParams_.Set("version", fmt.Sprint(version))
5782	return c
5783}
5784
5785// Fields allows partial responses to be retrieved. See
5786// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5787// for more information.
5788func (c *ProjectsLocationsWorkflowTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesGetCall {
5789	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5790	return c
5791}
5792
5793// IfNoneMatch sets the optional parameter which makes the operation
5794// fail if the object's ETag matches the given value. This is useful for
5795// getting updates only after the object has changed since the last
5796// request. Use googleapi.IsNotModified to check whether the response
5797// error from Do is the result of In-None-Match.
5798func (c *ProjectsLocationsWorkflowTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowTemplatesGetCall {
5799	c.ifNoneMatch_ = entityTag
5800	return c
5801}
5802
5803// Context sets the context to be used in this call's Do method. Any
5804// pending HTTP request will be aborted if the provided context is
5805// canceled.
5806func (c *ProjectsLocationsWorkflowTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesGetCall {
5807	c.ctx_ = ctx
5808	return c
5809}
5810
5811// Header returns an http.Header that can be modified by the caller to
5812// add HTTP headers to the request.
5813func (c *ProjectsLocationsWorkflowTemplatesGetCall) Header() http.Header {
5814	if c.header_ == nil {
5815		c.header_ = make(http.Header)
5816	}
5817	return c.header_
5818}
5819
5820func (c *ProjectsLocationsWorkflowTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
5821	reqHeaders := make(http.Header)
5822	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5823	for k, v := range c.header_ {
5824		reqHeaders[k] = v
5825	}
5826	reqHeaders.Set("User-Agent", c.s.userAgent())
5827	if c.ifNoneMatch_ != "" {
5828		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5829	}
5830	var body io.Reader = nil
5831	c.urlParams_.Set("alt", alt)
5832	c.urlParams_.Set("prettyPrint", "false")
5833	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
5834	urls += "?" + c.urlParams_.Encode()
5835	req, err := http.NewRequest("GET", urls, body)
5836	if err != nil {
5837		return nil, err
5838	}
5839	req.Header = reqHeaders
5840	googleapi.Expand(req.URL, map[string]string{
5841		"name": c.name,
5842	})
5843	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5844}
5845
5846// Do executes the "dataproc.projects.locations.workflowTemplates.get" call.
5847// Exactly one of *WorkflowTemplate or error will be non-nil. Any
5848// non-2xx status code is an error. Response headers are in either
5849// *WorkflowTemplate.ServerResponse.Header or (if a response was
5850// returned at all) in error.(*googleapi.Error).Header. Use
5851// googleapi.IsNotModified to check whether the returned error was
5852// because http.StatusNotModified was returned.
5853func (c *ProjectsLocationsWorkflowTemplatesGetCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
5854	gensupport.SetOptions(c.urlParams_, opts...)
5855	res, err := c.doRequest("json")
5856	if res != nil && res.StatusCode == http.StatusNotModified {
5857		if res.Body != nil {
5858			res.Body.Close()
5859		}
5860		return nil, &googleapi.Error{
5861			Code:   res.StatusCode,
5862			Header: res.Header,
5863		}
5864	}
5865	if err != nil {
5866		return nil, err
5867	}
5868	defer googleapi.CloseBody(res)
5869	if err := googleapi.CheckResponse(res); err != nil {
5870		return nil, err
5871	}
5872	ret := &WorkflowTemplate{
5873		ServerResponse: googleapi.ServerResponse{
5874			Header:         res.Header,
5875			HTTPStatusCode: res.StatusCode,
5876		},
5877	}
5878	target := &ret
5879	if err := gensupport.DecodeResponse(target, res); err != nil {
5880		return nil, err
5881	}
5882	return ret, nil
5883	// {
5884	//   "description": "Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.",
5885	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}",
5886	//   "httpMethod": "GET",
5887	//   "id": "dataproc.projects.locations.workflowTemplates.get",
5888	//   "parameterOrder": [
5889	//     "name"
5890	//   ],
5891	//   "parameters": {
5892	//     "name": {
5893	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id} For projects.locations.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
5894	//       "location": "path",
5895	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
5896	//       "required": true,
5897	//       "type": "string"
5898	//     },
5899	//     "version": {
5900	//       "description": "Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.If unspecified, retrieves the current version.",
5901	//       "format": "int32",
5902	//       "location": "query",
5903	//       "type": "integer"
5904	//     }
5905	//   },
5906	//   "path": "v1beta2/{+name}",
5907	//   "response": {
5908	//     "$ref": "WorkflowTemplate"
5909	//   },
5910	//   "scopes": [
5911	//     "https://www.googleapis.com/auth/cloud-platform"
5912	//   ]
5913	// }
5914
5915}
5916
5917// method id "dataproc.projects.locations.workflowTemplates.getIamPolicy":
5918
5919type ProjectsLocationsWorkflowTemplatesGetIamPolicyCall struct {
5920	s            *Service
5921	resource     string
5922	urlParams_   gensupport.URLParams
5923	ifNoneMatch_ string
5924	ctx_         context.Context
5925	header_      http.Header
5926}
5927
5928// GetIamPolicy: Gets the access control policy for a resource. Returns
5929// an empty policy if the resource exists and does not have a policy
5930// set.
5931func (r *ProjectsLocationsWorkflowTemplatesService) GetIamPolicy(resource string) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
5932	c := &ProjectsLocationsWorkflowTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5933	c.resource = resource
5934	return c
5935}
5936
5937// OptionsRequestedPolicyVersion sets the optional parameter
5938// "options.requestedPolicyVersion": The policy format version to be
5939// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
5940// value will be rejected.Requests for policies with any conditional
5941// bindings must specify version 3. Policies without any conditional
5942// bindings may specify any valid value or leave the field unset.To
5943// learn which resources support conditions in their IAM policies, see
5944// the IAM documentation
5945// (https://cloud.google.com/iam/help/conditions/resource-policies).
5946func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
5947	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
5948	return c
5949}
5950
5951// Fields allows partial responses to be retrieved. See
5952// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5953// for more information.
5954func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
5955	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5956	return c
5957}
5958
5959// IfNoneMatch sets the optional parameter which makes the operation
5960// fail if the object's ETag matches the given value. This is useful for
5961// getting updates only after the object has changed since the last
5962// request. Use googleapi.IsNotModified to check whether the response
5963// error from Do is the result of In-None-Match.
5964func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
5965	c.ifNoneMatch_ = entityTag
5966	return c
5967}
5968
5969// Context sets the context to be used in this call's Do method. Any
5970// pending HTTP request will be aborted if the provided context is
5971// canceled.
5972func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
5973	c.ctx_ = ctx
5974	return c
5975}
5976
5977// Header returns an http.Header that can be modified by the caller to
5978// add HTTP headers to the request.
5979func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Header() http.Header {
5980	if c.header_ == nil {
5981		c.header_ = make(http.Header)
5982	}
5983	return c.header_
5984}
5985
5986func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5987	reqHeaders := make(http.Header)
5988	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
5989	for k, v := range c.header_ {
5990		reqHeaders[k] = v
5991	}
5992	reqHeaders.Set("User-Agent", c.s.userAgent())
5993	if c.ifNoneMatch_ != "" {
5994		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5995	}
5996	var body io.Reader = nil
5997	c.urlParams_.Set("alt", alt)
5998	c.urlParams_.Set("prettyPrint", "false")
5999	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
6000	urls += "?" + c.urlParams_.Encode()
6001	req, err := http.NewRequest("GET", urls, body)
6002	if err != nil {
6003		return nil, err
6004	}
6005	req.Header = reqHeaders
6006	googleapi.Expand(req.URL, map[string]string{
6007		"resource": c.resource,
6008	})
6009	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6010}
6011
6012// Do executes the "dataproc.projects.locations.workflowTemplates.getIamPolicy" call.
6013// Exactly one of *Policy or error will be non-nil. Any non-2xx status
6014// code is an error. Response headers are in either
6015// *Policy.ServerResponse.Header or (if a response was returned at all)
6016// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6017// check whether the returned error was because http.StatusNotModified
6018// was returned.
6019func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6020	gensupport.SetOptions(c.urlParams_, opts...)
6021	res, err := c.doRequest("json")
6022	if res != nil && res.StatusCode == http.StatusNotModified {
6023		if res.Body != nil {
6024			res.Body.Close()
6025		}
6026		return nil, &googleapi.Error{
6027			Code:   res.StatusCode,
6028			Header: res.Header,
6029		}
6030	}
6031	if err != nil {
6032		return nil, err
6033	}
6034	defer googleapi.CloseBody(res)
6035	if err := googleapi.CheckResponse(res); err != nil {
6036		return nil, err
6037	}
6038	ret := &Policy{
6039		ServerResponse: googleapi.ServerResponse{
6040			Header:         res.Header,
6041			HTTPStatusCode: res.StatusCode,
6042		},
6043	}
6044	target := &ret
6045	if err := gensupport.DecodeResponse(target, res); err != nil {
6046		return nil, err
6047	}
6048	return ret, nil
6049	// {
6050	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
6051	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:getIamPolicy",
6052	//   "httpMethod": "GET",
6053	//   "id": "dataproc.projects.locations.workflowTemplates.getIamPolicy",
6054	//   "parameterOrder": [
6055	//     "resource"
6056	//   ],
6057	//   "parameters": {
6058	//     "options.requestedPolicyVersion": {
6059	//       "description": "Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).",
6060	//       "format": "int32",
6061	//       "location": "query",
6062	//       "type": "integer"
6063	//     },
6064	//     "resource": {
6065	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
6066	//       "location": "path",
6067	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6068	//       "required": true,
6069	//       "type": "string"
6070	//     }
6071	//   },
6072	//   "path": "v1beta2/{+resource}:getIamPolicy",
6073	//   "response": {
6074	//     "$ref": "Policy"
6075	//   },
6076	//   "scopes": [
6077	//     "https://www.googleapis.com/auth/cloud-platform"
6078	//   ]
6079	// }
6080
6081}
6082
6083// method id "dataproc.projects.locations.workflowTemplates.instantiate":
6084
6085type ProjectsLocationsWorkflowTemplatesInstantiateCall struct {
6086	s                                  *Service
6087	name                               string
6088	instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest
6089	urlParams_                         gensupport.URLParams
6090	ctx_                               context.Context
6091	header_                            http.Header
6092}
6093
6094// Instantiate: Instantiates a template and begins execution.The
6095// returned Operation can be used to track execution of workflow by
6096// polling operations.get. The Operation will complete when entire
6097// workflow is finished.The running workflow can be aborted via
6098// operations.cancel. This will cause any inflight jobs to be cancelled
6099// and workflow-owned clusters to be deleted.The Operation.metadata will
6100// be WorkflowMetadata
6101// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
6102// aproc.v1beta2#workflowmetadata). Also see Using WorkflowMetadata
6103// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#u
6104// sing_workflowmetadata).On successful completion, Operation.response
6105// will be Empty.
6106func (r *ProjectsLocationsWorkflowTemplatesService) Instantiate(name string, instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
6107	c := &ProjectsLocationsWorkflowTemplatesInstantiateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6108	c.name = name
6109	c.instantiateworkflowtemplaterequest = instantiateworkflowtemplaterequest
6110	return c
6111}
6112
6113// Fields allows partial responses to be retrieved. See
6114// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6115// for more information.
6116func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
6117	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6118	return c
6119}
6120
6121// Context sets the context to be used in this call's Do method. Any
6122// pending HTTP request will be aborted if the provided context is
6123// canceled.
6124func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
6125	c.ctx_ = ctx
6126	return c
6127}
6128
6129// Header returns an http.Header that can be modified by the caller to
6130// add HTTP headers to the request.
6131func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Header() http.Header {
6132	if c.header_ == nil {
6133		c.header_ = make(http.Header)
6134	}
6135	return c.header_
6136}
6137
6138func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) doRequest(alt string) (*http.Response, error) {
6139	reqHeaders := make(http.Header)
6140	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6141	for k, v := range c.header_ {
6142		reqHeaders[k] = v
6143	}
6144	reqHeaders.Set("User-Agent", c.s.userAgent())
6145	var body io.Reader = nil
6146	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantiateworkflowtemplaterequest)
6147	if err != nil {
6148		return nil, err
6149	}
6150	reqHeaders.Set("Content-Type", "application/json")
6151	c.urlParams_.Set("alt", alt)
6152	c.urlParams_.Set("prettyPrint", "false")
6153	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:instantiate")
6154	urls += "?" + c.urlParams_.Encode()
6155	req, err := http.NewRequest("POST", urls, body)
6156	if err != nil {
6157		return nil, err
6158	}
6159	req.Header = reqHeaders
6160	googleapi.Expand(req.URL, map[string]string{
6161		"name": c.name,
6162	})
6163	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6164}
6165
6166// Do executes the "dataproc.projects.locations.workflowTemplates.instantiate" call.
6167// Exactly one of *Operation or error will be non-nil. Any non-2xx
6168// status code is an error. Response headers are in either
6169// *Operation.ServerResponse.Header or (if a response was returned at
6170// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6171// to check whether the returned error was because
6172// http.StatusNotModified was returned.
6173func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6174	gensupport.SetOptions(c.urlParams_, opts...)
6175	res, err := c.doRequest("json")
6176	if res != nil && res.StatusCode == http.StatusNotModified {
6177		if res.Body != nil {
6178			res.Body.Close()
6179		}
6180		return nil, &googleapi.Error{
6181			Code:   res.StatusCode,
6182			Header: res.Header,
6183		}
6184	}
6185	if err != nil {
6186		return nil, err
6187	}
6188	defer googleapi.CloseBody(res)
6189	if err := googleapi.CheckResponse(res); err != nil {
6190		return nil, err
6191	}
6192	ret := &Operation{
6193		ServerResponse: googleapi.ServerResponse{
6194			Header:         res.Header,
6195			HTTPStatusCode: res.StatusCode,
6196		},
6197	}
6198	target := &ret
6199	if err := gensupport.DecodeResponse(target, res); err != nil {
6200		return nil, err
6201	}
6202	return ret, nil
6203	// {
6204	//   "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.v1beta2#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.",
6205	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:instantiate",
6206	//   "httpMethod": "POST",
6207	//   "id": "dataproc.projects.locations.workflowTemplates.instantiate",
6208	//   "parameterOrder": [
6209	//     "name"
6210	//   ],
6211	//   "parameters": {
6212	//     "name": {
6213	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id} For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
6214	//       "location": "path",
6215	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6216	//       "required": true,
6217	//       "type": "string"
6218	//     }
6219	//   },
6220	//   "path": "v1beta2/{+name}:instantiate",
6221	//   "request": {
6222	//     "$ref": "InstantiateWorkflowTemplateRequest"
6223	//   },
6224	//   "response": {
6225	//     "$ref": "Operation"
6226	//   },
6227	//   "scopes": [
6228	//     "https://www.googleapis.com/auth/cloud-platform"
6229	//   ]
6230	// }
6231
6232}
6233
6234// method id "dataproc.projects.locations.workflowTemplates.instantiateInline":
6235
6236type ProjectsLocationsWorkflowTemplatesInstantiateInlineCall struct {
6237	s                *Service
6238	parent           string
6239	workflowtemplate *WorkflowTemplate
6240	urlParams_       gensupport.URLParams
6241	ctx_             context.Context
6242	header_          http.Header
6243}
6244
6245// InstantiateInline: Instantiates a template and begins execution.This
6246// method is equivalent to executing the sequence
6247// CreateWorkflowTemplate, InstantiateWorkflowTemplate,
6248// DeleteWorkflowTemplate.The returned Operation can be used to track
6249// execution of workflow by polling operations.get. The Operation will
6250// complete when entire workflow is finished.The running workflow can be
6251// aborted via operations.cancel. This will cause any inflight jobs to
6252// be cancelled and workflow-owned clusters to be deleted.The
6253// Operation.metadata will be WorkflowMetadata
6254// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
6255// aproc.v1#workflowmetadata). Also see Using WorkflowMetadata
6256// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#u
6257// sing_workflowmetadata).On successful completion, Operation.response
6258// will be Empty.
6259func (r *ProjectsLocationsWorkflowTemplatesService) InstantiateInline(parent string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
6260	c := &ProjectsLocationsWorkflowTemplatesInstantiateInlineCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6261	c.parent = parent
6262	c.workflowtemplate = workflowtemplate
6263	return c
6264}
6265
6266// InstanceId sets the optional parameter "instanceId": Deprecated.
6267// Please use request_id field instead.
6268func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) InstanceId(instanceId string) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
6269	c.urlParams_.Set("instanceId", instanceId)
6270	return c
6271}
6272
6273// RequestId sets the optional parameter "requestId": A tag that
6274// prevents multiple concurrent workflow instances with the same tag
6275// from running. This mitigates risk of concurrent instances started due
6276// to retries.It is recommended to always set this value to a UUID
6277// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag
6278// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
6279// and hyphens (-). The maximum length is 40 characters.
6280func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) RequestId(requestId string) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
6281	c.urlParams_.Set("requestId", requestId)
6282	return c
6283}
6284
6285// Fields allows partial responses to be retrieved. See
6286// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6287// for more information.
6288func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
6289	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6290	return c
6291}
6292
6293// Context sets the context to be used in this call's Do method. Any
6294// pending HTTP request will be aborted if the provided context is
6295// canceled.
6296func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
6297	c.ctx_ = ctx
6298	return c
6299}
6300
6301// Header returns an http.Header that can be modified by the caller to
6302// add HTTP headers to the request.
6303func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Header() http.Header {
6304	if c.header_ == nil {
6305		c.header_ = make(http.Header)
6306	}
6307	return c.header_
6308}
6309
6310func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) doRequest(alt string) (*http.Response, error) {
6311	reqHeaders := make(http.Header)
6312	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6313	for k, v := range c.header_ {
6314		reqHeaders[k] = v
6315	}
6316	reqHeaders.Set("User-Agent", c.s.userAgent())
6317	var body io.Reader = nil
6318	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
6319	if err != nil {
6320		return nil, err
6321	}
6322	reqHeaders.Set("Content-Type", "application/json")
6323	c.urlParams_.Set("alt", alt)
6324	c.urlParams_.Set("prettyPrint", "false")
6325	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates:instantiateInline")
6326	urls += "?" + c.urlParams_.Encode()
6327	req, err := http.NewRequest("POST", urls, body)
6328	if err != nil {
6329		return nil, err
6330	}
6331	req.Header = reqHeaders
6332	googleapi.Expand(req.URL, map[string]string{
6333		"parent": c.parent,
6334	})
6335	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6336}
6337
6338// Do executes the "dataproc.projects.locations.workflowTemplates.instantiateInline" call.
6339// Exactly one of *Operation or error will be non-nil. Any non-2xx
6340// status code is an error. Response headers are in either
6341// *Operation.ServerResponse.Header or (if a response was returned at
6342// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6343// to check whether the returned error was because
6344// http.StatusNotModified was returned.
6345func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6346	gensupport.SetOptions(c.urlParams_, opts...)
6347	res, err := c.doRequest("json")
6348	if res != nil && res.StatusCode == http.StatusNotModified {
6349		if res.Body != nil {
6350			res.Body.Close()
6351		}
6352		return nil, &googleapi.Error{
6353			Code:   res.StatusCode,
6354			Header: res.Header,
6355		}
6356	}
6357	if err != nil {
6358		return nil, err
6359	}
6360	defer googleapi.CloseBody(res)
6361	if err := googleapi.CheckResponse(res); err != nil {
6362		return nil, err
6363	}
6364	ret := &Operation{
6365		ServerResponse: googleapi.ServerResponse{
6366			Header:         res.Header,
6367			HTTPStatusCode: res.StatusCode,
6368		},
6369	}
6370	target := &ret
6371	if err := gensupport.DecodeResponse(target, res); err != nil {
6372		return nil, err
6373	}
6374	return ret, nil
6375	// {
6376	//   "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.",
6377	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates:instantiateInline",
6378	//   "httpMethod": "POST",
6379	//   "id": "dataproc.projects.locations.workflowTemplates.instantiateInline",
6380	//   "parameterOrder": [
6381	//     "parent"
6382	//   ],
6383	//   "parameters": {
6384	//     "instanceId": {
6385	//       "description": "Deprecated. Please use request_id field instead.",
6386	//       "location": "query",
6387	//       "type": "string"
6388	//     },
6389	//     "parent": {
6390	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates,instantiateinline, the resource name of the region has the following format: projects/{project_id}/regions/{region} For projects.locations.workflowTemplates.instantiateinline, the resource name of the location has the following format: projects/{project_id}/locations/{location}",
6391	//       "location": "path",
6392	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
6393	//       "required": true,
6394	//       "type": "string"
6395	//     },
6396	//     "requestId": {
6397	//       "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.",
6398	//       "location": "query",
6399	//       "type": "string"
6400	//     }
6401	//   },
6402	//   "path": "v1beta2/{+parent}/workflowTemplates:instantiateInline",
6403	//   "request": {
6404	//     "$ref": "WorkflowTemplate"
6405	//   },
6406	//   "response": {
6407	//     "$ref": "Operation"
6408	//   },
6409	//   "scopes": [
6410	//     "https://www.googleapis.com/auth/cloud-platform"
6411	//   ]
6412	// }
6413
6414}
6415
6416// method id "dataproc.projects.locations.workflowTemplates.list":
6417
6418type ProjectsLocationsWorkflowTemplatesListCall struct {
6419	s            *Service
6420	parent       string
6421	urlParams_   gensupport.URLParams
6422	ifNoneMatch_ string
6423	ctx_         context.Context
6424	header_      http.Header
6425}
6426
6427// List: Lists workflows that match the specified filter in the request.
6428func (r *ProjectsLocationsWorkflowTemplatesService) List(parent string) *ProjectsLocationsWorkflowTemplatesListCall {
6429	c := &ProjectsLocationsWorkflowTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6430	c.parent = parent
6431	return c
6432}
6433
6434// PageSize sets the optional parameter "pageSize": The maximum number
6435// of results to return in each response.
6436func (c *ProjectsLocationsWorkflowTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowTemplatesListCall {
6437	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6438	return c
6439}
6440
6441// PageToken sets the optional parameter "pageToken": The page token,
6442// returned by a previous call, to request the next page of results.
6443func (c *ProjectsLocationsWorkflowTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowTemplatesListCall {
6444	c.urlParams_.Set("pageToken", pageToken)
6445	return c
6446}
6447
6448// Fields allows partial responses to be retrieved. See
6449// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6450// for more information.
6451func (c *ProjectsLocationsWorkflowTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesListCall {
6452	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6453	return c
6454}
6455
6456// IfNoneMatch sets the optional parameter which makes the operation
6457// fail if the object's ETag matches the given value. This is useful for
6458// getting updates only after the object has changed since the last
6459// request. Use googleapi.IsNotModified to check whether the response
6460// error from Do is the result of In-None-Match.
6461func (c *ProjectsLocationsWorkflowTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowTemplatesListCall {
6462	c.ifNoneMatch_ = entityTag
6463	return c
6464}
6465
6466// Context sets the context to be used in this call's Do method. Any
6467// pending HTTP request will be aborted if the provided context is
6468// canceled.
6469func (c *ProjectsLocationsWorkflowTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesListCall {
6470	c.ctx_ = ctx
6471	return c
6472}
6473
6474// Header returns an http.Header that can be modified by the caller to
6475// add HTTP headers to the request.
6476func (c *ProjectsLocationsWorkflowTemplatesListCall) Header() http.Header {
6477	if c.header_ == nil {
6478		c.header_ = make(http.Header)
6479	}
6480	return c.header_
6481}
6482
6483func (c *ProjectsLocationsWorkflowTemplatesListCall) doRequest(alt string) (*http.Response, error) {
6484	reqHeaders := make(http.Header)
6485	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6486	for k, v := range c.header_ {
6487		reqHeaders[k] = v
6488	}
6489	reqHeaders.Set("User-Agent", c.s.userAgent())
6490	if c.ifNoneMatch_ != "" {
6491		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6492	}
6493	var body io.Reader = nil
6494	c.urlParams_.Set("alt", alt)
6495	c.urlParams_.Set("prettyPrint", "false")
6496	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates")
6497	urls += "?" + c.urlParams_.Encode()
6498	req, err := http.NewRequest("GET", urls, body)
6499	if err != nil {
6500		return nil, err
6501	}
6502	req.Header = reqHeaders
6503	googleapi.Expand(req.URL, map[string]string{
6504		"parent": c.parent,
6505	})
6506	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6507}
6508
6509// Do executes the "dataproc.projects.locations.workflowTemplates.list" call.
6510// Exactly one of *ListWorkflowTemplatesResponse or error will be
6511// non-nil. Any non-2xx status code is an error. Response headers are in
6512// either *ListWorkflowTemplatesResponse.ServerResponse.Header or (if a
6513// response was returned at all) in error.(*googleapi.Error).Header. Use
6514// googleapi.IsNotModified to check whether the returned error was
6515// because http.StatusNotModified was returned.
6516func (c *ProjectsLocationsWorkflowTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListWorkflowTemplatesResponse, error) {
6517	gensupport.SetOptions(c.urlParams_, opts...)
6518	res, err := c.doRequest("json")
6519	if res != nil && res.StatusCode == http.StatusNotModified {
6520		if res.Body != nil {
6521			res.Body.Close()
6522		}
6523		return nil, &googleapi.Error{
6524			Code:   res.StatusCode,
6525			Header: res.Header,
6526		}
6527	}
6528	if err != nil {
6529		return nil, err
6530	}
6531	defer googleapi.CloseBody(res)
6532	if err := googleapi.CheckResponse(res); err != nil {
6533		return nil, err
6534	}
6535	ret := &ListWorkflowTemplatesResponse{
6536		ServerResponse: googleapi.ServerResponse{
6537			Header:         res.Header,
6538			HTTPStatusCode: res.StatusCode,
6539		},
6540	}
6541	target := &ret
6542	if err := gensupport.DecodeResponse(target, res); err != nil {
6543		return nil, err
6544	}
6545	return ret, nil
6546	// {
6547	//   "description": "Lists workflows that match the specified filter in the request.",
6548	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates",
6549	//   "httpMethod": "GET",
6550	//   "id": "dataproc.projects.locations.workflowTemplates.list",
6551	//   "parameterOrder": [
6552	//     "parent"
6553	//   ],
6554	//   "parameters": {
6555	//     "pageSize": {
6556	//       "description": "Optional. The maximum number of results to return in each response.",
6557	//       "format": "int32",
6558	//       "location": "query",
6559	//       "type": "integer"
6560	//     },
6561	//     "pageToken": {
6562	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
6563	//       "location": "query",
6564	//       "type": "string"
6565	//     },
6566	//     "parent": {
6567	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{project_id}/regions/{region} For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}",
6568	//       "location": "path",
6569	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
6570	//       "required": true,
6571	//       "type": "string"
6572	//     }
6573	//   },
6574	//   "path": "v1beta2/{+parent}/workflowTemplates",
6575	//   "response": {
6576	//     "$ref": "ListWorkflowTemplatesResponse"
6577	//   },
6578	//   "scopes": [
6579	//     "https://www.googleapis.com/auth/cloud-platform"
6580	//   ]
6581	// }
6582
6583}
6584
6585// Pages invokes f for each page of results.
6586// A non-nil error returned from f will halt the iteration.
6587// The provided context supersedes any context provided to the Context method.
6588func (c *ProjectsLocationsWorkflowTemplatesListCall) Pages(ctx context.Context, f func(*ListWorkflowTemplatesResponse) error) error {
6589	c.ctx_ = ctx
6590	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6591	for {
6592		x, err := c.Do()
6593		if err != nil {
6594			return err
6595		}
6596		if err := f(x); err != nil {
6597			return err
6598		}
6599		if x.NextPageToken == "" {
6600			return nil
6601		}
6602		c.PageToken(x.NextPageToken)
6603	}
6604}
6605
6606// method id "dataproc.projects.locations.workflowTemplates.setIamPolicy":
6607
6608type ProjectsLocationsWorkflowTemplatesSetIamPolicyCall struct {
6609	s                   *Service
6610	resource            string
6611	setiampolicyrequest *SetIamPolicyRequest
6612	urlParams_          gensupport.URLParams
6613	ctx_                context.Context
6614	header_             http.Header
6615}
6616
6617// SetIamPolicy: Sets the access control policy on the specified
6618// resource. Replaces any existing policy.Can return NOT_FOUND,
6619// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
6620func (r *ProjectsLocationsWorkflowTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
6621	c := &ProjectsLocationsWorkflowTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6622	c.resource = resource
6623	c.setiampolicyrequest = setiampolicyrequest
6624	return c
6625}
6626
6627// Fields allows partial responses to be retrieved. See
6628// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6629// for more information.
6630func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
6631	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6632	return c
6633}
6634
6635// Context sets the context to be used in this call's Do method. Any
6636// pending HTTP request will be aborted if the provided context is
6637// canceled.
6638func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
6639	c.ctx_ = ctx
6640	return c
6641}
6642
6643// Header returns an http.Header that can be modified by the caller to
6644// add HTTP headers to the request.
6645func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Header() http.Header {
6646	if c.header_ == nil {
6647		c.header_ = make(http.Header)
6648	}
6649	return c.header_
6650}
6651
6652func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6653	reqHeaders := make(http.Header)
6654	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6655	for k, v := range c.header_ {
6656		reqHeaders[k] = v
6657	}
6658	reqHeaders.Set("User-Agent", c.s.userAgent())
6659	var body io.Reader = nil
6660	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
6661	if err != nil {
6662		return nil, err
6663	}
6664	reqHeaders.Set("Content-Type", "application/json")
6665	c.urlParams_.Set("alt", alt)
6666	c.urlParams_.Set("prettyPrint", "false")
6667	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
6668	urls += "?" + c.urlParams_.Encode()
6669	req, err := http.NewRequest("POST", urls, body)
6670	if err != nil {
6671		return nil, err
6672	}
6673	req.Header = reqHeaders
6674	googleapi.Expand(req.URL, map[string]string{
6675		"resource": c.resource,
6676	})
6677	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6678}
6679
6680// Do executes the "dataproc.projects.locations.workflowTemplates.setIamPolicy" call.
6681// Exactly one of *Policy or error will be non-nil. Any non-2xx status
6682// code is an error. Response headers are in either
6683// *Policy.ServerResponse.Header or (if a response was returned at all)
6684// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6685// check whether the returned error was because http.StatusNotModified
6686// was returned.
6687func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6688	gensupport.SetOptions(c.urlParams_, opts...)
6689	res, err := c.doRequest("json")
6690	if res != nil && res.StatusCode == http.StatusNotModified {
6691		if res.Body != nil {
6692			res.Body.Close()
6693		}
6694		return nil, &googleapi.Error{
6695			Code:   res.StatusCode,
6696			Header: res.Header,
6697		}
6698	}
6699	if err != nil {
6700		return nil, err
6701	}
6702	defer googleapi.CloseBody(res)
6703	if err := googleapi.CheckResponse(res); err != nil {
6704		return nil, err
6705	}
6706	ret := &Policy{
6707		ServerResponse: googleapi.ServerResponse{
6708			Header:         res.Header,
6709			HTTPStatusCode: res.StatusCode,
6710		},
6711	}
6712	target := &ret
6713	if err := gensupport.DecodeResponse(target, res); err != nil {
6714		return nil, err
6715	}
6716	return ret, nil
6717	// {
6718	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
6719	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:setIamPolicy",
6720	//   "httpMethod": "POST",
6721	//   "id": "dataproc.projects.locations.workflowTemplates.setIamPolicy",
6722	//   "parameterOrder": [
6723	//     "resource"
6724	//   ],
6725	//   "parameters": {
6726	//     "resource": {
6727	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
6728	//       "location": "path",
6729	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6730	//       "required": true,
6731	//       "type": "string"
6732	//     }
6733	//   },
6734	//   "path": "v1beta2/{+resource}:setIamPolicy",
6735	//   "request": {
6736	//     "$ref": "SetIamPolicyRequest"
6737	//   },
6738	//   "response": {
6739	//     "$ref": "Policy"
6740	//   },
6741	//   "scopes": [
6742	//     "https://www.googleapis.com/auth/cloud-platform"
6743	//   ]
6744	// }
6745
6746}
6747
6748// method id "dataproc.projects.locations.workflowTemplates.testIamPermissions":
6749
6750type ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall struct {
6751	s                         *Service
6752	resource                  string
6753	testiampermissionsrequest *TestIamPermissionsRequest
6754	urlParams_                gensupport.URLParams
6755	ctx_                      context.Context
6756	header_                   http.Header
6757}
6758
6759// TestIamPermissions: Returns permissions that a caller has on the
6760// specified resource. If the resource does not exist, this will return
6761// an empty set of permissions, not a NOT_FOUND error.Note: This
6762// operation is designed to be used for building permission-aware UIs
6763// and command-line tools, not for authorization checking. This
6764// operation may "fail open" without warning.
6765func (r *ProjectsLocationsWorkflowTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
6766	c := &ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6767	c.resource = resource
6768	c.testiampermissionsrequest = testiampermissionsrequest
6769	return c
6770}
6771
6772// Fields allows partial responses to be retrieved. See
6773// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6774// for more information.
6775func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
6776	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6777	return c
6778}
6779
6780// Context sets the context to be used in this call's Do method. Any
6781// pending HTTP request will be aborted if the provided context is
6782// canceled.
6783func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
6784	c.ctx_ = ctx
6785	return c
6786}
6787
6788// Header returns an http.Header that can be modified by the caller to
6789// add HTTP headers to the request.
6790func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Header() http.Header {
6791	if c.header_ == nil {
6792		c.header_ = make(http.Header)
6793	}
6794	return c.header_
6795}
6796
6797func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
6798	reqHeaders := make(http.Header)
6799	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6800	for k, v := range c.header_ {
6801		reqHeaders[k] = v
6802	}
6803	reqHeaders.Set("User-Agent", c.s.userAgent())
6804	var body io.Reader = nil
6805	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
6806	if err != nil {
6807		return nil, err
6808	}
6809	reqHeaders.Set("Content-Type", "application/json")
6810	c.urlParams_.Set("alt", alt)
6811	c.urlParams_.Set("prettyPrint", "false")
6812	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
6813	urls += "?" + c.urlParams_.Encode()
6814	req, err := http.NewRequest("POST", urls, body)
6815	if err != nil {
6816		return nil, err
6817	}
6818	req.Header = reqHeaders
6819	googleapi.Expand(req.URL, map[string]string{
6820		"resource": c.resource,
6821	})
6822	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6823}
6824
6825// Do executes the "dataproc.projects.locations.workflowTemplates.testIamPermissions" call.
6826// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
6827// Any non-2xx status code is an error. Response headers are in either
6828// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
6829// was returned at all) in error.(*googleapi.Error).Header. Use
6830// googleapi.IsNotModified to check whether the returned error was
6831// because http.StatusNotModified was returned.
6832func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
6833	gensupport.SetOptions(c.urlParams_, opts...)
6834	res, err := c.doRequest("json")
6835	if res != nil && res.StatusCode == http.StatusNotModified {
6836		if res.Body != nil {
6837			res.Body.Close()
6838		}
6839		return nil, &googleapi.Error{
6840			Code:   res.StatusCode,
6841			Header: res.Header,
6842		}
6843	}
6844	if err != nil {
6845		return nil, err
6846	}
6847	defer googleapi.CloseBody(res)
6848	if err := googleapi.CheckResponse(res); err != nil {
6849		return nil, err
6850	}
6851	ret := &TestIamPermissionsResponse{
6852		ServerResponse: googleapi.ServerResponse{
6853			Header:         res.Header,
6854			HTTPStatusCode: res.StatusCode,
6855		},
6856	}
6857	target := &ret
6858	if err := gensupport.DecodeResponse(target, res); err != nil {
6859		return nil, err
6860	}
6861	return ret, nil
6862	// {
6863	//   "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.",
6864	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:testIamPermissions",
6865	//   "httpMethod": "POST",
6866	//   "id": "dataproc.projects.locations.workflowTemplates.testIamPermissions",
6867	//   "parameterOrder": [
6868	//     "resource"
6869	//   ],
6870	//   "parameters": {
6871	//     "resource": {
6872	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
6873	//       "location": "path",
6874	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6875	//       "required": true,
6876	//       "type": "string"
6877	//     }
6878	//   },
6879	//   "path": "v1beta2/{+resource}:testIamPermissions",
6880	//   "request": {
6881	//     "$ref": "TestIamPermissionsRequest"
6882	//   },
6883	//   "response": {
6884	//     "$ref": "TestIamPermissionsResponse"
6885	//   },
6886	//   "scopes": [
6887	//     "https://www.googleapis.com/auth/cloud-platform"
6888	//   ]
6889	// }
6890
6891}
6892
6893// method id "dataproc.projects.locations.workflowTemplates.update":
6894
6895type ProjectsLocationsWorkflowTemplatesUpdateCall struct {
6896	s                *Service
6897	name             string
6898	workflowtemplate *WorkflowTemplate
6899	urlParams_       gensupport.URLParams
6900	ctx_             context.Context
6901	header_          http.Header
6902}
6903
6904// Update: Updates (replaces) workflow template. The updated template
6905// must contain version that matches the current server version.
6906func (r *ProjectsLocationsWorkflowTemplatesService) Update(name string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesUpdateCall {
6907	c := &ProjectsLocationsWorkflowTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6908	c.name = name
6909	c.workflowtemplate = workflowtemplate
6910	return c
6911}
6912
6913// Fields allows partial responses to be retrieved. See
6914// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6915// for more information.
6916func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesUpdateCall {
6917	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6918	return c
6919}
6920
6921// Context sets the context to be used in this call's Do method. Any
6922// pending HTTP request will be aborted if the provided context is
6923// canceled.
6924func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesUpdateCall {
6925	c.ctx_ = ctx
6926	return c
6927}
6928
6929// Header returns an http.Header that can be modified by the caller to
6930// add HTTP headers to the request.
6931func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Header() http.Header {
6932	if c.header_ == nil {
6933		c.header_ = make(http.Header)
6934	}
6935	return c.header_
6936}
6937
6938func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
6939	reqHeaders := make(http.Header)
6940	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
6941	for k, v := range c.header_ {
6942		reqHeaders[k] = v
6943	}
6944	reqHeaders.Set("User-Agent", c.s.userAgent())
6945	var body io.Reader = nil
6946	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
6947	if err != nil {
6948		return nil, err
6949	}
6950	reqHeaders.Set("Content-Type", "application/json")
6951	c.urlParams_.Set("alt", alt)
6952	c.urlParams_.Set("prettyPrint", "false")
6953	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
6954	urls += "?" + c.urlParams_.Encode()
6955	req, err := http.NewRequest("PUT", urls, body)
6956	if err != nil {
6957		return nil, err
6958	}
6959	req.Header = reqHeaders
6960	googleapi.Expand(req.URL, map[string]string{
6961		"name": c.name,
6962	})
6963	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6964}
6965
6966// Do executes the "dataproc.projects.locations.workflowTemplates.update" call.
6967// Exactly one of *WorkflowTemplate or error will be non-nil. Any
6968// non-2xx status code is an error. Response headers are in either
6969// *WorkflowTemplate.ServerResponse.Header or (if a response was
6970// returned at all) in error.(*googleapi.Error).Header. Use
6971// googleapi.IsNotModified to check whether the returned error was
6972// because http.StatusNotModified was returned.
6973func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
6974	gensupport.SetOptions(c.urlParams_, opts...)
6975	res, err := c.doRequest("json")
6976	if res != nil && res.StatusCode == http.StatusNotModified {
6977		if res.Body != nil {
6978			res.Body.Close()
6979		}
6980		return nil, &googleapi.Error{
6981			Code:   res.StatusCode,
6982			Header: res.Header,
6983		}
6984	}
6985	if err != nil {
6986		return nil, err
6987	}
6988	defer googleapi.CloseBody(res)
6989	if err := googleapi.CheckResponse(res); err != nil {
6990		return nil, err
6991	}
6992	ret := &WorkflowTemplate{
6993		ServerResponse: googleapi.ServerResponse{
6994			Header:         res.Header,
6995			HTTPStatusCode: res.StatusCode,
6996		},
6997	}
6998	target := &ret
6999	if err := gensupport.DecodeResponse(target, res); err != nil {
7000		return nil, err
7001	}
7002	return ret, nil
7003	// {
7004	//   "description": "Updates (replaces) workflow template. The updated template must contain version that matches the current server version.",
7005	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}",
7006	//   "httpMethod": "PUT",
7007	//   "id": "dataproc.projects.locations.workflowTemplates.update",
7008	//   "parameterOrder": [
7009	//     "name"
7010	//   ],
7011	//   "parameters": {
7012	//     "name": {
7013	//       "description": "Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id} For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
7014	//       "location": "path",
7015	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
7016	//       "required": true,
7017	//       "type": "string"
7018	//     }
7019	//   },
7020	//   "path": "v1beta2/{+name}",
7021	//   "request": {
7022	//     "$ref": "WorkflowTemplate"
7023	//   },
7024	//   "response": {
7025	//     "$ref": "WorkflowTemplate"
7026	//   },
7027	//   "scopes": [
7028	//     "https://www.googleapis.com/auth/cloud-platform"
7029	//   ]
7030	// }
7031
7032}
7033
7034// method id "dataproc.projects.regions.autoscalingPolicies.create":
7035
7036type ProjectsRegionsAutoscalingPoliciesCreateCall struct {
7037	s                 *Service
7038	parent            string
7039	autoscalingpolicy *AutoscalingPolicy
7040	urlParams_        gensupport.URLParams
7041	ctx_              context.Context
7042	header_           http.Header
7043}
7044
7045// Create: Creates new autoscaling policy.
7046func (r *ProjectsRegionsAutoscalingPoliciesService) Create(parent string, autoscalingpolicy *AutoscalingPolicy) *ProjectsRegionsAutoscalingPoliciesCreateCall {
7047	c := &ProjectsRegionsAutoscalingPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7048	c.parent = parent
7049	c.autoscalingpolicy = autoscalingpolicy
7050	return c
7051}
7052
7053// Fields allows partial responses to be retrieved. See
7054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7055// for more information.
7056func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesCreateCall {
7057	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7058	return c
7059}
7060
7061// Context sets the context to be used in this call's Do method. Any
7062// pending HTTP request will be aborted if the provided context is
7063// canceled.
7064func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesCreateCall {
7065	c.ctx_ = ctx
7066	return c
7067}
7068
7069// Header returns an http.Header that can be modified by the caller to
7070// add HTTP headers to the request.
7071func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Header() http.Header {
7072	if c.header_ == nil {
7073		c.header_ = make(http.Header)
7074	}
7075	return c.header_
7076}
7077
7078func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
7079	reqHeaders := make(http.Header)
7080	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7081	for k, v := range c.header_ {
7082		reqHeaders[k] = v
7083	}
7084	reqHeaders.Set("User-Agent", c.s.userAgent())
7085	var body io.Reader = nil
7086	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
7087	if err != nil {
7088		return nil, err
7089	}
7090	reqHeaders.Set("Content-Type", "application/json")
7091	c.urlParams_.Set("alt", alt)
7092	c.urlParams_.Set("prettyPrint", "false")
7093	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/autoscalingPolicies")
7094	urls += "?" + c.urlParams_.Encode()
7095	req, err := http.NewRequest("POST", urls, body)
7096	if err != nil {
7097		return nil, err
7098	}
7099	req.Header = reqHeaders
7100	googleapi.Expand(req.URL, map[string]string{
7101		"parent": c.parent,
7102	})
7103	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7104}
7105
7106// Do executes the "dataproc.projects.regions.autoscalingPolicies.create" call.
7107// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
7108// non-2xx status code is an error. Response headers are in either
7109// *AutoscalingPolicy.ServerResponse.Header or (if a response was
7110// returned at all) in error.(*googleapi.Error).Header. Use
7111// googleapi.IsNotModified to check whether the returned error was
7112// because http.StatusNotModified was returned.
7113func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
7114	gensupport.SetOptions(c.urlParams_, opts...)
7115	res, err := c.doRequest("json")
7116	if res != nil && res.StatusCode == http.StatusNotModified {
7117		if res.Body != nil {
7118			res.Body.Close()
7119		}
7120		return nil, &googleapi.Error{
7121			Code:   res.StatusCode,
7122			Header: res.Header,
7123		}
7124	}
7125	if err != nil {
7126		return nil, err
7127	}
7128	defer googleapi.CloseBody(res)
7129	if err := googleapi.CheckResponse(res); err != nil {
7130		return nil, err
7131	}
7132	ret := &AutoscalingPolicy{
7133		ServerResponse: googleapi.ServerResponse{
7134			Header:         res.Header,
7135			HTTPStatusCode: res.StatusCode,
7136		},
7137	}
7138	target := &ret
7139	if err := gensupport.DecodeResponse(target, res); err != nil {
7140		return nil, err
7141	}
7142	return ret, nil
7143	// {
7144	//   "description": "Creates new autoscaling policy.",
7145	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies",
7146	//   "httpMethod": "POST",
7147	//   "id": "dataproc.projects.regions.autoscalingPolicies.create",
7148	//   "parameterOrder": [
7149	//     "parent"
7150	//   ],
7151	//   "parameters": {
7152	//     "parent": {
7153	//       "description": "Required. The \"resource name\" of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/regions/{region} For projects.locations.autoscalingPolicies.create, the resource name has the following format: projects/{project_id}/locations/{location}",
7154	//       "location": "path",
7155	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
7156	//       "required": true,
7157	//       "type": "string"
7158	//     }
7159	//   },
7160	//   "path": "v1beta2/{+parent}/autoscalingPolicies",
7161	//   "request": {
7162	//     "$ref": "AutoscalingPolicy"
7163	//   },
7164	//   "response": {
7165	//     "$ref": "AutoscalingPolicy"
7166	//   },
7167	//   "scopes": [
7168	//     "https://www.googleapis.com/auth/cloud-platform"
7169	//   ]
7170	// }
7171
7172}
7173
7174// method id "dataproc.projects.regions.autoscalingPolicies.delete":
7175
7176type ProjectsRegionsAutoscalingPoliciesDeleteCall struct {
7177	s          *Service
7178	name       string
7179	urlParams_ gensupport.URLParams
7180	ctx_       context.Context
7181	header_    http.Header
7182}
7183
7184// Delete: Deletes an autoscaling policy. It is an error to delete an
7185// autoscaling policy that is in use by one or more clusters.
7186func (r *ProjectsRegionsAutoscalingPoliciesService) Delete(name string) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
7187	c := &ProjectsRegionsAutoscalingPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7188	c.name = name
7189	return c
7190}
7191
7192// Fields allows partial responses to be retrieved. See
7193// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7194// for more information.
7195func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
7196	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7197	return c
7198}
7199
7200// Context sets the context to be used in this call's Do method. Any
7201// pending HTTP request will be aborted if the provided context is
7202// canceled.
7203func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
7204	c.ctx_ = ctx
7205	return c
7206}
7207
7208// Header returns an http.Header that can be modified by the caller to
7209// add HTTP headers to the request.
7210func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Header() http.Header {
7211	if c.header_ == nil {
7212		c.header_ = make(http.Header)
7213	}
7214	return c.header_
7215}
7216
7217func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
7218	reqHeaders := make(http.Header)
7219	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7220	for k, v := range c.header_ {
7221		reqHeaders[k] = v
7222	}
7223	reqHeaders.Set("User-Agent", c.s.userAgent())
7224	var body io.Reader = nil
7225	c.urlParams_.Set("alt", alt)
7226	c.urlParams_.Set("prettyPrint", "false")
7227	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
7228	urls += "?" + c.urlParams_.Encode()
7229	req, err := http.NewRequest("DELETE", urls, body)
7230	if err != nil {
7231		return nil, err
7232	}
7233	req.Header = reqHeaders
7234	googleapi.Expand(req.URL, map[string]string{
7235		"name": c.name,
7236	})
7237	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7238}
7239
7240// Do executes the "dataproc.projects.regions.autoscalingPolicies.delete" call.
7241// Exactly one of *Empty or error will be non-nil. Any non-2xx status
7242// code is an error. Response headers are in either
7243// *Empty.ServerResponse.Header or (if a response was returned at all)
7244// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7245// check whether the returned error was because http.StatusNotModified
7246// was returned.
7247func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7248	gensupport.SetOptions(c.urlParams_, opts...)
7249	res, err := c.doRequest("json")
7250	if res != nil && res.StatusCode == http.StatusNotModified {
7251		if res.Body != nil {
7252			res.Body.Close()
7253		}
7254		return nil, &googleapi.Error{
7255			Code:   res.StatusCode,
7256			Header: res.Header,
7257		}
7258	}
7259	if err != nil {
7260		return nil, err
7261	}
7262	defer googleapi.CloseBody(res)
7263	if err := googleapi.CheckResponse(res); err != nil {
7264		return nil, err
7265	}
7266	ret := &Empty{
7267		ServerResponse: googleapi.ServerResponse{
7268			Header:         res.Header,
7269			HTTPStatusCode: res.StatusCode,
7270		},
7271	}
7272	target := &ret
7273	if err := gensupport.DecodeResponse(target, res); err != nil {
7274		return nil, err
7275	}
7276	return ret, nil
7277	// {
7278	//   "description": "Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.",
7279	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}",
7280	//   "httpMethod": "DELETE",
7281	//   "id": "dataproc.projects.regions.autoscalingPolicies.delete",
7282	//   "parameterOrder": [
7283	//     "name"
7284	//   ],
7285	//   "parameters": {
7286	//     "name": {
7287	//       "description": "Required. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies.delete, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
7288	//       "location": "path",
7289	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7290	//       "required": true,
7291	//       "type": "string"
7292	//     }
7293	//   },
7294	//   "path": "v1beta2/{+name}",
7295	//   "response": {
7296	//     "$ref": "Empty"
7297	//   },
7298	//   "scopes": [
7299	//     "https://www.googleapis.com/auth/cloud-platform"
7300	//   ]
7301	// }
7302
7303}
7304
7305// method id "dataproc.projects.regions.autoscalingPolicies.get":
7306
7307type ProjectsRegionsAutoscalingPoliciesGetCall struct {
7308	s            *Service
7309	name         string
7310	urlParams_   gensupport.URLParams
7311	ifNoneMatch_ string
7312	ctx_         context.Context
7313	header_      http.Header
7314}
7315
7316// Get: Retrieves autoscaling policy.
7317func (r *ProjectsRegionsAutoscalingPoliciesService) Get(name string) *ProjectsRegionsAutoscalingPoliciesGetCall {
7318	c := &ProjectsRegionsAutoscalingPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7319	c.name = name
7320	return c
7321}
7322
7323// Fields allows partial responses to be retrieved. See
7324// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7325// for more information.
7326func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesGetCall {
7327	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7328	return c
7329}
7330
7331// IfNoneMatch sets the optional parameter which makes the operation
7332// fail if the object's ETag matches the given value. This is useful for
7333// getting updates only after the object has changed since the last
7334// request. Use googleapi.IsNotModified to check whether the response
7335// error from Do is the result of In-None-Match.
7336func (c *ProjectsRegionsAutoscalingPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsAutoscalingPoliciesGetCall {
7337	c.ifNoneMatch_ = entityTag
7338	return c
7339}
7340
7341// Context sets the context to be used in this call's Do method. Any
7342// pending HTTP request will be aborted if the provided context is
7343// canceled.
7344func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesGetCall {
7345	c.ctx_ = ctx
7346	return c
7347}
7348
7349// Header returns an http.Header that can be modified by the caller to
7350// add HTTP headers to the request.
7351func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Header() http.Header {
7352	if c.header_ == nil {
7353		c.header_ = make(http.Header)
7354	}
7355	return c.header_
7356}
7357
7358func (c *ProjectsRegionsAutoscalingPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
7359	reqHeaders := make(http.Header)
7360	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7361	for k, v := range c.header_ {
7362		reqHeaders[k] = v
7363	}
7364	reqHeaders.Set("User-Agent", c.s.userAgent())
7365	if c.ifNoneMatch_ != "" {
7366		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7367	}
7368	var body io.Reader = nil
7369	c.urlParams_.Set("alt", alt)
7370	c.urlParams_.Set("prettyPrint", "false")
7371	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
7372	urls += "?" + c.urlParams_.Encode()
7373	req, err := http.NewRequest("GET", urls, body)
7374	if err != nil {
7375		return nil, err
7376	}
7377	req.Header = reqHeaders
7378	googleapi.Expand(req.URL, map[string]string{
7379		"name": c.name,
7380	})
7381	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7382}
7383
7384// Do executes the "dataproc.projects.regions.autoscalingPolicies.get" call.
7385// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
7386// non-2xx status code is an error. Response headers are in either
7387// *AutoscalingPolicy.ServerResponse.Header or (if a response was
7388// returned at all) in error.(*googleapi.Error).Header. Use
7389// googleapi.IsNotModified to check whether the returned error was
7390// because http.StatusNotModified was returned.
7391func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
7392	gensupport.SetOptions(c.urlParams_, opts...)
7393	res, err := c.doRequest("json")
7394	if res != nil && res.StatusCode == http.StatusNotModified {
7395		if res.Body != nil {
7396			res.Body.Close()
7397		}
7398		return nil, &googleapi.Error{
7399			Code:   res.StatusCode,
7400			Header: res.Header,
7401		}
7402	}
7403	if err != nil {
7404		return nil, err
7405	}
7406	defer googleapi.CloseBody(res)
7407	if err := googleapi.CheckResponse(res); err != nil {
7408		return nil, err
7409	}
7410	ret := &AutoscalingPolicy{
7411		ServerResponse: googleapi.ServerResponse{
7412			Header:         res.Header,
7413			HTTPStatusCode: res.StatusCode,
7414		},
7415	}
7416	target := &ret
7417	if err := gensupport.DecodeResponse(target, res); err != nil {
7418		return nil, err
7419	}
7420	return ret, nil
7421	// {
7422	//   "description": "Retrieves autoscaling policy.",
7423	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}",
7424	//   "httpMethod": "GET",
7425	//   "id": "dataproc.projects.regions.autoscalingPolicies.get",
7426	//   "parameterOrder": [
7427	//     "name"
7428	//   ],
7429	//   "parameters": {
7430	//     "name": {
7431	//       "description": "Required. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies.get, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
7432	//       "location": "path",
7433	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7434	//       "required": true,
7435	//       "type": "string"
7436	//     }
7437	//   },
7438	//   "path": "v1beta2/{+name}",
7439	//   "response": {
7440	//     "$ref": "AutoscalingPolicy"
7441	//   },
7442	//   "scopes": [
7443	//     "https://www.googleapis.com/auth/cloud-platform"
7444	//   ]
7445	// }
7446
7447}
7448
7449// method id "dataproc.projects.regions.autoscalingPolicies.getIamPolicy":
7450
7451type ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall struct {
7452	s            *Service
7453	resource     string
7454	urlParams_   gensupport.URLParams
7455	ifNoneMatch_ string
7456	ctx_         context.Context
7457	header_      http.Header
7458}
7459
7460// GetIamPolicy: Gets the access control policy for a resource. Returns
7461// an empty policy if the resource exists and does not have a policy
7462// set.
7463func (r *ProjectsRegionsAutoscalingPoliciesService) GetIamPolicy(resource string) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7464	c := &ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7465	c.resource = resource
7466	return c
7467}
7468
7469// OptionsRequestedPolicyVersion sets the optional parameter
7470// "options.requestedPolicyVersion": The policy format version to be
7471// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
7472// value will be rejected.Requests for policies with any conditional
7473// bindings must specify version 3. Policies without any conditional
7474// bindings may specify any valid value or leave the field unset.To
7475// learn which resources support conditions in their IAM policies, see
7476// the IAM documentation
7477// (https://cloud.google.com/iam/help/conditions/resource-policies).
7478func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7479	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
7480	return c
7481}
7482
7483// Fields allows partial responses to be retrieved. See
7484// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7485// for more information.
7486func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7487	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7488	return c
7489}
7490
7491// IfNoneMatch sets the optional parameter which makes the operation
7492// fail if the object's ETag matches the given value. This is useful for
7493// getting updates only after the object has changed since the last
7494// request. Use googleapi.IsNotModified to check whether the response
7495// error from Do is the result of In-None-Match.
7496func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7497	c.ifNoneMatch_ = entityTag
7498	return c
7499}
7500
7501// Context sets the context to be used in this call's Do method. Any
7502// pending HTTP request will be aborted if the provided context is
7503// canceled.
7504func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7505	c.ctx_ = ctx
7506	return c
7507}
7508
7509// Header returns an http.Header that can be modified by the caller to
7510// add HTTP headers to the request.
7511func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Header() http.Header {
7512	if c.header_ == nil {
7513		c.header_ = make(http.Header)
7514	}
7515	return c.header_
7516}
7517
7518func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7519	reqHeaders := make(http.Header)
7520	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7521	for k, v := range c.header_ {
7522		reqHeaders[k] = v
7523	}
7524	reqHeaders.Set("User-Agent", c.s.userAgent())
7525	if c.ifNoneMatch_ != "" {
7526		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7527	}
7528	var body io.Reader = nil
7529	c.urlParams_.Set("alt", alt)
7530	c.urlParams_.Set("prettyPrint", "false")
7531	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
7532	urls += "?" + c.urlParams_.Encode()
7533	req, err := http.NewRequest("GET", urls, body)
7534	if err != nil {
7535		return nil, err
7536	}
7537	req.Header = reqHeaders
7538	googleapi.Expand(req.URL, map[string]string{
7539		"resource": c.resource,
7540	})
7541	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7542}
7543
7544// Do executes the "dataproc.projects.regions.autoscalingPolicies.getIamPolicy" call.
7545// Exactly one of *Policy or error will be non-nil. Any non-2xx status
7546// code is an error. Response headers are in either
7547// *Policy.ServerResponse.Header or (if a response was returned at all)
7548// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7549// check whether the returned error was because http.StatusNotModified
7550// was returned.
7551func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7552	gensupport.SetOptions(c.urlParams_, opts...)
7553	res, err := c.doRequest("json")
7554	if res != nil && res.StatusCode == http.StatusNotModified {
7555		if res.Body != nil {
7556			res.Body.Close()
7557		}
7558		return nil, &googleapi.Error{
7559			Code:   res.StatusCode,
7560			Header: res.Header,
7561		}
7562	}
7563	if err != nil {
7564		return nil, err
7565	}
7566	defer googleapi.CloseBody(res)
7567	if err := googleapi.CheckResponse(res); err != nil {
7568		return nil, err
7569	}
7570	ret := &Policy{
7571		ServerResponse: googleapi.ServerResponse{
7572			Header:         res.Header,
7573			HTTPStatusCode: res.StatusCode,
7574		},
7575	}
7576	target := &ret
7577	if err := gensupport.DecodeResponse(target, res); err != nil {
7578		return nil, err
7579	}
7580	return ret, nil
7581	// {
7582	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
7583	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}:getIamPolicy",
7584	//   "httpMethod": "GET",
7585	//   "id": "dataproc.projects.regions.autoscalingPolicies.getIamPolicy",
7586	//   "parameterOrder": [
7587	//     "resource"
7588	//   ],
7589	//   "parameters": {
7590	//     "options.requestedPolicyVersion": {
7591	//       "description": "Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).",
7592	//       "format": "int32",
7593	//       "location": "query",
7594	//       "type": "integer"
7595	//     },
7596	//     "resource": {
7597	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
7598	//       "location": "path",
7599	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7600	//       "required": true,
7601	//       "type": "string"
7602	//     }
7603	//   },
7604	//   "path": "v1beta2/{+resource}:getIamPolicy",
7605	//   "response": {
7606	//     "$ref": "Policy"
7607	//   },
7608	//   "scopes": [
7609	//     "https://www.googleapis.com/auth/cloud-platform"
7610	//   ]
7611	// }
7612
7613}
7614
7615// method id "dataproc.projects.regions.autoscalingPolicies.list":
7616
7617type ProjectsRegionsAutoscalingPoliciesListCall struct {
7618	s            *Service
7619	parent       string
7620	urlParams_   gensupport.URLParams
7621	ifNoneMatch_ string
7622	ctx_         context.Context
7623	header_      http.Header
7624}
7625
7626// List: Lists autoscaling policies in the project.
7627func (r *ProjectsRegionsAutoscalingPoliciesService) List(parent string) *ProjectsRegionsAutoscalingPoliciesListCall {
7628	c := &ProjectsRegionsAutoscalingPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7629	c.parent = parent
7630	return c
7631}
7632
7633// PageSize sets the optional parameter "pageSize": The maximum number
7634// of results to return in each response. Must be less than or equal to
7635// 1000. Defaults to 100.
7636func (c *ProjectsRegionsAutoscalingPoliciesListCall) PageSize(pageSize int64) *ProjectsRegionsAutoscalingPoliciesListCall {
7637	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7638	return c
7639}
7640
7641// PageToken sets the optional parameter "pageToken": The page token,
7642// returned by a previous call, to request the next page of results.
7643func (c *ProjectsRegionsAutoscalingPoliciesListCall) PageToken(pageToken string) *ProjectsRegionsAutoscalingPoliciesListCall {
7644	c.urlParams_.Set("pageToken", pageToken)
7645	return c
7646}
7647
7648// Fields allows partial responses to be retrieved. See
7649// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7650// for more information.
7651func (c *ProjectsRegionsAutoscalingPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesListCall {
7652	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7653	return c
7654}
7655
7656// IfNoneMatch sets the optional parameter which makes the operation
7657// fail if the object's ETag matches the given value. This is useful for
7658// getting updates only after the object has changed since the last
7659// request. Use googleapi.IsNotModified to check whether the response
7660// error from Do is the result of In-None-Match.
7661func (c *ProjectsRegionsAutoscalingPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsRegionsAutoscalingPoliciesListCall {
7662	c.ifNoneMatch_ = entityTag
7663	return c
7664}
7665
7666// Context sets the context to be used in this call's Do method. Any
7667// pending HTTP request will be aborted if the provided context is
7668// canceled.
7669func (c *ProjectsRegionsAutoscalingPoliciesListCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesListCall {
7670	c.ctx_ = ctx
7671	return c
7672}
7673
7674// Header returns an http.Header that can be modified by the caller to
7675// add HTTP headers to the request.
7676func (c *ProjectsRegionsAutoscalingPoliciesListCall) Header() http.Header {
7677	if c.header_ == nil {
7678		c.header_ = make(http.Header)
7679	}
7680	return c.header_
7681}
7682
7683func (c *ProjectsRegionsAutoscalingPoliciesListCall) doRequest(alt string) (*http.Response, error) {
7684	reqHeaders := make(http.Header)
7685	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7686	for k, v := range c.header_ {
7687		reqHeaders[k] = v
7688	}
7689	reqHeaders.Set("User-Agent", c.s.userAgent())
7690	if c.ifNoneMatch_ != "" {
7691		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7692	}
7693	var body io.Reader = nil
7694	c.urlParams_.Set("alt", alt)
7695	c.urlParams_.Set("prettyPrint", "false")
7696	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/autoscalingPolicies")
7697	urls += "?" + c.urlParams_.Encode()
7698	req, err := http.NewRequest("GET", urls, body)
7699	if err != nil {
7700		return nil, err
7701	}
7702	req.Header = reqHeaders
7703	googleapi.Expand(req.URL, map[string]string{
7704		"parent": c.parent,
7705	})
7706	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7707}
7708
7709// Do executes the "dataproc.projects.regions.autoscalingPolicies.list" call.
7710// Exactly one of *ListAutoscalingPoliciesResponse or error will be
7711// non-nil. Any non-2xx status code is an error. Response headers are in
7712// either *ListAutoscalingPoliciesResponse.ServerResponse.Header or (if
7713// a response was returned at all) in error.(*googleapi.Error).Header.
7714// Use googleapi.IsNotModified to check whether the returned error was
7715// because http.StatusNotModified was returned.
7716func (c *ProjectsRegionsAutoscalingPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListAutoscalingPoliciesResponse, error) {
7717	gensupport.SetOptions(c.urlParams_, opts...)
7718	res, err := c.doRequest("json")
7719	if res != nil && res.StatusCode == http.StatusNotModified {
7720		if res.Body != nil {
7721			res.Body.Close()
7722		}
7723		return nil, &googleapi.Error{
7724			Code:   res.StatusCode,
7725			Header: res.Header,
7726		}
7727	}
7728	if err != nil {
7729		return nil, err
7730	}
7731	defer googleapi.CloseBody(res)
7732	if err := googleapi.CheckResponse(res); err != nil {
7733		return nil, err
7734	}
7735	ret := &ListAutoscalingPoliciesResponse{
7736		ServerResponse: googleapi.ServerResponse{
7737			Header:         res.Header,
7738			HTTPStatusCode: res.StatusCode,
7739		},
7740	}
7741	target := &ret
7742	if err := gensupport.DecodeResponse(target, res); err != nil {
7743		return nil, err
7744	}
7745	return ret, nil
7746	// {
7747	//   "description": "Lists autoscaling policies in the project.",
7748	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies",
7749	//   "httpMethod": "GET",
7750	//   "id": "dataproc.projects.regions.autoscalingPolicies.list",
7751	//   "parameterOrder": [
7752	//     "parent"
7753	//   ],
7754	//   "parameters": {
7755	//     "pageSize": {
7756	//       "description": "Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.",
7757	//       "format": "int32",
7758	//       "location": "query",
7759	//       "type": "integer"
7760	//     },
7761	//     "pageToken": {
7762	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
7763	//       "location": "query",
7764	//       "type": "string"
7765	//     },
7766	//     "parent": {
7767	//       "description": "Required. The \"resource name\" of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies.list, the resource name of the region has the following format: projects/{project_id}/regions/{region} For projects.locations.autoscalingPolicies.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}",
7768	//       "location": "path",
7769	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
7770	//       "required": true,
7771	//       "type": "string"
7772	//     }
7773	//   },
7774	//   "path": "v1beta2/{+parent}/autoscalingPolicies",
7775	//   "response": {
7776	//     "$ref": "ListAutoscalingPoliciesResponse"
7777	//   },
7778	//   "scopes": [
7779	//     "https://www.googleapis.com/auth/cloud-platform"
7780	//   ]
7781	// }
7782
7783}
7784
7785// Pages invokes f for each page of results.
7786// A non-nil error returned from f will halt the iteration.
7787// The provided context supersedes any context provided to the Context method.
7788func (c *ProjectsRegionsAutoscalingPoliciesListCall) Pages(ctx context.Context, f func(*ListAutoscalingPoliciesResponse) error) error {
7789	c.ctx_ = ctx
7790	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
7791	for {
7792		x, err := c.Do()
7793		if err != nil {
7794			return err
7795		}
7796		if err := f(x); err != nil {
7797			return err
7798		}
7799		if x.NextPageToken == "" {
7800			return nil
7801		}
7802		c.PageToken(x.NextPageToken)
7803	}
7804}
7805
7806// method id "dataproc.projects.regions.autoscalingPolicies.setIamPolicy":
7807
7808type ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall struct {
7809	s                   *Service
7810	resource            string
7811	setiampolicyrequest *SetIamPolicyRequest
7812	urlParams_          gensupport.URLParams
7813	ctx_                context.Context
7814	header_             http.Header
7815}
7816
7817// SetIamPolicy: Sets the access control policy on the specified
7818// resource. Replaces any existing policy.Can return NOT_FOUND,
7819// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
7820func (r *ProjectsRegionsAutoscalingPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
7821	c := &ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7822	c.resource = resource
7823	c.setiampolicyrequest = setiampolicyrequest
7824	return c
7825}
7826
7827// Fields allows partial responses to be retrieved. See
7828// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7829// for more information.
7830func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
7831	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7832	return c
7833}
7834
7835// Context sets the context to be used in this call's Do method. Any
7836// pending HTTP request will be aborted if the provided context is
7837// canceled.
7838func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
7839	c.ctx_ = ctx
7840	return c
7841}
7842
7843// Header returns an http.Header that can be modified by the caller to
7844// add HTTP headers to the request.
7845func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Header() http.Header {
7846	if c.header_ == nil {
7847		c.header_ = make(http.Header)
7848	}
7849	return c.header_
7850}
7851
7852func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7853	reqHeaders := make(http.Header)
7854	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
7855	for k, v := range c.header_ {
7856		reqHeaders[k] = v
7857	}
7858	reqHeaders.Set("User-Agent", c.s.userAgent())
7859	var body io.Reader = nil
7860	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
7861	if err != nil {
7862		return nil, err
7863	}
7864	reqHeaders.Set("Content-Type", "application/json")
7865	c.urlParams_.Set("alt", alt)
7866	c.urlParams_.Set("prettyPrint", "false")
7867	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
7868	urls += "?" + c.urlParams_.Encode()
7869	req, err := http.NewRequest("POST", urls, body)
7870	if err != nil {
7871		return nil, err
7872	}
7873	req.Header = reqHeaders
7874	googleapi.Expand(req.URL, map[string]string{
7875		"resource": c.resource,
7876	})
7877	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7878}
7879
7880// Do executes the "dataproc.projects.regions.autoscalingPolicies.setIamPolicy" call.
7881// Exactly one of *Policy or error will be non-nil. Any non-2xx status
7882// code is an error. Response headers are in either
7883// *Policy.ServerResponse.Header or (if a response was returned at all)
7884// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7885// check whether the returned error was because http.StatusNotModified
7886// was returned.
7887func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7888	gensupport.SetOptions(c.urlParams_, opts...)
7889	res, err := c.doRequest("json")
7890	if res != nil && res.StatusCode == http.StatusNotModified {
7891		if res.Body != nil {
7892			res.Body.Close()
7893		}
7894		return nil, &googleapi.Error{
7895			Code:   res.StatusCode,
7896			Header: res.Header,
7897		}
7898	}
7899	if err != nil {
7900		return nil, err
7901	}
7902	defer googleapi.CloseBody(res)
7903	if err := googleapi.CheckResponse(res); err != nil {
7904		return nil, err
7905	}
7906	ret := &Policy{
7907		ServerResponse: googleapi.ServerResponse{
7908			Header:         res.Header,
7909			HTTPStatusCode: res.StatusCode,
7910		},
7911	}
7912	target := &ret
7913	if err := gensupport.DecodeResponse(target, res); err != nil {
7914		return nil, err
7915	}
7916	return ret, nil
7917	// {
7918	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
7919	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}:setIamPolicy",
7920	//   "httpMethod": "POST",
7921	//   "id": "dataproc.projects.regions.autoscalingPolicies.setIamPolicy",
7922	//   "parameterOrder": [
7923	//     "resource"
7924	//   ],
7925	//   "parameters": {
7926	//     "resource": {
7927	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
7928	//       "location": "path",
7929	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7930	//       "required": true,
7931	//       "type": "string"
7932	//     }
7933	//   },
7934	//   "path": "v1beta2/{+resource}:setIamPolicy",
7935	//   "request": {
7936	//     "$ref": "SetIamPolicyRequest"
7937	//   },
7938	//   "response": {
7939	//     "$ref": "Policy"
7940	//   },
7941	//   "scopes": [
7942	//     "https://www.googleapis.com/auth/cloud-platform"
7943	//   ]
7944	// }
7945
7946}
7947
7948// method id "dataproc.projects.regions.autoscalingPolicies.testIamPermissions":
7949
7950type ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall struct {
7951	s                         *Service
7952	resource                  string
7953	testiampermissionsrequest *TestIamPermissionsRequest
7954	urlParams_                gensupport.URLParams
7955	ctx_                      context.Context
7956	header_                   http.Header
7957}
7958
7959// TestIamPermissions: Returns permissions that a caller has on the
7960// specified resource. If the resource does not exist, this will return
7961// an empty set of permissions, not a NOT_FOUND error.Note: This
7962// operation is designed to be used for building permission-aware UIs
7963// and command-line tools, not for authorization checking. This
7964// operation may "fail open" without warning.
7965func (r *ProjectsRegionsAutoscalingPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
7966	c := &ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7967	c.resource = resource
7968	c.testiampermissionsrequest = testiampermissionsrequest
7969	return c
7970}
7971
7972// Fields allows partial responses to be retrieved. See
7973// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7974// for more information.
7975func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
7976	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7977	return c
7978}
7979
7980// Context sets the context to be used in this call's Do method. Any
7981// pending HTTP request will be aborted if the provided context is
7982// canceled.
7983func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
7984	c.ctx_ = ctx
7985	return c
7986}
7987
7988// Header returns an http.Header that can be modified by the caller to
7989// add HTTP headers to the request.
7990func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Header() http.Header {
7991	if c.header_ == nil {
7992		c.header_ = make(http.Header)
7993	}
7994	return c.header_
7995}
7996
7997func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
7998	reqHeaders := make(http.Header)
7999	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
8000	for k, v := range c.header_ {
8001		reqHeaders[k] = v
8002	}
8003	reqHeaders.Set("User-Agent", c.s.userAgent())
8004	var body io.Reader = nil
8005	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
8006	if err != nil {
8007		return nil, err
8008	}
8009	reqHeaders.Set("Content-Type", "application/json")
8010	c.urlParams_.Set("alt", alt)
8011	c.urlParams_.Set("prettyPrint", "false")
8012	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
8013	urls += "?" + c.urlParams_.Encode()
8014	req, err := http.NewRequest("POST", urls, body)
8015	if err != nil {
8016		return nil, err
8017	}
8018	req.Header = reqHeaders
8019	googleapi.Expand(req.URL, map[string]string{
8020		"resource": c.resource,
8021	})
8022	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8023}
8024
8025// Do executes the "dataproc.projects.regions.autoscalingPolicies.testIamPermissions" call.
8026// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
8027// Any non-2xx status code is an error. Response headers are in either
8028// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
8029// was returned at all) in error.(*googleapi.Error).Header. Use
8030// googleapi.IsNotModified to check whether the returned error was
8031// because http.StatusNotModified was returned.
8032func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8033	gensupport.SetOptions(c.urlParams_, opts...)
8034	res, err := c.doRequest("json")
8035	if res != nil && res.StatusCode == http.StatusNotModified {
8036		if res.Body != nil {
8037			res.Body.Close()
8038		}
8039		return nil, &googleapi.Error{
8040			Code:   res.StatusCode,
8041			Header: res.Header,
8042		}
8043	}
8044	if err != nil {
8045		return nil, err
8046	}
8047	defer googleapi.CloseBody(res)
8048	if err := googleapi.CheckResponse(res); err != nil {
8049		return nil, err
8050	}
8051	ret := &TestIamPermissionsResponse{
8052		ServerResponse: googleapi.ServerResponse{
8053			Header:         res.Header,
8054			HTTPStatusCode: res.StatusCode,
8055		},
8056	}
8057	target := &ret
8058	if err := gensupport.DecodeResponse(target, res); err != nil {
8059		return nil, err
8060	}
8061	return ret, nil
8062	// {
8063	//   "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.",
8064	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}:testIamPermissions",
8065	//   "httpMethod": "POST",
8066	//   "id": "dataproc.projects.regions.autoscalingPolicies.testIamPermissions",
8067	//   "parameterOrder": [
8068	//     "resource"
8069	//   ],
8070	//   "parameters": {
8071	//     "resource": {
8072	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
8073	//       "location": "path",
8074	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
8075	//       "required": true,
8076	//       "type": "string"
8077	//     }
8078	//   },
8079	//   "path": "v1beta2/{+resource}:testIamPermissions",
8080	//   "request": {
8081	//     "$ref": "TestIamPermissionsRequest"
8082	//   },
8083	//   "response": {
8084	//     "$ref": "TestIamPermissionsResponse"
8085	//   },
8086	//   "scopes": [
8087	//     "https://www.googleapis.com/auth/cloud-platform"
8088	//   ]
8089	// }
8090
8091}
8092
8093// method id "dataproc.projects.regions.autoscalingPolicies.update":
8094
8095type ProjectsRegionsAutoscalingPoliciesUpdateCall struct {
8096	s                 *Service
8097	name              string
8098	autoscalingpolicy *AutoscalingPolicy
8099	urlParams_        gensupport.URLParams
8100	ctx_              context.Context
8101	header_           http.Header
8102}
8103
8104// Update: Updates (replaces) autoscaling policy.Disabled check for
8105// update_mask, because all updates will be full replacements.
8106func (r *ProjectsRegionsAutoscalingPoliciesService) Update(name string, autoscalingpolicy *AutoscalingPolicy) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
8107	c := &ProjectsRegionsAutoscalingPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8108	c.name = name
8109	c.autoscalingpolicy = autoscalingpolicy
8110	return c
8111}
8112
8113// Fields allows partial responses to be retrieved. See
8114// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8115// for more information.
8116func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
8117	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8118	return c
8119}
8120
8121// Context sets the context to be used in this call's Do method. Any
8122// pending HTTP request will be aborted if the provided context is
8123// canceled.
8124func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
8125	c.ctx_ = ctx
8126	return c
8127}
8128
8129// Header returns an http.Header that can be modified by the caller to
8130// add HTTP headers to the request.
8131func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Header() http.Header {
8132	if c.header_ == nil {
8133		c.header_ = make(http.Header)
8134	}
8135	return c.header_
8136}
8137
8138func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
8139	reqHeaders := make(http.Header)
8140	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
8141	for k, v := range c.header_ {
8142		reqHeaders[k] = v
8143	}
8144	reqHeaders.Set("User-Agent", c.s.userAgent())
8145	var body io.Reader = nil
8146	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
8147	if err != nil {
8148		return nil, err
8149	}
8150	reqHeaders.Set("Content-Type", "application/json")
8151	c.urlParams_.Set("alt", alt)
8152	c.urlParams_.Set("prettyPrint", "false")
8153	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
8154	urls += "?" + c.urlParams_.Encode()
8155	req, err := http.NewRequest("PUT", urls, body)
8156	if err != nil {
8157		return nil, err
8158	}
8159	req.Header = reqHeaders
8160	googleapi.Expand(req.URL, map[string]string{
8161		"name": c.name,
8162	})
8163	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8164}
8165
8166// Do executes the "dataproc.projects.regions.autoscalingPolicies.update" call.
8167// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
8168// non-2xx status code is an error. Response headers are in either
8169// *AutoscalingPolicy.ServerResponse.Header or (if a response was
8170// returned at all) in error.(*googleapi.Error).Header. Use
8171// googleapi.IsNotModified to check whether the returned error was
8172// because http.StatusNotModified was returned.
8173func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
8174	gensupport.SetOptions(c.urlParams_, opts...)
8175	res, err := c.doRequest("json")
8176	if res != nil && res.StatusCode == http.StatusNotModified {
8177		if res.Body != nil {
8178			res.Body.Close()
8179		}
8180		return nil, &googleapi.Error{
8181			Code:   res.StatusCode,
8182			Header: res.Header,
8183		}
8184	}
8185	if err != nil {
8186		return nil, err
8187	}
8188	defer googleapi.CloseBody(res)
8189	if err := googleapi.CheckResponse(res); err != nil {
8190		return nil, err
8191	}
8192	ret := &AutoscalingPolicy{
8193		ServerResponse: googleapi.ServerResponse{
8194			Header:         res.Header,
8195			HTTPStatusCode: res.StatusCode,
8196		},
8197	}
8198	target := &ret
8199	if err := gensupport.DecodeResponse(target, res); err != nil {
8200		return nil, err
8201	}
8202	return ret, nil
8203	// {
8204	//   "description": "Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.",
8205	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}",
8206	//   "httpMethod": "PUT",
8207	//   "id": "dataproc.projects.regions.autoscalingPolicies.update",
8208	//   "parameterOrder": [
8209	//     "name"
8210	//   ],
8211	//   "parameters": {
8212	//     "name": {
8213	//       "description": "Output only. The \"resource name\" of the autoscaling policy, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id} For projects.locations.autoscalingPolicies, the resource name of the policy has the following format: projects/{project_id}/locations/{location}/autoscalingPolicies/{policy_id}",
8214	//       "location": "path",
8215	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
8216	//       "required": true,
8217	//       "type": "string"
8218	//     }
8219	//   },
8220	//   "path": "v1beta2/{+name}",
8221	//   "request": {
8222	//     "$ref": "AutoscalingPolicy"
8223	//   },
8224	//   "response": {
8225	//     "$ref": "AutoscalingPolicy"
8226	//   },
8227	//   "scopes": [
8228	//     "https://www.googleapis.com/auth/cloud-platform"
8229	//   ]
8230	// }
8231
8232}
8233
8234// method id "dataproc.projects.regions.clusters.create":
8235
8236type ProjectsRegionsClustersCreateCall struct {
8237	s          *Service
8238	projectId  string
8239	region     string
8240	cluster    *Cluster
8241	urlParams_ gensupport.URLParams
8242	ctx_       context.Context
8243	header_    http.Header
8244}
8245
8246// Create: Creates a cluster in a project. The returned
8247// Operation.metadata will be ClusterOperationMetadata
8248// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
8249// aproc.v1beta2#clusteroperationmetadata).
8250func (r *ProjectsRegionsClustersService) Create(projectId string, region string, cluster *Cluster) *ProjectsRegionsClustersCreateCall {
8251	c := &ProjectsRegionsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8252	c.projectId = projectId
8253	c.region = region
8254	c.cluster = cluster
8255	return c
8256}
8257
8258// RequestId sets the optional parameter "requestId": A unique id used
8259// to identify the request. If the server receives two
8260// CreateClusterRequest requests with the same id, then the second
8261// request will be ignored and the first google.longrunning.Operation
8262// created and stored in the backend is returned.It is recommended to
8263// always set this value to a UUID
8264// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
8265// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
8266// and hyphens (-). The maximum length is 40 characters.
8267func (c *ProjectsRegionsClustersCreateCall) RequestId(requestId string) *ProjectsRegionsClustersCreateCall {
8268	c.urlParams_.Set("requestId", requestId)
8269	return c
8270}
8271
8272// Fields allows partial responses to be retrieved. See
8273// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8274// for more information.
8275func (c *ProjectsRegionsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersCreateCall {
8276	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8277	return c
8278}
8279
8280// Context sets the context to be used in this call's Do method. Any
8281// pending HTTP request will be aborted if the provided context is
8282// canceled.
8283func (c *ProjectsRegionsClustersCreateCall) Context(ctx context.Context) *ProjectsRegionsClustersCreateCall {
8284	c.ctx_ = ctx
8285	return c
8286}
8287
8288// Header returns an http.Header that can be modified by the caller to
8289// add HTTP headers to the request.
8290func (c *ProjectsRegionsClustersCreateCall) Header() http.Header {
8291	if c.header_ == nil {
8292		c.header_ = make(http.Header)
8293	}
8294	return c.header_
8295}
8296
8297func (c *ProjectsRegionsClustersCreateCall) doRequest(alt string) (*http.Response, error) {
8298	reqHeaders := make(http.Header)
8299	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
8300	for k, v := range c.header_ {
8301		reqHeaders[k] = v
8302	}
8303	reqHeaders.Set("User-Agent", c.s.userAgent())
8304	var body io.Reader = nil
8305	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
8306	if err != nil {
8307		return nil, err
8308	}
8309	reqHeaders.Set("Content-Type", "application/json")
8310	c.urlParams_.Set("alt", alt)
8311	c.urlParams_.Set("prettyPrint", "false")
8312	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters")
8313	urls += "?" + c.urlParams_.Encode()
8314	req, err := http.NewRequest("POST", urls, body)
8315	if err != nil {
8316		return nil, err
8317	}
8318	req.Header = reqHeaders
8319	googleapi.Expand(req.URL, map[string]string{
8320		"projectId": c.projectId,
8321		"region":    c.region,
8322	})
8323	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8324}
8325
8326// Do executes the "dataproc.projects.regions.clusters.create" call.
8327// Exactly one of *Operation or error will be non-nil. Any non-2xx
8328// status code is an error. Response headers are in either
8329// *Operation.ServerResponse.Header or (if a response was returned at
8330// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8331// to check whether the returned error was because
8332// http.StatusNotModified was returned.
8333func (c *ProjectsRegionsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8334	gensupport.SetOptions(c.urlParams_, opts...)
8335	res, err := c.doRequest("json")
8336	if res != nil && res.StatusCode == http.StatusNotModified {
8337		if res.Body != nil {
8338			res.Body.Close()
8339		}
8340		return nil, &googleapi.Error{
8341			Code:   res.StatusCode,
8342			Header: res.Header,
8343		}
8344	}
8345	if err != nil {
8346		return nil, err
8347	}
8348	defer googleapi.CloseBody(res)
8349	if err := googleapi.CheckResponse(res); err != nil {
8350		return nil, err
8351	}
8352	ret := &Operation{
8353		ServerResponse: googleapi.ServerResponse{
8354			Header:         res.Header,
8355			HTTPStatusCode: res.StatusCode,
8356		},
8357	}
8358	target := &ret
8359	if err := gensupport.DecodeResponse(target, res); err != nil {
8360		return nil, err
8361	}
8362	return ret, nil
8363	// {
8364	//   "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.v1beta2#clusteroperationmetadata).",
8365	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters",
8366	//   "httpMethod": "POST",
8367	//   "id": "dataproc.projects.regions.clusters.create",
8368	//   "parameterOrder": [
8369	//     "projectId",
8370	//     "region"
8371	//   ],
8372	//   "parameters": {
8373	//     "projectId": {
8374	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8375	//       "location": "path",
8376	//       "required": true,
8377	//       "type": "string"
8378	//     },
8379	//     "region": {
8380	//       "description": "Required. The Dataproc region in which to handle the request.",
8381	//       "location": "path",
8382	//       "required": true,
8383	//       "type": "string"
8384	//     },
8385	//     "requestId": {
8386	//       "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.",
8387	//       "location": "query",
8388	//       "type": "string"
8389	//     }
8390	//   },
8391	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters",
8392	//   "request": {
8393	//     "$ref": "Cluster"
8394	//   },
8395	//   "response": {
8396	//     "$ref": "Operation"
8397	//   },
8398	//   "scopes": [
8399	//     "https://www.googleapis.com/auth/cloud-platform"
8400	//   ]
8401	// }
8402
8403}
8404
8405// method id "dataproc.projects.regions.clusters.delete":
8406
8407type ProjectsRegionsClustersDeleteCall struct {
8408	s           *Service
8409	projectId   string
8410	region      string
8411	clusterName string
8412	urlParams_  gensupport.URLParams
8413	ctx_        context.Context
8414	header_     http.Header
8415}
8416
8417// Delete: Deletes a cluster in a project. The returned
8418// Operation.metadata will be ClusterOperationMetadata
8419// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
8420// aproc.v1beta2#clusteroperationmetadata).
8421func (r *ProjectsRegionsClustersService) Delete(projectId string, region string, clusterName string) *ProjectsRegionsClustersDeleteCall {
8422	c := &ProjectsRegionsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8423	c.projectId = projectId
8424	c.region = region
8425	c.clusterName = clusterName
8426	return c
8427}
8428
8429// ClusterUuid sets the optional parameter "clusterUuid": Specifying the
8430// cluster_uuid means the RPC should fail (with error NOT_FOUND) if
8431// cluster with specified UUID does not exist.
8432func (c *ProjectsRegionsClustersDeleteCall) ClusterUuid(clusterUuid string) *ProjectsRegionsClustersDeleteCall {
8433	c.urlParams_.Set("clusterUuid", clusterUuid)
8434	return c
8435}
8436
8437// RequestId sets the optional parameter "requestId": A unique id used
8438// to identify the request. If the server receives two
8439// DeleteClusterRequest requests with the same id, then the second
8440// request will be ignored and the first google.longrunning.Operation
8441// created and stored in the backend is returned.It is recommended to
8442// always set this value to a UUID
8443// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
8444// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
8445// and hyphens (-). The maximum length is 40 characters.
8446func (c *ProjectsRegionsClustersDeleteCall) RequestId(requestId string) *ProjectsRegionsClustersDeleteCall {
8447	c.urlParams_.Set("requestId", requestId)
8448	return c
8449}
8450
8451// Fields allows partial responses to be retrieved. See
8452// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8453// for more information.
8454func (c *ProjectsRegionsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersDeleteCall {
8455	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8456	return c
8457}
8458
8459// Context sets the context to be used in this call's Do method. Any
8460// pending HTTP request will be aborted if the provided context is
8461// canceled.
8462func (c *ProjectsRegionsClustersDeleteCall) Context(ctx context.Context) *ProjectsRegionsClustersDeleteCall {
8463	c.ctx_ = ctx
8464	return c
8465}
8466
8467// Header returns an http.Header that can be modified by the caller to
8468// add HTTP headers to the request.
8469func (c *ProjectsRegionsClustersDeleteCall) Header() http.Header {
8470	if c.header_ == nil {
8471		c.header_ = make(http.Header)
8472	}
8473	return c.header_
8474}
8475
8476func (c *ProjectsRegionsClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
8477	reqHeaders := make(http.Header)
8478	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
8479	for k, v := range c.header_ {
8480		reqHeaders[k] = v
8481	}
8482	reqHeaders.Set("User-Agent", c.s.userAgent())
8483	var body io.Reader = nil
8484	c.urlParams_.Set("alt", alt)
8485	c.urlParams_.Set("prettyPrint", "false")
8486	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}")
8487	urls += "?" + c.urlParams_.Encode()
8488	req, err := http.NewRequest("DELETE", urls, body)
8489	if err != nil {
8490		return nil, err
8491	}
8492	req.Header = reqHeaders
8493	googleapi.Expand(req.URL, map[string]string{
8494		"projectId":   c.projectId,
8495		"region":      c.region,
8496		"clusterName": c.clusterName,
8497	})
8498	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8499}
8500
8501// Do executes the "dataproc.projects.regions.clusters.delete" call.
8502// Exactly one of *Operation or error will be non-nil. Any non-2xx
8503// status code is an error. Response headers are in either
8504// *Operation.ServerResponse.Header or (if a response was returned at
8505// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8506// to check whether the returned error was because
8507// http.StatusNotModified was returned.
8508func (c *ProjectsRegionsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8509	gensupport.SetOptions(c.urlParams_, opts...)
8510	res, err := c.doRequest("json")
8511	if res != nil && res.StatusCode == http.StatusNotModified {
8512		if res.Body != nil {
8513			res.Body.Close()
8514		}
8515		return nil, &googleapi.Error{
8516			Code:   res.StatusCode,
8517			Header: res.Header,
8518		}
8519	}
8520	if err != nil {
8521		return nil, err
8522	}
8523	defer googleapi.CloseBody(res)
8524	if err := googleapi.CheckResponse(res); err != nil {
8525		return nil, err
8526	}
8527	ret := &Operation{
8528		ServerResponse: googleapi.ServerResponse{
8529			Header:         res.Header,
8530			HTTPStatusCode: res.StatusCode,
8531		},
8532	}
8533	target := &ret
8534	if err := gensupport.DecodeResponse(target, res); err != nil {
8535		return nil, err
8536	}
8537	return ret, nil
8538	// {
8539	//   "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.v1beta2#clusteroperationmetadata).",
8540	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
8541	//   "httpMethod": "DELETE",
8542	//   "id": "dataproc.projects.regions.clusters.delete",
8543	//   "parameterOrder": [
8544	//     "projectId",
8545	//     "region",
8546	//     "clusterName"
8547	//   ],
8548	//   "parameters": {
8549	//     "clusterName": {
8550	//       "description": "Required. The cluster name.",
8551	//       "location": "path",
8552	//       "required": true,
8553	//       "type": "string"
8554	//     },
8555	//     "clusterUuid": {
8556	//       "description": "Optional. Specifying the cluster_uuid means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist.",
8557	//       "location": "query",
8558	//       "type": "string"
8559	//     },
8560	//     "projectId": {
8561	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8562	//       "location": "path",
8563	//       "required": true,
8564	//       "type": "string"
8565	//     },
8566	//     "region": {
8567	//       "description": "Required. The Dataproc region in which to handle the request.",
8568	//       "location": "path",
8569	//       "required": true,
8570	//       "type": "string"
8571	//     },
8572	//     "requestId": {
8573	//       "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.",
8574	//       "location": "query",
8575	//       "type": "string"
8576	//     }
8577	//   },
8578	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
8579	//   "response": {
8580	//     "$ref": "Operation"
8581	//   },
8582	//   "scopes": [
8583	//     "https://www.googleapis.com/auth/cloud-platform"
8584	//   ]
8585	// }
8586
8587}
8588
8589// method id "dataproc.projects.regions.clusters.diagnose":
8590
8591type ProjectsRegionsClustersDiagnoseCall struct {
8592	s                      *Service
8593	projectId              string
8594	region                 string
8595	clusterName            string
8596	diagnoseclusterrequest *DiagnoseClusterRequest
8597	urlParams_             gensupport.URLParams
8598	ctx_                   context.Context
8599	header_                http.Header
8600}
8601
8602// Diagnose: Gets cluster diagnostic information. The returned
8603// Operation.metadata will be ClusterOperationMetadata
8604// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
8605// aproc.v1beta2#clusteroperationmetadata). After the operation
8606// completes, Operation.response contains Empty.
8607func (r *ProjectsRegionsClustersService) Diagnose(projectId string, region string, clusterName string, diagnoseclusterrequest *DiagnoseClusterRequest) *ProjectsRegionsClustersDiagnoseCall {
8608	c := &ProjectsRegionsClustersDiagnoseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8609	c.projectId = projectId
8610	c.region = region
8611	c.clusterName = clusterName
8612	c.diagnoseclusterrequest = diagnoseclusterrequest
8613	return c
8614}
8615
8616// Fields allows partial responses to be retrieved. See
8617// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8618// for more information.
8619func (c *ProjectsRegionsClustersDiagnoseCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersDiagnoseCall {
8620	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8621	return c
8622}
8623
8624// Context sets the context to be used in this call's Do method. Any
8625// pending HTTP request will be aborted if the provided context is
8626// canceled.
8627func (c *ProjectsRegionsClustersDiagnoseCall) Context(ctx context.Context) *ProjectsRegionsClustersDiagnoseCall {
8628	c.ctx_ = ctx
8629	return c
8630}
8631
8632// Header returns an http.Header that can be modified by the caller to
8633// add HTTP headers to the request.
8634func (c *ProjectsRegionsClustersDiagnoseCall) Header() http.Header {
8635	if c.header_ == nil {
8636		c.header_ = make(http.Header)
8637	}
8638	return c.header_
8639}
8640
8641func (c *ProjectsRegionsClustersDiagnoseCall) doRequest(alt string) (*http.Response, error) {
8642	reqHeaders := make(http.Header)
8643	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
8644	for k, v := range c.header_ {
8645		reqHeaders[k] = v
8646	}
8647	reqHeaders.Set("User-Agent", c.s.userAgent())
8648	var body io.Reader = nil
8649	body, err := googleapi.WithoutDataWrapper.JSONReader(c.diagnoseclusterrequest)
8650	if err != nil {
8651		return nil, err
8652	}
8653	reqHeaders.Set("Content-Type", "application/json")
8654	c.urlParams_.Set("alt", alt)
8655	c.urlParams_.Set("prettyPrint", "false")
8656	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose")
8657	urls += "?" + c.urlParams_.Encode()
8658	req, err := http.NewRequest("POST", urls, body)
8659	if err != nil {
8660		return nil, err
8661	}
8662	req.Header = reqHeaders
8663	googleapi.Expand(req.URL, map[string]string{
8664		"projectId":   c.projectId,
8665		"region":      c.region,
8666		"clusterName": c.clusterName,
8667	})
8668	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8669}
8670
8671// Do executes the "dataproc.projects.regions.clusters.diagnose" call.
8672// Exactly one of *Operation or error will be non-nil. Any non-2xx
8673// status code is an error. Response headers are in either
8674// *Operation.ServerResponse.Header or (if a response was returned at
8675// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8676// to check whether the returned error was because
8677// http.StatusNotModified was returned.
8678func (c *ProjectsRegionsClustersDiagnoseCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8679	gensupport.SetOptions(c.urlParams_, opts...)
8680	res, err := c.doRequest("json")
8681	if res != nil && res.StatusCode == http.StatusNotModified {
8682		if res.Body != nil {
8683			res.Body.Close()
8684		}
8685		return nil, &googleapi.Error{
8686			Code:   res.StatusCode,
8687			Header: res.Header,
8688		}
8689	}
8690	if err != nil {
8691		return nil, err
8692	}
8693	defer googleapi.CloseBody(res)
8694	if err := googleapi.CheckResponse(res); err != nil {
8695		return nil, err
8696	}
8697	ret := &Operation{
8698		ServerResponse: googleapi.ServerResponse{
8699			Header:         res.Header,
8700			HTTPStatusCode: res.StatusCode,
8701		},
8702	}
8703	target := &ret
8704	if err := gensupport.DecodeResponse(target, res); err != nil {
8705		return nil, err
8706	}
8707	return ret, nil
8708	// {
8709	//   "description": "Gets cluster diagnostic information. The returned Operation.metadata will be ClusterOperationMetadata (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata). After the operation completes, Operation.response contains Empty.",
8710	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose",
8711	//   "httpMethod": "POST",
8712	//   "id": "dataproc.projects.regions.clusters.diagnose",
8713	//   "parameterOrder": [
8714	//     "projectId",
8715	//     "region",
8716	//     "clusterName"
8717	//   ],
8718	//   "parameters": {
8719	//     "clusterName": {
8720	//       "description": "Required. The cluster name.",
8721	//       "location": "path",
8722	//       "required": true,
8723	//       "type": "string"
8724	//     },
8725	//     "projectId": {
8726	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8727	//       "location": "path",
8728	//       "required": true,
8729	//       "type": "string"
8730	//     },
8731	//     "region": {
8732	//       "description": "Required. The Dataproc region in which to handle the request.",
8733	//       "location": "path",
8734	//       "required": true,
8735	//       "type": "string"
8736	//     }
8737	//   },
8738	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose",
8739	//   "request": {
8740	//     "$ref": "DiagnoseClusterRequest"
8741	//   },
8742	//   "response": {
8743	//     "$ref": "Operation"
8744	//   },
8745	//   "scopes": [
8746	//     "https://www.googleapis.com/auth/cloud-platform"
8747	//   ]
8748	// }
8749
8750}
8751
8752// method id "dataproc.projects.regions.clusters.get":
8753
8754type ProjectsRegionsClustersGetCall struct {
8755	s            *Service
8756	projectId    string
8757	region       string
8758	clusterName  string
8759	urlParams_   gensupport.URLParams
8760	ifNoneMatch_ string
8761	ctx_         context.Context
8762	header_      http.Header
8763}
8764
8765// Get: Gets the resource representation for a cluster in a project.
8766func (r *ProjectsRegionsClustersService) Get(projectId string, region string, clusterName string) *ProjectsRegionsClustersGetCall {
8767	c := &ProjectsRegionsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8768	c.projectId = projectId
8769	c.region = region
8770	c.clusterName = clusterName
8771	return c
8772}
8773
8774// Fields allows partial responses to be retrieved. See
8775// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8776// for more information.
8777func (c *ProjectsRegionsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersGetCall {
8778	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8779	return c
8780}
8781
8782// IfNoneMatch sets the optional parameter which makes the operation
8783// fail if the object's ETag matches the given value. This is useful for
8784// getting updates only after the object has changed since the last
8785// request. Use googleapi.IsNotModified to check whether the response
8786// error from Do is the result of In-None-Match.
8787func (c *ProjectsRegionsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersGetCall {
8788	c.ifNoneMatch_ = entityTag
8789	return c
8790}
8791
8792// Context sets the context to be used in this call's Do method. Any
8793// pending HTTP request will be aborted if the provided context is
8794// canceled.
8795func (c *ProjectsRegionsClustersGetCall) Context(ctx context.Context) *ProjectsRegionsClustersGetCall {
8796	c.ctx_ = ctx
8797	return c
8798}
8799
8800// Header returns an http.Header that can be modified by the caller to
8801// add HTTP headers to the request.
8802func (c *ProjectsRegionsClustersGetCall) Header() http.Header {
8803	if c.header_ == nil {
8804		c.header_ = make(http.Header)
8805	}
8806	return c.header_
8807}
8808
8809func (c *ProjectsRegionsClustersGetCall) doRequest(alt string) (*http.Response, error) {
8810	reqHeaders := make(http.Header)
8811	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
8812	for k, v := range c.header_ {
8813		reqHeaders[k] = v
8814	}
8815	reqHeaders.Set("User-Agent", c.s.userAgent())
8816	if c.ifNoneMatch_ != "" {
8817		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8818	}
8819	var body io.Reader = nil
8820	c.urlParams_.Set("alt", alt)
8821	c.urlParams_.Set("prettyPrint", "false")
8822	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}")
8823	urls += "?" + c.urlParams_.Encode()
8824	req, err := http.NewRequest("GET", urls, body)
8825	if err != nil {
8826		return nil, err
8827	}
8828	req.Header = reqHeaders
8829	googleapi.Expand(req.URL, map[string]string{
8830		"projectId":   c.projectId,
8831		"region":      c.region,
8832		"clusterName": c.clusterName,
8833	})
8834	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8835}
8836
8837// Do executes the "dataproc.projects.regions.clusters.get" call.
8838// Exactly one of *Cluster or error will be non-nil. Any non-2xx status
8839// code is an error. Response headers are in either
8840// *Cluster.ServerResponse.Header or (if a response was returned at all)
8841// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8842// check whether the returned error was because http.StatusNotModified
8843// was returned.
8844func (c *ProjectsRegionsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) {
8845	gensupport.SetOptions(c.urlParams_, opts...)
8846	res, err := c.doRequest("json")
8847	if res != nil && res.StatusCode == http.StatusNotModified {
8848		if res.Body != nil {
8849			res.Body.Close()
8850		}
8851		return nil, &googleapi.Error{
8852			Code:   res.StatusCode,
8853			Header: res.Header,
8854		}
8855	}
8856	if err != nil {
8857		return nil, err
8858	}
8859	defer googleapi.CloseBody(res)
8860	if err := googleapi.CheckResponse(res); err != nil {
8861		return nil, err
8862	}
8863	ret := &Cluster{
8864		ServerResponse: googleapi.ServerResponse{
8865			Header:         res.Header,
8866			HTTPStatusCode: res.StatusCode,
8867		},
8868	}
8869	target := &ret
8870	if err := gensupport.DecodeResponse(target, res); err != nil {
8871		return nil, err
8872	}
8873	return ret, nil
8874	// {
8875	//   "description": "Gets the resource representation for a cluster in a project.",
8876	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
8877	//   "httpMethod": "GET",
8878	//   "id": "dataproc.projects.regions.clusters.get",
8879	//   "parameterOrder": [
8880	//     "projectId",
8881	//     "region",
8882	//     "clusterName"
8883	//   ],
8884	//   "parameters": {
8885	//     "clusterName": {
8886	//       "description": "Required. The cluster name.",
8887	//       "location": "path",
8888	//       "required": true,
8889	//       "type": "string"
8890	//     },
8891	//     "projectId": {
8892	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8893	//       "location": "path",
8894	//       "required": true,
8895	//       "type": "string"
8896	//     },
8897	//     "region": {
8898	//       "description": "Required. The Dataproc region in which to handle the request.",
8899	//       "location": "path",
8900	//       "required": true,
8901	//       "type": "string"
8902	//     }
8903	//   },
8904	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
8905	//   "response": {
8906	//     "$ref": "Cluster"
8907	//   },
8908	//   "scopes": [
8909	//     "https://www.googleapis.com/auth/cloud-platform"
8910	//   ]
8911	// }
8912
8913}
8914
8915// method id "dataproc.projects.regions.clusters.getIamPolicy":
8916
8917type ProjectsRegionsClustersGetIamPolicyCall struct {
8918	s            *Service
8919	resource     string
8920	urlParams_   gensupport.URLParams
8921	ifNoneMatch_ string
8922	ctx_         context.Context
8923	header_      http.Header
8924}
8925
8926// GetIamPolicy: Gets the access control policy for a resource. Returns
8927// an empty policy if the resource exists and does not have a policy
8928// set.
8929func (r *ProjectsRegionsClustersService) GetIamPolicy(resource string) *ProjectsRegionsClustersGetIamPolicyCall {
8930	c := &ProjectsRegionsClustersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8931	c.resource = resource
8932	return c
8933}
8934
8935// OptionsRequestedPolicyVersion sets the optional parameter
8936// "options.requestedPolicyVersion": The policy format version to be
8937// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
8938// value will be rejected.Requests for policies with any conditional
8939// bindings must specify version 3. Policies without any conditional
8940// bindings may specify any valid value or leave the field unset.To
8941// learn which resources support conditions in their IAM policies, see
8942// the IAM documentation
8943// (https://cloud.google.com/iam/help/conditions/resource-policies).
8944func (c *ProjectsRegionsClustersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsRegionsClustersGetIamPolicyCall {
8945	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
8946	return c
8947}
8948
8949// Fields allows partial responses to be retrieved. See
8950// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8951// for more information.
8952func (c *ProjectsRegionsClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersGetIamPolicyCall {
8953	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8954	return c
8955}
8956
8957// IfNoneMatch sets the optional parameter which makes the operation
8958// fail if the object's ETag matches the given value. This is useful for
8959// getting updates only after the object has changed since the last
8960// request. Use googleapi.IsNotModified to check whether the response
8961// error from Do is the result of In-None-Match.
8962func (c *ProjectsRegionsClustersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersGetIamPolicyCall {
8963	c.ifNoneMatch_ = entityTag
8964	return c
8965}
8966
8967// Context sets the context to be used in this call's Do method. Any
8968// pending HTTP request will be aborted if the provided context is
8969// canceled.
8970func (c *ProjectsRegionsClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsClustersGetIamPolicyCall {
8971	c.ctx_ = ctx
8972	return c
8973}
8974
8975// Header returns an http.Header that can be modified by the caller to
8976// add HTTP headers to the request.
8977func (c *ProjectsRegionsClustersGetIamPolicyCall) Header() http.Header {
8978	if c.header_ == nil {
8979		c.header_ = make(http.Header)
8980	}
8981	return c.header_
8982}
8983
8984func (c *ProjectsRegionsClustersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8985	reqHeaders := make(http.Header)
8986	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
8987	for k, v := range c.header_ {
8988		reqHeaders[k] = v
8989	}
8990	reqHeaders.Set("User-Agent", c.s.userAgent())
8991	if c.ifNoneMatch_ != "" {
8992		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
8993	}
8994	var body io.Reader = nil
8995	c.urlParams_.Set("alt", alt)
8996	c.urlParams_.Set("prettyPrint", "false")
8997	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
8998	urls += "?" + c.urlParams_.Encode()
8999	req, err := http.NewRequest("GET", urls, body)
9000	if err != nil {
9001		return nil, err
9002	}
9003	req.Header = reqHeaders
9004	googleapi.Expand(req.URL, map[string]string{
9005		"resource": c.resource,
9006	})
9007	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9008}
9009
9010// Do executes the "dataproc.projects.regions.clusters.getIamPolicy" call.
9011// Exactly one of *Policy or error will be non-nil. Any non-2xx status
9012// code is an error. Response headers are in either
9013// *Policy.ServerResponse.Header or (if a response was returned at all)
9014// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9015// check whether the returned error was because http.StatusNotModified
9016// was returned.
9017func (c *ProjectsRegionsClustersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9018	gensupport.SetOptions(c.urlParams_, opts...)
9019	res, err := c.doRequest("json")
9020	if res != nil && res.StatusCode == http.StatusNotModified {
9021		if res.Body != nil {
9022			res.Body.Close()
9023		}
9024		return nil, &googleapi.Error{
9025			Code:   res.StatusCode,
9026			Header: res.Header,
9027		}
9028	}
9029	if err != nil {
9030		return nil, err
9031	}
9032	defer googleapi.CloseBody(res)
9033	if err := googleapi.CheckResponse(res); err != nil {
9034		return nil, err
9035	}
9036	ret := &Policy{
9037		ServerResponse: googleapi.ServerResponse{
9038			Header:         res.Header,
9039			HTTPStatusCode: res.StatusCode,
9040		},
9041	}
9042	target := &ret
9043	if err := gensupport.DecodeResponse(target, res); err != nil {
9044		return nil, err
9045	}
9046	return ret, nil
9047	// {
9048	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
9049	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:getIamPolicy",
9050	//   "httpMethod": "GET",
9051	//   "id": "dataproc.projects.regions.clusters.getIamPolicy",
9052	//   "parameterOrder": [
9053	//     "resource"
9054	//   ],
9055	//   "parameters": {
9056	//     "options.requestedPolicyVersion": {
9057	//       "description": "Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).",
9058	//       "format": "int32",
9059	//       "location": "query",
9060	//       "type": "integer"
9061	//     },
9062	//     "resource": {
9063	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
9064	//       "location": "path",
9065	//       "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$",
9066	//       "required": true,
9067	//       "type": "string"
9068	//     }
9069	//   },
9070	//   "path": "v1beta2/{+resource}:getIamPolicy",
9071	//   "response": {
9072	//     "$ref": "Policy"
9073	//   },
9074	//   "scopes": [
9075	//     "https://www.googleapis.com/auth/cloud-platform"
9076	//   ]
9077	// }
9078
9079}
9080
9081// method id "dataproc.projects.regions.clusters.list":
9082
9083type ProjectsRegionsClustersListCall struct {
9084	s            *Service
9085	projectId    string
9086	region       string
9087	urlParams_   gensupport.URLParams
9088	ifNoneMatch_ string
9089	ctx_         context.Context
9090	header_      http.Header
9091}
9092
9093// List: Lists all regions/{region}/clusters in a project
9094// alphabetically.
9095func (r *ProjectsRegionsClustersService) List(projectId string, region string) *ProjectsRegionsClustersListCall {
9096	c := &ProjectsRegionsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9097	c.projectId = projectId
9098	c.region = region
9099	return c
9100}
9101
9102// Filter sets the optional parameter "filter": A filter constraining
9103// the clusters to list. Filters are case-sensitive and have the
9104// following syntax:field = value AND field = value ...where field is
9105// one of status.state, clusterName, or labels.[KEY], and [KEY] is a
9106// label key. value can be * to match all values. status.state can be
9107// one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR,
9108// DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and
9109// RUNNING states. INACTIVE contains the DELETING and ERROR states.
9110// clusterName is the name of the cluster provided at creation time.
9111// Only the logical AND operator is supported; space-separated items are
9112// treated as having an implicit AND operator.Example
9113// filter:status.state = ACTIVE AND clusterName = mycluster AND
9114// labels.env = staging AND labels.starred = *
9115func (c *ProjectsRegionsClustersListCall) Filter(filter string) *ProjectsRegionsClustersListCall {
9116	c.urlParams_.Set("filter", filter)
9117	return c
9118}
9119
9120// PageSize sets the optional parameter "pageSize": The standard List
9121// page size.
9122func (c *ProjectsRegionsClustersListCall) PageSize(pageSize int64) *ProjectsRegionsClustersListCall {
9123	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9124	return c
9125}
9126
9127// PageToken sets the optional parameter "pageToken": The standard List
9128// page token.
9129func (c *ProjectsRegionsClustersListCall) PageToken(pageToken string) *ProjectsRegionsClustersListCall {
9130	c.urlParams_.Set("pageToken", pageToken)
9131	return c
9132}
9133
9134// Fields allows partial responses to be retrieved. See
9135// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9136// for more information.
9137func (c *ProjectsRegionsClustersListCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersListCall {
9138	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9139	return c
9140}
9141
9142// IfNoneMatch sets the optional parameter which makes the operation
9143// fail if the object's ETag matches the given value. This is useful for
9144// getting updates only after the object has changed since the last
9145// request. Use googleapi.IsNotModified to check whether the response
9146// error from Do is the result of In-None-Match.
9147func (c *ProjectsRegionsClustersListCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersListCall {
9148	c.ifNoneMatch_ = entityTag
9149	return c
9150}
9151
9152// Context sets the context to be used in this call's Do method. Any
9153// pending HTTP request will be aborted if the provided context is
9154// canceled.
9155func (c *ProjectsRegionsClustersListCall) Context(ctx context.Context) *ProjectsRegionsClustersListCall {
9156	c.ctx_ = ctx
9157	return c
9158}
9159
9160// Header returns an http.Header that can be modified by the caller to
9161// add HTTP headers to the request.
9162func (c *ProjectsRegionsClustersListCall) Header() http.Header {
9163	if c.header_ == nil {
9164		c.header_ = make(http.Header)
9165	}
9166	return c.header_
9167}
9168
9169func (c *ProjectsRegionsClustersListCall) doRequest(alt string) (*http.Response, error) {
9170	reqHeaders := make(http.Header)
9171	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
9172	for k, v := range c.header_ {
9173		reqHeaders[k] = v
9174	}
9175	reqHeaders.Set("User-Agent", c.s.userAgent())
9176	if c.ifNoneMatch_ != "" {
9177		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9178	}
9179	var body io.Reader = nil
9180	c.urlParams_.Set("alt", alt)
9181	c.urlParams_.Set("prettyPrint", "false")
9182	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters")
9183	urls += "?" + c.urlParams_.Encode()
9184	req, err := http.NewRequest("GET", urls, body)
9185	if err != nil {
9186		return nil, err
9187	}
9188	req.Header = reqHeaders
9189	googleapi.Expand(req.URL, map[string]string{
9190		"projectId": c.projectId,
9191		"region":    c.region,
9192	})
9193	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9194}
9195
9196// Do executes the "dataproc.projects.regions.clusters.list" call.
9197// Exactly one of *ListClustersResponse or error will be non-nil. Any
9198// non-2xx status code is an error. Response headers are in either
9199// *ListClustersResponse.ServerResponse.Header or (if a response was
9200// returned at all) in error.(*googleapi.Error).Header. Use
9201// googleapi.IsNotModified to check whether the returned error was
9202// because http.StatusNotModified was returned.
9203func (c *ProjectsRegionsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) {
9204	gensupport.SetOptions(c.urlParams_, opts...)
9205	res, err := c.doRequest("json")
9206	if res != nil && res.StatusCode == http.StatusNotModified {
9207		if res.Body != nil {
9208			res.Body.Close()
9209		}
9210		return nil, &googleapi.Error{
9211			Code:   res.StatusCode,
9212			Header: res.Header,
9213		}
9214	}
9215	if err != nil {
9216		return nil, err
9217	}
9218	defer googleapi.CloseBody(res)
9219	if err := googleapi.CheckResponse(res); err != nil {
9220		return nil, err
9221	}
9222	ret := &ListClustersResponse{
9223		ServerResponse: googleapi.ServerResponse{
9224			Header:         res.Header,
9225			HTTPStatusCode: res.StatusCode,
9226		},
9227	}
9228	target := &ret
9229	if err := gensupport.DecodeResponse(target, res); err != nil {
9230		return nil, err
9231	}
9232	return ret, nil
9233	// {
9234	//   "description": "Lists all regions/{region}/clusters in a project alphabetically.",
9235	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters",
9236	//   "httpMethod": "GET",
9237	//   "id": "dataproc.projects.regions.clusters.list",
9238	//   "parameterOrder": [
9239	//     "projectId",
9240	//     "region"
9241	//   ],
9242	//   "parameters": {
9243	//     "filter": {
9244	//       "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 = *",
9245	//       "location": "query",
9246	//       "type": "string"
9247	//     },
9248	//     "pageSize": {
9249	//       "description": "Optional. The standard List page size.",
9250	//       "format": "int32",
9251	//       "location": "query",
9252	//       "type": "integer"
9253	//     },
9254	//     "pageToken": {
9255	//       "description": "Optional. The standard List page token.",
9256	//       "location": "query",
9257	//       "type": "string"
9258	//     },
9259	//     "projectId": {
9260	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
9261	//       "location": "path",
9262	//       "required": true,
9263	//       "type": "string"
9264	//     },
9265	//     "region": {
9266	//       "description": "Required. The Dataproc region in which to handle the request.",
9267	//       "location": "path",
9268	//       "required": true,
9269	//       "type": "string"
9270	//     }
9271	//   },
9272	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters",
9273	//   "response": {
9274	//     "$ref": "ListClustersResponse"
9275	//   },
9276	//   "scopes": [
9277	//     "https://www.googleapis.com/auth/cloud-platform"
9278	//   ]
9279	// }
9280
9281}
9282
9283// Pages invokes f for each page of results.
9284// A non-nil error returned from f will halt the iteration.
9285// The provided context supersedes any context provided to the Context method.
9286func (c *ProjectsRegionsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) error) error {
9287	c.ctx_ = ctx
9288	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9289	for {
9290		x, err := c.Do()
9291		if err != nil {
9292			return err
9293		}
9294		if err := f(x); err != nil {
9295			return err
9296		}
9297		if x.NextPageToken == "" {
9298			return nil
9299		}
9300		c.PageToken(x.NextPageToken)
9301	}
9302}
9303
9304// method id "dataproc.projects.regions.clusters.patch":
9305
9306type ProjectsRegionsClustersPatchCall struct {
9307	s           *Service
9308	projectId   string
9309	region      string
9310	clusterName string
9311	cluster     *Cluster
9312	urlParams_  gensupport.URLParams
9313	ctx_        context.Context
9314	header_     http.Header
9315}
9316
9317// Patch: Updates a cluster in a project. The returned
9318// Operation.metadata will be ClusterOperationMetadata
9319// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
9320// aproc.v1beta2#clusteroperationmetadata).
9321func (r *ProjectsRegionsClustersService) Patch(projectId string, region string, clusterName string, cluster *Cluster) *ProjectsRegionsClustersPatchCall {
9322	c := &ProjectsRegionsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9323	c.projectId = projectId
9324	c.region = region
9325	c.clusterName = clusterName
9326	c.cluster = cluster
9327	return c
9328}
9329
9330// GracefulDecommissionTimeout sets the optional parameter
9331// "gracefulDecommissionTimeout": Timeout for graceful YARN
9332// decomissioning. Graceful decommissioning allows removing nodes from
9333// the cluster without interrupting jobs in progress. Timeout specifies
9334// how long to wait for jobs in progress to finish before forcefully
9335// removing nodes (and potentially interrupting jobs). Default timeout
9336// is 0 (for forceful decommission), and the maximum allowed timeout is
9337// 1 day (see JSON representation of Duration
9338// (https://developers.google.com/protocol-buffers/docs/proto3#json)).Onl
9339// y supported on Dataproc image versions 1.2 and higher.
9340func (c *ProjectsRegionsClustersPatchCall) GracefulDecommissionTimeout(gracefulDecommissionTimeout string) *ProjectsRegionsClustersPatchCall {
9341	c.urlParams_.Set("gracefulDecommissionTimeout", gracefulDecommissionTimeout)
9342	return c
9343}
9344
9345// RequestId sets the optional parameter "requestId": A unique id used
9346// to identify the request. If the server receives two
9347// UpdateClusterRequest requests with the same id, then the second
9348// request will be ignored and the first google.longrunning.Operation
9349// created and stored in the backend is returned.It is recommended to
9350// always set this value to a UUID
9351// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
9352// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
9353// and hyphens (-). The maximum length is 40 characters.
9354func (c *ProjectsRegionsClustersPatchCall) RequestId(requestId string) *ProjectsRegionsClustersPatchCall {
9355	c.urlParams_.Set("requestId", requestId)
9356	return c
9357}
9358
9359// UpdateMask sets the optional parameter "updateMask": Required.
9360// Specifies the path, relative to Cluster, of the field to update. For
9361// example, to change the number of workers in a cluster to 5, the
9362// update_mask parameter would be specified as
9363// config.worker_config.num_instances, and the PATCH request body would
9364// specify the new value, as follows: { "config":{ "workerConfig":{
9365// "numInstances":"5" } } } Similarly, to change the number of
9366// preemptible workers in a cluster to 5, the update_mask parameter
9367// would be config.secondary_worker_config.num_instances, and the PATCH
9368// request body would be set as follows: { "config":{
9369// "secondaryWorkerConfig":{ "numInstances":"5" } } } *Note:* currently
9370// only the following fields can be updated: *Mask* *Purpose* labels
9371// Updates labels config.worker_config.num_instances Resize primary
9372// worker group config.secondary_worker_config.num_instances Resize
9373// secondary worker group config.lifecycle_config.auto_delete_ttl Reset
9374// MAX TTL duration config.lifecycle_config.auto_delete_time Update MAX
9375// TTL deletion timestamp config.lifecycle_config.idle_delete_ttl Update
9376// Idle TTL duration config.autoscaling_config.policy_uri Use, stop
9377// using, or change autoscaling policies
9378func (c *ProjectsRegionsClustersPatchCall) UpdateMask(updateMask string) *ProjectsRegionsClustersPatchCall {
9379	c.urlParams_.Set("updateMask", updateMask)
9380	return c
9381}
9382
9383// Fields allows partial responses to be retrieved. See
9384// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9385// for more information.
9386func (c *ProjectsRegionsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersPatchCall {
9387	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9388	return c
9389}
9390
9391// Context sets the context to be used in this call's Do method. Any
9392// pending HTTP request will be aborted if the provided context is
9393// canceled.
9394func (c *ProjectsRegionsClustersPatchCall) Context(ctx context.Context) *ProjectsRegionsClustersPatchCall {
9395	c.ctx_ = ctx
9396	return c
9397}
9398
9399// Header returns an http.Header that can be modified by the caller to
9400// add HTTP headers to the request.
9401func (c *ProjectsRegionsClustersPatchCall) Header() http.Header {
9402	if c.header_ == nil {
9403		c.header_ = make(http.Header)
9404	}
9405	return c.header_
9406}
9407
9408func (c *ProjectsRegionsClustersPatchCall) doRequest(alt string) (*http.Response, error) {
9409	reqHeaders := make(http.Header)
9410	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
9411	for k, v := range c.header_ {
9412		reqHeaders[k] = v
9413	}
9414	reqHeaders.Set("User-Agent", c.s.userAgent())
9415	var body io.Reader = nil
9416	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
9417	if err != nil {
9418		return nil, err
9419	}
9420	reqHeaders.Set("Content-Type", "application/json")
9421	c.urlParams_.Set("alt", alt)
9422	c.urlParams_.Set("prettyPrint", "false")
9423	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}")
9424	urls += "?" + c.urlParams_.Encode()
9425	req, err := http.NewRequest("PATCH", urls, body)
9426	if err != nil {
9427		return nil, err
9428	}
9429	req.Header = reqHeaders
9430	googleapi.Expand(req.URL, map[string]string{
9431		"projectId":   c.projectId,
9432		"region":      c.region,
9433		"clusterName": c.clusterName,
9434	})
9435	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9436}
9437
9438// Do executes the "dataproc.projects.regions.clusters.patch" call.
9439// Exactly one of *Operation or error will be non-nil. Any non-2xx
9440// status code is an error. Response headers are in either
9441// *Operation.ServerResponse.Header or (if a response was returned at
9442// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9443// to check whether the returned error was because
9444// http.StatusNotModified was returned.
9445func (c *ProjectsRegionsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9446	gensupport.SetOptions(c.urlParams_, opts...)
9447	res, err := c.doRequest("json")
9448	if res != nil && res.StatusCode == http.StatusNotModified {
9449		if res.Body != nil {
9450			res.Body.Close()
9451		}
9452		return nil, &googleapi.Error{
9453			Code:   res.StatusCode,
9454			Header: res.Header,
9455		}
9456	}
9457	if err != nil {
9458		return nil, err
9459	}
9460	defer googleapi.CloseBody(res)
9461	if err := googleapi.CheckResponse(res); err != nil {
9462		return nil, err
9463	}
9464	ret := &Operation{
9465		ServerResponse: googleapi.ServerResponse{
9466			Header:         res.Header,
9467			HTTPStatusCode: res.StatusCode,
9468		},
9469	}
9470	target := &ret
9471	if err := gensupport.DecodeResponse(target, res); err != nil {
9472		return nil, err
9473	}
9474	return ret, nil
9475	// {
9476	//   "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.v1beta2#clusteroperationmetadata).",
9477	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
9478	//   "httpMethod": "PATCH",
9479	//   "id": "dataproc.projects.regions.clusters.patch",
9480	//   "parameterOrder": [
9481	//     "projectId",
9482	//     "region",
9483	//     "clusterName"
9484	//   ],
9485	//   "parameters": {
9486	//     "clusterName": {
9487	//       "description": "Required. The cluster name.",
9488	//       "location": "path",
9489	//       "required": true,
9490	//       "type": "string"
9491	//     },
9492	//     "gracefulDecommissionTimeout": {
9493	//       "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.",
9494	//       "format": "google-duration",
9495	//       "location": "query",
9496	//       "type": "string"
9497	//     },
9498	//     "projectId": {
9499	//       "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.",
9500	//       "location": "path",
9501	//       "required": true,
9502	//       "type": "string"
9503	//     },
9504	//     "region": {
9505	//       "description": "Required. The Dataproc region in which to handle the request.",
9506	//       "location": "path",
9507	//       "required": true,
9508	//       "type": "string"
9509	//     },
9510	//     "requestId": {
9511	//       "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.",
9512	//       "location": "query",
9513	//       "type": "string"
9514	//     },
9515	//     "updateMask": {
9516	//       "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: { \"config\":{ \"workerConfig\":{ \"numInstances\":\"5\" } } } Similarly, 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: { \"config\":{ \"secondaryWorkerConfig\":{ \"numInstances\":\"5\" } } } *Note:* currently only the following fields can be updated: *Mask* *Purpose* labels Updates labels config.worker_config.num_instances Resize primary worker group config.secondary_worker_config.num_instances Resize secondary worker group config.lifecycle_config.auto_delete_ttl Reset MAX TTL duration config.lifecycle_config.auto_delete_time Update MAX TTL deletion timestamp config.lifecycle_config.idle_delete_ttl Update Idle TTL duration config.autoscaling_config.policy_uri Use, stop using, or change autoscaling policies ",
9517	//       "format": "google-fieldmask",
9518	//       "location": "query",
9519	//       "type": "string"
9520	//     }
9521	//   },
9522	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
9523	//   "request": {
9524	//     "$ref": "Cluster"
9525	//   },
9526	//   "response": {
9527	//     "$ref": "Operation"
9528	//   },
9529	//   "scopes": [
9530	//     "https://www.googleapis.com/auth/cloud-platform"
9531	//   ]
9532	// }
9533
9534}
9535
9536// method id "dataproc.projects.regions.clusters.setIamPolicy":
9537
9538type ProjectsRegionsClustersSetIamPolicyCall struct {
9539	s                   *Service
9540	resource            string
9541	setiampolicyrequest *SetIamPolicyRequest
9542	urlParams_          gensupport.URLParams
9543	ctx_                context.Context
9544	header_             http.Header
9545}
9546
9547// SetIamPolicy: Sets the access control policy on the specified
9548// resource. Replaces any existing policy.Can return NOT_FOUND,
9549// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
9550func (r *ProjectsRegionsClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsClustersSetIamPolicyCall {
9551	c := &ProjectsRegionsClustersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9552	c.resource = resource
9553	c.setiampolicyrequest = setiampolicyrequest
9554	return c
9555}
9556
9557// Fields allows partial responses to be retrieved. See
9558// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9559// for more information.
9560func (c *ProjectsRegionsClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersSetIamPolicyCall {
9561	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9562	return c
9563}
9564
9565// Context sets the context to be used in this call's Do method. Any
9566// pending HTTP request will be aborted if the provided context is
9567// canceled.
9568func (c *ProjectsRegionsClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsClustersSetIamPolicyCall {
9569	c.ctx_ = ctx
9570	return c
9571}
9572
9573// Header returns an http.Header that can be modified by the caller to
9574// add HTTP headers to the request.
9575func (c *ProjectsRegionsClustersSetIamPolicyCall) Header() http.Header {
9576	if c.header_ == nil {
9577		c.header_ = make(http.Header)
9578	}
9579	return c.header_
9580}
9581
9582func (c *ProjectsRegionsClustersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9583	reqHeaders := make(http.Header)
9584	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
9585	for k, v := range c.header_ {
9586		reqHeaders[k] = v
9587	}
9588	reqHeaders.Set("User-Agent", c.s.userAgent())
9589	var body io.Reader = nil
9590	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
9591	if err != nil {
9592		return nil, err
9593	}
9594	reqHeaders.Set("Content-Type", "application/json")
9595	c.urlParams_.Set("alt", alt)
9596	c.urlParams_.Set("prettyPrint", "false")
9597	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
9598	urls += "?" + c.urlParams_.Encode()
9599	req, err := http.NewRequest("POST", urls, body)
9600	if err != nil {
9601		return nil, err
9602	}
9603	req.Header = reqHeaders
9604	googleapi.Expand(req.URL, map[string]string{
9605		"resource": c.resource,
9606	})
9607	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9608}
9609
9610// Do executes the "dataproc.projects.regions.clusters.setIamPolicy" call.
9611// Exactly one of *Policy or error will be non-nil. Any non-2xx status
9612// code is an error. Response headers are in either
9613// *Policy.ServerResponse.Header or (if a response was returned at all)
9614// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9615// check whether the returned error was because http.StatusNotModified
9616// was returned.
9617func (c *ProjectsRegionsClustersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9618	gensupport.SetOptions(c.urlParams_, opts...)
9619	res, err := c.doRequest("json")
9620	if res != nil && res.StatusCode == http.StatusNotModified {
9621		if res.Body != nil {
9622			res.Body.Close()
9623		}
9624		return nil, &googleapi.Error{
9625			Code:   res.StatusCode,
9626			Header: res.Header,
9627		}
9628	}
9629	if err != nil {
9630		return nil, err
9631	}
9632	defer googleapi.CloseBody(res)
9633	if err := googleapi.CheckResponse(res); err != nil {
9634		return nil, err
9635	}
9636	ret := &Policy{
9637		ServerResponse: googleapi.ServerResponse{
9638			Header:         res.Header,
9639			HTTPStatusCode: res.StatusCode,
9640		},
9641	}
9642	target := &ret
9643	if err := gensupport.DecodeResponse(target, res); err != nil {
9644		return nil, err
9645	}
9646	return ret, nil
9647	// {
9648	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
9649	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:setIamPolicy",
9650	//   "httpMethod": "POST",
9651	//   "id": "dataproc.projects.regions.clusters.setIamPolicy",
9652	//   "parameterOrder": [
9653	//     "resource"
9654	//   ],
9655	//   "parameters": {
9656	//     "resource": {
9657	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
9658	//       "location": "path",
9659	//       "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$",
9660	//       "required": true,
9661	//       "type": "string"
9662	//     }
9663	//   },
9664	//   "path": "v1beta2/{+resource}:setIamPolicy",
9665	//   "request": {
9666	//     "$ref": "SetIamPolicyRequest"
9667	//   },
9668	//   "response": {
9669	//     "$ref": "Policy"
9670	//   },
9671	//   "scopes": [
9672	//     "https://www.googleapis.com/auth/cloud-platform"
9673	//   ]
9674	// }
9675
9676}
9677
9678// method id "dataproc.projects.regions.clusters.start":
9679
9680type ProjectsRegionsClustersStartCall struct {
9681	s                   *Service
9682	projectId           string
9683	region              string
9684	clusterName         string
9685	startclusterrequest *StartClusterRequest
9686	urlParams_          gensupport.URLParams
9687	ctx_                context.Context
9688	header_             http.Header
9689}
9690
9691// Start: Starts a cluster in a project.
9692func (r *ProjectsRegionsClustersService) Start(projectId string, region string, clusterName string, startclusterrequest *StartClusterRequest) *ProjectsRegionsClustersStartCall {
9693	c := &ProjectsRegionsClustersStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9694	c.projectId = projectId
9695	c.region = region
9696	c.clusterName = clusterName
9697	c.startclusterrequest = startclusterrequest
9698	return c
9699}
9700
9701// Fields allows partial responses to be retrieved. See
9702// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9703// for more information.
9704func (c *ProjectsRegionsClustersStartCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersStartCall {
9705	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9706	return c
9707}
9708
9709// Context sets the context to be used in this call's Do method. Any
9710// pending HTTP request will be aborted if the provided context is
9711// canceled.
9712func (c *ProjectsRegionsClustersStartCall) Context(ctx context.Context) *ProjectsRegionsClustersStartCall {
9713	c.ctx_ = ctx
9714	return c
9715}
9716
9717// Header returns an http.Header that can be modified by the caller to
9718// add HTTP headers to the request.
9719func (c *ProjectsRegionsClustersStartCall) Header() http.Header {
9720	if c.header_ == nil {
9721		c.header_ = make(http.Header)
9722	}
9723	return c.header_
9724}
9725
9726func (c *ProjectsRegionsClustersStartCall) doRequest(alt string) (*http.Response, error) {
9727	reqHeaders := make(http.Header)
9728	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
9729	for k, v := range c.header_ {
9730		reqHeaders[k] = v
9731	}
9732	reqHeaders.Set("User-Agent", c.s.userAgent())
9733	var body io.Reader = nil
9734	body, err := googleapi.WithoutDataWrapper.JSONReader(c.startclusterrequest)
9735	if err != nil {
9736		return nil, err
9737	}
9738	reqHeaders.Set("Content-Type", "application/json")
9739	c.urlParams_.Set("alt", alt)
9740	c.urlParams_.Set("prettyPrint", "false")
9741	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:start")
9742	urls += "?" + c.urlParams_.Encode()
9743	req, err := http.NewRequest("POST", urls, body)
9744	if err != nil {
9745		return nil, err
9746	}
9747	req.Header = reqHeaders
9748	googleapi.Expand(req.URL, map[string]string{
9749		"projectId":   c.projectId,
9750		"region":      c.region,
9751		"clusterName": c.clusterName,
9752	})
9753	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9754}
9755
9756// Do executes the "dataproc.projects.regions.clusters.start" call.
9757// Exactly one of *Operation or error will be non-nil. Any non-2xx
9758// status code is an error. Response headers are in either
9759// *Operation.ServerResponse.Header or (if a response was returned at
9760// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9761// to check whether the returned error was because
9762// http.StatusNotModified was returned.
9763func (c *ProjectsRegionsClustersStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9764	gensupport.SetOptions(c.urlParams_, opts...)
9765	res, err := c.doRequest("json")
9766	if res != nil && res.StatusCode == http.StatusNotModified {
9767		if res.Body != nil {
9768			res.Body.Close()
9769		}
9770		return nil, &googleapi.Error{
9771			Code:   res.StatusCode,
9772			Header: res.Header,
9773		}
9774	}
9775	if err != nil {
9776		return nil, err
9777	}
9778	defer googleapi.CloseBody(res)
9779	if err := googleapi.CheckResponse(res); err != nil {
9780		return nil, err
9781	}
9782	ret := &Operation{
9783		ServerResponse: googleapi.ServerResponse{
9784			Header:         res.Header,
9785			HTTPStatusCode: res.StatusCode,
9786		},
9787	}
9788	target := &ret
9789	if err := gensupport.DecodeResponse(target, res); err != nil {
9790		return nil, err
9791	}
9792	return ret, nil
9793	// {
9794	//   "description": "Starts a cluster in a project.",
9795	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:start",
9796	//   "httpMethod": "POST",
9797	//   "id": "dataproc.projects.regions.clusters.start",
9798	//   "parameterOrder": [
9799	//     "projectId",
9800	//     "region",
9801	//     "clusterName"
9802	//   ],
9803	//   "parameters": {
9804	//     "clusterName": {
9805	//       "description": "Required. The cluster name.",
9806	//       "location": "path",
9807	//       "required": true,
9808	//       "type": "string"
9809	//     },
9810	//     "projectId": {
9811	//       "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.",
9812	//       "location": "path",
9813	//       "required": true,
9814	//       "type": "string"
9815	//     },
9816	//     "region": {
9817	//       "description": "Required. The Dataproc region in which to handle the request.",
9818	//       "location": "path",
9819	//       "required": true,
9820	//       "type": "string"
9821	//     }
9822	//   },
9823	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:start",
9824	//   "request": {
9825	//     "$ref": "StartClusterRequest"
9826	//   },
9827	//   "response": {
9828	//     "$ref": "Operation"
9829	//   },
9830	//   "scopes": [
9831	//     "https://www.googleapis.com/auth/cloud-platform"
9832	//   ]
9833	// }
9834
9835}
9836
9837// method id "dataproc.projects.regions.clusters.stop":
9838
9839type ProjectsRegionsClustersStopCall struct {
9840	s                  *Service
9841	projectId          string
9842	region             string
9843	clusterName        string
9844	stopclusterrequest *StopClusterRequest
9845	urlParams_         gensupport.URLParams
9846	ctx_               context.Context
9847	header_            http.Header
9848}
9849
9850// Stop: Stops a cluster in a project.
9851func (r *ProjectsRegionsClustersService) Stop(projectId string, region string, clusterName string, stopclusterrequest *StopClusterRequest) *ProjectsRegionsClustersStopCall {
9852	c := &ProjectsRegionsClustersStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9853	c.projectId = projectId
9854	c.region = region
9855	c.clusterName = clusterName
9856	c.stopclusterrequest = stopclusterrequest
9857	return c
9858}
9859
9860// Fields allows partial responses to be retrieved. See
9861// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9862// for more information.
9863func (c *ProjectsRegionsClustersStopCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersStopCall {
9864	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9865	return c
9866}
9867
9868// Context sets the context to be used in this call's Do method. Any
9869// pending HTTP request will be aborted if the provided context is
9870// canceled.
9871func (c *ProjectsRegionsClustersStopCall) Context(ctx context.Context) *ProjectsRegionsClustersStopCall {
9872	c.ctx_ = ctx
9873	return c
9874}
9875
9876// Header returns an http.Header that can be modified by the caller to
9877// add HTTP headers to the request.
9878func (c *ProjectsRegionsClustersStopCall) Header() http.Header {
9879	if c.header_ == nil {
9880		c.header_ = make(http.Header)
9881	}
9882	return c.header_
9883}
9884
9885func (c *ProjectsRegionsClustersStopCall) doRequest(alt string) (*http.Response, error) {
9886	reqHeaders := make(http.Header)
9887	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
9888	for k, v := range c.header_ {
9889		reqHeaders[k] = v
9890	}
9891	reqHeaders.Set("User-Agent", c.s.userAgent())
9892	var body io.Reader = nil
9893	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopclusterrequest)
9894	if err != nil {
9895		return nil, err
9896	}
9897	reqHeaders.Set("Content-Type", "application/json")
9898	c.urlParams_.Set("alt", alt)
9899	c.urlParams_.Set("prettyPrint", "false")
9900	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:stop")
9901	urls += "?" + c.urlParams_.Encode()
9902	req, err := http.NewRequest("POST", urls, body)
9903	if err != nil {
9904		return nil, err
9905	}
9906	req.Header = reqHeaders
9907	googleapi.Expand(req.URL, map[string]string{
9908		"projectId":   c.projectId,
9909		"region":      c.region,
9910		"clusterName": c.clusterName,
9911	})
9912	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9913}
9914
9915// Do executes the "dataproc.projects.regions.clusters.stop" call.
9916// Exactly one of *Operation or error will be non-nil. Any non-2xx
9917// status code is an error. Response headers are in either
9918// *Operation.ServerResponse.Header or (if a response was returned at
9919// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9920// to check whether the returned error was because
9921// http.StatusNotModified was returned.
9922func (c *ProjectsRegionsClustersStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9923	gensupport.SetOptions(c.urlParams_, opts...)
9924	res, err := c.doRequest("json")
9925	if res != nil && res.StatusCode == http.StatusNotModified {
9926		if res.Body != nil {
9927			res.Body.Close()
9928		}
9929		return nil, &googleapi.Error{
9930			Code:   res.StatusCode,
9931			Header: res.Header,
9932		}
9933	}
9934	if err != nil {
9935		return nil, err
9936	}
9937	defer googleapi.CloseBody(res)
9938	if err := googleapi.CheckResponse(res); err != nil {
9939		return nil, err
9940	}
9941	ret := &Operation{
9942		ServerResponse: googleapi.ServerResponse{
9943			Header:         res.Header,
9944			HTTPStatusCode: res.StatusCode,
9945		},
9946	}
9947	target := &ret
9948	if err := gensupport.DecodeResponse(target, res); err != nil {
9949		return nil, err
9950	}
9951	return ret, nil
9952	// {
9953	//   "description": "Stops a cluster in a project.",
9954	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:stop",
9955	//   "httpMethod": "POST",
9956	//   "id": "dataproc.projects.regions.clusters.stop",
9957	//   "parameterOrder": [
9958	//     "projectId",
9959	//     "region",
9960	//     "clusterName"
9961	//   ],
9962	//   "parameters": {
9963	//     "clusterName": {
9964	//       "description": "Required. The cluster name.",
9965	//       "location": "path",
9966	//       "required": true,
9967	//       "type": "string"
9968	//     },
9969	//     "projectId": {
9970	//       "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.",
9971	//       "location": "path",
9972	//       "required": true,
9973	//       "type": "string"
9974	//     },
9975	//     "region": {
9976	//       "description": "Required. The Dataproc region in which to handle the request.",
9977	//       "location": "path",
9978	//       "required": true,
9979	//       "type": "string"
9980	//     }
9981	//   },
9982	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:stop",
9983	//   "request": {
9984	//     "$ref": "StopClusterRequest"
9985	//   },
9986	//   "response": {
9987	//     "$ref": "Operation"
9988	//   },
9989	//   "scopes": [
9990	//     "https://www.googleapis.com/auth/cloud-platform"
9991	//   ]
9992	// }
9993
9994}
9995
9996// method id "dataproc.projects.regions.clusters.testIamPermissions":
9997
9998type ProjectsRegionsClustersTestIamPermissionsCall struct {
9999	s                         *Service
10000	resource                  string
10001	testiampermissionsrequest *TestIamPermissionsRequest
10002	urlParams_                gensupport.URLParams
10003	ctx_                      context.Context
10004	header_                   http.Header
10005}
10006
10007// TestIamPermissions: Returns permissions that a caller has on the
10008// specified resource. If the resource does not exist, this will return
10009// an empty set of permissions, not a NOT_FOUND error.Note: This
10010// operation is designed to be used for building permission-aware UIs
10011// and command-line tools, not for authorization checking. This
10012// operation may "fail open" without warning.
10013func (r *ProjectsRegionsClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsClustersTestIamPermissionsCall {
10014	c := &ProjectsRegionsClustersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10015	c.resource = resource
10016	c.testiampermissionsrequest = testiampermissionsrequest
10017	return c
10018}
10019
10020// Fields allows partial responses to be retrieved. See
10021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10022// for more information.
10023func (c *ProjectsRegionsClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersTestIamPermissionsCall {
10024	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10025	return c
10026}
10027
10028// Context sets the context to be used in this call's Do method. Any
10029// pending HTTP request will be aborted if the provided context is
10030// canceled.
10031func (c *ProjectsRegionsClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsClustersTestIamPermissionsCall {
10032	c.ctx_ = ctx
10033	return c
10034}
10035
10036// Header returns an http.Header that can be modified by the caller to
10037// add HTTP headers to the request.
10038func (c *ProjectsRegionsClustersTestIamPermissionsCall) Header() http.Header {
10039	if c.header_ == nil {
10040		c.header_ = make(http.Header)
10041	}
10042	return c.header_
10043}
10044
10045func (c *ProjectsRegionsClustersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
10046	reqHeaders := make(http.Header)
10047	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
10048	for k, v := range c.header_ {
10049		reqHeaders[k] = v
10050	}
10051	reqHeaders.Set("User-Agent", c.s.userAgent())
10052	var body io.Reader = nil
10053	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
10054	if err != nil {
10055		return nil, err
10056	}
10057	reqHeaders.Set("Content-Type", "application/json")
10058	c.urlParams_.Set("alt", alt)
10059	c.urlParams_.Set("prettyPrint", "false")
10060	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
10061	urls += "?" + c.urlParams_.Encode()
10062	req, err := http.NewRequest("POST", urls, body)
10063	if err != nil {
10064		return nil, err
10065	}
10066	req.Header = reqHeaders
10067	googleapi.Expand(req.URL, map[string]string{
10068		"resource": c.resource,
10069	})
10070	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10071}
10072
10073// Do executes the "dataproc.projects.regions.clusters.testIamPermissions" call.
10074// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
10075// Any non-2xx status code is an error. Response headers are in either
10076// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
10077// was returned at all) in error.(*googleapi.Error).Header. Use
10078// googleapi.IsNotModified to check whether the returned error was
10079// because http.StatusNotModified was returned.
10080func (c *ProjectsRegionsClustersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
10081	gensupport.SetOptions(c.urlParams_, opts...)
10082	res, err := c.doRequest("json")
10083	if res != nil && res.StatusCode == http.StatusNotModified {
10084		if res.Body != nil {
10085			res.Body.Close()
10086		}
10087		return nil, &googleapi.Error{
10088			Code:   res.StatusCode,
10089			Header: res.Header,
10090		}
10091	}
10092	if err != nil {
10093		return nil, err
10094	}
10095	defer googleapi.CloseBody(res)
10096	if err := googleapi.CheckResponse(res); err != nil {
10097		return nil, err
10098	}
10099	ret := &TestIamPermissionsResponse{
10100		ServerResponse: googleapi.ServerResponse{
10101			Header:         res.Header,
10102			HTTPStatusCode: res.StatusCode,
10103		},
10104	}
10105	target := &ret
10106	if err := gensupport.DecodeResponse(target, res); err != nil {
10107		return nil, err
10108	}
10109	return ret, nil
10110	// {
10111	//   "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.",
10112	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:testIamPermissions",
10113	//   "httpMethod": "POST",
10114	//   "id": "dataproc.projects.regions.clusters.testIamPermissions",
10115	//   "parameterOrder": [
10116	//     "resource"
10117	//   ],
10118	//   "parameters": {
10119	//     "resource": {
10120	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
10121	//       "location": "path",
10122	//       "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$",
10123	//       "required": true,
10124	//       "type": "string"
10125	//     }
10126	//   },
10127	//   "path": "v1beta2/{+resource}:testIamPermissions",
10128	//   "request": {
10129	//     "$ref": "TestIamPermissionsRequest"
10130	//   },
10131	//   "response": {
10132	//     "$ref": "TestIamPermissionsResponse"
10133	//   },
10134	//   "scopes": [
10135	//     "https://www.googleapis.com/auth/cloud-platform"
10136	//   ]
10137	// }
10138
10139}
10140
10141// method id "dataproc.projects.regions.jobs.cancel":
10142
10143type ProjectsRegionsJobsCancelCall struct {
10144	s                *Service
10145	projectId        string
10146	region           string
10147	jobId            string
10148	canceljobrequest *CancelJobRequest
10149	urlParams_       gensupport.URLParams
10150	ctx_             context.Context
10151	header_          http.Header
10152}
10153
10154// Cancel: Starts a job cancellation request. To access the job resource
10155// after cancellation, call regions/{region}/jobs.list
10156// (https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/project
10157// s.regions.jobs/list) or regions/{region}/jobs.get
10158// (https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/project
10159// s.regions.jobs/get).
10160func (r *ProjectsRegionsJobsService) Cancel(projectId string, region string, jobId string, canceljobrequest *CancelJobRequest) *ProjectsRegionsJobsCancelCall {
10161	c := &ProjectsRegionsJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10162	c.projectId = projectId
10163	c.region = region
10164	c.jobId = jobId
10165	c.canceljobrequest = canceljobrequest
10166	return c
10167}
10168
10169// Fields allows partial responses to be retrieved. See
10170// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10171// for more information.
10172func (c *ProjectsRegionsJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsCancelCall {
10173	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10174	return c
10175}
10176
10177// Context sets the context to be used in this call's Do method. Any
10178// pending HTTP request will be aborted if the provided context is
10179// canceled.
10180func (c *ProjectsRegionsJobsCancelCall) Context(ctx context.Context) *ProjectsRegionsJobsCancelCall {
10181	c.ctx_ = ctx
10182	return c
10183}
10184
10185// Header returns an http.Header that can be modified by the caller to
10186// add HTTP headers to the request.
10187func (c *ProjectsRegionsJobsCancelCall) Header() http.Header {
10188	if c.header_ == nil {
10189		c.header_ = make(http.Header)
10190	}
10191	return c.header_
10192}
10193
10194func (c *ProjectsRegionsJobsCancelCall) doRequest(alt string) (*http.Response, error) {
10195	reqHeaders := make(http.Header)
10196	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
10197	for k, v := range c.header_ {
10198		reqHeaders[k] = v
10199	}
10200	reqHeaders.Set("User-Agent", c.s.userAgent())
10201	var body io.Reader = nil
10202	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceljobrequest)
10203	if err != nil {
10204		return nil, err
10205	}
10206	reqHeaders.Set("Content-Type", "application/json")
10207	c.urlParams_.Set("alt", alt)
10208	c.urlParams_.Set("prettyPrint", "false")
10209	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel")
10210	urls += "?" + c.urlParams_.Encode()
10211	req, err := http.NewRequest("POST", urls, body)
10212	if err != nil {
10213		return nil, err
10214	}
10215	req.Header = reqHeaders
10216	googleapi.Expand(req.URL, map[string]string{
10217		"projectId": c.projectId,
10218		"region":    c.region,
10219		"jobId":     c.jobId,
10220	})
10221	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10222}
10223
10224// Do executes the "dataproc.projects.regions.jobs.cancel" call.
10225// Exactly one of *Job or error will be non-nil. Any non-2xx status code
10226// is an error. Response headers are in either
10227// *Job.ServerResponse.Header or (if a response was returned at all) in
10228// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10229// whether the returned error was because http.StatusNotModified was
10230// returned.
10231func (c *ProjectsRegionsJobsCancelCall) Do(opts ...googleapi.CallOption) (*Job, error) {
10232	gensupport.SetOptions(c.urlParams_, opts...)
10233	res, err := c.doRequest("json")
10234	if res != nil && res.StatusCode == http.StatusNotModified {
10235		if res.Body != nil {
10236			res.Body.Close()
10237		}
10238		return nil, &googleapi.Error{
10239			Code:   res.StatusCode,
10240			Header: res.Header,
10241		}
10242	}
10243	if err != nil {
10244		return nil, err
10245	}
10246	defer googleapi.CloseBody(res)
10247	if err := googleapi.CheckResponse(res); err != nil {
10248		return nil, err
10249	}
10250	ret := &Job{
10251		ServerResponse: googleapi.ServerResponse{
10252			Header:         res.Header,
10253			HTTPStatusCode: res.StatusCode,
10254		},
10255	}
10256	target := &ret
10257	if err := gensupport.DecodeResponse(target, res); err != nil {
10258		return nil, err
10259	}
10260	return ret, nil
10261	// {
10262	//   "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/v1beta2/projects.regions.jobs/list) or regions/{region}/jobs.get (https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).",
10263	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel",
10264	//   "httpMethod": "POST",
10265	//   "id": "dataproc.projects.regions.jobs.cancel",
10266	//   "parameterOrder": [
10267	//     "projectId",
10268	//     "region",
10269	//     "jobId"
10270	//   ],
10271	//   "parameters": {
10272	//     "jobId": {
10273	//       "description": "Required. The job ID.",
10274	//       "location": "path",
10275	//       "required": true,
10276	//       "type": "string"
10277	//     },
10278	//     "projectId": {
10279	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
10280	//       "location": "path",
10281	//       "required": true,
10282	//       "type": "string"
10283	//     },
10284	//     "region": {
10285	//       "description": "Required. The Dataproc region in which to handle the request.",
10286	//       "location": "path",
10287	//       "required": true,
10288	//       "type": "string"
10289	//     }
10290	//   },
10291	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel",
10292	//   "request": {
10293	//     "$ref": "CancelJobRequest"
10294	//   },
10295	//   "response": {
10296	//     "$ref": "Job"
10297	//   },
10298	//   "scopes": [
10299	//     "https://www.googleapis.com/auth/cloud-platform"
10300	//   ]
10301	// }
10302
10303}
10304
10305// method id "dataproc.projects.regions.jobs.delete":
10306
10307type ProjectsRegionsJobsDeleteCall struct {
10308	s          *Service
10309	projectId  string
10310	region     string
10311	jobId      string
10312	urlParams_ gensupport.URLParams
10313	ctx_       context.Context
10314	header_    http.Header
10315}
10316
10317// Delete: Deletes the job from the project. If the job is active, the
10318// delete fails, and the response returns FAILED_PRECONDITION.
10319func (r *ProjectsRegionsJobsService) Delete(projectId string, region string, jobId string) *ProjectsRegionsJobsDeleteCall {
10320	c := &ProjectsRegionsJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10321	c.projectId = projectId
10322	c.region = region
10323	c.jobId = jobId
10324	return c
10325}
10326
10327// Fields allows partial responses to be retrieved. See
10328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10329// for more information.
10330func (c *ProjectsRegionsJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsDeleteCall {
10331	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10332	return c
10333}
10334
10335// Context sets the context to be used in this call's Do method. Any
10336// pending HTTP request will be aborted if the provided context is
10337// canceled.
10338func (c *ProjectsRegionsJobsDeleteCall) Context(ctx context.Context) *ProjectsRegionsJobsDeleteCall {
10339	c.ctx_ = ctx
10340	return c
10341}
10342
10343// Header returns an http.Header that can be modified by the caller to
10344// add HTTP headers to the request.
10345func (c *ProjectsRegionsJobsDeleteCall) Header() http.Header {
10346	if c.header_ == nil {
10347		c.header_ = make(http.Header)
10348	}
10349	return c.header_
10350}
10351
10352func (c *ProjectsRegionsJobsDeleteCall) doRequest(alt string) (*http.Response, error) {
10353	reqHeaders := make(http.Header)
10354	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
10355	for k, v := range c.header_ {
10356		reqHeaders[k] = v
10357	}
10358	reqHeaders.Set("User-Agent", c.s.userAgent())
10359	var body io.Reader = nil
10360	c.urlParams_.Set("alt", alt)
10361	c.urlParams_.Set("prettyPrint", "false")
10362	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}")
10363	urls += "?" + c.urlParams_.Encode()
10364	req, err := http.NewRequest("DELETE", urls, body)
10365	if err != nil {
10366		return nil, err
10367	}
10368	req.Header = reqHeaders
10369	googleapi.Expand(req.URL, map[string]string{
10370		"projectId": c.projectId,
10371		"region":    c.region,
10372		"jobId":     c.jobId,
10373	})
10374	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10375}
10376
10377// Do executes the "dataproc.projects.regions.jobs.delete" call.
10378// Exactly one of *Empty or error will be non-nil. Any non-2xx status
10379// code is an error. Response headers are in either
10380// *Empty.ServerResponse.Header or (if a response was returned at all)
10381// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10382// check whether the returned error was because http.StatusNotModified
10383// was returned.
10384func (c *ProjectsRegionsJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10385	gensupport.SetOptions(c.urlParams_, opts...)
10386	res, err := c.doRequest("json")
10387	if res != nil && res.StatusCode == http.StatusNotModified {
10388		if res.Body != nil {
10389			res.Body.Close()
10390		}
10391		return nil, &googleapi.Error{
10392			Code:   res.StatusCode,
10393			Header: res.Header,
10394		}
10395	}
10396	if err != nil {
10397		return nil, err
10398	}
10399	defer googleapi.CloseBody(res)
10400	if err := googleapi.CheckResponse(res); err != nil {
10401		return nil, err
10402	}
10403	ret := &Empty{
10404		ServerResponse: googleapi.ServerResponse{
10405			Header:         res.Header,
10406			HTTPStatusCode: res.StatusCode,
10407		},
10408	}
10409	target := &ret
10410	if err := gensupport.DecodeResponse(target, res); err != nil {
10411		return nil, err
10412	}
10413	return ret, nil
10414	// {
10415	//   "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.",
10416	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
10417	//   "httpMethod": "DELETE",
10418	//   "id": "dataproc.projects.regions.jobs.delete",
10419	//   "parameterOrder": [
10420	//     "projectId",
10421	//     "region",
10422	//     "jobId"
10423	//   ],
10424	//   "parameters": {
10425	//     "jobId": {
10426	//       "description": "Required. The job ID.",
10427	//       "location": "path",
10428	//       "required": true,
10429	//       "type": "string"
10430	//     },
10431	//     "projectId": {
10432	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
10433	//       "location": "path",
10434	//       "required": true,
10435	//       "type": "string"
10436	//     },
10437	//     "region": {
10438	//       "description": "Required. The Dataproc region in which to handle the request.",
10439	//       "location": "path",
10440	//       "required": true,
10441	//       "type": "string"
10442	//     }
10443	//   },
10444	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
10445	//   "response": {
10446	//     "$ref": "Empty"
10447	//   },
10448	//   "scopes": [
10449	//     "https://www.googleapis.com/auth/cloud-platform"
10450	//   ]
10451	// }
10452
10453}
10454
10455// method id "dataproc.projects.regions.jobs.get":
10456
10457type ProjectsRegionsJobsGetCall struct {
10458	s            *Service
10459	projectId    string
10460	region       string
10461	jobId        string
10462	urlParams_   gensupport.URLParams
10463	ifNoneMatch_ string
10464	ctx_         context.Context
10465	header_      http.Header
10466}
10467
10468// Get: Gets the resource representation for a job in a project.
10469func (r *ProjectsRegionsJobsService) Get(projectId string, region string, jobId string) *ProjectsRegionsJobsGetCall {
10470	c := &ProjectsRegionsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10471	c.projectId = projectId
10472	c.region = region
10473	c.jobId = jobId
10474	return c
10475}
10476
10477// Fields allows partial responses to be retrieved. See
10478// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10479// for more information.
10480func (c *ProjectsRegionsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsGetCall {
10481	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10482	return c
10483}
10484
10485// IfNoneMatch sets the optional parameter which makes the operation
10486// fail if the object's ETag matches the given value. This is useful for
10487// getting updates only after the object has changed since the last
10488// request. Use googleapi.IsNotModified to check whether the response
10489// error from Do is the result of In-None-Match.
10490func (c *ProjectsRegionsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsGetCall {
10491	c.ifNoneMatch_ = entityTag
10492	return c
10493}
10494
10495// Context sets the context to be used in this call's Do method. Any
10496// pending HTTP request will be aborted if the provided context is
10497// canceled.
10498func (c *ProjectsRegionsJobsGetCall) Context(ctx context.Context) *ProjectsRegionsJobsGetCall {
10499	c.ctx_ = ctx
10500	return c
10501}
10502
10503// Header returns an http.Header that can be modified by the caller to
10504// add HTTP headers to the request.
10505func (c *ProjectsRegionsJobsGetCall) Header() http.Header {
10506	if c.header_ == nil {
10507		c.header_ = make(http.Header)
10508	}
10509	return c.header_
10510}
10511
10512func (c *ProjectsRegionsJobsGetCall) doRequest(alt string) (*http.Response, error) {
10513	reqHeaders := make(http.Header)
10514	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
10515	for k, v := range c.header_ {
10516		reqHeaders[k] = v
10517	}
10518	reqHeaders.Set("User-Agent", c.s.userAgent())
10519	if c.ifNoneMatch_ != "" {
10520		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10521	}
10522	var body io.Reader = nil
10523	c.urlParams_.Set("alt", alt)
10524	c.urlParams_.Set("prettyPrint", "false")
10525	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}")
10526	urls += "?" + c.urlParams_.Encode()
10527	req, err := http.NewRequest("GET", urls, body)
10528	if err != nil {
10529		return nil, err
10530	}
10531	req.Header = reqHeaders
10532	googleapi.Expand(req.URL, map[string]string{
10533		"projectId": c.projectId,
10534		"region":    c.region,
10535		"jobId":     c.jobId,
10536	})
10537	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10538}
10539
10540// Do executes the "dataproc.projects.regions.jobs.get" call.
10541// Exactly one of *Job or error will be non-nil. Any non-2xx status code
10542// is an error. Response headers are in either
10543// *Job.ServerResponse.Header or (if a response was returned at all) in
10544// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10545// whether the returned error was because http.StatusNotModified was
10546// returned.
10547func (c *ProjectsRegionsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
10548	gensupport.SetOptions(c.urlParams_, opts...)
10549	res, err := c.doRequest("json")
10550	if res != nil && res.StatusCode == http.StatusNotModified {
10551		if res.Body != nil {
10552			res.Body.Close()
10553		}
10554		return nil, &googleapi.Error{
10555			Code:   res.StatusCode,
10556			Header: res.Header,
10557		}
10558	}
10559	if err != nil {
10560		return nil, err
10561	}
10562	defer googleapi.CloseBody(res)
10563	if err := googleapi.CheckResponse(res); err != nil {
10564		return nil, err
10565	}
10566	ret := &Job{
10567		ServerResponse: googleapi.ServerResponse{
10568			Header:         res.Header,
10569			HTTPStatusCode: res.StatusCode,
10570		},
10571	}
10572	target := &ret
10573	if err := gensupport.DecodeResponse(target, res); err != nil {
10574		return nil, err
10575	}
10576	return ret, nil
10577	// {
10578	//   "description": "Gets the resource representation for a job in a project.",
10579	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
10580	//   "httpMethod": "GET",
10581	//   "id": "dataproc.projects.regions.jobs.get",
10582	//   "parameterOrder": [
10583	//     "projectId",
10584	//     "region",
10585	//     "jobId"
10586	//   ],
10587	//   "parameters": {
10588	//     "jobId": {
10589	//       "description": "Required. The job ID.",
10590	//       "location": "path",
10591	//       "required": true,
10592	//       "type": "string"
10593	//     },
10594	//     "projectId": {
10595	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
10596	//       "location": "path",
10597	//       "required": true,
10598	//       "type": "string"
10599	//     },
10600	//     "region": {
10601	//       "description": "Required. The Dataproc region in which to handle the request.",
10602	//       "location": "path",
10603	//       "required": true,
10604	//       "type": "string"
10605	//     }
10606	//   },
10607	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
10608	//   "response": {
10609	//     "$ref": "Job"
10610	//   },
10611	//   "scopes": [
10612	//     "https://www.googleapis.com/auth/cloud-platform"
10613	//   ]
10614	// }
10615
10616}
10617
10618// method id "dataproc.projects.regions.jobs.getIamPolicy":
10619
10620type ProjectsRegionsJobsGetIamPolicyCall struct {
10621	s            *Service
10622	resource     string
10623	urlParams_   gensupport.URLParams
10624	ifNoneMatch_ string
10625	ctx_         context.Context
10626	header_      http.Header
10627}
10628
10629// GetIamPolicy: Gets the access control policy for a resource. Returns
10630// an empty policy if the resource exists and does not have a policy
10631// set.
10632func (r *ProjectsRegionsJobsService) GetIamPolicy(resource string) *ProjectsRegionsJobsGetIamPolicyCall {
10633	c := &ProjectsRegionsJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10634	c.resource = resource
10635	return c
10636}
10637
10638// OptionsRequestedPolicyVersion sets the optional parameter
10639// "options.requestedPolicyVersion": The policy format version to be
10640// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
10641// value will be rejected.Requests for policies with any conditional
10642// bindings must specify version 3. Policies without any conditional
10643// bindings may specify any valid value or leave the field unset.To
10644// learn which resources support conditions in their IAM policies, see
10645// the IAM documentation
10646// (https://cloud.google.com/iam/help/conditions/resource-policies).
10647func (c *ProjectsRegionsJobsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsRegionsJobsGetIamPolicyCall {
10648	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
10649	return c
10650}
10651
10652// Fields allows partial responses to be retrieved. See
10653// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10654// for more information.
10655func (c *ProjectsRegionsJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsGetIamPolicyCall {
10656	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10657	return c
10658}
10659
10660// IfNoneMatch sets the optional parameter which makes the operation
10661// fail if the object's ETag matches the given value. This is useful for
10662// getting updates only after the object has changed since the last
10663// request. Use googleapi.IsNotModified to check whether the response
10664// error from Do is the result of In-None-Match.
10665func (c *ProjectsRegionsJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsGetIamPolicyCall {
10666	c.ifNoneMatch_ = entityTag
10667	return c
10668}
10669
10670// Context sets the context to be used in this call's Do method. Any
10671// pending HTTP request will be aborted if the provided context is
10672// canceled.
10673func (c *ProjectsRegionsJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsJobsGetIamPolicyCall {
10674	c.ctx_ = ctx
10675	return c
10676}
10677
10678// Header returns an http.Header that can be modified by the caller to
10679// add HTTP headers to the request.
10680func (c *ProjectsRegionsJobsGetIamPolicyCall) Header() http.Header {
10681	if c.header_ == nil {
10682		c.header_ = make(http.Header)
10683	}
10684	return c.header_
10685}
10686
10687func (c *ProjectsRegionsJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
10688	reqHeaders := make(http.Header)
10689	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
10690	for k, v := range c.header_ {
10691		reqHeaders[k] = v
10692	}
10693	reqHeaders.Set("User-Agent", c.s.userAgent())
10694	if c.ifNoneMatch_ != "" {
10695		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10696	}
10697	var body io.Reader = nil
10698	c.urlParams_.Set("alt", alt)
10699	c.urlParams_.Set("prettyPrint", "false")
10700	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
10701	urls += "?" + c.urlParams_.Encode()
10702	req, err := http.NewRequest("GET", urls, body)
10703	if err != nil {
10704		return nil, err
10705	}
10706	req.Header = reqHeaders
10707	googleapi.Expand(req.URL, map[string]string{
10708		"resource": c.resource,
10709	})
10710	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10711}
10712
10713// Do executes the "dataproc.projects.regions.jobs.getIamPolicy" call.
10714// Exactly one of *Policy or error will be non-nil. Any non-2xx status
10715// code is an error. Response headers are in either
10716// *Policy.ServerResponse.Header or (if a response was returned at all)
10717// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10718// check whether the returned error was because http.StatusNotModified
10719// was returned.
10720func (c *ProjectsRegionsJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10721	gensupport.SetOptions(c.urlParams_, opts...)
10722	res, err := c.doRequest("json")
10723	if res != nil && res.StatusCode == http.StatusNotModified {
10724		if res.Body != nil {
10725			res.Body.Close()
10726		}
10727		return nil, &googleapi.Error{
10728			Code:   res.StatusCode,
10729			Header: res.Header,
10730		}
10731	}
10732	if err != nil {
10733		return nil, err
10734	}
10735	defer googleapi.CloseBody(res)
10736	if err := googleapi.CheckResponse(res); err != nil {
10737		return nil, err
10738	}
10739	ret := &Policy{
10740		ServerResponse: googleapi.ServerResponse{
10741			Header:         res.Header,
10742			HTTPStatusCode: res.StatusCode,
10743		},
10744	}
10745	target := &ret
10746	if err := gensupport.DecodeResponse(target, res); err != nil {
10747		return nil, err
10748	}
10749	return ret, nil
10750	// {
10751	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
10752	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:getIamPolicy",
10753	//   "httpMethod": "GET",
10754	//   "id": "dataproc.projects.regions.jobs.getIamPolicy",
10755	//   "parameterOrder": [
10756	//     "resource"
10757	//   ],
10758	//   "parameters": {
10759	//     "options.requestedPolicyVersion": {
10760	//       "description": "Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).",
10761	//       "format": "int32",
10762	//       "location": "query",
10763	//       "type": "integer"
10764	//     },
10765	//     "resource": {
10766	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
10767	//       "location": "path",
10768	//       "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$",
10769	//       "required": true,
10770	//       "type": "string"
10771	//     }
10772	//   },
10773	//   "path": "v1beta2/{+resource}:getIamPolicy",
10774	//   "response": {
10775	//     "$ref": "Policy"
10776	//   },
10777	//   "scopes": [
10778	//     "https://www.googleapis.com/auth/cloud-platform"
10779	//   ]
10780	// }
10781
10782}
10783
10784// method id "dataproc.projects.regions.jobs.list":
10785
10786type ProjectsRegionsJobsListCall struct {
10787	s            *Service
10788	projectId    string
10789	region       string
10790	urlParams_   gensupport.URLParams
10791	ifNoneMatch_ string
10792	ctx_         context.Context
10793	header_      http.Header
10794}
10795
10796// List: Lists regions/{region}/jobs in a project.
10797func (r *ProjectsRegionsJobsService) List(projectId string, region string) *ProjectsRegionsJobsListCall {
10798	c := &ProjectsRegionsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10799	c.projectId = projectId
10800	c.region = region
10801	return c
10802}
10803
10804// ClusterName sets the optional parameter "clusterName": If set, the
10805// returned jobs list includes only jobs that were submitted to the
10806// named cluster.
10807func (c *ProjectsRegionsJobsListCall) ClusterName(clusterName string) *ProjectsRegionsJobsListCall {
10808	c.urlParams_.Set("clusterName", clusterName)
10809	return c
10810}
10811
10812// Filter sets the optional parameter "filter": A filter constraining
10813// the jobs to list. Filters are case-sensitive and have the following
10814// syntax:field = value AND field = value ...where field is status.state
10815// or labels.[KEY], and [KEY] is a label key. value can be * to match
10816// all values. status.state can be either ACTIVE or NON_ACTIVE. Only the
10817// logical AND operator is supported; space-separated items are treated
10818// as having an implicit AND operator.Example filter:status.state =
10819// ACTIVE AND labels.env = staging AND labels.starred = *
10820func (c *ProjectsRegionsJobsListCall) Filter(filter string) *ProjectsRegionsJobsListCall {
10821	c.urlParams_.Set("filter", filter)
10822	return c
10823}
10824
10825// JobStateMatcher sets the optional parameter "jobStateMatcher":
10826// Specifies enumerated categories of jobs to list. (default = match ALL
10827// jobs).If filter is provided, jobStateMatcher will be ignored.
10828//
10829// Possible values:
10830//   "ALL" - Match all jobs, regardless of state.
10831//   "ACTIVE" - Only match jobs in non-terminal states: PENDING,
10832// RUNNING, or CANCEL_PENDING.
10833//   "NON_ACTIVE" - Only match jobs in terminal states: CANCELLED, DONE,
10834// or ERROR.
10835func (c *ProjectsRegionsJobsListCall) JobStateMatcher(jobStateMatcher string) *ProjectsRegionsJobsListCall {
10836	c.urlParams_.Set("jobStateMatcher", jobStateMatcher)
10837	return c
10838}
10839
10840// PageSize sets the optional parameter "pageSize": The number of
10841// results to return in each response.
10842func (c *ProjectsRegionsJobsListCall) PageSize(pageSize int64) *ProjectsRegionsJobsListCall {
10843	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
10844	return c
10845}
10846
10847// PageToken sets the optional parameter "pageToken": The page token,
10848// returned by a previous call, to request the next page of results.
10849func (c *ProjectsRegionsJobsListCall) PageToken(pageToken string) *ProjectsRegionsJobsListCall {
10850	c.urlParams_.Set("pageToken", pageToken)
10851	return c
10852}
10853
10854// Fields allows partial responses to be retrieved. See
10855// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10856// for more information.
10857func (c *ProjectsRegionsJobsListCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsListCall {
10858	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10859	return c
10860}
10861
10862// IfNoneMatch sets the optional parameter which makes the operation
10863// fail if the object's ETag matches the given value. This is useful for
10864// getting updates only after the object has changed since the last
10865// request. Use googleapi.IsNotModified to check whether the response
10866// error from Do is the result of In-None-Match.
10867func (c *ProjectsRegionsJobsListCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsListCall {
10868	c.ifNoneMatch_ = entityTag
10869	return c
10870}
10871
10872// Context sets the context to be used in this call's Do method. Any
10873// pending HTTP request will be aborted if the provided context is
10874// canceled.
10875func (c *ProjectsRegionsJobsListCall) Context(ctx context.Context) *ProjectsRegionsJobsListCall {
10876	c.ctx_ = ctx
10877	return c
10878}
10879
10880// Header returns an http.Header that can be modified by the caller to
10881// add HTTP headers to the request.
10882func (c *ProjectsRegionsJobsListCall) Header() http.Header {
10883	if c.header_ == nil {
10884		c.header_ = make(http.Header)
10885	}
10886	return c.header_
10887}
10888
10889func (c *ProjectsRegionsJobsListCall) doRequest(alt string) (*http.Response, error) {
10890	reqHeaders := make(http.Header)
10891	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
10892	for k, v := range c.header_ {
10893		reqHeaders[k] = v
10894	}
10895	reqHeaders.Set("User-Agent", c.s.userAgent())
10896	if c.ifNoneMatch_ != "" {
10897		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
10898	}
10899	var body io.Reader = nil
10900	c.urlParams_.Set("alt", alt)
10901	c.urlParams_.Set("prettyPrint", "false")
10902	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs")
10903	urls += "?" + c.urlParams_.Encode()
10904	req, err := http.NewRequest("GET", urls, body)
10905	if err != nil {
10906		return nil, err
10907	}
10908	req.Header = reqHeaders
10909	googleapi.Expand(req.URL, map[string]string{
10910		"projectId": c.projectId,
10911		"region":    c.region,
10912	})
10913	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10914}
10915
10916// Do executes the "dataproc.projects.regions.jobs.list" call.
10917// Exactly one of *ListJobsResponse or error will be non-nil. Any
10918// non-2xx status code is an error. Response headers are in either
10919// *ListJobsResponse.ServerResponse.Header or (if a response was
10920// returned at all) in error.(*googleapi.Error).Header. Use
10921// googleapi.IsNotModified to check whether the returned error was
10922// because http.StatusNotModified was returned.
10923func (c *ProjectsRegionsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
10924	gensupport.SetOptions(c.urlParams_, opts...)
10925	res, err := c.doRequest("json")
10926	if res != nil && res.StatusCode == http.StatusNotModified {
10927		if res.Body != nil {
10928			res.Body.Close()
10929		}
10930		return nil, &googleapi.Error{
10931			Code:   res.StatusCode,
10932			Header: res.Header,
10933		}
10934	}
10935	if err != nil {
10936		return nil, err
10937	}
10938	defer googleapi.CloseBody(res)
10939	if err := googleapi.CheckResponse(res); err != nil {
10940		return nil, err
10941	}
10942	ret := &ListJobsResponse{
10943		ServerResponse: googleapi.ServerResponse{
10944			Header:         res.Header,
10945			HTTPStatusCode: res.StatusCode,
10946		},
10947	}
10948	target := &ret
10949	if err := gensupport.DecodeResponse(target, res); err != nil {
10950		return nil, err
10951	}
10952	return ret, nil
10953	// {
10954	//   "description": "Lists regions/{region}/jobs in a project.",
10955	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs",
10956	//   "httpMethod": "GET",
10957	//   "id": "dataproc.projects.regions.jobs.list",
10958	//   "parameterOrder": [
10959	//     "projectId",
10960	//     "region"
10961	//   ],
10962	//   "parameters": {
10963	//     "clusterName": {
10964	//       "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.",
10965	//       "location": "query",
10966	//       "type": "string"
10967	//     },
10968	//     "filter": {
10969	//       "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 = *",
10970	//       "location": "query",
10971	//       "type": "string"
10972	//     },
10973	//     "jobStateMatcher": {
10974	//       "description": "Optional. Specifies enumerated categories of jobs to list. (default = match ALL jobs).If filter is provided, jobStateMatcher will be ignored.",
10975	//       "enum": [
10976	//         "ALL",
10977	//         "ACTIVE",
10978	//         "NON_ACTIVE"
10979	//       ],
10980	//       "enumDescriptions": [
10981	//         "Match all jobs, regardless of state.",
10982	//         "Only match jobs in non-terminal states: PENDING, RUNNING, or CANCEL_PENDING.",
10983	//         "Only match jobs in terminal states: CANCELLED, DONE, or ERROR."
10984	//       ],
10985	//       "location": "query",
10986	//       "type": "string"
10987	//     },
10988	//     "pageSize": {
10989	//       "description": "Optional. The number of results to return in each response.",
10990	//       "format": "int32",
10991	//       "location": "query",
10992	//       "type": "integer"
10993	//     },
10994	//     "pageToken": {
10995	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
10996	//       "location": "query",
10997	//       "type": "string"
10998	//     },
10999	//     "projectId": {
11000	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
11001	//       "location": "path",
11002	//       "required": true,
11003	//       "type": "string"
11004	//     },
11005	//     "region": {
11006	//       "description": "Required. The Dataproc region in which to handle the request.",
11007	//       "location": "path",
11008	//       "required": true,
11009	//       "type": "string"
11010	//     }
11011	//   },
11012	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs",
11013	//   "response": {
11014	//     "$ref": "ListJobsResponse"
11015	//   },
11016	//   "scopes": [
11017	//     "https://www.googleapis.com/auth/cloud-platform"
11018	//   ]
11019	// }
11020
11021}
11022
11023// Pages invokes f for each page of results.
11024// A non-nil error returned from f will halt the iteration.
11025// The provided context supersedes any context provided to the Context method.
11026func (c *ProjectsRegionsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
11027	c.ctx_ = ctx
11028	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11029	for {
11030		x, err := c.Do()
11031		if err != nil {
11032			return err
11033		}
11034		if err := f(x); err != nil {
11035			return err
11036		}
11037		if x.NextPageToken == "" {
11038			return nil
11039		}
11040		c.PageToken(x.NextPageToken)
11041	}
11042}
11043
11044// method id "dataproc.projects.regions.jobs.patch":
11045
11046type ProjectsRegionsJobsPatchCall struct {
11047	s          *Service
11048	projectId  string
11049	region     string
11050	jobId      string
11051	job        *Job
11052	urlParams_ gensupport.URLParams
11053	ctx_       context.Context
11054	header_    http.Header
11055}
11056
11057// Patch: Updates a job in a project.
11058func (r *ProjectsRegionsJobsService) Patch(projectId string, region string, jobId string, job *Job) *ProjectsRegionsJobsPatchCall {
11059	c := &ProjectsRegionsJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11060	c.projectId = projectId
11061	c.region = region
11062	c.jobId = jobId
11063	c.job = job
11064	return c
11065}
11066
11067// UpdateMask sets the optional parameter "updateMask": Required.
11068// Specifies the path, relative to Job, of the field to update. For
11069// example, to update the labels of a Job the update_mask parameter
11070// would be specified as labels, and the PATCH request body would
11071// specify the new value. *Note:* Currently, labels is the only field
11072// that can be updated.
11073func (c *ProjectsRegionsJobsPatchCall) UpdateMask(updateMask string) *ProjectsRegionsJobsPatchCall {
11074	c.urlParams_.Set("updateMask", updateMask)
11075	return c
11076}
11077
11078// Fields allows partial responses to be retrieved. See
11079// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11080// for more information.
11081func (c *ProjectsRegionsJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsPatchCall {
11082	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11083	return c
11084}
11085
11086// Context sets the context to be used in this call's Do method. Any
11087// pending HTTP request will be aborted if the provided context is
11088// canceled.
11089func (c *ProjectsRegionsJobsPatchCall) Context(ctx context.Context) *ProjectsRegionsJobsPatchCall {
11090	c.ctx_ = ctx
11091	return c
11092}
11093
11094// Header returns an http.Header that can be modified by the caller to
11095// add HTTP headers to the request.
11096func (c *ProjectsRegionsJobsPatchCall) Header() http.Header {
11097	if c.header_ == nil {
11098		c.header_ = make(http.Header)
11099	}
11100	return c.header_
11101}
11102
11103func (c *ProjectsRegionsJobsPatchCall) doRequest(alt string) (*http.Response, error) {
11104	reqHeaders := make(http.Header)
11105	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
11106	for k, v := range c.header_ {
11107		reqHeaders[k] = v
11108	}
11109	reqHeaders.Set("User-Agent", c.s.userAgent())
11110	var body io.Reader = nil
11111	body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
11112	if err != nil {
11113		return nil, err
11114	}
11115	reqHeaders.Set("Content-Type", "application/json")
11116	c.urlParams_.Set("alt", alt)
11117	c.urlParams_.Set("prettyPrint", "false")
11118	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}")
11119	urls += "?" + c.urlParams_.Encode()
11120	req, err := http.NewRequest("PATCH", urls, body)
11121	if err != nil {
11122		return nil, err
11123	}
11124	req.Header = reqHeaders
11125	googleapi.Expand(req.URL, map[string]string{
11126		"projectId": c.projectId,
11127		"region":    c.region,
11128		"jobId":     c.jobId,
11129	})
11130	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11131}
11132
11133// Do executes the "dataproc.projects.regions.jobs.patch" call.
11134// Exactly one of *Job or error will be non-nil. Any non-2xx status code
11135// is an error. Response headers are in either
11136// *Job.ServerResponse.Header or (if a response was returned at all) in
11137// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11138// whether the returned error was because http.StatusNotModified was
11139// returned.
11140func (c *ProjectsRegionsJobsPatchCall) Do(opts ...googleapi.CallOption) (*Job, error) {
11141	gensupport.SetOptions(c.urlParams_, opts...)
11142	res, err := c.doRequest("json")
11143	if res != nil && res.StatusCode == http.StatusNotModified {
11144		if res.Body != nil {
11145			res.Body.Close()
11146		}
11147		return nil, &googleapi.Error{
11148			Code:   res.StatusCode,
11149			Header: res.Header,
11150		}
11151	}
11152	if err != nil {
11153		return nil, err
11154	}
11155	defer googleapi.CloseBody(res)
11156	if err := googleapi.CheckResponse(res); err != nil {
11157		return nil, err
11158	}
11159	ret := &Job{
11160		ServerResponse: googleapi.ServerResponse{
11161			Header:         res.Header,
11162			HTTPStatusCode: res.StatusCode,
11163		},
11164	}
11165	target := &ret
11166	if err := gensupport.DecodeResponse(target, res); err != nil {
11167		return nil, err
11168	}
11169	return ret, nil
11170	// {
11171	//   "description": "Updates a job in a project.",
11172	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
11173	//   "httpMethod": "PATCH",
11174	//   "id": "dataproc.projects.regions.jobs.patch",
11175	//   "parameterOrder": [
11176	//     "projectId",
11177	//     "region",
11178	//     "jobId"
11179	//   ],
11180	//   "parameters": {
11181	//     "jobId": {
11182	//       "description": "Required. The job ID.",
11183	//       "location": "path",
11184	//       "required": true,
11185	//       "type": "string"
11186	//     },
11187	//     "projectId": {
11188	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
11189	//       "location": "path",
11190	//       "required": true,
11191	//       "type": "string"
11192	//     },
11193	//     "region": {
11194	//       "description": "Required. The Dataproc region in which to handle the request.",
11195	//       "location": "path",
11196	//       "required": true,
11197	//       "type": "string"
11198	//     },
11199	//     "updateMask": {
11200	//       "description": "Required. Specifies the path, relative to Job, of the field to update. For example, to update the labels of a Job the update_mask parameter would be specified as labels, and the PATCH request body would specify the new value. *Note:* Currently, labels is the only field that can be updated.",
11201	//       "format": "google-fieldmask",
11202	//       "location": "query",
11203	//       "type": "string"
11204	//     }
11205	//   },
11206	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
11207	//   "request": {
11208	//     "$ref": "Job"
11209	//   },
11210	//   "response": {
11211	//     "$ref": "Job"
11212	//   },
11213	//   "scopes": [
11214	//     "https://www.googleapis.com/auth/cloud-platform"
11215	//   ]
11216	// }
11217
11218}
11219
11220// method id "dataproc.projects.regions.jobs.setIamPolicy":
11221
11222type ProjectsRegionsJobsSetIamPolicyCall struct {
11223	s                   *Service
11224	resource            string
11225	setiampolicyrequest *SetIamPolicyRequest
11226	urlParams_          gensupport.URLParams
11227	ctx_                context.Context
11228	header_             http.Header
11229}
11230
11231// SetIamPolicy: Sets the access control policy on the specified
11232// resource. Replaces any existing policy.Can return NOT_FOUND,
11233// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
11234func (r *ProjectsRegionsJobsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsJobsSetIamPolicyCall {
11235	c := &ProjectsRegionsJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11236	c.resource = resource
11237	c.setiampolicyrequest = setiampolicyrequest
11238	return c
11239}
11240
11241// Fields allows partial responses to be retrieved. See
11242// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11243// for more information.
11244func (c *ProjectsRegionsJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSetIamPolicyCall {
11245	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11246	return c
11247}
11248
11249// Context sets the context to be used in this call's Do method. Any
11250// pending HTTP request will be aborted if the provided context is
11251// canceled.
11252func (c *ProjectsRegionsJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsJobsSetIamPolicyCall {
11253	c.ctx_ = ctx
11254	return c
11255}
11256
11257// Header returns an http.Header that can be modified by the caller to
11258// add HTTP headers to the request.
11259func (c *ProjectsRegionsJobsSetIamPolicyCall) Header() http.Header {
11260	if c.header_ == nil {
11261		c.header_ = make(http.Header)
11262	}
11263	return c.header_
11264}
11265
11266func (c *ProjectsRegionsJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11267	reqHeaders := make(http.Header)
11268	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
11269	for k, v := range c.header_ {
11270		reqHeaders[k] = v
11271	}
11272	reqHeaders.Set("User-Agent", c.s.userAgent())
11273	var body io.Reader = nil
11274	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
11275	if err != nil {
11276		return nil, err
11277	}
11278	reqHeaders.Set("Content-Type", "application/json")
11279	c.urlParams_.Set("alt", alt)
11280	c.urlParams_.Set("prettyPrint", "false")
11281	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
11282	urls += "?" + c.urlParams_.Encode()
11283	req, err := http.NewRequest("POST", urls, body)
11284	if err != nil {
11285		return nil, err
11286	}
11287	req.Header = reqHeaders
11288	googleapi.Expand(req.URL, map[string]string{
11289		"resource": c.resource,
11290	})
11291	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11292}
11293
11294// Do executes the "dataproc.projects.regions.jobs.setIamPolicy" call.
11295// Exactly one of *Policy or error will be non-nil. Any non-2xx status
11296// code is an error. Response headers are in either
11297// *Policy.ServerResponse.Header or (if a response was returned at all)
11298// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11299// check whether the returned error was because http.StatusNotModified
11300// was returned.
11301func (c *ProjectsRegionsJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11302	gensupport.SetOptions(c.urlParams_, opts...)
11303	res, err := c.doRequest("json")
11304	if res != nil && res.StatusCode == http.StatusNotModified {
11305		if res.Body != nil {
11306			res.Body.Close()
11307		}
11308		return nil, &googleapi.Error{
11309			Code:   res.StatusCode,
11310			Header: res.Header,
11311		}
11312	}
11313	if err != nil {
11314		return nil, err
11315	}
11316	defer googleapi.CloseBody(res)
11317	if err := googleapi.CheckResponse(res); err != nil {
11318		return nil, err
11319	}
11320	ret := &Policy{
11321		ServerResponse: googleapi.ServerResponse{
11322			Header:         res.Header,
11323			HTTPStatusCode: res.StatusCode,
11324		},
11325	}
11326	target := &ret
11327	if err := gensupport.DecodeResponse(target, res); err != nil {
11328		return nil, err
11329	}
11330	return ret, nil
11331	// {
11332	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
11333	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:setIamPolicy",
11334	//   "httpMethod": "POST",
11335	//   "id": "dataproc.projects.regions.jobs.setIamPolicy",
11336	//   "parameterOrder": [
11337	//     "resource"
11338	//   ],
11339	//   "parameters": {
11340	//     "resource": {
11341	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
11342	//       "location": "path",
11343	//       "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$",
11344	//       "required": true,
11345	//       "type": "string"
11346	//     }
11347	//   },
11348	//   "path": "v1beta2/{+resource}:setIamPolicy",
11349	//   "request": {
11350	//     "$ref": "SetIamPolicyRequest"
11351	//   },
11352	//   "response": {
11353	//     "$ref": "Policy"
11354	//   },
11355	//   "scopes": [
11356	//     "https://www.googleapis.com/auth/cloud-platform"
11357	//   ]
11358	// }
11359
11360}
11361
11362// method id "dataproc.projects.regions.jobs.submit":
11363
11364type ProjectsRegionsJobsSubmitCall struct {
11365	s                *Service
11366	projectId        string
11367	region           string
11368	submitjobrequest *SubmitJobRequest
11369	urlParams_       gensupport.URLParams
11370	ctx_             context.Context
11371	header_          http.Header
11372}
11373
11374// Submit: Submits a job to a cluster.
11375func (r *ProjectsRegionsJobsService) Submit(projectId string, region string, submitjobrequest *SubmitJobRequest) *ProjectsRegionsJobsSubmitCall {
11376	c := &ProjectsRegionsJobsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11377	c.projectId = projectId
11378	c.region = region
11379	c.submitjobrequest = submitjobrequest
11380	return c
11381}
11382
11383// Fields allows partial responses to be retrieved. See
11384// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11385// for more information.
11386func (c *ProjectsRegionsJobsSubmitCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSubmitCall {
11387	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11388	return c
11389}
11390
11391// Context sets the context to be used in this call's Do method. Any
11392// pending HTTP request will be aborted if the provided context is
11393// canceled.
11394func (c *ProjectsRegionsJobsSubmitCall) Context(ctx context.Context) *ProjectsRegionsJobsSubmitCall {
11395	c.ctx_ = ctx
11396	return c
11397}
11398
11399// Header returns an http.Header that can be modified by the caller to
11400// add HTTP headers to the request.
11401func (c *ProjectsRegionsJobsSubmitCall) Header() http.Header {
11402	if c.header_ == nil {
11403		c.header_ = make(http.Header)
11404	}
11405	return c.header_
11406}
11407
11408func (c *ProjectsRegionsJobsSubmitCall) doRequest(alt string) (*http.Response, error) {
11409	reqHeaders := make(http.Header)
11410	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
11411	for k, v := range c.header_ {
11412		reqHeaders[k] = v
11413	}
11414	reqHeaders.Set("User-Agent", c.s.userAgent())
11415	var body io.Reader = nil
11416	body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitjobrequest)
11417	if err != nil {
11418		return nil, err
11419	}
11420	reqHeaders.Set("Content-Type", "application/json")
11421	c.urlParams_.Set("alt", alt)
11422	c.urlParams_.Set("prettyPrint", "false")
11423	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs:submit")
11424	urls += "?" + c.urlParams_.Encode()
11425	req, err := http.NewRequest("POST", urls, body)
11426	if err != nil {
11427		return nil, err
11428	}
11429	req.Header = reqHeaders
11430	googleapi.Expand(req.URL, map[string]string{
11431		"projectId": c.projectId,
11432		"region":    c.region,
11433	})
11434	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11435}
11436
11437// Do executes the "dataproc.projects.regions.jobs.submit" call.
11438// Exactly one of *Job or error will be non-nil. Any non-2xx status code
11439// is an error. Response headers are in either
11440// *Job.ServerResponse.Header or (if a response was returned at all) in
11441// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11442// whether the returned error was because http.StatusNotModified was
11443// returned.
11444func (c *ProjectsRegionsJobsSubmitCall) Do(opts ...googleapi.CallOption) (*Job, error) {
11445	gensupport.SetOptions(c.urlParams_, opts...)
11446	res, err := c.doRequest("json")
11447	if res != nil && res.StatusCode == http.StatusNotModified {
11448		if res.Body != nil {
11449			res.Body.Close()
11450		}
11451		return nil, &googleapi.Error{
11452			Code:   res.StatusCode,
11453			Header: res.Header,
11454		}
11455	}
11456	if err != nil {
11457		return nil, err
11458	}
11459	defer googleapi.CloseBody(res)
11460	if err := googleapi.CheckResponse(res); err != nil {
11461		return nil, err
11462	}
11463	ret := &Job{
11464		ServerResponse: googleapi.ServerResponse{
11465			Header:         res.Header,
11466			HTTPStatusCode: res.StatusCode,
11467		},
11468	}
11469	target := &ret
11470	if err := gensupport.DecodeResponse(target, res); err != nil {
11471		return nil, err
11472	}
11473	return ret, nil
11474	// {
11475	//   "description": "Submits a job to a cluster.",
11476	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit",
11477	//   "httpMethod": "POST",
11478	//   "id": "dataproc.projects.regions.jobs.submit",
11479	//   "parameterOrder": [
11480	//     "projectId",
11481	//     "region"
11482	//   ],
11483	//   "parameters": {
11484	//     "projectId": {
11485	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
11486	//       "location": "path",
11487	//       "required": true,
11488	//       "type": "string"
11489	//     },
11490	//     "region": {
11491	//       "description": "Required. The Dataproc region in which to handle the request.",
11492	//       "location": "path",
11493	//       "required": true,
11494	//       "type": "string"
11495	//     }
11496	//   },
11497	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit",
11498	//   "request": {
11499	//     "$ref": "SubmitJobRequest"
11500	//   },
11501	//   "response": {
11502	//     "$ref": "Job"
11503	//   },
11504	//   "scopes": [
11505	//     "https://www.googleapis.com/auth/cloud-platform"
11506	//   ]
11507	// }
11508
11509}
11510
11511// method id "dataproc.projects.regions.jobs.submitAsOperation":
11512
11513type ProjectsRegionsJobsSubmitAsOperationCall struct {
11514	s                *Service
11515	projectId        string
11516	region           string
11517	submitjobrequest *SubmitJobRequest
11518	urlParams_       gensupport.URLParams
11519	ctx_             context.Context
11520	header_          http.Header
11521}
11522
11523// SubmitAsOperation: Submits job to a cluster.
11524func (r *ProjectsRegionsJobsService) SubmitAsOperation(projectId string, region string, submitjobrequest *SubmitJobRequest) *ProjectsRegionsJobsSubmitAsOperationCall {
11525	c := &ProjectsRegionsJobsSubmitAsOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11526	c.projectId = projectId
11527	c.region = region
11528	c.submitjobrequest = submitjobrequest
11529	return c
11530}
11531
11532// Fields allows partial responses to be retrieved. See
11533// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11534// for more information.
11535func (c *ProjectsRegionsJobsSubmitAsOperationCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSubmitAsOperationCall {
11536	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11537	return c
11538}
11539
11540// Context sets the context to be used in this call's Do method. Any
11541// pending HTTP request will be aborted if the provided context is
11542// canceled.
11543func (c *ProjectsRegionsJobsSubmitAsOperationCall) Context(ctx context.Context) *ProjectsRegionsJobsSubmitAsOperationCall {
11544	c.ctx_ = ctx
11545	return c
11546}
11547
11548// Header returns an http.Header that can be modified by the caller to
11549// add HTTP headers to the request.
11550func (c *ProjectsRegionsJobsSubmitAsOperationCall) Header() http.Header {
11551	if c.header_ == nil {
11552		c.header_ = make(http.Header)
11553	}
11554	return c.header_
11555}
11556
11557func (c *ProjectsRegionsJobsSubmitAsOperationCall) doRequest(alt string) (*http.Response, error) {
11558	reqHeaders := make(http.Header)
11559	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
11560	for k, v := range c.header_ {
11561		reqHeaders[k] = v
11562	}
11563	reqHeaders.Set("User-Agent", c.s.userAgent())
11564	var body io.Reader = nil
11565	body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitjobrequest)
11566	if err != nil {
11567		return nil, err
11568	}
11569	reqHeaders.Set("Content-Type", "application/json")
11570	c.urlParams_.Set("alt", alt)
11571	c.urlParams_.Set("prettyPrint", "false")
11572	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs:submitAsOperation")
11573	urls += "?" + c.urlParams_.Encode()
11574	req, err := http.NewRequest("POST", urls, body)
11575	if err != nil {
11576		return nil, err
11577	}
11578	req.Header = reqHeaders
11579	googleapi.Expand(req.URL, map[string]string{
11580		"projectId": c.projectId,
11581		"region":    c.region,
11582	})
11583	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11584}
11585
11586// Do executes the "dataproc.projects.regions.jobs.submitAsOperation" call.
11587// Exactly one of *Operation or error will be non-nil. Any non-2xx
11588// status code is an error. Response headers are in either
11589// *Operation.ServerResponse.Header or (if a response was returned at
11590// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
11591// to check whether the returned error was because
11592// http.StatusNotModified was returned.
11593func (c *ProjectsRegionsJobsSubmitAsOperationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
11594	gensupport.SetOptions(c.urlParams_, opts...)
11595	res, err := c.doRequest("json")
11596	if res != nil && res.StatusCode == http.StatusNotModified {
11597		if res.Body != nil {
11598			res.Body.Close()
11599		}
11600		return nil, &googleapi.Error{
11601			Code:   res.StatusCode,
11602			Header: res.Header,
11603		}
11604	}
11605	if err != nil {
11606		return nil, err
11607	}
11608	defer googleapi.CloseBody(res)
11609	if err := googleapi.CheckResponse(res); err != nil {
11610		return nil, err
11611	}
11612	ret := &Operation{
11613		ServerResponse: googleapi.ServerResponse{
11614			Header:         res.Header,
11615			HTTPStatusCode: res.StatusCode,
11616		},
11617	}
11618	target := &ret
11619	if err := gensupport.DecodeResponse(target, res); err != nil {
11620		return nil, err
11621	}
11622	return ret, nil
11623	// {
11624	//   "description": "Submits job to a cluster.",
11625	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs:submitAsOperation",
11626	//   "httpMethod": "POST",
11627	//   "id": "dataproc.projects.regions.jobs.submitAsOperation",
11628	//   "parameterOrder": [
11629	//     "projectId",
11630	//     "region"
11631	//   ],
11632	//   "parameters": {
11633	//     "projectId": {
11634	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
11635	//       "location": "path",
11636	//       "required": true,
11637	//       "type": "string"
11638	//     },
11639	//     "region": {
11640	//       "description": "Required. The Dataproc region in which to handle the request.",
11641	//       "location": "path",
11642	//       "required": true,
11643	//       "type": "string"
11644	//     }
11645	//   },
11646	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs:submitAsOperation",
11647	//   "request": {
11648	//     "$ref": "SubmitJobRequest"
11649	//   },
11650	//   "response": {
11651	//     "$ref": "Operation"
11652	//   },
11653	//   "scopes": [
11654	//     "https://www.googleapis.com/auth/cloud-platform"
11655	//   ]
11656	// }
11657
11658}
11659
11660// method id "dataproc.projects.regions.jobs.testIamPermissions":
11661
11662type ProjectsRegionsJobsTestIamPermissionsCall struct {
11663	s                         *Service
11664	resource                  string
11665	testiampermissionsrequest *TestIamPermissionsRequest
11666	urlParams_                gensupport.URLParams
11667	ctx_                      context.Context
11668	header_                   http.Header
11669}
11670
11671// TestIamPermissions: Returns permissions that a caller has on the
11672// specified resource. If the resource does not exist, this will return
11673// an empty set of permissions, not a NOT_FOUND error.Note: This
11674// operation is designed to be used for building permission-aware UIs
11675// and command-line tools, not for authorization checking. This
11676// operation may "fail open" without warning.
11677func (r *ProjectsRegionsJobsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsJobsTestIamPermissionsCall {
11678	c := &ProjectsRegionsJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11679	c.resource = resource
11680	c.testiampermissionsrequest = testiampermissionsrequest
11681	return c
11682}
11683
11684// Fields allows partial responses to be retrieved. See
11685// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11686// for more information.
11687func (c *ProjectsRegionsJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsTestIamPermissionsCall {
11688	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11689	return c
11690}
11691
11692// Context sets the context to be used in this call's Do method. Any
11693// pending HTTP request will be aborted if the provided context is
11694// canceled.
11695func (c *ProjectsRegionsJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsJobsTestIamPermissionsCall {
11696	c.ctx_ = ctx
11697	return c
11698}
11699
11700// Header returns an http.Header that can be modified by the caller to
11701// add HTTP headers to the request.
11702func (c *ProjectsRegionsJobsTestIamPermissionsCall) Header() http.Header {
11703	if c.header_ == nil {
11704		c.header_ = make(http.Header)
11705	}
11706	return c.header_
11707}
11708
11709func (c *ProjectsRegionsJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
11710	reqHeaders := make(http.Header)
11711	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
11712	for k, v := range c.header_ {
11713		reqHeaders[k] = v
11714	}
11715	reqHeaders.Set("User-Agent", c.s.userAgent())
11716	var body io.Reader = nil
11717	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
11718	if err != nil {
11719		return nil, err
11720	}
11721	reqHeaders.Set("Content-Type", "application/json")
11722	c.urlParams_.Set("alt", alt)
11723	c.urlParams_.Set("prettyPrint", "false")
11724	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
11725	urls += "?" + c.urlParams_.Encode()
11726	req, err := http.NewRequest("POST", urls, body)
11727	if err != nil {
11728		return nil, err
11729	}
11730	req.Header = reqHeaders
11731	googleapi.Expand(req.URL, map[string]string{
11732		"resource": c.resource,
11733	})
11734	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11735}
11736
11737// Do executes the "dataproc.projects.regions.jobs.testIamPermissions" call.
11738// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
11739// Any non-2xx status code is an error. Response headers are in either
11740// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
11741// was returned at all) in error.(*googleapi.Error).Header. Use
11742// googleapi.IsNotModified to check whether the returned error was
11743// because http.StatusNotModified was returned.
11744func (c *ProjectsRegionsJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
11745	gensupport.SetOptions(c.urlParams_, opts...)
11746	res, err := c.doRequest("json")
11747	if res != nil && res.StatusCode == http.StatusNotModified {
11748		if res.Body != nil {
11749			res.Body.Close()
11750		}
11751		return nil, &googleapi.Error{
11752			Code:   res.StatusCode,
11753			Header: res.Header,
11754		}
11755	}
11756	if err != nil {
11757		return nil, err
11758	}
11759	defer googleapi.CloseBody(res)
11760	if err := googleapi.CheckResponse(res); err != nil {
11761		return nil, err
11762	}
11763	ret := &TestIamPermissionsResponse{
11764		ServerResponse: googleapi.ServerResponse{
11765			Header:         res.Header,
11766			HTTPStatusCode: res.StatusCode,
11767		},
11768	}
11769	target := &ret
11770	if err := gensupport.DecodeResponse(target, res); err != nil {
11771		return nil, err
11772	}
11773	return ret, nil
11774	// {
11775	//   "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.",
11776	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:testIamPermissions",
11777	//   "httpMethod": "POST",
11778	//   "id": "dataproc.projects.regions.jobs.testIamPermissions",
11779	//   "parameterOrder": [
11780	//     "resource"
11781	//   ],
11782	//   "parameters": {
11783	//     "resource": {
11784	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
11785	//       "location": "path",
11786	//       "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$",
11787	//       "required": true,
11788	//       "type": "string"
11789	//     }
11790	//   },
11791	//   "path": "v1beta2/{+resource}:testIamPermissions",
11792	//   "request": {
11793	//     "$ref": "TestIamPermissionsRequest"
11794	//   },
11795	//   "response": {
11796	//     "$ref": "TestIamPermissionsResponse"
11797	//   },
11798	//   "scopes": [
11799	//     "https://www.googleapis.com/auth/cloud-platform"
11800	//   ]
11801	// }
11802
11803}
11804
11805// method id "dataproc.projects.regions.operations.cancel":
11806
11807type ProjectsRegionsOperationsCancelCall struct {
11808	s          *Service
11809	name       string
11810	urlParams_ gensupport.URLParams
11811	ctx_       context.Context
11812	header_    http.Header
11813}
11814
11815// Cancel: Starts asynchronous cancellation on a long-running operation.
11816// The server makes a best effort to cancel the operation, but success
11817// is not guaranteed. If the server doesn't support this method, it
11818// returns google.rpc.Code.UNIMPLEMENTED. Clients can use
11819// Operations.GetOperation or other methods to check whether the
11820// cancellation succeeded or whether the operation completed despite
11821// cancellation. On successful cancellation, the operation is not
11822// deleted; instead, it becomes an operation with an Operation.error
11823// value with a google.rpc.Status.code of 1, corresponding to
11824// Code.CANCELLED.
11825func (r *ProjectsRegionsOperationsService) Cancel(name string) *ProjectsRegionsOperationsCancelCall {
11826	c := &ProjectsRegionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11827	c.name = name
11828	return c
11829}
11830
11831// Fields allows partial responses to be retrieved. See
11832// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11833// for more information.
11834func (c *ProjectsRegionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsCancelCall {
11835	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11836	return c
11837}
11838
11839// Context sets the context to be used in this call's Do method. Any
11840// pending HTTP request will be aborted if the provided context is
11841// canceled.
11842func (c *ProjectsRegionsOperationsCancelCall) Context(ctx context.Context) *ProjectsRegionsOperationsCancelCall {
11843	c.ctx_ = ctx
11844	return c
11845}
11846
11847// Header returns an http.Header that can be modified by the caller to
11848// add HTTP headers to the request.
11849func (c *ProjectsRegionsOperationsCancelCall) Header() http.Header {
11850	if c.header_ == nil {
11851		c.header_ = make(http.Header)
11852	}
11853	return c.header_
11854}
11855
11856func (c *ProjectsRegionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
11857	reqHeaders := make(http.Header)
11858	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
11859	for k, v := range c.header_ {
11860		reqHeaders[k] = v
11861	}
11862	reqHeaders.Set("User-Agent", c.s.userAgent())
11863	var body io.Reader = nil
11864	c.urlParams_.Set("alt", alt)
11865	c.urlParams_.Set("prettyPrint", "false")
11866	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:cancel")
11867	urls += "?" + c.urlParams_.Encode()
11868	req, err := http.NewRequest("POST", urls, body)
11869	if err != nil {
11870		return nil, err
11871	}
11872	req.Header = reqHeaders
11873	googleapi.Expand(req.URL, map[string]string{
11874		"name": c.name,
11875	})
11876	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11877}
11878
11879// Do executes the "dataproc.projects.regions.operations.cancel" call.
11880// Exactly one of *Empty or error will be non-nil. Any non-2xx status
11881// code is an error. Response headers are in either
11882// *Empty.ServerResponse.Header or (if a response was returned at all)
11883// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11884// check whether the returned error was because http.StatusNotModified
11885// was returned.
11886func (c *ProjectsRegionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
11887	gensupport.SetOptions(c.urlParams_, opts...)
11888	res, err := c.doRequest("json")
11889	if res != nil && res.StatusCode == http.StatusNotModified {
11890		if res.Body != nil {
11891			res.Body.Close()
11892		}
11893		return nil, &googleapi.Error{
11894			Code:   res.StatusCode,
11895			Header: res.Header,
11896		}
11897	}
11898	if err != nil {
11899		return nil, err
11900	}
11901	defer googleapi.CloseBody(res)
11902	if err := googleapi.CheckResponse(res); err != nil {
11903		return nil, err
11904	}
11905	ret := &Empty{
11906		ServerResponse: googleapi.ServerResponse{
11907			Header:         res.Header,
11908			HTTPStatusCode: res.StatusCode,
11909		},
11910	}
11911	target := &ret
11912	if err := gensupport.DecodeResponse(target, res); err != nil {
11913		return nil, err
11914	}
11915	return ret, nil
11916	// {
11917	//   "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.",
11918	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel",
11919	//   "httpMethod": "POST",
11920	//   "id": "dataproc.projects.regions.operations.cancel",
11921	//   "parameterOrder": [
11922	//     "name"
11923	//   ],
11924	//   "parameters": {
11925	//     "name": {
11926	//       "description": "The name of the operation resource to be cancelled.",
11927	//       "location": "path",
11928	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
11929	//       "required": true,
11930	//       "type": "string"
11931	//     }
11932	//   },
11933	//   "path": "v1beta2/{+name}:cancel",
11934	//   "response": {
11935	//     "$ref": "Empty"
11936	//   },
11937	//   "scopes": [
11938	//     "https://www.googleapis.com/auth/cloud-platform"
11939	//   ]
11940	// }
11941
11942}
11943
11944// method id "dataproc.projects.regions.operations.delete":
11945
11946type ProjectsRegionsOperationsDeleteCall struct {
11947	s          *Service
11948	name       string
11949	urlParams_ gensupport.URLParams
11950	ctx_       context.Context
11951	header_    http.Header
11952}
11953
11954// Delete: Deletes a long-running operation. This method indicates that
11955// the client is no longer interested in the operation result. It does
11956// not cancel the operation. If the server doesn't support this method,
11957// it returns google.rpc.Code.UNIMPLEMENTED.
11958func (r *ProjectsRegionsOperationsService) Delete(name string) *ProjectsRegionsOperationsDeleteCall {
11959	c := &ProjectsRegionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11960	c.name = name
11961	return c
11962}
11963
11964// Fields allows partial responses to be retrieved. See
11965// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11966// for more information.
11967func (c *ProjectsRegionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsDeleteCall {
11968	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11969	return c
11970}
11971
11972// Context sets the context to be used in this call's Do method. Any
11973// pending HTTP request will be aborted if the provided context is
11974// canceled.
11975func (c *ProjectsRegionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsRegionsOperationsDeleteCall {
11976	c.ctx_ = ctx
11977	return c
11978}
11979
11980// Header returns an http.Header that can be modified by the caller to
11981// add HTTP headers to the request.
11982func (c *ProjectsRegionsOperationsDeleteCall) Header() http.Header {
11983	if c.header_ == nil {
11984		c.header_ = make(http.Header)
11985	}
11986	return c.header_
11987}
11988
11989func (c *ProjectsRegionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
11990	reqHeaders := make(http.Header)
11991	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
11992	for k, v := range c.header_ {
11993		reqHeaders[k] = v
11994	}
11995	reqHeaders.Set("User-Agent", c.s.userAgent())
11996	var body io.Reader = nil
11997	c.urlParams_.Set("alt", alt)
11998	c.urlParams_.Set("prettyPrint", "false")
11999	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
12000	urls += "?" + c.urlParams_.Encode()
12001	req, err := http.NewRequest("DELETE", urls, body)
12002	if err != nil {
12003		return nil, err
12004	}
12005	req.Header = reqHeaders
12006	googleapi.Expand(req.URL, map[string]string{
12007		"name": c.name,
12008	})
12009	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12010}
12011
12012// Do executes the "dataproc.projects.regions.operations.delete" call.
12013// Exactly one of *Empty or error will be non-nil. Any non-2xx status
12014// code is an error. Response headers are in either
12015// *Empty.ServerResponse.Header or (if a response was returned at all)
12016// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12017// check whether the returned error was because http.StatusNotModified
12018// was returned.
12019func (c *ProjectsRegionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12020	gensupport.SetOptions(c.urlParams_, opts...)
12021	res, err := c.doRequest("json")
12022	if res != nil && res.StatusCode == http.StatusNotModified {
12023		if res.Body != nil {
12024			res.Body.Close()
12025		}
12026		return nil, &googleapi.Error{
12027			Code:   res.StatusCode,
12028			Header: res.Header,
12029		}
12030	}
12031	if err != nil {
12032		return nil, err
12033	}
12034	defer googleapi.CloseBody(res)
12035	if err := googleapi.CheckResponse(res); err != nil {
12036		return nil, err
12037	}
12038	ret := &Empty{
12039		ServerResponse: googleapi.ServerResponse{
12040			Header:         res.Header,
12041			HTTPStatusCode: res.StatusCode,
12042		},
12043	}
12044	target := &ret
12045	if err := gensupport.DecodeResponse(target, res); err != nil {
12046		return nil, err
12047	}
12048	return ret, nil
12049	// {
12050	//   "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.",
12051	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}",
12052	//   "httpMethod": "DELETE",
12053	//   "id": "dataproc.projects.regions.operations.delete",
12054	//   "parameterOrder": [
12055	//     "name"
12056	//   ],
12057	//   "parameters": {
12058	//     "name": {
12059	//       "description": "The name of the operation resource to be deleted.",
12060	//       "location": "path",
12061	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
12062	//       "required": true,
12063	//       "type": "string"
12064	//     }
12065	//   },
12066	//   "path": "v1beta2/{+name}",
12067	//   "response": {
12068	//     "$ref": "Empty"
12069	//   },
12070	//   "scopes": [
12071	//     "https://www.googleapis.com/auth/cloud-platform"
12072	//   ]
12073	// }
12074
12075}
12076
12077// method id "dataproc.projects.regions.operations.get":
12078
12079type ProjectsRegionsOperationsGetCall struct {
12080	s            *Service
12081	name         string
12082	urlParams_   gensupport.URLParams
12083	ifNoneMatch_ string
12084	ctx_         context.Context
12085	header_      http.Header
12086}
12087
12088// Get: Gets the latest state of a long-running operation. Clients can
12089// use this method to poll the operation result at intervals as
12090// recommended by the API service.
12091func (r *ProjectsRegionsOperationsService) Get(name string) *ProjectsRegionsOperationsGetCall {
12092	c := &ProjectsRegionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12093	c.name = name
12094	return c
12095}
12096
12097// Fields allows partial responses to be retrieved. See
12098// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12099// for more information.
12100func (c *ProjectsRegionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsGetCall {
12101	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12102	return c
12103}
12104
12105// IfNoneMatch sets the optional parameter which makes the operation
12106// fail if the object's ETag matches the given value. This is useful for
12107// getting updates only after the object has changed since the last
12108// request. Use googleapi.IsNotModified to check whether the response
12109// error from Do is the result of In-None-Match.
12110func (c *ProjectsRegionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsOperationsGetCall {
12111	c.ifNoneMatch_ = entityTag
12112	return c
12113}
12114
12115// Context sets the context to be used in this call's Do method. Any
12116// pending HTTP request will be aborted if the provided context is
12117// canceled.
12118func (c *ProjectsRegionsOperationsGetCall) Context(ctx context.Context) *ProjectsRegionsOperationsGetCall {
12119	c.ctx_ = ctx
12120	return c
12121}
12122
12123// Header returns an http.Header that can be modified by the caller to
12124// add HTTP headers to the request.
12125func (c *ProjectsRegionsOperationsGetCall) Header() http.Header {
12126	if c.header_ == nil {
12127		c.header_ = make(http.Header)
12128	}
12129	return c.header_
12130}
12131
12132func (c *ProjectsRegionsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
12133	reqHeaders := make(http.Header)
12134	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
12135	for k, v := range c.header_ {
12136		reqHeaders[k] = v
12137	}
12138	reqHeaders.Set("User-Agent", c.s.userAgent())
12139	if c.ifNoneMatch_ != "" {
12140		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12141	}
12142	var body io.Reader = nil
12143	c.urlParams_.Set("alt", alt)
12144	c.urlParams_.Set("prettyPrint", "false")
12145	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
12146	urls += "?" + c.urlParams_.Encode()
12147	req, err := http.NewRequest("GET", urls, body)
12148	if err != nil {
12149		return nil, err
12150	}
12151	req.Header = reqHeaders
12152	googleapi.Expand(req.URL, map[string]string{
12153		"name": c.name,
12154	})
12155	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12156}
12157
12158// Do executes the "dataproc.projects.regions.operations.get" call.
12159// Exactly one of *Operation or error will be non-nil. Any non-2xx
12160// status code is an error. Response headers are in either
12161// *Operation.ServerResponse.Header or (if a response was returned at
12162// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12163// to check whether the returned error was because
12164// http.StatusNotModified was returned.
12165func (c *ProjectsRegionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12166	gensupport.SetOptions(c.urlParams_, opts...)
12167	res, err := c.doRequest("json")
12168	if res != nil && res.StatusCode == http.StatusNotModified {
12169		if res.Body != nil {
12170			res.Body.Close()
12171		}
12172		return nil, &googleapi.Error{
12173			Code:   res.StatusCode,
12174			Header: res.Header,
12175		}
12176	}
12177	if err != nil {
12178		return nil, err
12179	}
12180	defer googleapi.CloseBody(res)
12181	if err := googleapi.CheckResponse(res); err != nil {
12182		return nil, err
12183	}
12184	ret := &Operation{
12185		ServerResponse: googleapi.ServerResponse{
12186			Header:         res.Header,
12187			HTTPStatusCode: res.StatusCode,
12188		},
12189	}
12190	target := &ret
12191	if err := gensupport.DecodeResponse(target, res); err != nil {
12192		return nil, err
12193	}
12194	return ret, nil
12195	// {
12196	//   "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.",
12197	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}",
12198	//   "httpMethod": "GET",
12199	//   "id": "dataproc.projects.regions.operations.get",
12200	//   "parameterOrder": [
12201	//     "name"
12202	//   ],
12203	//   "parameters": {
12204	//     "name": {
12205	//       "description": "The name of the operation resource.",
12206	//       "location": "path",
12207	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
12208	//       "required": true,
12209	//       "type": "string"
12210	//     }
12211	//   },
12212	//   "path": "v1beta2/{+name}",
12213	//   "response": {
12214	//     "$ref": "Operation"
12215	//   },
12216	//   "scopes": [
12217	//     "https://www.googleapis.com/auth/cloud-platform"
12218	//   ]
12219	// }
12220
12221}
12222
12223// method id "dataproc.projects.regions.operations.getIamPolicy":
12224
12225type ProjectsRegionsOperationsGetIamPolicyCall struct {
12226	s            *Service
12227	resource     string
12228	urlParams_   gensupport.URLParams
12229	ifNoneMatch_ string
12230	ctx_         context.Context
12231	header_      http.Header
12232}
12233
12234// GetIamPolicy: Gets the access control policy for a resource. Returns
12235// an empty policy if the resource exists and does not have a policy
12236// set.
12237func (r *ProjectsRegionsOperationsService) GetIamPolicy(resource string) *ProjectsRegionsOperationsGetIamPolicyCall {
12238	c := &ProjectsRegionsOperationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12239	c.resource = resource
12240	return c
12241}
12242
12243// OptionsRequestedPolicyVersion sets the optional parameter
12244// "options.requestedPolicyVersion": The policy format version to be
12245// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
12246// value will be rejected.Requests for policies with any conditional
12247// bindings must specify version 3. Policies without any conditional
12248// bindings may specify any valid value or leave the field unset.To
12249// learn which resources support conditions in their IAM policies, see
12250// the IAM documentation
12251// (https://cloud.google.com/iam/help/conditions/resource-policies).
12252func (c *ProjectsRegionsOperationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsRegionsOperationsGetIamPolicyCall {
12253	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
12254	return c
12255}
12256
12257// Fields allows partial responses to be retrieved. See
12258// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12259// for more information.
12260func (c *ProjectsRegionsOperationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsGetIamPolicyCall {
12261	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12262	return c
12263}
12264
12265// IfNoneMatch sets the optional parameter which makes the operation
12266// fail if the object's ETag matches the given value. This is useful for
12267// getting updates only after the object has changed since the last
12268// request. Use googleapi.IsNotModified to check whether the response
12269// error from Do is the result of In-None-Match.
12270func (c *ProjectsRegionsOperationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsRegionsOperationsGetIamPolicyCall {
12271	c.ifNoneMatch_ = entityTag
12272	return c
12273}
12274
12275// Context sets the context to be used in this call's Do method. Any
12276// pending HTTP request will be aborted if the provided context is
12277// canceled.
12278func (c *ProjectsRegionsOperationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsOperationsGetIamPolicyCall {
12279	c.ctx_ = ctx
12280	return c
12281}
12282
12283// Header returns an http.Header that can be modified by the caller to
12284// add HTTP headers to the request.
12285func (c *ProjectsRegionsOperationsGetIamPolicyCall) Header() http.Header {
12286	if c.header_ == nil {
12287		c.header_ = make(http.Header)
12288	}
12289	return c.header_
12290}
12291
12292func (c *ProjectsRegionsOperationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
12293	reqHeaders := make(http.Header)
12294	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
12295	for k, v := range c.header_ {
12296		reqHeaders[k] = v
12297	}
12298	reqHeaders.Set("User-Agent", c.s.userAgent())
12299	if c.ifNoneMatch_ != "" {
12300		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12301	}
12302	var body io.Reader = nil
12303	c.urlParams_.Set("alt", alt)
12304	c.urlParams_.Set("prettyPrint", "false")
12305	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
12306	urls += "?" + c.urlParams_.Encode()
12307	req, err := http.NewRequest("GET", urls, body)
12308	if err != nil {
12309		return nil, err
12310	}
12311	req.Header = reqHeaders
12312	googleapi.Expand(req.URL, map[string]string{
12313		"resource": c.resource,
12314	})
12315	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12316}
12317
12318// Do executes the "dataproc.projects.regions.operations.getIamPolicy" call.
12319// Exactly one of *Policy or error will be non-nil. Any non-2xx status
12320// code is an error. Response headers are in either
12321// *Policy.ServerResponse.Header or (if a response was returned at all)
12322// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12323// check whether the returned error was because http.StatusNotModified
12324// was returned.
12325func (c *ProjectsRegionsOperationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
12326	gensupport.SetOptions(c.urlParams_, opts...)
12327	res, err := c.doRequest("json")
12328	if res != nil && res.StatusCode == http.StatusNotModified {
12329		if res.Body != nil {
12330			res.Body.Close()
12331		}
12332		return nil, &googleapi.Error{
12333			Code:   res.StatusCode,
12334			Header: res.Header,
12335		}
12336	}
12337	if err != nil {
12338		return nil, err
12339	}
12340	defer googleapi.CloseBody(res)
12341	if err := googleapi.CheckResponse(res); err != nil {
12342		return nil, err
12343	}
12344	ret := &Policy{
12345		ServerResponse: googleapi.ServerResponse{
12346			Header:         res.Header,
12347			HTTPStatusCode: res.StatusCode,
12348		},
12349	}
12350	target := &ret
12351	if err := gensupport.DecodeResponse(target, res); err != nil {
12352		return nil, err
12353	}
12354	return ret, nil
12355	// {
12356	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
12357	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:getIamPolicy",
12358	//   "httpMethod": "GET",
12359	//   "id": "dataproc.projects.regions.operations.getIamPolicy",
12360	//   "parameterOrder": [
12361	//     "resource"
12362	//   ],
12363	//   "parameters": {
12364	//     "options.requestedPolicyVersion": {
12365	//       "description": "Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).",
12366	//       "format": "int32",
12367	//       "location": "query",
12368	//       "type": "integer"
12369	//     },
12370	//     "resource": {
12371	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
12372	//       "location": "path",
12373	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
12374	//       "required": true,
12375	//       "type": "string"
12376	//     }
12377	//   },
12378	//   "path": "v1beta2/{+resource}:getIamPolicy",
12379	//   "response": {
12380	//     "$ref": "Policy"
12381	//   },
12382	//   "scopes": [
12383	//     "https://www.googleapis.com/auth/cloud-platform"
12384	//   ]
12385	// }
12386
12387}
12388
12389// method id "dataproc.projects.regions.operations.list":
12390
12391type ProjectsRegionsOperationsListCall struct {
12392	s            *Service
12393	name         string
12394	urlParams_   gensupport.URLParams
12395	ifNoneMatch_ string
12396	ctx_         context.Context
12397	header_      http.Header
12398}
12399
12400// List: Lists operations that match the specified filter in the
12401// request. If the server doesn't support this method, it returns
12402// UNIMPLEMENTED.NOTE: the name binding allows API services to override
12403// the binding to use different resource name schemes, such as
12404// users/*/operations. To override the binding, API services can add a
12405// binding such as "/v1/{name=users/*}/operations" to their service
12406// configuration. For backwards compatibility, the default name includes
12407// the operations collection id, however overriding users must ensure
12408// the name binding is the parent resource, without the operations
12409// collection id.
12410func (r *ProjectsRegionsOperationsService) List(name string) *ProjectsRegionsOperationsListCall {
12411	c := &ProjectsRegionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12412	c.name = name
12413	return c
12414}
12415
12416// Filter sets the optional parameter "filter": The standard list
12417// filter.
12418func (c *ProjectsRegionsOperationsListCall) Filter(filter string) *ProjectsRegionsOperationsListCall {
12419	c.urlParams_.Set("filter", filter)
12420	return c
12421}
12422
12423// PageSize sets the optional parameter "pageSize": The standard list
12424// page size.
12425func (c *ProjectsRegionsOperationsListCall) PageSize(pageSize int64) *ProjectsRegionsOperationsListCall {
12426	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
12427	return c
12428}
12429
12430// PageToken sets the optional parameter "pageToken": The standard list
12431// page token.
12432func (c *ProjectsRegionsOperationsListCall) PageToken(pageToken string) *ProjectsRegionsOperationsListCall {
12433	c.urlParams_.Set("pageToken", pageToken)
12434	return c
12435}
12436
12437// Fields allows partial responses to be retrieved. See
12438// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12439// for more information.
12440func (c *ProjectsRegionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsListCall {
12441	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12442	return c
12443}
12444
12445// IfNoneMatch sets the optional parameter which makes the operation
12446// fail if the object's ETag matches the given value. This is useful for
12447// getting updates only after the object has changed since the last
12448// request. Use googleapi.IsNotModified to check whether the response
12449// error from Do is the result of In-None-Match.
12450func (c *ProjectsRegionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsRegionsOperationsListCall {
12451	c.ifNoneMatch_ = entityTag
12452	return c
12453}
12454
12455// Context sets the context to be used in this call's Do method. Any
12456// pending HTTP request will be aborted if the provided context is
12457// canceled.
12458func (c *ProjectsRegionsOperationsListCall) Context(ctx context.Context) *ProjectsRegionsOperationsListCall {
12459	c.ctx_ = ctx
12460	return c
12461}
12462
12463// Header returns an http.Header that can be modified by the caller to
12464// add HTTP headers to the request.
12465func (c *ProjectsRegionsOperationsListCall) Header() http.Header {
12466	if c.header_ == nil {
12467		c.header_ = make(http.Header)
12468	}
12469	return c.header_
12470}
12471
12472func (c *ProjectsRegionsOperationsListCall) doRequest(alt string) (*http.Response, error) {
12473	reqHeaders := make(http.Header)
12474	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
12475	for k, v := range c.header_ {
12476		reqHeaders[k] = v
12477	}
12478	reqHeaders.Set("User-Agent", c.s.userAgent())
12479	if c.ifNoneMatch_ != "" {
12480		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12481	}
12482	var body io.Reader = nil
12483	c.urlParams_.Set("alt", alt)
12484	c.urlParams_.Set("prettyPrint", "false")
12485	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
12486	urls += "?" + c.urlParams_.Encode()
12487	req, err := http.NewRequest("GET", urls, body)
12488	if err != nil {
12489		return nil, err
12490	}
12491	req.Header = reqHeaders
12492	googleapi.Expand(req.URL, map[string]string{
12493		"name": c.name,
12494	})
12495	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12496}
12497
12498// Do executes the "dataproc.projects.regions.operations.list" call.
12499// Exactly one of *ListOperationsResponse or error will be non-nil. Any
12500// non-2xx status code is an error. Response headers are in either
12501// *ListOperationsResponse.ServerResponse.Header or (if a response was
12502// returned at all) in error.(*googleapi.Error).Header. Use
12503// googleapi.IsNotModified to check whether the returned error was
12504// because http.StatusNotModified was returned.
12505func (c *ProjectsRegionsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
12506	gensupport.SetOptions(c.urlParams_, opts...)
12507	res, err := c.doRequest("json")
12508	if res != nil && res.StatusCode == http.StatusNotModified {
12509		if res.Body != nil {
12510			res.Body.Close()
12511		}
12512		return nil, &googleapi.Error{
12513			Code:   res.StatusCode,
12514			Header: res.Header,
12515		}
12516	}
12517	if err != nil {
12518		return nil, err
12519	}
12520	defer googleapi.CloseBody(res)
12521	if err := googleapi.CheckResponse(res); err != nil {
12522		return nil, err
12523	}
12524	ret := &ListOperationsResponse{
12525		ServerResponse: googleapi.ServerResponse{
12526			Header:         res.Header,
12527			HTTPStatusCode: res.StatusCode,
12528		},
12529	}
12530	target := &ret
12531	if err := gensupport.DecodeResponse(target, res); err != nil {
12532		return nil, err
12533	}
12534	return ret, nil
12535	// {
12536	//   "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.",
12537	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations",
12538	//   "httpMethod": "GET",
12539	//   "id": "dataproc.projects.regions.operations.list",
12540	//   "parameterOrder": [
12541	//     "name"
12542	//   ],
12543	//   "parameters": {
12544	//     "filter": {
12545	//       "description": "The standard list filter.",
12546	//       "location": "query",
12547	//       "type": "string"
12548	//     },
12549	//     "name": {
12550	//       "description": "The name of the operation's parent resource.",
12551	//       "location": "path",
12552	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations$",
12553	//       "required": true,
12554	//       "type": "string"
12555	//     },
12556	//     "pageSize": {
12557	//       "description": "The standard list page size.",
12558	//       "format": "int32",
12559	//       "location": "query",
12560	//       "type": "integer"
12561	//     },
12562	//     "pageToken": {
12563	//       "description": "The standard list page token.",
12564	//       "location": "query",
12565	//       "type": "string"
12566	//     }
12567	//   },
12568	//   "path": "v1beta2/{+name}",
12569	//   "response": {
12570	//     "$ref": "ListOperationsResponse"
12571	//   },
12572	//   "scopes": [
12573	//     "https://www.googleapis.com/auth/cloud-platform"
12574	//   ]
12575	// }
12576
12577}
12578
12579// Pages invokes f for each page of results.
12580// A non-nil error returned from f will halt the iteration.
12581// The provided context supersedes any context provided to the Context method.
12582func (c *ProjectsRegionsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
12583	c.ctx_ = ctx
12584	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
12585	for {
12586		x, err := c.Do()
12587		if err != nil {
12588			return err
12589		}
12590		if err := f(x); err != nil {
12591			return err
12592		}
12593		if x.NextPageToken == "" {
12594			return nil
12595		}
12596		c.PageToken(x.NextPageToken)
12597	}
12598}
12599
12600// method id "dataproc.projects.regions.operations.setIamPolicy":
12601
12602type ProjectsRegionsOperationsSetIamPolicyCall struct {
12603	s                   *Service
12604	resource            string
12605	setiampolicyrequest *SetIamPolicyRequest
12606	urlParams_          gensupport.URLParams
12607	ctx_                context.Context
12608	header_             http.Header
12609}
12610
12611// SetIamPolicy: Sets the access control policy on the specified
12612// resource. Replaces any existing policy.Can return NOT_FOUND,
12613// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
12614func (r *ProjectsRegionsOperationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsOperationsSetIamPolicyCall {
12615	c := &ProjectsRegionsOperationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12616	c.resource = resource
12617	c.setiampolicyrequest = setiampolicyrequest
12618	return c
12619}
12620
12621// Fields allows partial responses to be retrieved. See
12622// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12623// for more information.
12624func (c *ProjectsRegionsOperationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsSetIamPolicyCall {
12625	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12626	return c
12627}
12628
12629// Context sets the context to be used in this call's Do method. Any
12630// pending HTTP request will be aborted if the provided context is
12631// canceled.
12632func (c *ProjectsRegionsOperationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsOperationsSetIamPolicyCall {
12633	c.ctx_ = ctx
12634	return c
12635}
12636
12637// Header returns an http.Header that can be modified by the caller to
12638// add HTTP headers to the request.
12639func (c *ProjectsRegionsOperationsSetIamPolicyCall) Header() http.Header {
12640	if c.header_ == nil {
12641		c.header_ = make(http.Header)
12642	}
12643	return c.header_
12644}
12645
12646func (c *ProjectsRegionsOperationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
12647	reqHeaders := make(http.Header)
12648	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
12649	for k, v := range c.header_ {
12650		reqHeaders[k] = v
12651	}
12652	reqHeaders.Set("User-Agent", c.s.userAgent())
12653	var body io.Reader = nil
12654	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
12655	if err != nil {
12656		return nil, err
12657	}
12658	reqHeaders.Set("Content-Type", "application/json")
12659	c.urlParams_.Set("alt", alt)
12660	c.urlParams_.Set("prettyPrint", "false")
12661	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
12662	urls += "?" + c.urlParams_.Encode()
12663	req, err := http.NewRequest("POST", urls, body)
12664	if err != nil {
12665		return nil, err
12666	}
12667	req.Header = reqHeaders
12668	googleapi.Expand(req.URL, map[string]string{
12669		"resource": c.resource,
12670	})
12671	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12672}
12673
12674// Do executes the "dataproc.projects.regions.operations.setIamPolicy" call.
12675// Exactly one of *Policy or error will be non-nil. Any non-2xx status
12676// code is an error. Response headers are in either
12677// *Policy.ServerResponse.Header or (if a response was returned at all)
12678// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12679// check whether the returned error was because http.StatusNotModified
12680// was returned.
12681func (c *ProjectsRegionsOperationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
12682	gensupport.SetOptions(c.urlParams_, opts...)
12683	res, err := c.doRequest("json")
12684	if res != nil && res.StatusCode == http.StatusNotModified {
12685		if res.Body != nil {
12686			res.Body.Close()
12687		}
12688		return nil, &googleapi.Error{
12689			Code:   res.StatusCode,
12690			Header: res.Header,
12691		}
12692	}
12693	if err != nil {
12694		return nil, err
12695	}
12696	defer googleapi.CloseBody(res)
12697	if err := googleapi.CheckResponse(res); err != nil {
12698		return nil, err
12699	}
12700	ret := &Policy{
12701		ServerResponse: googleapi.ServerResponse{
12702			Header:         res.Header,
12703			HTTPStatusCode: res.StatusCode,
12704		},
12705	}
12706	target := &ret
12707	if err := gensupport.DecodeResponse(target, res); err != nil {
12708		return nil, err
12709	}
12710	return ret, nil
12711	// {
12712	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
12713	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:setIamPolicy",
12714	//   "httpMethod": "POST",
12715	//   "id": "dataproc.projects.regions.operations.setIamPolicy",
12716	//   "parameterOrder": [
12717	//     "resource"
12718	//   ],
12719	//   "parameters": {
12720	//     "resource": {
12721	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
12722	//       "location": "path",
12723	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
12724	//       "required": true,
12725	//       "type": "string"
12726	//     }
12727	//   },
12728	//   "path": "v1beta2/{+resource}:setIamPolicy",
12729	//   "request": {
12730	//     "$ref": "SetIamPolicyRequest"
12731	//   },
12732	//   "response": {
12733	//     "$ref": "Policy"
12734	//   },
12735	//   "scopes": [
12736	//     "https://www.googleapis.com/auth/cloud-platform"
12737	//   ]
12738	// }
12739
12740}
12741
12742// method id "dataproc.projects.regions.operations.testIamPermissions":
12743
12744type ProjectsRegionsOperationsTestIamPermissionsCall struct {
12745	s                         *Service
12746	resource                  string
12747	testiampermissionsrequest *TestIamPermissionsRequest
12748	urlParams_                gensupport.URLParams
12749	ctx_                      context.Context
12750	header_                   http.Header
12751}
12752
12753// TestIamPermissions: Returns permissions that a caller has on the
12754// specified resource. If the resource does not exist, this will return
12755// an empty set of permissions, not a NOT_FOUND error.Note: This
12756// operation is designed to be used for building permission-aware UIs
12757// and command-line tools, not for authorization checking. This
12758// operation may "fail open" without warning.
12759func (r *ProjectsRegionsOperationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsOperationsTestIamPermissionsCall {
12760	c := &ProjectsRegionsOperationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12761	c.resource = resource
12762	c.testiampermissionsrequest = testiampermissionsrequest
12763	return c
12764}
12765
12766// Fields allows partial responses to be retrieved. See
12767// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12768// for more information.
12769func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsTestIamPermissionsCall {
12770	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12771	return c
12772}
12773
12774// Context sets the context to be used in this call's Do method. Any
12775// pending HTTP request will be aborted if the provided context is
12776// canceled.
12777func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsOperationsTestIamPermissionsCall {
12778	c.ctx_ = ctx
12779	return c
12780}
12781
12782// Header returns an http.Header that can be modified by the caller to
12783// add HTTP headers to the request.
12784func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Header() http.Header {
12785	if c.header_ == nil {
12786		c.header_ = make(http.Header)
12787	}
12788	return c.header_
12789}
12790
12791func (c *ProjectsRegionsOperationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
12792	reqHeaders := make(http.Header)
12793	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
12794	for k, v := range c.header_ {
12795		reqHeaders[k] = v
12796	}
12797	reqHeaders.Set("User-Agent", c.s.userAgent())
12798	var body io.Reader = nil
12799	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
12800	if err != nil {
12801		return nil, err
12802	}
12803	reqHeaders.Set("Content-Type", "application/json")
12804	c.urlParams_.Set("alt", alt)
12805	c.urlParams_.Set("prettyPrint", "false")
12806	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
12807	urls += "?" + c.urlParams_.Encode()
12808	req, err := http.NewRequest("POST", urls, body)
12809	if err != nil {
12810		return nil, err
12811	}
12812	req.Header = reqHeaders
12813	googleapi.Expand(req.URL, map[string]string{
12814		"resource": c.resource,
12815	})
12816	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12817}
12818
12819// Do executes the "dataproc.projects.regions.operations.testIamPermissions" call.
12820// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
12821// Any non-2xx status code is an error. Response headers are in either
12822// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
12823// was returned at all) in error.(*googleapi.Error).Header. Use
12824// googleapi.IsNotModified to check whether the returned error was
12825// because http.StatusNotModified was returned.
12826func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
12827	gensupport.SetOptions(c.urlParams_, opts...)
12828	res, err := c.doRequest("json")
12829	if res != nil && res.StatusCode == http.StatusNotModified {
12830		if res.Body != nil {
12831			res.Body.Close()
12832		}
12833		return nil, &googleapi.Error{
12834			Code:   res.StatusCode,
12835			Header: res.Header,
12836		}
12837	}
12838	if err != nil {
12839		return nil, err
12840	}
12841	defer googleapi.CloseBody(res)
12842	if err := googleapi.CheckResponse(res); err != nil {
12843		return nil, err
12844	}
12845	ret := &TestIamPermissionsResponse{
12846		ServerResponse: googleapi.ServerResponse{
12847			Header:         res.Header,
12848			HTTPStatusCode: res.StatusCode,
12849		},
12850	}
12851	target := &ret
12852	if err := gensupport.DecodeResponse(target, res); err != nil {
12853		return nil, err
12854	}
12855	return ret, nil
12856	// {
12857	//   "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.",
12858	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:testIamPermissions",
12859	//   "httpMethod": "POST",
12860	//   "id": "dataproc.projects.regions.operations.testIamPermissions",
12861	//   "parameterOrder": [
12862	//     "resource"
12863	//   ],
12864	//   "parameters": {
12865	//     "resource": {
12866	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
12867	//       "location": "path",
12868	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
12869	//       "required": true,
12870	//       "type": "string"
12871	//     }
12872	//   },
12873	//   "path": "v1beta2/{+resource}:testIamPermissions",
12874	//   "request": {
12875	//     "$ref": "TestIamPermissionsRequest"
12876	//   },
12877	//   "response": {
12878	//     "$ref": "TestIamPermissionsResponse"
12879	//   },
12880	//   "scopes": [
12881	//     "https://www.googleapis.com/auth/cloud-platform"
12882	//   ]
12883	// }
12884
12885}
12886
12887// method id "dataproc.projects.regions.workflowTemplates.create":
12888
12889type ProjectsRegionsWorkflowTemplatesCreateCall struct {
12890	s                *Service
12891	parent           string
12892	workflowtemplate *WorkflowTemplate
12893	urlParams_       gensupport.URLParams
12894	ctx_             context.Context
12895	header_          http.Header
12896}
12897
12898// Create: Creates new workflow template.
12899func (r *ProjectsRegionsWorkflowTemplatesService) Create(parent string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesCreateCall {
12900	c := &ProjectsRegionsWorkflowTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12901	c.parent = parent
12902	c.workflowtemplate = workflowtemplate
12903	return c
12904}
12905
12906// Fields allows partial responses to be retrieved. See
12907// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12908// for more information.
12909func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesCreateCall {
12910	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12911	return c
12912}
12913
12914// Context sets the context to be used in this call's Do method. Any
12915// pending HTTP request will be aborted if the provided context is
12916// canceled.
12917func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesCreateCall {
12918	c.ctx_ = ctx
12919	return c
12920}
12921
12922// Header returns an http.Header that can be modified by the caller to
12923// add HTTP headers to the request.
12924func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Header() http.Header {
12925	if c.header_ == nil {
12926		c.header_ = make(http.Header)
12927	}
12928	return c.header_
12929}
12930
12931func (c *ProjectsRegionsWorkflowTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
12932	reqHeaders := make(http.Header)
12933	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
12934	for k, v := range c.header_ {
12935		reqHeaders[k] = v
12936	}
12937	reqHeaders.Set("User-Agent", c.s.userAgent())
12938	var body io.Reader = nil
12939	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
12940	if err != nil {
12941		return nil, err
12942	}
12943	reqHeaders.Set("Content-Type", "application/json")
12944	c.urlParams_.Set("alt", alt)
12945	c.urlParams_.Set("prettyPrint", "false")
12946	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates")
12947	urls += "?" + c.urlParams_.Encode()
12948	req, err := http.NewRequest("POST", urls, body)
12949	if err != nil {
12950		return nil, err
12951	}
12952	req.Header = reqHeaders
12953	googleapi.Expand(req.URL, map[string]string{
12954		"parent": c.parent,
12955	})
12956	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12957}
12958
12959// Do executes the "dataproc.projects.regions.workflowTemplates.create" call.
12960// Exactly one of *WorkflowTemplate or error will be non-nil. Any
12961// non-2xx status code is an error. Response headers are in either
12962// *WorkflowTemplate.ServerResponse.Header or (if a response was
12963// returned at all) in error.(*googleapi.Error).Header. Use
12964// googleapi.IsNotModified to check whether the returned error was
12965// because http.StatusNotModified was returned.
12966func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
12967	gensupport.SetOptions(c.urlParams_, opts...)
12968	res, err := c.doRequest("json")
12969	if res != nil && res.StatusCode == http.StatusNotModified {
12970		if res.Body != nil {
12971			res.Body.Close()
12972		}
12973		return nil, &googleapi.Error{
12974			Code:   res.StatusCode,
12975			Header: res.Header,
12976		}
12977	}
12978	if err != nil {
12979		return nil, err
12980	}
12981	defer googleapi.CloseBody(res)
12982	if err := googleapi.CheckResponse(res); err != nil {
12983		return nil, err
12984	}
12985	ret := &WorkflowTemplate{
12986		ServerResponse: googleapi.ServerResponse{
12987			Header:         res.Header,
12988			HTTPStatusCode: res.StatusCode,
12989		},
12990	}
12991	target := &ret
12992	if err := gensupport.DecodeResponse(target, res); err != nil {
12993		return nil, err
12994	}
12995	return ret, nil
12996	// {
12997	//   "description": "Creates new workflow template.",
12998	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates",
12999	//   "httpMethod": "POST",
13000	//   "id": "dataproc.projects.regions.workflowTemplates.create",
13001	//   "parameterOrder": [
13002	//     "parent"
13003	//   ],
13004	//   "parameters": {
13005	//     "parent": {
13006	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates,create, the resource name of the region has the following format: projects/{project_id}/regions/{region} For projects.locations.workflowTemplates.create, the resource name of the location has the following format: projects/{project_id}/locations/{location}",
13007	//       "location": "path",
13008	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
13009	//       "required": true,
13010	//       "type": "string"
13011	//     }
13012	//   },
13013	//   "path": "v1beta2/{+parent}/workflowTemplates",
13014	//   "request": {
13015	//     "$ref": "WorkflowTemplate"
13016	//   },
13017	//   "response": {
13018	//     "$ref": "WorkflowTemplate"
13019	//   },
13020	//   "scopes": [
13021	//     "https://www.googleapis.com/auth/cloud-platform"
13022	//   ]
13023	// }
13024
13025}
13026
13027// method id "dataproc.projects.regions.workflowTemplates.delete":
13028
13029type ProjectsRegionsWorkflowTemplatesDeleteCall struct {
13030	s          *Service
13031	name       string
13032	urlParams_ gensupport.URLParams
13033	ctx_       context.Context
13034	header_    http.Header
13035}
13036
13037// Delete: Deletes a workflow template. It does not cancel in-progress
13038// workflows.
13039func (r *ProjectsRegionsWorkflowTemplatesService) Delete(name string) *ProjectsRegionsWorkflowTemplatesDeleteCall {
13040	c := &ProjectsRegionsWorkflowTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13041	c.name = name
13042	return c
13043}
13044
13045// Version sets the optional parameter "version": The version of
13046// workflow template to delete. If specified, will only delete the
13047// template if the current server version matches specified version.
13048func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Version(version int64) *ProjectsRegionsWorkflowTemplatesDeleteCall {
13049	c.urlParams_.Set("version", fmt.Sprint(version))
13050	return c
13051}
13052
13053// Fields allows partial responses to be retrieved. See
13054// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13055// for more information.
13056func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesDeleteCall {
13057	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13058	return c
13059}
13060
13061// Context sets the context to be used in this call's Do method. Any
13062// pending HTTP request will be aborted if the provided context is
13063// canceled.
13064func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesDeleteCall {
13065	c.ctx_ = ctx
13066	return c
13067}
13068
13069// Header returns an http.Header that can be modified by the caller to
13070// add HTTP headers to the request.
13071func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Header() http.Header {
13072	if c.header_ == nil {
13073		c.header_ = make(http.Header)
13074	}
13075	return c.header_
13076}
13077
13078func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
13079	reqHeaders := make(http.Header)
13080	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
13081	for k, v := range c.header_ {
13082		reqHeaders[k] = v
13083	}
13084	reqHeaders.Set("User-Agent", c.s.userAgent())
13085	var body io.Reader = nil
13086	c.urlParams_.Set("alt", alt)
13087	c.urlParams_.Set("prettyPrint", "false")
13088	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
13089	urls += "?" + c.urlParams_.Encode()
13090	req, err := http.NewRequest("DELETE", urls, body)
13091	if err != nil {
13092		return nil, err
13093	}
13094	req.Header = reqHeaders
13095	googleapi.Expand(req.URL, map[string]string{
13096		"name": c.name,
13097	})
13098	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13099}
13100
13101// Do executes the "dataproc.projects.regions.workflowTemplates.delete" call.
13102// Exactly one of *Empty or error will be non-nil. Any non-2xx status
13103// code is an error. Response headers are in either
13104// *Empty.ServerResponse.Header or (if a response was returned at all)
13105// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13106// check whether the returned error was because http.StatusNotModified
13107// was returned.
13108func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
13109	gensupport.SetOptions(c.urlParams_, opts...)
13110	res, err := c.doRequest("json")
13111	if res != nil && res.StatusCode == http.StatusNotModified {
13112		if res.Body != nil {
13113			res.Body.Close()
13114		}
13115		return nil, &googleapi.Error{
13116			Code:   res.StatusCode,
13117			Header: res.Header,
13118		}
13119	}
13120	if err != nil {
13121		return nil, err
13122	}
13123	defer googleapi.CloseBody(res)
13124	if err := googleapi.CheckResponse(res); err != nil {
13125		return nil, err
13126	}
13127	ret := &Empty{
13128		ServerResponse: googleapi.ServerResponse{
13129			Header:         res.Header,
13130			HTTPStatusCode: res.StatusCode,
13131		},
13132	}
13133	target := &ret
13134	if err := gensupport.DecodeResponse(target, res); err != nil {
13135		return nil, err
13136	}
13137	return ret, nil
13138	// {
13139	//   "description": "Deletes a workflow template. It does not cancel in-progress workflows.",
13140	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}",
13141	//   "httpMethod": "DELETE",
13142	//   "id": "dataproc.projects.regions.workflowTemplates.delete",
13143	//   "parameterOrder": [
13144	//     "name"
13145	//   ],
13146	//   "parameters": {
13147	//     "name": {
13148	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates.delete, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id} For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
13149	//       "location": "path",
13150	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
13151	//       "required": true,
13152	//       "type": "string"
13153	//     },
13154	//     "version": {
13155	//       "description": "Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.",
13156	//       "format": "int32",
13157	//       "location": "query",
13158	//       "type": "integer"
13159	//     }
13160	//   },
13161	//   "path": "v1beta2/{+name}",
13162	//   "response": {
13163	//     "$ref": "Empty"
13164	//   },
13165	//   "scopes": [
13166	//     "https://www.googleapis.com/auth/cloud-platform"
13167	//   ]
13168	// }
13169
13170}
13171
13172// method id "dataproc.projects.regions.workflowTemplates.get":
13173
13174type ProjectsRegionsWorkflowTemplatesGetCall struct {
13175	s            *Service
13176	name         string
13177	urlParams_   gensupport.URLParams
13178	ifNoneMatch_ string
13179	ctx_         context.Context
13180	header_      http.Header
13181}
13182
13183// Get: Retrieves the latest workflow template.Can retrieve previously
13184// instantiated template by specifying optional version parameter.
13185func (r *ProjectsRegionsWorkflowTemplatesService) Get(name string) *ProjectsRegionsWorkflowTemplatesGetCall {
13186	c := &ProjectsRegionsWorkflowTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13187	c.name = name
13188	return c
13189}
13190
13191// Version sets the optional parameter "version": The version of
13192// workflow template to retrieve. Only previously instantiated versions
13193// can be retrieved.If unspecified, retrieves the current version.
13194func (c *ProjectsRegionsWorkflowTemplatesGetCall) Version(version int64) *ProjectsRegionsWorkflowTemplatesGetCall {
13195	c.urlParams_.Set("version", fmt.Sprint(version))
13196	return c
13197}
13198
13199// Fields allows partial responses to be retrieved. See
13200// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13201// for more information.
13202func (c *ProjectsRegionsWorkflowTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesGetCall {
13203	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13204	return c
13205}
13206
13207// IfNoneMatch sets the optional parameter which makes the operation
13208// fail if the object's ETag matches the given value. This is useful for
13209// getting updates only after the object has changed since the last
13210// request. Use googleapi.IsNotModified to check whether the response
13211// error from Do is the result of In-None-Match.
13212func (c *ProjectsRegionsWorkflowTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsWorkflowTemplatesGetCall {
13213	c.ifNoneMatch_ = entityTag
13214	return c
13215}
13216
13217// Context sets the context to be used in this call's Do method. Any
13218// pending HTTP request will be aborted if the provided context is
13219// canceled.
13220func (c *ProjectsRegionsWorkflowTemplatesGetCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesGetCall {
13221	c.ctx_ = ctx
13222	return c
13223}
13224
13225// Header returns an http.Header that can be modified by the caller to
13226// add HTTP headers to the request.
13227func (c *ProjectsRegionsWorkflowTemplatesGetCall) Header() http.Header {
13228	if c.header_ == nil {
13229		c.header_ = make(http.Header)
13230	}
13231	return c.header_
13232}
13233
13234func (c *ProjectsRegionsWorkflowTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
13235	reqHeaders := make(http.Header)
13236	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
13237	for k, v := range c.header_ {
13238		reqHeaders[k] = v
13239	}
13240	reqHeaders.Set("User-Agent", c.s.userAgent())
13241	if c.ifNoneMatch_ != "" {
13242		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13243	}
13244	var body io.Reader = nil
13245	c.urlParams_.Set("alt", alt)
13246	c.urlParams_.Set("prettyPrint", "false")
13247	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
13248	urls += "?" + c.urlParams_.Encode()
13249	req, err := http.NewRequest("GET", urls, body)
13250	if err != nil {
13251		return nil, err
13252	}
13253	req.Header = reqHeaders
13254	googleapi.Expand(req.URL, map[string]string{
13255		"name": c.name,
13256	})
13257	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13258}
13259
13260// Do executes the "dataproc.projects.regions.workflowTemplates.get" call.
13261// Exactly one of *WorkflowTemplate or error will be non-nil. Any
13262// non-2xx status code is an error. Response headers are in either
13263// *WorkflowTemplate.ServerResponse.Header or (if a response was
13264// returned at all) in error.(*googleapi.Error).Header. Use
13265// googleapi.IsNotModified to check whether the returned error was
13266// because http.StatusNotModified was returned.
13267func (c *ProjectsRegionsWorkflowTemplatesGetCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
13268	gensupport.SetOptions(c.urlParams_, opts...)
13269	res, err := c.doRequest("json")
13270	if res != nil && res.StatusCode == http.StatusNotModified {
13271		if res.Body != nil {
13272			res.Body.Close()
13273		}
13274		return nil, &googleapi.Error{
13275			Code:   res.StatusCode,
13276			Header: res.Header,
13277		}
13278	}
13279	if err != nil {
13280		return nil, err
13281	}
13282	defer googleapi.CloseBody(res)
13283	if err := googleapi.CheckResponse(res); err != nil {
13284		return nil, err
13285	}
13286	ret := &WorkflowTemplate{
13287		ServerResponse: googleapi.ServerResponse{
13288			Header:         res.Header,
13289			HTTPStatusCode: res.StatusCode,
13290		},
13291	}
13292	target := &ret
13293	if err := gensupport.DecodeResponse(target, res); err != nil {
13294		return nil, err
13295	}
13296	return ret, nil
13297	// {
13298	//   "description": "Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.",
13299	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}",
13300	//   "httpMethod": "GET",
13301	//   "id": "dataproc.projects.regions.workflowTemplates.get",
13302	//   "parameterOrder": [
13303	//     "name"
13304	//   ],
13305	//   "parameters": {
13306	//     "name": {
13307	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id} For projects.locations.workflowTemplates.get, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
13308	//       "location": "path",
13309	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
13310	//       "required": true,
13311	//       "type": "string"
13312	//     },
13313	//     "version": {
13314	//       "description": "Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.If unspecified, retrieves the current version.",
13315	//       "format": "int32",
13316	//       "location": "query",
13317	//       "type": "integer"
13318	//     }
13319	//   },
13320	//   "path": "v1beta2/{+name}",
13321	//   "response": {
13322	//     "$ref": "WorkflowTemplate"
13323	//   },
13324	//   "scopes": [
13325	//     "https://www.googleapis.com/auth/cloud-platform"
13326	//   ]
13327	// }
13328
13329}
13330
13331// method id "dataproc.projects.regions.workflowTemplates.getIamPolicy":
13332
13333type ProjectsRegionsWorkflowTemplatesGetIamPolicyCall struct {
13334	s            *Service
13335	resource     string
13336	urlParams_   gensupport.URLParams
13337	ifNoneMatch_ string
13338	ctx_         context.Context
13339	header_      http.Header
13340}
13341
13342// GetIamPolicy: Gets the access control policy for a resource. Returns
13343// an empty policy if the resource exists and does not have a policy
13344// set.
13345func (r *ProjectsRegionsWorkflowTemplatesService) GetIamPolicy(resource string) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
13346	c := &ProjectsRegionsWorkflowTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13347	c.resource = resource
13348	return c
13349}
13350
13351// OptionsRequestedPolicyVersion sets the optional parameter
13352// "options.requestedPolicyVersion": The policy format version to be
13353// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
13354// value will be rejected.Requests for policies with any conditional
13355// bindings must specify version 3. Policies without any conditional
13356// bindings may specify any valid value or leave the field unset.To
13357// learn which resources support conditions in their IAM policies, see
13358// the IAM documentation
13359// (https://cloud.google.com/iam/help/conditions/resource-policies).
13360func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
13361	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
13362	return c
13363}
13364
13365// Fields allows partial responses to be retrieved. See
13366// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13367// for more information.
13368func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
13369	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13370	return c
13371}
13372
13373// IfNoneMatch sets the optional parameter which makes the operation
13374// fail if the object's ETag matches the given value. This is useful for
13375// getting updates only after the object has changed since the last
13376// request. Use googleapi.IsNotModified to check whether the response
13377// error from Do is the result of In-None-Match.
13378func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
13379	c.ifNoneMatch_ = entityTag
13380	return c
13381}
13382
13383// Context sets the context to be used in this call's Do method. Any
13384// pending HTTP request will be aborted if the provided context is
13385// canceled.
13386func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
13387	c.ctx_ = ctx
13388	return c
13389}
13390
13391// Header returns an http.Header that can be modified by the caller to
13392// add HTTP headers to the request.
13393func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Header() http.Header {
13394	if c.header_ == nil {
13395		c.header_ = make(http.Header)
13396	}
13397	return c.header_
13398}
13399
13400func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13401	reqHeaders := make(http.Header)
13402	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
13403	for k, v := range c.header_ {
13404		reqHeaders[k] = v
13405	}
13406	reqHeaders.Set("User-Agent", c.s.userAgent())
13407	if c.ifNoneMatch_ != "" {
13408		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13409	}
13410	var body io.Reader = nil
13411	c.urlParams_.Set("alt", alt)
13412	c.urlParams_.Set("prettyPrint", "false")
13413	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
13414	urls += "?" + c.urlParams_.Encode()
13415	req, err := http.NewRequest("GET", urls, body)
13416	if err != nil {
13417		return nil, err
13418	}
13419	req.Header = reqHeaders
13420	googleapi.Expand(req.URL, map[string]string{
13421		"resource": c.resource,
13422	})
13423	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13424}
13425
13426// Do executes the "dataproc.projects.regions.workflowTemplates.getIamPolicy" call.
13427// Exactly one of *Policy or error will be non-nil. Any non-2xx status
13428// code is an error. Response headers are in either
13429// *Policy.ServerResponse.Header or (if a response was returned at all)
13430// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13431// check whether the returned error was because http.StatusNotModified
13432// was returned.
13433func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13434	gensupport.SetOptions(c.urlParams_, opts...)
13435	res, err := c.doRequest("json")
13436	if res != nil && res.StatusCode == http.StatusNotModified {
13437		if res.Body != nil {
13438			res.Body.Close()
13439		}
13440		return nil, &googleapi.Error{
13441			Code:   res.StatusCode,
13442			Header: res.Header,
13443		}
13444	}
13445	if err != nil {
13446		return nil, err
13447	}
13448	defer googleapi.CloseBody(res)
13449	if err := googleapi.CheckResponse(res); err != nil {
13450		return nil, err
13451	}
13452	ret := &Policy{
13453		ServerResponse: googleapi.ServerResponse{
13454			Header:         res.Header,
13455			HTTPStatusCode: res.StatusCode,
13456		},
13457	}
13458	target := &ret
13459	if err := gensupport.DecodeResponse(target, res); err != nil {
13460		return nil, err
13461	}
13462	return ret, nil
13463	// {
13464	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
13465	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:getIamPolicy",
13466	//   "httpMethod": "GET",
13467	//   "id": "dataproc.projects.regions.workflowTemplates.getIamPolicy",
13468	//   "parameterOrder": [
13469	//     "resource"
13470	//   ],
13471	//   "parameters": {
13472	//     "options.requestedPolicyVersion": {
13473	//       "description": "Optional. The policy format version to be returned.Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected.Requests for policies with any conditional bindings must specify version 3. Policies without any conditional bindings may specify any valid value or leave the field unset.To learn which resources support conditions in their IAM policies, see the IAM documentation (https://cloud.google.com/iam/help/conditions/resource-policies).",
13474	//       "format": "int32",
13475	//       "location": "query",
13476	//       "type": "integer"
13477	//     },
13478	//     "resource": {
13479	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
13480	//       "location": "path",
13481	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
13482	//       "required": true,
13483	//       "type": "string"
13484	//     }
13485	//   },
13486	//   "path": "v1beta2/{+resource}:getIamPolicy",
13487	//   "response": {
13488	//     "$ref": "Policy"
13489	//   },
13490	//   "scopes": [
13491	//     "https://www.googleapis.com/auth/cloud-platform"
13492	//   ]
13493	// }
13494
13495}
13496
13497// method id "dataproc.projects.regions.workflowTemplates.instantiate":
13498
13499type ProjectsRegionsWorkflowTemplatesInstantiateCall struct {
13500	s                                  *Service
13501	name                               string
13502	instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest
13503	urlParams_                         gensupport.URLParams
13504	ctx_                               context.Context
13505	header_                            http.Header
13506}
13507
13508// Instantiate: Instantiates a template and begins execution.The
13509// returned Operation can be used to track execution of workflow by
13510// polling operations.get. The Operation will complete when entire
13511// workflow is finished.The running workflow can be aborted via
13512// operations.cancel. This will cause any inflight jobs to be cancelled
13513// and workflow-owned clusters to be deleted.The Operation.metadata will
13514// be WorkflowMetadata
13515// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
13516// aproc.v1beta2#workflowmetadata). Also see Using WorkflowMetadata
13517// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#u
13518// sing_workflowmetadata).On successful completion, Operation.response
13519// will be Empty.
13520func (r *ProjectsRegionsWorkflowTemplatesService) Instantiate(name string, instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
13521	c := &ProjectsRegionsWorkflowTemplatesInstantiateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13522	c.name = name
13523	c.instantiateworkflowtemplaterequest = instantiateworkflowtemplaterequest
13524	return c
13525}
13526
13527// Fields allows partial responses to be retrieved. See
13528// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13529// for more information.
13530func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
13531	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13532	return c
13533}
13534
13535// Context sets the context to be used in this call's Do method. Any
13536// pending HTTP request will be aborted if the provided context is
13537// canceled.
13538func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
13539	c.ctx_ = ctx
13540	return c
13541}
13542
13543// Header returns an http.Header that can be modified by the caller to
13544// add HTTP headers to the request.
13545func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Header() http.Header {
13546	if c.header_ == nil {
13547		c.header_ = make(http.Header)
13548	}
13549	return c.header_
13550}
13551
13552func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) doRequest(alt string) (*http.Response, error) {
13553	reqHeaders := make(http.Header)
13554	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
13555	for k, v := range c.header_ {
13556		reqHeaders[k] = v
13557	}
13558	reqHeaders.Set("User-Agent", c.s.userAgent())
13559	var body io.Reader = nil
13560	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantiateworkflowtemplaterequest)
13561	if err != nil {
13562		return nil, err
13563	}
13564	reqHeaders.Set("Content-Type", "application/json")
13565	c.urlParams_.Set("alt", alt)
13566	c.urlParams_.Set("prettyPrint", "false")
13567	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:instantiate")
13568	urls += "?" + c.urlParams_.Encode()
13569	req, err := http.NewRequest("POST", urls, body)
13570	if err != nil {
13571		return nil, err
13572	}
13573	req.Header = reqHeaders
13574	googleapi.Expand(req.URL, map[string]string{
13575		"name": c.name,
13576	})
13577	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13578}
13579
13580// Do executes the "dataproc.projects.regions.workflowTemplates.instantiate" call.
13581// Exactly one of *Operation or error will be non-nil. Any non-2xx
13582// status code is an error. Response headers are in either
13583// *Operation.ServerResponse.Header or (if a response was returned at
13584// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13585// to check whether the returned error was because
13586// http.StatusNotModified was returned.
13587func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13588	gensupport.SetOptions(c.urlParams_, opts...)
13589	res, err := c.doRequest("json")
13590	if res != nil && res.StatusCode == http.StatusNotModified {
13591		if res.Body != nil {
13592			res.Body.Close()
13593		}
13594		return nil, &googleapi.Error{
13595			Code:   res.StatusCode,
13596			Header: res.Header,
13597		}
13598	}
13599	if err != nil {
13600		return nil, err
13601	}
13602	defer googleapi.CloseBody(res)
13603	if err := googleapi.CheckResponse(res); err != nil {
13604		return nil, err
13605	}
13606	ret := &Operation{
13607		ServerResponse: googleapi.ServerResponse{
13608			Header:         res.Header,
13609			HTTPStatusCode: res.StatusCode,
13610		},
13611	}
13612	target := &ret
13613	if err := gensupport.DecodeResponse(target, res); err != nil {
13614		return nil, err
13615	}
13616	return ret, nil
13617	// {
13618	//   "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.v1beta2#workflowmetadata). Also see Using WorkflowMetadata (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On successful completion, Operation.response will be Empty.",
13619	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:instantiate",
13620	//   "httpMethod": "POST",
13621	//   "id": "dataproc.projects.regions.workflowTemplates.instantiate",
13622	//   "parameterOrder": [
13623	//     "name"
13624	//   ],
13625	//   "parameters": {
13626	//     "name": {
13627	//       "description": "Required. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id} For projects.locations.workflowTemplates.instantiate, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
13628	//       "location": "path",
13629	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
13630	//       "required": true,
13631	//       "type": "string"
13632	//     }
13633	//   },
13634	//   "path": "v1beta2/{+name}:instantiate",
13635	//   "request": {
13636	//     "$ref": "InstantiateWorkflowTemplateRequest"
13637	//   },
13638	//   "response": {
13639	//     "$ref": "Operation"
13640	//   },
13641	//   "scopes": [
13642	//     "https://www.googleapis.com/auth/cloud-platform"
13643	//   ]
13644	// }
13645
13646}
13647
13648// method id "dataproc.projects.regions.workflowTemplates.instantiateInline":
13649
13650type ProjectsRegionsWorkflowTemplatesInstantiateInlineCall struct {
13651	s                *Service
13652	parent           string
13653	workflowtemplate *WorkflowTemplate
13654	urlParams_       gensupport.URLParams
13655	ctx_             context.Context
13656	header_          http.Header
13657}
13658
13659// InstantiateInline: Instantiates a template and begins execution.This
13660// method is equivalent to executing the sequence
13661// CreateWorkflowTemplate, InstantiateWorkflowTemplate,
13662// DeleteWorkflowTemplate.The returned Operation can be used to track
13663// execution of workflow by polling operations.get. The Operation will
13664// complete when entire workflow is finished.The running workflow can be
13665// aborted via operations.cancel. This will cause any inflight jobs to
13666// be cancelled and workflow-owned clusters to be deleted.The
13667// Operation.metadata will be WorkflowMetadata
13668// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dat
13669// aproc.v1#workflowmetadata). Also see Using WorkflowMetadata
13670// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#u
13671// sing_workflowmetadata).On successful completion, Operation.response
13672// will be Empty.
13673func (r *ProjectsRegionsWorkflowTemplatesService) InstantiateInline(parent string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
13674	c := &ProjectsRegionsWorkflowTemplatesInstantiateInlineCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13675	c.parent = parent
13676	c.workflowtemplate = workflowtemplate
13677	return c
13678}
13679
13680// InstanceId sets the optional parameter "instanceId": Deprecated.
13681// Please use request_id field instead.
13682func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) InstanceId(instanceId string) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
13683	c.urlParams_.Set("instanceId", instanceId)
13684	return c
13685}
13686
13687// RequestId sets the optional parameter "requestId": A tag that
13688// prevents multiple concurrent workflow instances with the same tag
13689// from running. This mitigates risk of concurrent instances started due
13690// to retries.It is recommended to always set this value to a UUID
13691// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag
13692// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
13693// and hyphens (-). The maximum length is 40 characters.
13694func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) RequestId(requestId string) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
13695	c.urlParams_.Set("requestId", requestId)
13696	return c
13697}
13698
13699// Fields allows partial responses to be retrieved. See
13700// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13701// for more information.
13702func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
13703	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13704	return c
13705}
13706
13707// Context sets the context to be used in this call's Do method. Any
13708// pending HTTP request will be aborted if the provided context is
13709// canceled.
13710func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
13711	c.ctx_ = ctx
13712	return c
13713}
13714
13715// Header returns an http.Header that can be modified by the caller to
13716// add HTTP headers to the request.
13717func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Header() http.Header {
13718	if c.header_ == nil {
13719		c.header_ = make(http.Header)
13720	}
13721	return c.header_
13722}
13723
13724func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) doRequest(alt string) (*http.Response, error) {
13725	reqHeaders := make(http.Header)
13726	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
13727	for k, v := range c.header_ {
13728		reqHeaders[k] = v
13729	}
13730	reqHeaders.Set("User-Agent", c.s.userAgent())
13731	var body io.Reader = nil
13732	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
13733	if err != nil {
13734		return nil, err
13735	}
13736	reqHeaders.Set("Content-Type", "application/json")
13737	c.urlParams_.Set("alt", alt)
13738	c.urlParams_.Set("prettyPrint", "false")
13739	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates:instantiateInline")
13740	urls += "?" + c.urlParams_.Encode()
13741	req, err := http.NewRequest("POST", urls, body)
13742	if err != nil {
13743		return nil, err
13744	}
13745	req.Header = reqHeaders
13746	googleapi.Expand(req.URL, map[string]string{
13747		"parent": c.parent,
13748	})
13749	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13750}
13751
13752// Do executes the "dataproc.projects.regions.workflowTemplates.instantiateInline" call.
13753// Exactly one of *Operation or error will be non-nil. Any non-2xx
13754// status code is an error. Response headers are in either
13755// *Operation.ServerResponse.Header or (if a response was returned at
13756// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
13757// to check whether the returned error was because
13758// http.StatusNotModified was returned.
13759func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
13760	gensupport.SetOptions(c.urlParams_, opts...)
13761	res, err := c.doRequest("json")
13762	if res != nil && res.StatusCode == http.StatusNotModified {
13763		if res.Body != nil {
13764			res.Body.Close()
13765		}
13766		return nil, &googleapi.Error{
13767			Code:   res.StatusCode,
13768			Header: res.Header,
13769		}
13770	}
13771	if err != nil {
13772		return nil, err
13773	}
13774	defer googleapi.CloseBody(res)
13775	if err := googleapi.CheckResponse(res); err != nil {
13776		return nil, err
13777	}
13778	ret := &Operation{
13779		ServerResponse: googleapi.ServerResponse{
13780			Header:         res.Header,
13781			HTTPStatusCode: res.StatusCode,
13782		},
13783	}
13784	target := &ret
13785	if err := gensupport.DecodeResponse(target, res); err != nil {
13786		return nil, err
13787	}
13788	return ret, nil
13789	// {
13790	//   "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.",
13791	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates:instantiateInline",
13792	//   "httpMethod": "POST",
13793	//   "id": "dataproc.projects.regions.workflowTemplates.instantiateInline",
13794	//   "parameterOrder": [
13795	//     "parent"
13796	//   ],
13797	//   "parameters": {
13798	//     "instanceId": {
13799	//       "description": "Deprecated. Please use request_id field instead.",
13800	//       "location": "query",
13801	//       "type": "string"
13802	//     },
13803	//     "parent": {
13804	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates,instantiateinline, the resource name of the region has the following format: projects/{project_id}/regions/{region} For projects.locations.workflowTemplates.instantiateinline, the resource name of the location has the following format: projects/{project_id}/locations/{location}",
13805	//       "location": "path",
13806	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
13807	//       "required": true,
13808	//       "type": "string"
13809	//     },
13810	//     "requestId": {
13811	//       "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.",
13812	//       "location": "query",
13813	//       "type": "string"
13814	//     }
13815	//   },
13816	//   "path": "v1beta2/{+parent}/workflowTemplates:instantiateInline",
13817	//   "request": {
13818	//     "$ref": "WorkflowTemplate"
13819	//   },
13820	//   "response": {
13821	//     "$ref": "Operation"
13822	//   },
13823	//   "scopes": [
13824	//     "https://www.googleapis.com/auth/cloud-platform"
13825	//   ]
13826	// }
13827
13828}
13829
13830// method id "dataproc.projects.regions.workflowTemplates.list":
13831
13832type ProjectsRegionsWorkflowTemplatesListCall struct {
13833	s            *Service
13834	parent       string
13835	urlParams_   gensupport.URLParams
13836	ifNoneMatch_ string
13837	ctx_         context.Context
13838	header_      http.Header
13839}
13840
13841// List: Lists workflows that match the specified filter in the request.
13842func (r *ProjectsRegionsWorkflowTemplatesService) List(parent string) *ProjectsRegionsWorkflowTemplatesListCall {
13843	c := &ProjectsRegionsWorkflowTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13844	c.parent = parent
13845	return c
13846}
13847
13848// PageSize sets the optional parameter "pageSize": The maximum number
13849// of results to return in each response.
13850func (c *ProjectsRegionsWorkflowTemplatesListCall) PageSize(pageSize int64) *ProjectsRegionsWorkflowTemplatesListCall {
13851	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13852	return c
13853}
13854
13855// PageToken sets the optional parameter "pageToken": The page token,
13856// returned by a previous call, to request the next page of results.
13857func (c *ProjectsRegionsWorkflowTemplatesListCall) PageToken(pageToken string) *ProjectsRegionsWorkflowTemplatesListCall {
13858	c.urlParams_.Set("pageToken", pageToken)
13859	return c
13860}
13861
13862// Fields allows partial responses to be retrieved. See
13863// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13864// for more information.
13865func (c *ProjectsRegionsWorkflowTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesListCall {
13866	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13867	return c
13868}
13869
13870// IfNoneMatch sets the optional parameter which makes the operation
13871// fail if the object's ETag matches the given value. This is useful for
13872// getting updates only after the object has changed since the last
13873// request. Use googleapi.IsNotModified to check whether the response
13874// error from Do is the result of In-None-Match.
13875func (c *ProjectsRegionsWorkflowTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsRegionsWorkflowTemplatesListCall {
13876	c.ifNoneMatch_ = entityTag
13877	return c
13878}
13879
13880// Context sets the context to be used in this call's Do method. Any
13881// pending HTTP request will be aborted if the provided context is
13882// canceled.
13883func (c *ProjectsRegionsWorkflowTemplatesListCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesListCall {
13884	c.ctx_ = ctx
13885	return c
13886}
13887
13888// Header returns an http.Header that can be modified by the caller to
13889// add HTTP headers to the request.
13890func (c *ProjectsRegionsWorkflowTemplatesListCall) Header() http.Header {
13891	if c.header_ == nil {
13892		c.header_ = make(http.Header)
13893	}
13894	return c.header_
13895}
13896
13897func (c *ProjectsRegionsWorkflowTemplatesListCall) doRequest(alt string) (*http.Response, error) {
13898	reqHeaders := make(http.Header)
13899	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
13900	for k, v := range c.header_ {
13901		reqHeaders[k] = v
13902	}
13903	reqHeaders.Set("User-Agent", c.s.userAgent())
13904	if c.ifNoneMatch_ != "" {
13905		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13906	}
13907	var body io.Reader = nil
13908	c.urlParams_.Set("alt", alt)
13909	c.urlParams_.Set("prettyPrint", "false")
13910	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates")
13911	urls += "?" + c.urlParams_.Encode()
13912	req, err := http.NewRequest("GET", urls, body)
13913	if err != nil {
13914		return nil, err
13915	}
13916	req.Header = reqHeaders
13917	googleapi.Expand(req.URL, map[string]string{
13918		"parent": c.parent,
13919	})
13920	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13921}
13922
13923// Do executes the "dataproc.projects.regions.workflowTemplates.list" call.
13924// Exactly one of *ListWorkflowTemplatesResponse or error will be
13925// non-nil. Any non-2xx status code is an error. Response headers are in
13926// either *ListWorkflowTemplatesResponse.ServerResponse.Header or (if a
13927// response was returned at all) in error.(*googleapi.Error).Header. Use
13928// googleapi.IsNotModified to check whether the returned error was
13929// because http.StatusNotModified was returned.
13930func (c *ProjectsRegionsWorkflowTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListWorkflowTemplatesResponse, error) {
13931	gensupport.SetOptions(c.urlParams_, opts...)
13932	res, err := c.doRequest("json")
13933	if res != nil && res.StatusCode == http.StatusNotModified {
13934		if res.Body != nil {
13935			res.Body.Close()
13936		}
13937		return nil, &googleapi.Error{
13938			Code:   res.StatusCode,
13939			Header: res.Header,
13940		}
13941	}
13942	if err != nil {
13943		return nil, err
13944	}
13945	defer googleapi.CloseBody(res)
13946	if err := googleapi.CheckResponse(res); err != nil {
13947		return nil, err
13948	}
13949	ret := &ListWorkflowTemplatesResponse{
13950		ServerResponse: googleapi.ServerResponse{
13951			Header:         res.Header,
13952			HTTPStatusCode: res.StatusCode,
13953		},
13954	}
13955	target := &ret
13956	if err := gensupport.DecodeResponse(target, res); err != nil {
13957		return nil, err
13958	}
13959	return ret, nil
13960	// {
13961	//   "description": "Lists workflows that match the specified filter in the request.",
13962	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates",
13963	//   "httpMethod": "GET",
13964	//   "id": "dataproc.projects.regions.workflowTemplates.list",
13965	//   "parameterOrder": [
13966	//     "parent"
13967	//   ],
13968	//   "parameters": {
13969	//     "pageSize": {
13970	//       "description": "Optional. The maximum number of results to return in each response.",
13971	//       "format": "int32",
13972	//       "location": "query",
13973	//       "type": "integer"
13974	//     },
13975	//     "pageToken": {
13976	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
13977	//       "location": "query",
13978	//       "type": "string"
13979	//     },
13980	//     "parent": {
13981	//       "description": "Required. The resource name of the region or location, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates,list, the resource name of the region has the following format: projects/{project_id}/regions/{region} For projects.locations.workflowTemplates.list, the resource name of the location has the following format: projects/{project_id}/locations/{location}",
13982	//       "location": "path",
13983	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
13984	//       "required": true,
13985	//       "type": "string"
13986	//     }
13987	//   },
13988	//   "path": "v1beta2/{+parent}/workflowTemplates",
13989	//   "response": {
13990	//     "$ref": "ListWorkflowTemplatesResponse"
13991	//   },
13992	//   "scopes": [
13993	//     "https://www.googleapis.com/auth/cloud-platform"
13994	//   ]
13995	// }
13996
13997}
13998
13999// Pages invokes f for each page of results.
14000// A non-nil error returned from f will halt the iteration.
14001// The provided context supersedes any context provided to the Context method.
14002func (c *ProjectsRegionsWorkflowTemplatesListCall) Pages(ctx context.Context, f func(*ListWorkflowTemplatesResponse) error) error {
14003	c.ctx_ = ctx
14004	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14005	for {
14006		x, err := c.Do()
14007		if err != nil {
14008			return err
14009		}
14010		if err := f(x); err != nil {
14011			return err
14012		}
14013		if x.NextPageToken == "" {
14014			return nil
14015		}
14016		c.PageToken(x.NextPageToken)
14017	}
14018}
14019
14020// method id "dataproc.projects.regions.workflowTemplates.setIamPolicy":
14021
14022type ProjectsRegionsWorkflowTemplatesSetIamPolicyCall struct {
14023	s                   *Service
14024	resource            string
14025	setiampolicyrequest *SetIamPolicyRequest
14026	urlParams_          gensupport.URLParams
14027	ctx_                context.Context
14028	header_             http.Header
14029}
14030
14031// SetIamPolicy: Sets the access control policy on the specified
14032// resource. Replaces any existing policy.Can return NOT_FOUND,
14033// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
14034func (r *ProjectsRegionsWorkflowTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
14035	c := &ProjectsRegionsWorkflowTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14036	c.resource = resource
14037	c.setiampolicyrequest = setiampolicyrequest
14038	return c
14039}
14040
14041// Fields allows partial responses to be retrieved. See
14042// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14043// for more information.
14044func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
14045	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14046	return c
14047}
14048
14049// Context sets the context to be used in this call's Do method. Any
14050// pending HTTP request will be aborted if the provided context is
14051// canceled.
14052func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
14053	c.ctx_ = ctx
14054	return c
14055}
14056
14057// Header returns an http.Header that can be modified by the caller to
14058// add HTTP headers to the request.
14059func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Header() http.Header {
14060	if c.header_ == nil {
14061		c.header_ = make(http.Header)
14062	}
14063	return c.header_
14064}
14065
14066func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14067	reqHeaders := make(http.Header)
14068	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
14069	for k, v := range c.header_ {
14070		reqHeaders[k] = v
14071	}
14072	reqHeaders.Set("User-Agent", c.s.userAgent())
14073	var body io.Reader = nil
14074	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
14075	if err != nil {
14076		return nil, err
14077	}
14078	reqHeaders.Set("Content-Type", "application/json")
14079	c.urlParams_.Set("alt", alt)
14080	c.urlParams_.Set("prettyPrint", "false")
14081	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
14082	urls += "?" + c.urlParams_.Encode()
14083	req, err := http.NewRequest("POST", urls, body)
14084	if err != nil {
14085		return nil, err
14086	}
14087	req.Header = reqHeaders
14088	googleapi.Expand(req.URL, map[string]string{
14089		"resource": c.resource,
14090	})
14091	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14092}
14093
14094// Do executes the "dataproc.projects.regions.workflowTemplates.setIamPolicy" call.
14095// Exactly one of *Policy or error will be non-nil. Any non-2xx status
14096// code is an error. Response headers are in either
14097// *Policy.ServerResponse.Header or (if a response was returned at all)
14098// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14099// check whether the returned error was because http.StatusNotModified
14100// was returned.
14101func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14102	gensupport.SetOptions(c.urlParams_, opts...)
14103	res, err := c.doRequest("json")
14104	if res != nil && res.StatusCode == http.StatusNotModified {
14105		if res.Body != nil {
14106			res.Body.Close()
14107		}
14108		return nil, &googleapi.Error{
14109			Code:   res.StatusCode,
14110			Header: res.Header,
14111		}
14112	}
14113	if err != nil {
14114		return nil, err
14115	}
14116	defer googleapi.CloseBody(res)
14117	if err := googleapi.CheckResponse(res); err != nil {
14118		return nil, err
14119	}
14120	ret := &Policy{
14121		ServerResponse: googleapi.ServerResponse{
14122			Header:         res.Header,
14123			HTTPStatusCode: res.StatusCode,
14124		},
14125	}
14126	target := &ret
14127	if err := gensupport.DecodeResponse(target, res); err != nil {
14128		return nil, err
14129	}
14130	return ret, nil
14131	// {
14132	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
14133	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:setIamPolicy",
14134	//   "httpMethod": "POST",
14135	//   "id": "dataproc.projects.regions.workflowTemplates.setIamPolicy",
14136	//   "parameterOrder": [
14137	//     "resource"
14138	//   ],
14139	//   "parameters": {
14140	//     "resource": {
14141	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
14142	//       "location": "path",
14143	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
14144	//       "required": true,
14145	//       "type": "string"
14146	//     }
14147	//   },
14148	//   "path": "v1beta2/{+resource}:setIamPolicy",
14149	//   "request": {
14150	//     "$ref": "SetIamPolicyRequest"
14151	//   },
14152	//   "response": {
14153	//     "$ref": "Policy"
14154	//   },
14155	//   "scopes": [
14156	//     "https://www.googleapis.com/auth/cloud-platform"
14157	//   ]
14158	// }
14159
14160}
14161
14162// method id "dataproc.projects.regions.workflowTemplates.testIamPermissions":
14163
14164type ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall struct {
14165	s                         *Service
14166	resource                  string
14167	testiampermissionsrequest *TestIamPermissionsRequest
14168	urlParams_                gensupport.URLParams
14169	ctx_                      context.Context
14170	header_                   http.Header
14171}
14172
14173// TestIamPermissions: Returns permissions that a caller has on the
14174// specified resource. If the resource does not exist, this will return
14175// an empty set of permissions, not a NOT_FOUND error.Note: This
14176// operation is designed to be used for building permission-aware UIs
14177// and command-line tools, not for authorization checking. This
14178// operation may "fail open" without warning.
14179func (r *ProjectsRegionsWorkflowTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
14180	c := &ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14181	c.resource = resource
14182	c.testiampermissionsrequest = testiampermissionsrequest
14183	return c
14184}
14185
14186// Fields allows partial responses to be retrieved. See
14187// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14188// for more information.
14189func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
14190	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14191	return c
14192}
14193
14194// Context sets the context to be used in this call's Do method. Any
14195// pending HTTP request will be aborted if the provided context is
14196// canceled.
14197func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
14198	c.ctx_ = ctx
14199	return c
14200}
14201
14202// Header returns an http.Header that can be modified by the caller to
14203// add HTTP headers to the request.
14204func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Header() http.Header {
14205	if c.header_ == nil {
14206		c.header_ = make(http.Header)
14207	}
14208	return c.header_
14209}
14210
14211func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
14212	reqHeaders := make(http.Header)
14213	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
14214	for k, v := range c.header_ {
14215		reqHeaders[k] = v
14216	}
14217	reqHeaders.Set("User-Agent", c.s.userAgent())
14218	var body io.Reader = nil
14219	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
14220	if err != nil {
14221		return nil, err
14222	}
14223	reqHeaders.Set("Content-Type", "application/json")
14224	c.urlParams_.Set("alt", alt)
14225	c.urlParams_.Set("prettyPrint", "false")
14226	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
14227	urls += "?" + c.urlParams_.Encode()
14228	req, err := http.NewRequest("POST", urls, body)
14229	if err != nil {
14230		return nil, err
14231	}
14232	req.Header = reqHeaders
14233	googleapi.Expand(req.URL, map[string]string{
14234		"resource": c.resource,
14235	})
14236	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14237}
14238
14239// Do executes the "dataproc.projects.regions.workflowTemplates.testIamPermissions" call.
14240// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
14241// Any non-2xx status code is an error. Response headers are in either
14242// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
14243// was returned at all) in error.(*googleapi.Error).Header. Use
14244// googleapi.IsNotModified to check whether the returned error was
14245// because http.StatusNotModified was returned.
14246func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
14247	gensupport.SetOptions(c.urlParams_, opts...)
14248	res, err := c.doRequest("json")
14249	if res != nil && res.StatusCode == http.StatusNotModified {
14250		if res.Body != nil {
14251			res.Body.Close()
14252		}
14253		return nil, &googleapi.Error{
14254			Code:   res.StatusCode,
14255			Header: res.Header,
14256		}
14257	}
14258	if err != nil {
14259		return nil, err
14260	}
14261	defer googleapi.CloseBody(res)
14262	if err := googleapi.CheckResponse(res); err != nil {
14263		return nil, err
14264	}
14265	ret := &TestIamPermissionsResponse{
14266		ServerResponse: googleapi.ServerResponse{
14267			Header:         res.Header,
14268			HTTPStatusCode: res.StatusCode,
14269		},
14270	}
14271	target := &ret
14272	if err := gensupport.DecodeResponse(target, res); err != nil {
14273		return nil, err
14274	}
14275	return ret, nil
14276	// {
14277	//   "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.",
14278	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:testIamPermissions",
14279	//   "httpMethod": "POST",
14280	//   "id": "dataproc.projects.regions.workflowTemplates.testIamPermissions",
14281	//   "parameterOrder": [
14282	//     "resource"
14283	//   ],
14284	//   "parameters": {
14285	//     "resource": {
14286	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
14287	//       "location": "path",
14288	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
14289	//       "required": true,
14290	//       "type": "string"
14291	//     }
14292	//   },
14293	//   "path": "v1beta2/{+resource}:testIamPermissions",
14294	//   "request": {
14295	//     "$ref": "TestIamPermissionsRequest"
14296	//   },
14297	//   "response": {
14298	//     "$ref": "TestIamPermissionsResponse"
14299	//   },
14300	//   "scopes": [
14301	//     "https://www.googleapis.com/auth/cloud-platform"
14302	//   ]
14303	// }
14304
14305}
14306
14307// method id "dataproc.projects.regions.workflowTemplates.update":
14308
14309type ProjectsRegionsWorkflowTemplatesUpdateCall struct {
14310	s                *Service
14311	name             string
14312	workflowtemplate *WorkflowTemplate
14313	urlParams_       gensupport.URLParams
14314	ctx_             context.Context
14315	header_          http.Header
14316}
14317
14318// Update: Updates (replaces) workflow template. The updated template
14319// must contain version that matches the current server version.
14320func (r *ProjectsRegionsWorkflowTemplatesService) Update(name string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesUpdateCall {
14321	c := &ProjectsRegionsWorkflowTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14322	c.name = name
14323	c.workflowtemplate = workflowtemplate
14324	return c
14325}
14326
14327// Fields allows partial responses to be retrieved. See
14328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14329// for more information.
14330func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesUpdateCall {
14331	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14332	return c
14333}
14334
14335// Context sets the context to be used in this call's Do method. Any
14336// pending HTTP request will be aborted if the provided context is
14337// canceled.
14338func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesUpdateCall {
14339	c.ctx_ = ctx
14340	return c
14341}
14342
14343// Header returns an http.Header that can be modified by the caller to
14344// add HTTP headers to the request.
14345func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Header() http.Header {
14346	if c.header_ == nil {
14347		c.header_ = make(http.Header)
14348	}
14349	return c.header_
14350}
14351
14352func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
14353	reqHeaders := make(http.Header)
14354	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20201124")
14355	for k, v := range c.header_ {
14356		reqHeaders[k] = v
14357	}
14358	reqHeaders.Set("User-Agent", c.s.userAgent())
14359	var body io.Reader = nil
14360	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
14361	if err != nil {
14362		return nil, err
14363	}
14364	reqHeaders.Set("Content-Type", "application/json")
14365	c.urlParams_.Set("alt", alt)
14366	c.urlParams_.Set("prettyPrint", "false")
14367	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
14368	urls += "?" + c.urlParams_.Encode()
14369	req, err := http.NewRequest("PUT", urls, body)
14370	if err != nil {
14371		return nil, err
14372	}
14373	req.Header = reqHeaders
14374	googleapi.Expand(req.URL, map[string]string{
14375		"name": c.name,
14376	})
14377	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14378}
14379
14380// Do executes the "dataproc.projects.regions.workflowTemplates.update" call.
14381// Exactly one of *WorkflowTemplate or error will be non-nil. Any
14382// non-2xx status code is an error. Response headers are in either
14383// *WorkflowTemplate.ServerResponse.Header or (if a response was
14384// returned at all) in error.(*googleapi.Error).Header. Use
14385// googleapi.IsNotModified to check whether the returned error was
14386// because http.StatusNotModified was returned.
14387func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
14388	gensupport.SetOptions(c.urlParams_, opts...)
14389	res, err := c.doRequest("json")
14390	if res != nil && res.StatusCode == http.StatusNotModified {
14391		if res.Body != nil {
14392			res.Body.Close()
14393		}
14394		return nil, &googleapi.Error{
14395			Code:   res.StatusCode,
14396			Header: res.Header,
14397		}
14398	}
14399	if err != nil {
14400		return nil, err
14401	}
14402	defer googleapi.CloseBody(res)
14403	if err := googleapi.CheckResponse(res); err != nil {
14404		return nil, err
14405	}
14406	ret := &WorkflowTemplate{
14407		ServerResponse: googleapi.ServerResponse{
14408			Header:         res.Header,
14409			HTTPStatusCode: res.StatusCode,
14410		},
14411	}
14412	target := &ret
14413	if err := gensupport.DecodeResponse(target, res); err != nil {
14414		return nil, err
14415	}
14416	return ret, nil
14417	// {
14418	//   "description": "Updates (replaces) workflow template. The updated template must contain version that matches the current server version.",
14419	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}",
14420	//   "httpMethod": "PUT",
14421	//   "id": "dataproc.projects.regions.workflowTemplates.update",
14422	//   "parameterOrder": [
14423	//     "name"
14424	//   ],
14425	//   "parameters": {
14426	//     "name": {
14427	//       "description": "Output only. The resource name of the workflow template, as described in https://cloud.google.com/apis/design/resource_names. For projects.regions.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/regions/{region}/workflowTemplates/{template_id} For projects.locations.workflowTemplates, the resource name of the template has the following format: projects/{project_id}/locations/{location}/workflowTemplates/{template_id}",
14428	//       "location": "path",
14429	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
14430	//       "required": true,
14431	//       "type": "string"
14432	//     }
14433	//   },
14434	//   "path": "v1beta2/{+name}",
14435	//   "request": {
14436	//     "$ref": "WorkflowTemplate"
14437	//   },
14438	//   "response": {
14439	//     "$ref": "WorkflowTemplate"
14440	//   },
14441	//   "scopes": [
14442	//     "https://www.googleapis.com/auth/cloud-platform"
14443	//   ]
14444	// }
14445
14446}
14447