1// Copyright 2021 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	// See, edit, configure, and delete your Google Cloud data and see the
85	// email address for your Google Account.
86	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
87)
88
89// NewService creates a new Service.
90func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
91	scopesOption := option.WithScopes(
92		"https://www.googleapis.com/auth/cloud-platform",
93	)
94	// NOTE: prepend, so we don't override user-specified scopes.
95	opts = append([]option.ClientOption{scopesOption}, opts...)
96	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
97	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
98	client, endpoint, err := htransport.NewClient(ctx, opts...)
99	if err != nil {
100		return nil, err
101	}
102	s, err := New(client)
103	if err != nil {
104		return nil, err
105	}
106	if endpoint != "" {
107		s.BasePath = endpoint
108	}
109	return s, nil
110}
111
112// New creates a new Service. It uses the provided http.Client for requests.
113//
114// Deprecated: please use NewService instead.
115// To provide a custom HTTP client, use option.WithHTTPClient.
116// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
117func New(client *http.Client) (*Service, error) {
118	if client == nil {
119		return nil, errors.New("client is nil")
120	}
121	s := &Service{client: client, BasePath: basePath}
122	s.Projects = NewProjectsService(s)
123	return s, nil
124}
125
126type Service struct {
127	client    *http.Client
128	BasePath  string // API endpoint base URL
129	UserAgent string // optional additional User-Agent fragment
130
131	Projects *ProjectsService
132}
133
134func (s *Service) userAgent() string {
135	if s.UserAgent == "" {
136		return googleapi.UserAgent
137	}
138	return googleapi.UserAgent + " " + s.UserAgent
139}
140
141func NewProjectsService(s *Service) *ProjectsService {
142	rs := &ProjectsService{s: s}
143	rs.Locations = NewProjectsLocationsService(s)
144	rs.Regions = NewProjectsRegionsService(s)
145	return rs
146}
147
148type ProjectsService struct {
149	s *Service
150
151	Locations *ProjectsLocationsService
152
153	Regions *ProjectsRegionsService
154}
155
156func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
157	rs := &ProjectsLocationsService{s: s}
158	rs.AutoscalingPolicies = NewProjectsLocationsAutoscalingPoliciesService(s)
159	rs.WorkflowTemplates = NewProjectsLocationsWorkflowTemplatesService(s)
160	return rs
161}
162
163type ProjectsLocationsService struct {
164	s *Service
165
166	AutoscalingPolicies *ProjectsLocationsAutoscalingPoliciesService
167
168	WorkflowTemplates *ProjectsLocationsWorkflowTemplatesService
169}
170
171func NewProjectsLocationsAutoscalingPoliciesService(s *Service) *ProjectsLocationsAutoscalingPoliciesService {
172	rs := &ProjectsLocationsAutoscalingPoliciesService{s: s}
173	return rs
174}
175
176type ProjectsLocationsAutoscalingPoliciesService struct {
177	s *Service
178}
179
180func NewProjectsLocationsWorkflowTemplatesService(s *Service) *ProjectsLocationsWorkflowTemplatesService {
181	rs := &ProjectsLocationsWorkflowTemplatesService{s: s}
182	return rs
183}
184
185type ProjectsLocationsWorkflowTemplatesService struct {
186	s *Service
187}
188
189func NewProjectsRegionsService(s *Service) *ProjectsRegionsService {
190	rs := &ProjectsRegionsService{s: s}
191	rs.AutoscalingPolicies = NewProjectsRegionsAutoscalingPoliciesService(s)
192	rs.Clusters = NewProjectsRegionsClustersService(s)
193	rs.Jobs = NewProjectsRegionsJobsService(s)
194	rs.Operations = NewProjectsRegionsOperationsService(s)
195	rs.WorkflowTemplates = NewProjectsRegionsWorkflowTemplatesService(s)
196	return rs
197}
198
199type ProjectsRegionsService struct {
200	s *Service
201
202	AutoscalingPolicies *ProjectsRegionsAutoscalingPoliciesService
203
204	Clusters *ProjectsRegionsClustersService
205
206	Jobs *ProjectsRegionsJobsService
207
208	Operations *ProjectsRegionsOperationsService
209
210	WorkflowTemplates *ProjectsRegionsWorkflowTemplatesService
211}
212
213func NewProjectsRegionsAutoscalingPoliciesService(s *Service) *ProjectsRegionsAutoscalingPoliciesService {
214	rs := &ProjectsRegionsAutoscalingPoliciesService{s: s}
215	return rs
216}
217
218type ProjectsRegionsAutoscalingPoliciesService struct {
219	s *Service
220}
221
222func NewProjectsRegionsClustersService(s *Service) *ProjectsRegionsClustersService {
223	rs := &ProjectsRegionsClustersService{s: s}
224	return rs
225}
226
227type ProjectsRegionsClustersService struct {
228	s *Service
229}
230
231func NewProjectsRegionsJobsService(s *Service) *ProjectsRegionsJobsService {
232	rs := &ProjectsRegionsJobsService{s: s}
233	return rs
234}
235
236type ProjectsRegionsJobsService struct {
237	s *Service
238}
239
240func NewProjectsRegionsOperationsService(s *Service) *ProjectsRegionsOperationsService {
241	rs := &ProjectsRegionsOperationsService{s: s}
242	return rs
243}
244
245type ProjectsRegionsOperationsService struct {
246	s *Service
247}
248
249func NewProjectsRegionsWorkflowTemplatesService(s *Service) *ProjectsRegionsWorkflowTemplatesService {
250	rs := &ProjectsRegionsWorkflowTemplatesService{s: s}
251	return rs
252}
253
254type ProjectsRegionsWorkflowTemplatesService struct {
255	s *Service
256}
257
258// AcceleratorConfig: Specifies the type and number of accelerator cards
259// attached to the instances of an instance group (see GPUs on Compute
260// Engine (https://cloud.google.com/compute/docs/gpus/)).
261type AcceleratorConfig struct {
262	// AcceleratorCount: The number of the accelerator cards of this type
263	// exposed to this instance.
264	AcceleratorCount int64 `json:"acceleratorCount,omitempty"`
265
266	// AcceleratorTypeUri: Full URL, partial URI, or short name of the
267	// accelerator type resource to expose to this instance. See Compute
268	// Engine AcceleratorTypes
269	// (https://cloud.google.com/compute/docs/reference/beta/acceleratorTypes)Examples
270	// *
271	// https://www.googleapis.com/compute/beta/projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k80
272	// *
273	// projects/[project_id]/zones/us-east1-a/acceleratorTypes/nvidia-tesla-k
274	// 80 * nvidia-tesla-k80Auto Zone Exception: If you are using the
275	// Dataproc Auto Zone Placement
276	// (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
277	// feature, you must use the short name of the accelerator type
278	// resource, for example, nvidia-tesla-k80.
279	AcceleratorTypeUri string `json:"acceleratorTypeUri,omitempty"`
280
281	// ForceSendFields is a list of field names (e.g. "AcceleratorCount") to
282	// unconditionally include in API requests. By default, fields with
283	// empty values are omitted from API requests. However, any non-pointer,
284	// non-interface field appearing in ForceSendFields will be sent to the
285	// server regardless of whether the field is empty or not. This may be
286	// used to include empty fields in Patch requests.
287	ForceSendFields []string `json:"-"`
288
289	// NullFields is a list of field names (e.g. "AcceleratorCount") to
290	// include in API requests with the JSON null value. By default, fields
291	// with empty values are omitted from API requests. However, any field
292	// with an empty value appearing in NullFields will be sent to the
293	// server as null. It is an error if a field in this list has a
294	// non-empty value. This may be used to include null fields in Patch
295	// requests.
296	NullFields []string `json:"-"`
297}
298
299func (s *AcceleratorConfig) MarshalJSON() ([]byte, error) {
300	type NoMethod AcceleratorConfig
301	raw := NoMethod(*s)
302	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
303}
304
305// AutoscalingConfig: Autoscaling Policy config associated with the
306// cluster.
307type AutoscalingConfig struct {
308	// PolicyUri: Optional. The autoscaling policy used by the cluster.Only
309	// resource names including projectid and location (region) are valid.
310	// Examples:
311	// https://www.googleapis.com/compute/v1/projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/[policy_id]
312	// projects/[project_id]/locations/[dataproc_region]/autoscalingPolicies/
313	// [policy_id]Note that the policy must be in the same project and
314	// Dataproc region.
315	PolicyUri string `json:"policyUri,omitempty"`
316
317	// ForceSendFields is a list of field names (e.g. "PolicyUri") to
318	// unconditionally include in API requests. By default, fields with
319	// empty values are omitted from API requests. However, any non-pointer,
320	// non-interface field appearing in ForceSendFields will be sent to the
321	// server regardless of whether the field is empty or not. This may be
322	// used to include empty fields in Patch requests.
323	ForceSendFields []string `json:"-"`
324
325	// NullFields is a list of field names (e.g. "PolicyUri") to include in
326	// API requests with the JSON null value. By default, fields with empty
327	// values are omitted from API requests. However, any field with an
328	// empty value appearing in NullFields will be sent to the server as
329	// null. It is an error if a field in this list has a non-empty value.
330	// This may be used to include null fields in Patch requests.
331	NullFields []string `json:"-"`
332}
333
334func (s *AutoscalingConfig) MarshalJSON() ([]byte, error) {
335	type NoMethod AutoscalingConfig
336	raw := NoMethod(*s)
337	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
338}
339
340// AutoscalingPolicy: Describes an autoscaling policy for Dataproc
341// cluster autoscaler.
342type AutoscalingPolicy struct {
343	BasicAlgorithm *BasicAutoscalingAlgorithm `json:"basicAlgorithm,omitempty"`
344
345	// Id: Required. The policy id.The id must contain only letters (a-z,
346	// A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin
347	// or end with underscore or hyphen. Must consist of between 3 and 50
348	// characters.
349	Id string `json:"id,omitempty"`
350
351	// Name: Output only. The "resource name" of the autoscaling policy, as
352	// described in https://cloud.google.com/apis/design/resource_names. For
353	// projects.regions.autoscalingPolicies, the resource name of the policy
354	// has the following format:
355	// projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_id}
356	//  For projects.locations.autoscalingPolicies, the resource name of the
357	// policy has the following format:
358	// projects/{project_id}/locations/{location}/autoscalingPolicies/{policy
359	// _id}
360	Name string `json:"name,omitempty"`
361
362	// SecondaryWorkerConfig: Optional. Describes how the autoscaler will
363	// operate for secondary workers.
364	SecondaryWorkerConfig *InstanceGroupAutoscalingPolicyConfig `json:"secondaryWorkerConfig,omitempty"`
365
366	// WorkerConfig: Required. Describes how the autoscaler will operate for
367	// primary workers.
368	WorkerConfig *InstanceGroupAutoscalingPolicyConfig `json:"workerConfig,omitempty"`
369
370	// ServerResponse contains the HTTP response code and headers from the
371	// server.
372	googleapi.ServerResponse `json:"-"`
373
374	// ForceSendFields is a list of field names (e.g. "BasicAlgorithm") to
375	// unconditionally include in API requests. By default, fields with
376	// empty values are omitted from API requests. However, any non-pointer,
377	// non-interface field appearing in ForceSendFields will be sent to the
378	// server regardless of whether the field is empty or not. This may be
379	// used to include empty fields in Patch requests.
380	ForceSendFields []string `json:"-"`
381
382	// NullFields is a list of field names (e.g. "BasicAlgorithm") to
383	// include in API requests with the JSON null value. By default, fields
384	// with empty values are omitted from API requests. However, any field
385	// with an empty value appearing in NullFields will be sent to the
386	// server as null. It is an error if a field in this list has a
387	// non-empty value. This may be used to include null fields in Patch
388	// requests.
389	NullFields []string `json:"-"`
390}
391
392func (s *AutoscalingPolicy) MarshalJSON() ([]byte, error) {
393	type NoMethod AutoscalingPolicy
394	raw := NoMethod(*s)
395	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
396}
397
398// BasicAutoscalingAlgorithm: Basic algorithm for autoscaling.
399type BasicAutoscalingAlgorithm struct {
400	// CooldownPeriod: Optional. Duration between scaling events. A scaling
401	// period starts after the update operation from the previous event has
402	// completed.Bounds: 2m, 1d. Default: 2m.
403	CooldownPeriod string `json:"cooldownPeriod,omitempty"`
404
405	// YarnConfig: Optional. YARN autoscaling configuration.
406	YarnConfig *BasicYarnAutoscalingConfig `json:"yarnConfig,omitempty"`
407
408	// ForceSendFields is a list of field names (e.g. "CooldownPeriod") to
409	// unconditionally include in API requests. By default, fields with
410	// empty values are omitted from API requests. However, any non-pointer,
411	// non-interface field appearing in ForceSendFields will be sent to the
412	// server regardless of whether the field is empty or not. This may be
413	// used to include empty fields in Patch requests.
414	ForceSendFields []string `json:"-"`
415
416	// NullFields is a list of field names (e.g. "CooldownPeriod") to
417	// include in API requests with the JSON null value. By default, fields
418	// with empty values are omitted from API requests. However, any field
419	// with an empty value appearing in NullFields will be sent to the
420	// server as null. It is an error if a field in this list has a
421	// non-empty value. This may be used to include null fields in Patch
422	// requests.
423	NullFields []string `json:"-"`
424}
425
426func (s *BasicAutoscalingAlgorithm) MarshalJSON() ([]byte, error) {
427	type NoMethod BasicAutoscalingAlgorithm
428	raw := NoMethod(*s)
429	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
430}
431
432// BasicYarnAutoscalingConfig: Basic autoscaling configurations for
433// YARN.
434type BasicYarnAutoscalingConfig struct {
435	// GracefulDecommissionTimeout: Required. Timeout for YARN graceful
436	// decommissioning of Node Managers. Specifies the duration to wait for
437	// jobs to complete before forcefully removing workers (and potentially
438	// interrupting jobs). Only applicable to downscaling operations.Bounds:
439	// 0s, 1d.
440	GracefulDecommissionTimeout string `json:"gracefulDecommissionTimeout,omitempty"`
441
442	// ScaleDownFactor: Required. Fraction of average YARN pending memory in
443	// the last cooldown period for which to remove workers. A scale-down
444	// factor of 1 will result in scaling down so that there is no available
445	// memory remaining after the update (more aggressive scaling). A
446	// scale-down factor of 0 disables removing workers, which can be
447	// beneficial for autoscaling a single job. See How autoscaling works
448	// for more information.Bounds: 0.0, 1.0.
449	ScaleDownFactor float64 `json:"scaleDownFactor,omitempty"`
450
451	// ScaleDownMinWorkerFraction: Optional. Minimum scale-down threshold as
452	// a fraction of total cluster size before scaling occurs. For example,
453	// in a 20-worker cluster, a threshold of 0.1 means the autoscaler must
454	// recommend at least a 2 worker scale-down for the cluster to scale. A
455	// threshold of 0 means the autoscaler will scale down on any
456	// recommended change.Bounds: 0.0, 1.0. Default: 0.0.
457	ScaleDownMinWorkerFraction float64 `json:"scaleDownMinWorkerFraction,omitempty"`
458
459	// ScaleUpFactor: Required. Fraction of average YARN pending memory in
460	// the last cooldown period for which to add workers. A scale-up factor
461	// of 1.0 will result in scaling up so that there is no pending memory
462	// remaining after the update (more aggressive scaling). A scale-up
463	// factor closer to 0 will result in a smaller magnitude of scaling up
464	// (less aggressive scaling). See How autoscaling works for more
465	// information.Bounds: 0.0, 1.0.
466	ScaleUpFactor float64 `json:"scaleUpFactor,omitempty"`
467
468	// ScaleUpMinWorkerFraction: Optional. Minimum scale-up threshold as a
469	// fraction of total cluster size before scaling occurs. For example, in
470	// a 20-worker cluster, a threshold of 0.1 means the autoscaler must
471	// recommend at least a 2-worker scale-up for the cluster to scale. A
472	// threshold of 0 means the autoscaler will scale up on any recommended
473	// change.Bounds: 0.0, 1.0. Default: 0.0.
474	ScaleUpMinWorkerFraction float64 `json:"scaleUpMinWorkerFraction,omitempty"`
475
476	// ForceSendFields is a list of field names (e.g.
477	// "GracefulDecommissionTimeout") to unconditionally include in API
478	// requests. By default, fields with empty values are omitted from API
479	// requests. However, any non-pointer, non-interface field appearing in
480	// ForceSendFields will be sent to the server regardless of whether the
481	// field is empty or not. This may be used to include empty fields in
482	// Patch requests.
483	ForceSendFields []string `json:"-"`
484
485	// NullFields is a list of field names (e.g.
486	// "GracefulDecommissionTimeout") to include in API requests with the
487	// JSON null value. By default, fields with empty values are omitted
488	// from API requests. However, any field with an empty value appearing
489	// in NullFields will be sent to the server as null. It is an error if a
490	// field in this list has a non-empty value. This may be used to include
491	// null fields in Patch requests.
492	NullFields []string `json:"-"`
493}
494
495func (s *BasicYarnAutoscalingConfig) MarshalJSON() ([]byte, error) {
496	type NoMethod BasicYarnAutoscalingConfig
497	raw := NoMethod(*s)
498	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
499}
500
501func (s *BasicYarnAutoscalingConfig) UnmarshalJSON(data []byte) error {
502	type NoMethod BasicYarnAutoscalingConfig
503	var s1 struct {
504		ScaleDownFactor            gensupport.JSONFloat64 `json:"scaleDownFactor"`
505		ScaleDownMinWorkerFraction gensupport.JSONFloat64 `json:"scaleDownMinWorkerFraction"`
506		ScaleUpFactor              gensupport.JSONFloat64 `json:"scaleUpFactor"`
507		ScaleUpMinWorkerFraction   gensupport.JSONFloat64 `json:"scaleUpMinWorkerFraction"`
508		*NoMethod
509	}
510	s1.NoMethod = (*NoMethod)(s)
511	if err := json.Unmarshal(data, &s1); err != nil {
512		return err
513	}
514	s.ScaleDownFactor = float64(s1.ScaleDownFactor)
515	s.ScaleDownMinWorkerFraction = float64(s1.ScaleDownMinWorkerFraction)
516	s.ScaleUpFactor = float64(s1.ScaleUpFactor)
517	s.ScaleUpMinWorkerFraction = float64(s1.ScaleUpMinWorkerFraction)
518	return nil
519}
520
521// Binding: Associates members with a role.
522type Binding struct {
523	// Condition: The condition that is associated with this binding.If the
524	// condition evaluates to true, then this binding applies to the current
525	// request.If the condition evaluates to false, then this binding does
526	// not apply to the current request. However, a different role binding
527	// might grant the same role to one or more of the members in this
528	// binding.To learn which resources support conditions in their IAM
529	// policies, see the IAM documentation
530	// (https://cloud.google.com/iam/help/conditions/resource-policies).
531	Condition *Expr `json:"condition,omitempty"`
532
533	// Members: Specifies the identities requesting access for a Cloud
534	// Platform resource. members can have the following values: allUsers: A
535	// special identifier that represents anyone who is on the internet;
536	// with or without a Google account. allAuthenticatedUsers: A special
537	// identifier that represents anyone who is authenticated with a Google
538	// account or a service account. user:{emailid}: An email address that
539	// represents a specific Google account. For example, alice@example.com
540	// . serviceAccount:{emailid}: An email address that represents a
541	// service account. For example,
542	// my-other-app@appspot.gserviceaccount.com. group:{emailid}: An email
543	// address that represents a Google group. For example,
544	// admins@example.com. deleted:user:{emailid}?uid={uniqueid}: An email
545	// address (plus unique identifier) representing a user that has been
546	// recently deleted. For example,
547	// alice@example.com?uid=123456789012345678901. If the user is
548	// recovered, this value reverts to user:{emailid} and the recovered
549	// user retains the role in the binding.
550	// deleted:serviceAccount:{emailid}?uid={uniqueid}: An email address
551	// (plus unique identifier) representing a service account that has been
552	// recently deleted. For example,
553	// my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901.
554	// If the service account is undeleted, this value reverts to
555	// serviceAccount:{emailid} and the undeleted service account retains
556	// the role in the binding. deleted:group:{emailid}?uid={uniqueid}: An
557	// email address (plus unique identifier) representing a Google group
558	// that has been recently deleted. For example,
559	// admins@example.com?uid=123456789012345678901. If the group is
560	// recovered, this value reverts to group:{emailid} and the recovered
561	// group retains the role in the binding. domain:{domain}: The G Suite
562	// domain (primary) that represents all the users of that domain. For
563	// example, google.com or example.com.
564	Members []string `json:"members,omitempty"`
565
566	// Role: Role that is assigned to members. For example, roles/viewer,
567	// roles/editor, or roles/owner.
568	Role string `json:"role,omitempty"`
569
570	// ForceSendFields is a list of field names (e.g. "Condition") to
571	// unconditionally include in API requests. By default, fields with
572	// empty values are omitted from API requests. However, any non-pointer,
573	// non-interface field appearing in ForceSendFields will be sent to the
574	// server regardless of whether the field is empty or not. This may be
575	// used to include empty fields in Patch requests.
576	ForceSendFields []string `json:"-"`
577
578	// NullFields is a list of field names (e.g. "Condition") to include in
579	// API requests with the JSON null value. By default, fields with empty
580	// values are omitted from API requests. However, any field with an
581	// empty value appearing in NullFields will be sent to the server as
582	// null. It is an error if a field in this list has a non-empty value.
583	// This may be used to include null fields in Patch requests.
584	NullFields []string `json:"-"`
585}
586
587func (s *Binding) MarshalJSON() ([]byte, error) {
588	type NoMethod Binding
589	raw := NoMethod(*s)
590	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
591}
592
593// CancelJobRequest: A request to cancel a job.
594type CancelJobRequest struct {
595}
596
597// Cluster: Describes the identifying information, config, and status of
598// a cluster of Compute Engine instances.
599type Cluster struct {
600	// ClusterName: Required. The cluster name. Cluster names within a
601	// project must be unique. Names of deleted clusters can be reused.
602	ClusterName string `json:"clusterName,omitempty"`
603
604	// ClusterUuid: Output only. A cluster UUID (Unique Universal
605	// Identifier). Dataproc generates this value when it creates the
606	// cluster.
607	ClusterUuid string `json:"clusterUuid,omitempty"`
608
609	// Config: Required. The cluster config. Note that Dataproc may set
610	// default values, and values may change when clusters are updated.
611	Config *ClusterConfig `json:"config,omitempty"`
612
613	// Labels: Optional. The labels to associate with this cluster. Label
614	// keys must contain 1 to 63 characters, and must conform to RFC 1035
615	// (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty,
616	// but, if present, must contain 1 to 63 characters, and must conform to
617	// RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32
618	// labels can be associated with a cluster.
619	Labels map[string]string `json:"labels,omitempty"`
620
621	// Metrics: Output only. Contains cluster daemon metrics such as HDFS
622	// and YARN stats.Beta Feature: This report is available for testing
623	// purposes only. It may be changed before final release.
624	Metrics *ClusterMetrics `json:"metrics,omitempty"`
625
626	// ProjectId: Required. The Google Cloud Platform project ID that the
627	// cluster belongs to.
628	ProjectId string `json:"projectId,omitempty"`
629
630	// Status: Output only. Cluster status.
631	Status *ClusterStatus `json:"status,omitempty"`
632
633	// StatusHistory: Output only. The previous cluster status.
634	StatusHistory []*ClusterStatus `json:"statusHistory,omitempty"`
635
636	// ServerResponse contains the HTTP response code and headers from the
637	// server.
638	googleapi.ServerResponse `json:"-"`
639
640	// ForceSendFields is a list of field names (e.g. "ClusterName") to
641	// unconditionally include in API requests. By default, fields with
642	// empty values are omitted from API requests. However, any non-pointer,
643	// non-interface field appearing in ForceSendFields will be sent to the
644	// server regardless of whether the field is empty or not. This may be
645	// used to include empty fields in Patch requests.
646	ForceSendFields []string `json:"-"`
647
648	// NullFields is a list of field names (e.g. "ClusterName") to include
649	// in API requests with the JSON null value. By default, fields with
650	// empty values are omitted from API requests. However, any field with
651	// an empty value appearing in NullFields will be sent to the server as
652	// null. It is an error if a field in this list has a non-empty value.
653	// This may be used to include null fields in Patch requests.
654	NullFields []string `json:"-"`
655}
656
657func (s *Cluster) MarshalJSON() ([]byte, error) {
658	type NoMethod Cluster
659	raw := NoMethod(*s)
660	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
661}
662
663// ClusterConfig: The cluster config.
664type ClusterConfig struct {
665	// AutoscalingConfig: Optional. Autoscaling config for the policy
666	// associated with the cluster. Cluster does not autoscale if this field
667	// is unset.
668	AutoscalingConfig *AutoscalingConfig `json:"autoscalingConfig,omitempty"`
669
670	// ConfigBucket: Optional. A Cloud Storage bucket used to stage job
671	// dependencies, config files, and job driver console output. If you do
672	// not specify a staging bucket, Cloud Dataproc will determine a Cloud
673	// Storage location (US, ASIA, or EU) for your cluster's staging bucket
674	// according to the Compute Engine zone where your cluster is deployed,
675	// and then create and manage this project-level, per-location bucket
676	// (see Dataproc staging bucket
677	// (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/staging-bucket)).
678	// This field requires a Cloud Storage bucket name, not a URI to a Cloud
679	// Storage bucket.
680	ConfigBucket string `json:"configBucket,omitempty"`
681
682	// EncryptionConfig: Optional. Encryption settings for the cluster.
683	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`
684
685	// EndpointConfig: Optional. Port/endpoint configuration for this
686	// cluster
687	EndpointConfig *EndpointConfig `json:"endpointConfig,omitempty"`
688
689	// GceClusterConfig: Optional. The shared Compute Engine config settings
690	// for all instances in a cluster.
691	GceClusterConfig *GceClusterConfig `json:"gceClusterConfig,omitempty"`
692
693	// GkeClusterConfig: Optional. The Kubernetes Engine config for Dataproc
694	// clusters deployed to Kubernetes. Setting this is considered mutually
695	// exclusive with Compute Engine-based options such as
696	// gce_cluster_config, master_config, worker_config,
697	// secondary_worker_config, and autoscaling_config.
698	GkeClusterConfig *GkeClusterConfig `json:"gkeClusterConfig,omitempty"`
699
700	// InitializationActions: Optional. Commands to execute on each node
701	// after config is completed. By default, executables are run on master
702	// and all worker nodes. You can test a node's role metadata to run an
703	// executable on a master or worker node, as shown below using curl (you
704	// can also use wget): ROLE=$(curl -H Metadata-Flavor:Google
705	// http://metadata/computeMetadata/v1beta2/instance/attributes/dataproc-role)
706	// if [[ "${ROLE}" == 'Master' ]]; then ... master specific actions ...
707	// else ... worker specific actions ... fi
708	InitializationActions []*NodeInitializationAction `json:"initializationActions,omitempty"`
709
710	// LifecycleConfig: Optional. The config setting for auto delete cluster
711	// schedule.
712	LifecycleConfig *LifecycleConfig `json:"lifecycleConfig,omitempty"`
713
714	// MasterConfig: Optional. The Compute Engine config settings for the
715	// master instance in a cluster.
716	MasterConfig *InstanceGroupConfig `json:"masterConfig,omitempty"`
717
718	// MetastoreConfig: Optional. Metastore configuration.
719	MetastoreConfig *MetastoreConfig `json:"metastoreConfig,omitempty"`
720
721	// SecondaryWorkerConfig: Optional. The Compute Engine config settings
722	// for additional worker instances in a cluster.
723	SecondaryWorkerConfig *InstanceGroupConfig `json:"secondaryWorkerConfig,omitempty"`
724
725	// SecurityConfig: Optional. Security related configuration.
726	SecurityConfig *SecurityConfig `json:"securityConfig,omitempty"`
727
728	// SoftwareConfig: Optional. The config settings for software inside the
729	// cluster.
730	SoftwareConfig *SoftwareConfig `json:"softwareConfig,omitempty"`
731
732	// TempBucket: Optional. A Cloud Storage bucket used to store ephemeral
733	// cluster and jobs data, such as Spark and MapReduce history files. If
734	// you do not specify a temp bucket, Dataproc will determine a Cloud
735	// Storage location (US, ASIA, or EU) for your cluster's temp bucket
736	// according to the Compute Engine zone where your cluster is deployed,
737	// and then create and manage this project-level, per-location bucket.
738	// The default bucket has a TTL of 90 days, but you can use any TTL (or
739	// none) if you specify a bucket. This field requires a Cloud Storage
740	// bucket name, not a URI to a Cloud Storage bucket.
741	TempBucket string `json:"tempBucket,omitempty"`
742
743	// WorkerConfig: Optional. The Compute Engine config settings for worker
744	// instances in a cluster.
745	WorkerConfig *InstanceGroupConfig `json:"workerConfig,omitempty"`
746
747	// ForceSendFields is a list of field names (e.g. "AutoscalingConfig")
748	// to unconditionally include in API requests. By default, fields with
749	// empty values are omitted from API requests. However, any non-pointer,
750	// non-interface field appearing in ForceSendFields will be sent to the
751	// server regardless of whether the field is empty or not. This may be
752	// used to include empty fields in Patch requests.
753	ForceSendFields []string `json:"-"`
754
755	// NullFields is a list of field names (e.g. "AutoscalingConfig") to
756	// include in API requests with the JSON null value. By default, fields
757	// with empty values are omitted from API requests. However, any field
758	// with an empty value appearing in NullFields will be sent to the
759	// server as null. It is an error if a field in this list has a
760	// non-empty value. This may be used to include null fields in Patch
761	// requests.
762	NullFields []string `json:"-"`
763}
764
765func (s *ClusterConfig) MarshalJSON() ([]byte, error) {
766	type NoMethod ClusterConfig
767	raw := NoMethod(*s)
768	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
769}
770
771// ClusterMetrics: Contains cluster daemon metrics, such as HDFS and
772// YARN stats.Beta Feature: This report is available for testing
773// purposes only. It may be changed before final release.
774type ClusterMetrics struct {
775	// HdfsMetrics: The HDFS metrics.
776	HdfsMetrics map[string]string `json:"hdfsMetrics,omitempty"`
777
778	// YarnMetrics: The YARN metrics.
779	YarnMetrics map[string]string `json:"yarnMetrics,omitempty"`
780
781	// ForceSendFields is a list of field names (e.g. "HdfsMetrics") to
782	// unconditionally include in API requests. By default, fields with
783	// empty values are omitted from API requests. However, any non-pointer,
784	// non-interface field appearing in ForceSendFields will be sent to the
785	// server regardless of whether the field is empty or not. This may be
786	// used to include empty fields in Patch requests.
787	ForceSendFields []string `json:"-"`
788
789	// NullFields is a list of field names (e.g. "HdfsMetrics") to include
790	// in API requests with the JSON null value. By default, fields with
791	// empty values are omitted from API requests. However, any field with
792	// an empty value appearing in NullFields will be sent to the server as
793	// null. It is an error if a field in this list has a non-empty value.
794	// This may be used to include null fields in Patch requests.
795	NullFields []string `json:"-"`
796}
797
798func (s *ClusterMetrics) MarshalJSON() ([]byte, error) {
799	type NoMethod ClusterMetrics
800	raw := NoMethod(*s)
801	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
802}
803
804// ClusterOperation: The cluster operation triggered by a workflow.
805type ClusterOperation struct {
806	// Done: Output only. Indicates the operation is done.
807	Done bool `json:"done,omitempty"`
808
809	// Error: Output only. Error, if operation failed.
810	Error string `json:"error,omitempty"`
811
812	// OperationId: Output only. The id of the cluster operation.
813	OperationId string `json:"operationId,omitempty"`
814
815	// ForceSendFields is a list of field names (e.g. "Done") to
816	// unconditionally include in API requests. By default, fields with
817	// empty values are omitted from API requests. However, any non-pointer,
818	// non-interface field appearing in ForceSendFields will be sent to the
819	// server regardless of whether the field is empty or not. This may be
820	// used to include empty fields in Patch requests.
821	ForceSendFields []string `json:"-"`
822
823	// NullFields is a list of field names (e.g. "Done") to include in API
824	// requests with the JSON null value. By default, fields with empty
825	// values are omitted from API requests. However, any field with an
826	// empty value appearing in NullFields will be sent to the server as
827	// null. It is an error if a field in this list has a non-empty value.
828	// This may be used to include null fields in Patch requests.
829	NullFields []string `json:"-"`
830}
831
832func (s *ClusterOperation) MarshalJSON() ([]byte, error) {
833	type NoMethod ClusterOperation
834	raw := NoMethod(*s)
835	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
836}
837
838// ClusterOperationMetadata: Metadata describing the operation.
839type ClusterOperationMetadata struct {
840	// ClusterName: Output only. Name of the cluster for the operation.
841	ClusterName string `json:"clusterName,omitempty"`
842
843	// ClusterUuid: Output only. Cluster UUID for the operation.
844	ClusterUuid string `json:"clusterUuid,omitempty"`
845
846	// Description: Output only. Short description of operation.
847	Description string `json:"description,omitempty"`
848
849	// Labels: Output only. Labels associated with the operation
850	Labels map[string]string `json:"labels,omitempty"`
851
852	// OperationType: Output only. The operation type.
853	OperationType string `json:"operationType,omitempty"`
854
855	// Status: Output only. Current operation status.
856	Status *ClusterOperationStatus `json:"status,omitempty"`
857
858	// StatusHistory: Output only. The previous operation status.
859	StatusHistory []*ClusterOperationStatus `json:"statusHistory,omitempty"`
860
861	// Warnings: Output only. Errors encountered during operation execution.
862	Warnings []string `json:"warnings,omitempty"`
863
864	// ForceSendFields is a list of field names (e.g. "ClusterName") to
865	// unconditionally include in API requests. By default, fields with
866	// empty values are omitted from API requests. However, any non-pointer,
867	// non-interface field appearing in ForceSendFields will be sent to the
868	// server regardless of whether the field is empty or not. This may be
869	// used to include empty fields in Patch requests.
870	ForceSendFields []string `json:"-"`
871
872	// NullFields is a list of field names (e.g. "ClusterName") to include
873	// in API requests with the JSON null value. By default, fields with
874	// empty values are omitted from API requests. However, any field with
875	// an empty value appearing in NullFields will be sent to the server as
876	// null. It is an error if a field in this list has a non-empty value.
877	// This may be used to include null fields in Patch requests.
878	NullFields []string `json:"-"`
879}
880
881func (s *ClusterOperationMetadata) MarshalJSON() ([]byte, error) {
882	type NoMethod ClusterOperationMetadata
883	raw := NoMethod(*s)
884	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
885}
886
887// ClusterOperationStatus: The status of the operation.
888type ClusterOperationStatus struct {
889	// Details: Output only. A message containing any operation metadata
890	// details.
891	Details string `json:"details,omitempty"`
892
893	// InnerState: Output only. A message containing the detailed operation
894	// state.
895	InnerState string `json:"innerState,omitempty"`
896
897	// State: Output only. A message containing the operation state.
898	//
899	// Possible values:
900	//   "UNKNOWN" - Unused.
901	//   "PENDING" - The operation has been created.
902	//   "RUNNING" - The operation is running.
903	//   "DONE" - The operation is done; either cancelled or completed.
904	State string `json:"state,omitempty"`
905
906	// StateStartTime: Output only. The time this state was entered.
907	StateStartTime string `json:"stateStartTime,omitempty"`
908
909	// ForceSendFields is a list of field names (e.g. "Details") to
910	// unconditionally include in API requests. By default, fields with
911	// empty values are omitted from API requests. However, any non-pointer,
912	// non-interface field appearing in ForceSendFields will be sent to the
913	// server regardless of whether the field is empty or not. This may be
914	// used to include empty fields in Patch requests.
915	ForceSendFields []string `json:"-"`
916
917	// NullFields is a list of field names (e.g. "Details") to include in
918	// API requests with the JSON null value. By default, fields with empty
919	// values are omitted from API requests. However, any field with an
920	// empty value appearing in NullFields will be sent to the server as
921	// null. It is an error if a field in this list has a non-empty value.
922	// This may be used to include null fields in Patch requests.
923	NullFields []string `json:"-"`
924}
925
926func (s *ClusterOperationStatus) MarshalJSON() ([]byte, error) {
927	type NoMethod ClusterOperationStatus
928	raw := NoMethod(*s)
929	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
930}
931
932// ClusterSelector: A selector that chooses target cluster for jobs
933// based on metadata.
934type ClusterSelector struct {
935	// ClusterLabels: Required. The cluster labels. Cluster must have all
936	// labels to match.
937	ClusterLabels map[string]string `json:"clusterLabels,omitempty"`
938
939	// Zone: Optional. The zone where workflow process executes. This
940	// parameter does not affect the selection of the cluster.If
941	// unspecified, the zone of the first cluster matching the selector is
942	// used.
943	Zone string `json:"zone,omitempty"`
944
945	// ForceSendFields is a list of field names (e.g. "ClusterLabels") to
946	// unconditionally include in API requests. By default, fields with
947	// empty values are omitted from API requests. However, any non-pointer,
948	// non-interface field appearing in ForceSendFields will be sent to the
949	// server regardless of whether the field is empty or not. This may be
950	// used to include empty fields in Patch requests.
951	ForceSendFields []string `json:"-"`
952
953	// NullFields is a list of field names (e.g. "ClusterLabels") to include
954	// in API requests with the JSON null value. By default, fields with
955	// empty values are omitted from API requests. However, any field with
956	// an empty value appearing in NullFields will be sent to the server as
957	// null. It is an error if a field in this list has a non-empty value.
958	// This may be used to include null fields in Patch requests.
959	NullFields []string `json:"-"`
960}
961
962func (s *ClusterSelector) MarshalJSON() ([]byte, error) {
963	type NoMethod ClusterSelector
964	raw := NoMethod(*s)
965	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
966}
967
968// ClusterStatus: The status of a cluster and its instances.
969type ClusterStatus struct {
970	// Detail: Output only. Optional details of cluster's state.
971	Detail string `json:"detail,omitempty"`
972
973	// State: Output only. The cluster's state.
974	//
975	// Possible values:
976	//   "UNKNOWN" - The cluster state is unknown.
977	//   "CREATING" - The cluster is being created and set up. It is not
978	// ready for use.
979	//   "RUNNING" - The cluster is currently running and healthy. It is
980	// ready for use.
981	//   "ERROR" - The cluster encountered an error. It is not ready for
982	// use.
983	//   "ERROR_DUE_TO_UPDATE" - The cluster has encountered an error while
984	// being updated. Jobs can be submitted to the cluster, but the cluster
985	// cannot be updated.
986	//   "DELETING" - The cluster is being deleted. It cannot be used.
987	//   "UPDATING" - The cluster is being updated. It continues to accept
988	// and process jobs.
989	//   "STOPPING" - The cluster is being stopped. It cannot be used.
990	//   "STOPPED" - The cluster is currently stopped. It is not ready for
991	// use.
992	//   "STARTING" - The cluster is being started. It is not ready for use.
993	State string `json:"state,omitempty"`
994
995	// StateStartTime: Output only. Time when this state was entered (see
996	// JSON representation of Timestamp
997	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
998	StateStartTime string `json:"stateStartTime,omitempty"`
999
1000	// Substate: Output only. Additional state information that includes
1001	// status reported by the agent.
1002	//
1003	// Possible values:
1004	//   "UNSPECIFIED" - The cluster substate is unknown.
1005	//   "UNHEALTHY" - The cluster is known to be in an unhealthy state (for
1006	// example, critical daemons are not running or HDFS capacity is
1007	// exhausted).Applies to RUNNING state.
1008	//   "STALE_STATUS" - The agent-reported status is out of date (may
1009	// occur if Dataproc loses communication with Agent).Applies to RUNNING
1010	// state.
1011	Substate string `json:"substate,omitempty"`
1012
1013	// ForceSendFields is a list of field names (e.g. "Detail") to
1014	// unconditionally include in API requests. By default, fields with
1015	// empty values are omitted from API requests. However, any non-pointer,
1016	// non-interface field appearing in ForceSendFields will be sent to the
1017	// server regardless of whether the field is empty or not. This may be
1018	// used to include empty fields in Patch requests.
1019	ForceSendFields []string `json:"-"`
1020
1021	// NullFields is a list of field names (e.g. "Detail") to include in API
1022	// requests with the JSON null value. By default, fields with empty
1023	// values are omitted from API requests. However, any field with an
1024	// empty value appearing in NullFields will be sent to the server as
1025	// null. It is an error if a field in this list has a non-empty value.
1026	// This may be used to include null fields in Patch requests.
1027	NullFields []string `json:"-"`
1028}
1029
1030func (s *ClusterStatus) MarshalJSON() ([]byte, error) {
1031	type NoMethod ClusterStatus
1032	raw := NoMethod(*s)
1033	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1034}
1035
1036// DiagnoseClusterRequest: A request to collect cluster diagnostic
1037// information.
1038type DiagnoseClusterRequest struct {
1039}
1040
1041// DiagnoseClusterResults: The location of diagnostic output.
1042type DiagnoseClusterResults struct {
1043	// OutputUri: Output only. The Cloud Storage URI of the diagnostic
1044	// output. The output report is a plain text file with a summary of
1045	// collected diagnostics.
1046	OutputUri string `json:"outputUri,omitempty"`
1047
1048	// ForceSendFields is a list of field names (e.g. "OutputUri") to
1049	// unconditionally include in API requests. By default, fields with
1050	// empty values are omitted from API requests. However, any non-pointer,
1051	// non-interface field appearing in ForceSendFields will be sent to the
1052	// server regardless of whether the field is empty or not. This may be
1053	// used to include empty fields in Patch requests.
1054	ForceSendFields []string `json:"-"`
1055
1056	// NullFields is a list of field names (e.g. "OutputUri") to include in
1057	// API requests with the JSON null value. By default, fields with empty
1058	// values are omitted from API requests. However, any field with an
1059	// empty value appearing in NullFields will be sent to the server as
1060	// null. It is an error if a field in this list has a non-empty value.
1061	// This may be used to include null fields in Patch requests.
1062	NullFields []string `json:"-"`
1063}
1064
1065func (s *DiagnoseClusterResults) MarshalJSON() ([]byte, error) {
1066	type NoMethod DiagnoseClusterResults
1067	raw := NoMethod(*s)
1068	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1069}
1070
1071// DiskConfig: Specifies the config of disk options for a group of VM
1072// instances.
1073type DiskConfig struct {
1074	// BootDiskSizeGb: Optional. Size in GB of the boot disk (default is
1075	// 500GB).
1076	BootDiskSizeGb int64 `json:"bootDiskSizeGb,omitempty"`
1077
1078	// BootDiskType: Optional. Type of the boot disk (default is
1079	// "pd-standard"). Valid values: "pd-balanced" (Persistent Disk Balanced
1080	// Solid State Drive), "pd-ssd" (Persistent Disk Solid State Drive), or
1081	// "pd-standard" (Persistent Disk Hard Disk Drive). See Disk types
1082	// (https://cloud.google.com/compute/docs/disks#disk-types).
1083	BootDiskType string `json:"bootDiskType,omitempty"`
1084
1085	// NumLocalSsds: Number of attached SSDs, from 0 to 4 (default is 0). If
1086	// SSDs are not attached, the boot disk is used to store runtime logs
1087	// and HDFS (https://hadoop.apache.org/docs/r1.2.1/hdfs_user_guide.html)
1088	// data. If one or more SSDs are attached, this runtime bulk data is
1089	// spread across them, and the boot disk contains only basic config and
1090	// installed binaries.
1091	NumLocalSsds int64 `json:"numLocalSsds,omitempty"`
1092
1093	// ForceSendFields is a list of field names (e.g. "BootDiskSizeGb") to
1094	// unconditionally include in API requests. By default, fields with
1095	// empty values are omitted from API requests. However, any non-pointer,
1096	// non-interface field appearing in ForceSendFields will be sent to the
1097	// server regardless of whether the field is empty or not. This may be
1098	// used to include empty fields in Patch requests.
1099	ForceSendFields []string `json:"-"`
1100
1101	// NullFields is a list of field names (e.g. "BootDiskSizeGb") to
1102	// include in API requests with the JSON null value. By default, fields
1103	// with empty values are omitted from API requests. However, any field
1104	// with an empty value appearing in NullFields will be sent to the
1105	// server as null. It is an error if a field in this list has a
1106	// non-empty value. This may be used to include null fields in Patch
1107	// requests.
1108	NullFields []string `json:"-"`
1109}
1110
1111func (s *DiskConfig) MarshalJSON() ([]byte, error) {
1112	type NoMethod DiskConfig
1113	raw := NoMethod(*s)
1114	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1115}
1116
1117// Empty: A generic empty message that you can re-use to avoid defining
1118// duplicated empty messages in your APIs. A typical example is to use
1119// it as the request or the response type of an API method. For
1120// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
1121// (google.protobuf.Empty); } The JSON representation for Empty is empty
1122// JSON object {}.
1123type Empty struct {
1124	// ServerResponse contains the HTTP response code and headers from the
1125	// server.
1126	googleapi.ServerResponse `json:"-"`
1127}
1128
1129// EncryptionConfig: Encryption settings for the cluster.
1130type EncryptionConfig struct {
1131	// GcePdKmsKeyName: Optional. The Cloud KMS key name to use for PD disk
1132	// encryption for all instances in the cluster.
1133	GcePdKmsKeyName string `json:"gcePdKmsKeyName,omitempty"`
1134
1135	// ForceSendFields is a list of field names (e.g. "GcePdKmsKeyName") to
1136	// unconditionally include in API requests. By default, fields with
1137	// empty values are omitted from API requests. However, any non-pointer,
1138	// non-interface field appearing in ForceSendFields will be sent to the
1139	// server regardless of whether the field is empty or not. This may be
1140	// used to include empty fields in Patch requests.
1141	ForceSendFields []string `json:"-"`
1142
1143	// NullFields is a list of field names (e.g. "GcePdKmsKeyName") to
1144	// include in API requests with the JSON null value. By default, fields
1145	// with empty values are omitted from API requests. However, any field
1146	// with an empty value appearing in NullFields will be sent to the
1147	// server as null. It is an error if a field in this list has a
1148	// non-empty value. This may be used to include null fields in Patch
1149	// requests.
1150	NullFields []string `json:"-"`
1151}
1152
1153func (s *EncryptionConfig) MarshalJSON() ([]byte, error) {
1154	type NoMethod EncryptionConfig
1155	raw := NoMethod(*s)
1156	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1157}
1158
1159// EndpointConfig: Endpoint config for this cluster
1160type EndpointConfig struct {
1161	// EnableHttpPortAccess: Optional. If true, enable http access to
1162	// specific ports on the cluster from external sources. Defaults to
1163	// false.
1164	EnableHttpPortAccess bool `json:"enableHttpPortAccess,omitempty"`
1165
1166	// HttpPorts: Output only. The map of port descriptions to URLs. Will
1167	// only be populated if enable_http_port_access is true.
1168	HttpPorts map[string]string `json:"httpPorts,omitempty"`
1169
1170	// ForceSendFields is a list of field names (e.g.
1171	// "EnableHttpPortAccess") to unconditionally include in API requests.
1172	// By default, fields with empty values are omitted from API requests.
1173	// However, any non-pointer, non-interface field appearing in
1174	// ForceSendFields will be sent to the server regardless of whether the
1175	// field is empty or not. This may be used to include empty fields in
1176	// Patch requests.
1177	ForceSendFields []string `json:"-"`
1178
1179	// NullFields is a list of field names (e.g. "EnableHttpPortAccess") to
1180	// include in API requests with the JSON null value. By default, fields
1181	// with empty values are omitted from API requests. However, any field
1182	// with an empty value appearing in NullFields will be sent to the
1183	// server as null. It is an error if a field in this list has a
1184	// non-empty value. This may be used to include null fields in Patch
1185	// requests.
1186	NullFields []string `json:"-"`
1187}
1188
1189func (s *EndpointConfig) MarshalJSON() ([]byte, error) {
1190	type NoMethod EndpointConfig
1191	raw := NoMethod(*s)
1192	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1193}
1194
1195// Expr: Represents a textual expression in the Common Expression
1196// Language (CEL) syntax. CEL is a C-like expression language. The
1197// syntax and semantics of CEL are documented at
1198// https://github.com/google/cel-spec.Example (Comparison): title:
1199// "Summary size limit" description: "Determines if a summary is less
1200// than 100 chars" expression: "document.summary.size() < 100" Example
1201// (Equality): title: "Requestor is owner" description: "Determines if
1202// requestor is the document owner" expression: "document.owner ==
1203// request.auth.claims.email" Example (Logic): title: "Public documents"
1204// description: "Determine whether the document should be publicly
1205// visible" expression: "document.type != 'private' && document.type !=
1206// 'internal'" Example (Data Manipulation): title: "Notification string"
1207// description: "Create a notification string with a timestamp."
1208// expression: "'New message received at ' +
1209// string(document.create_time)" The exact variables and functions that
1210// may be referenced within an expression are determined by the service
1211// that evaluates it. See the service documentation for additional
1212// information.
1213type Expr struct {
1214	// Description: Optional. Description of the expression. This is a
1215	// longer text which describes the expression, e.g. when hovered over it
1216	// in a UI.
1217	Description string `json:"description,omitempty"`
1218
1219	// Expression: Textual representation of an expression in Common
1220	// Expression Language syntax.
1221	Expression string `json:"expression,omitempty"`
1222
1223	// Location: Optional. String indicating the location of the expression
1224	// for error reporting, e.g. a file name and a position in the file.
1225	Location string `json:"location,omitempty"`
1226
1227	// Title: Optional. Title for the expression, i.e. a short string
1228	// describing its purpose. This can be used e.g. in UIs which allow to
1229	// enter the expression.
1230	Title string `json:"title,omitempty"`
1231
1232	// ForceSendFields is a list of field names (e.g. "Description") to
1233	// unconditionally include in API requests. By default, fields with
1234	// empty values are omitted from API requests. However, any non-pointer,
1235	// non-interface field appearing in ForceSendFields will be sent to the
1236	// server regardless of whether the field is empty or not. This may be
1237	// used to include empty fields in Patch requests.
1238	ForceSendFields []string `json:"-"`
1239
1240	// NullFields is a list of field names (e.g. "Description") to include
1241	// in API requests with the JSON null value. By default, fields with
1242	// empty values are omitted from API requests. However, any field with
1243	// an empty value appearing in NullFields will be sent to the server as
1244	// null. It is an error if a field in this list has a non-empty value.
1245	// This may be used to include null fields in Patch requests.
1246	NullFields []string `json:"-"`
1247}
1248
1249func (s *Expr) MarshalJSON() ([]byte, error) {
1250	type NoMethod Expr
1251	raw := NoMethod(*s)
1252	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1253}
1254
1255// GceClusterConfig: Common config settings for resources of Compute
1256// Engine cluster instances, applicable to all instances in the cluster.
1257type GceClusterConfig struct {
1258	// InternalIpOnly: Optional. If true, all instances in the cluster will
1259	// only have internal IP addresses. By default, clusters are not
1260	// restricted to internal IP addresses, and will have ephemeral external
1261	// IP addresses assigned to each instance. This internal_ip_only
1262	// restriction can only be enabled for subnetwork enabled networks, and
1263	// all off-cluster dependencies must be configured to be accessible
1264	// without external IP addresses.
1265	InternalIpOnly bool `json:"internalIpOnly,omitempty"`
1266
1267	// Metadata: The Compute Engine metadata entries to add to all instances
1268	// (see Project and instance metadata
1269	// (https://cloud.google.com/compute/docs/storing-retrieving-metadata#project_and_instance_metadata)).
1270	Metadata map[string]string `json:"metadata,omitempty"`
1271
1272	// NetworkUri: Optional. The Compute Engine network to be used for
1273	// machine communications. Cannot be specified with subnetwork_uri. If
1274	// neither network_uri nor subnetwork_uri is specified, the "default"
1275	// network of the project is used, if it exists. Cannot be a "Custom
1276	// Subnet Network" (see Using Subnetworks
1277	// (https://cloud.google.com/compute/docs/subnetworks) for more
1278	// information).A full URL, partial URI, or short name are valid.
1279	// Examples:
1280	// https://www.googleapis.com/compute/v1/projects/[project_id]/regions/global/default
1281	// projects/[project_id]/regions/global/default default
1282	NetworkUri string `json:"networkUri,omitempty"`
1283
1284	// NodeGroupAffinity: Optional. Node Group Affinity for sole-tenant
1285	// clusters.
1286	NodeGroupAffinity *NodeGroupAffinity `json:"nodeGroupAffinity,omitempty"`
1287
1288	// PrivateIpv6GoogleAccess: Optional. The type of IPv6 access for a
1289	// cluster.
1290	//
1291	// Possible values:
1292	//   "PRIVATE_IPV6_GOOGLE_ACCESS_UNSPECIFIED" - If unspecified, Compute
1293	// Engine default behavior will apply, which is the same as
1294	// INHERIT_FROM_SUBNETWORK.
1295	//   "INHERIT_FROM_SUBNETWORK" - Private access to and from Google
1296	// Services configuration inherited from the subnetwork configuration.
1297	// This is the default Compute Engine behavior.
1298	//   "OUTBOUND" - Enables outbound private IPv6 access to Google
1299	// Services from the Dataproc cluster.
1300	//   "BIDIRECTIONAL" - Enables bidirectional private IPv6 access between
1301	// Google Services and the Dataproc cluster.
1302	PrivateIpv6GoogleAccess string `json:"privateIpv6GoogleAccess,omitempty"`
1303
1304	// ReservationAffinity: Optional. Reservation Affinity for consuming
1305	// Zonal reservation.
1306	ReservationAffinity *ReservationAffinity `json:"reservationAffinity,omitempty"`
1307
1308	// ServiceAccount: Optional. The Dataproc service account
1309	// (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/service-accounts#service_accounts_in_dataproc)
1310	// (also see VM Data Plane identity
1311	// (https://cloud.google.com/dataproc/docs/concepts/iam/dataproc-principals#vm_service_account_data_plane_identity))
1312	// used by Dataproc cluster VM instances to access Google Cloud Platform
1313	// services.If not specified, the Compute Engine default service account
1314	// (https://cloud.google.com/compute/docs/access/service-accounts#default_service_account)
1315	// is used.
1316	ServiceAccount string `json:"serviceAccount,omitempty"`
1317
1318	// ServiceAccountScopes: Optional. The URIs of service account scopes to
1319	// be included in Compute Engine instances. The following base set of
1320	// scopes is always included:
1321	// https://www.googleapis.com/auth/cloud.useraccounts.readonly
1322	// https://www.googleapis.com/auth/devstorage.read_write
1323	// https://www.googleapis.com/auth/logging.writeIf no scopes are
1324	// specified, the following defaults are also provided:
1325	// https://www.googleapis.com/auth/bigquery
1326	// https://www.googleapis.com/auth/bigtable.admin.table
1327	// https://www.googleapis.com/auth/bigtable.data
1328	// https://www.googleapis.com/auth/devstorage.full_control
1329	ServiceAccountScopes []string `json:"serviceAccountScopes,omitempty"`
1330
1331	// ShieldedInstanceConfig: Optional. Shielded Instance Config for
1332	// clusters using Compute Engine Shielded VMs
1333	// (https://cloud.google.com/security/shielded-cloud/shielded-vm).
1334	ShieldedInstanceConfig *ShieldedInstanceConfig `json:"shieldedInstanceConfig,omitempty"`
1335
1336	// SubnetworkUri: Optional. The Compute Engine subnetwork to be used for
1337	// machine communications. Cannot be specified with network_uri.A full
1338	// URL, partial URI, or short name are valid. Examples:
1339	// https://www.googleapis.com/compute/v1/projects/[project_id]/regions/us-east1/subnetworks/sub0
1340	// projects/[project_id]/regions/us-east1/subnetworks/sub0 sub0
1341	SubnetworkUri string `json:"subnetworkUri,omitempty"`
1342
1343	// Tags: The Compute Engine tags to add to all instances (see Tagging
1344	// instances
1345	// (https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
1346	Tags []string `json:"tags,omitempty"`
1347
1348	// ZoneUri: Optional. The zone where the Compute Engine cluster will be
1349	// located. On a create request, it is required in the "global" region.
1350	// If omitted in a non-global Dataproc region, the service will pick a
1351	// zone in the corresponding Compute Engine region. On a get request,
1352	// zone will always be present.A full URL, partial URI, or short name
1353	// are valid. Examples:
1354	// https://www.googleapis.com/compute/v1/projects/[project_id]/zones/[zone]
1355	// projects/[project_id]/zones/[zone] us-central1-f
1356	ZoneUri string `json:"zoneUri,omitempty"`
1357
1358	// ForceSendFields is a list of field names (e.g. "InternalIpOnly") to
1359	// unconditionally include in API requests. By default, fields with
1360	// empty values are omitted from API requests. However, any non-pointer,
1361	// non-interface field appearing in ForceSendFields will be sent to the
1362	// server regardless of whether the field is empty or not. This may be
1363	// used to include empty fields in Patch requests.
1364	ForceSendFields []string `json:"-"`
1365
1366	// NullFields is a list of field names (e.g. "InternalIpOnly") to
1367	// include in API requests with the JSON null value. By default, fields
1368	// with empty values are omitted from API requests. However, any field
1369	// with an empty value appearing in NullFields will be sent to the
1370	// server as null. It is an error if a field in this list has a
1371	// non-empty value. This may be used to include null fields in Patch
1372	// requests.
1373	NullFields []string `json:"-"`
1374}
1375
1376func (s *GceClusterConfig) MarshalJSON() ([]byte, error) {
1377	type NoMethod GceClusterConfig
1378	raw := NoMethod(*s)
1379	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1380}
1381
1382// GetIamPolicyRequest: Request message for GetIamPolicy method.
1383type GetIamPolicyRequest struct {
1384	// Options: OPTIONAL: A GetPolicyOptions object for specifying options
1385	// to GetIamPolicy.
1386	Options *GetPolicyOptions `json:"options,omitempty"`
1387
1388	// ForceSendFields is a list of field names (e.g. "Options") to
1389	// unconditionally include in API requests. By default, fields with
1390	// empty values are omitted from API requests. However, any non-pointer,
1391	// non-interface field appearing in ForceSendFields will be sent to the
1392	// server regardless of whether the field is empty or not. This may be
1393	// used to include empty fields in Patch requests.
1394	ForceSendFields []string `json:"-"`
1395
1396	// NullFields is a list of field names (e.g. "Options") to include in
1397	// API requests with the JSON null value. By default, fields with empty
1398	// values are omitted from API requests. However, any field with an
1399	// empty value appearing in NullFields will be sent to the server as
1400	// null. It is an error if a field in this list has a non-empty value.
1401	// This may be used to include null fields in Patch requests.
1402	NullFields []string `json:"-"`
1403}
1404
1405func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1406	type NoMethod GetIamPolicyRequest
1407	raw := NoMethod(*s)
1408	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1409}
1410
1411// GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
1412type GetPolicyOptions struct {
1413	// RequestedPolicyVersion: Optional. The policy format version to be
1414	// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
1415	// value will be rejected.Requests for policies with any conditional
1416	// bindings must specify version 3. Policies without any conditional
1417	// bindings may specify any valid value or leave the field unset.To
1418	// learn which resources support conditions in their IAM policies, see
1419	// the IAM documentation
1420	// (https://cloud.google.com/iam/help/conditions/resource-policies).
1421	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
1422
1423	// ForceSendFields is a list of field names (e.g.
1424	// "RequestedPolicyVersion") to unconditionally include in API requests.
1425	// By default, fields with empty values are omitted from API requests.
1426	// However, any non-pointer, non-interface field appearing in
1427	// ForceSendFields will be sent to the server regardless of whether the
1428	// field is empty or not. This may be used to include empty fields in
1429	// Patch requests.
1430	ForceSendFields []string `json:"-"`
1431
1432	// NullFields is a list of field names (e.g. "RequestedPolicyVersion")
1433	// to include in API requests with the JSON null value. By default,
1434	// fields with empty values are omitted from API requests. However, any
1435	// field with an empty value appearing in NullFields will be sent to the
1436	// server as null. It is an error if a field in this list has a
1437	// non-empty value. This may be used to include null fields in Patch
1438	// requests.
1439	NullFields []string `json:"-"`
1440}
1441
1442func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
1443	type NoMethod GetPolicyOptions
1444	raw := NoMethod(*s)
1445	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1446}
1447
1448// GkeClusterConfig: The GKE config for this cluster.
1449type GkeClusterConfig struct {
1450	// NamespacedGkeDeploymentTarget: Optional. A target for the deployment.
1451	NamespacedGkeDeploymentTarget *NamespacedGkeDeploymentTarget `json:"namespacedGkeDeploymentTarget,omitempty"`
1452
1453	// ForceSendFields is a list of field names (e.g.
1454	// "NamespacedGkeDeploymentTarget") to unconditionally include in API
1455	// requests. By default, fields with empty values are omitted from API
1456	// requests. However, any non-pointer, non-interface field appearing in
1457	// ForceSendFields will be sent to the server regardless of whether the
1458	// field is empty or not. This may be used to include empty fields in
1459	// Patch requests.
1460	ForceSendFields []string `json:"-"`
1461
1462	// NullFields is a list of field names (e.g.
1463	// "NamespacedGkeDeploymentTarget") to include in API requests with the
1464	// JSON null value. By default, fields with empty values are omitted
1465	// from API requests. However, any field with an empty value appearing
1466	// in NullFields will be sent to the server as null. It is an error if a
1467	// field in this list has a non-empty value. This may be used to include
1468	// null fields in Patch requests.
1469	NullFields []string `json:"-"`
1470}
1471
1472func (s *GkeClusterConfig) MarshalJSON() ([]byte, error) {
1473	type NoMethod GkeClusterConfig
1474	raw := NoMethod(*s)
1475	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1476}
1477
1478// HadoopJob: A Dataproc job for running Apache Hadoop MapReduce
1479// (https://hadoop.apache.org/docs/current/hadoop-mapreduce-client/hadoop-mapreduce-client-core/MapReduceTutorial.html)
1480// jobs on Apache Hadoop YARN
1481// (https://hadoop.apache.org/docs/r2.7.1/hadoop-yarn/hadoop-yarn-site/YARN.html).
1482type HadoopJob struct {
1483	// ArchiveUris: Optional. HCFS URIs of archives to be extracted in the
1484	// working directory of Hadoop drivers and tasks. Supported file types:
1485	// .jar, .tar, .tar.gz, .tgz, or .zip.
1486	ArchiveUris []string `json:"archiveUris,omitempty"`
1487
1488	// Args: Optional. The arguments to pass to the driver. Do not include
1489	// arguments, such as -libjars or -Dfoo=bar, that can be set as job
1490	// properties, since a collision may occur that causes an incorrect job
1491	// submission.
1492	Args []string `json:"args,omitempty"`
1493
1494	// FileUris: Optional. HCFS (Hadoop Compatible Filesystem) URIs of files
1495	// to be copied to the working directory of Hadoop drivers and
1496	// distributed tasks. Useful for naively parallel tasks.
1497	FileUris []string `json:"fileUris,omitempty"`
1498
1499	// JarFileUris: Optional. Jar file URIs to add to the CLASSPATHs of the
1500	// Hadoop driver and tasks.
1501	JarFileUris []string `json:"jarFileUris,omitempty"`
1502
1503	// LoggingConfig: Optional. The runtime log config for job execution.
1504	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
1505
1506	// MainClass: The name of the driver's main class. The jar file
1507	// containing the class must be in the default CLASSPATH or specified in
1508	// jar_file_uris.
1509	MainClass string `json:"mainClass,omitempty"`
1510
1511	// MainJarFileUri: The HCFS URI of the jar file containing the main
1512	// class. Examples:
1513	// 'gs://foo-bucket/analytics-binaries/extract-useful-metrics-mr.jar'
1514	// 'hdfs:/tmp/test-samples/custom-wordcount.jar'
1515	// 'file:///home/usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar'
1516	MainJarFileUri string `json:"mainJarFileUri,omitempty"`
1517
1518	// Properties: Optional. A mapping of property names to values, used to
1519	// configure Hadoop. Properties that conflict with values set by the
1520	// Dataproc API may be overwritten. Can include properties set in
1521	// /etc/hadoop/conf/*-site and classes in user code.
1522	Properties map[string]string `json:"properties,omitempty"`
1523
1524	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
1525	// unconditionally include in API requests. By default, fields with
1526	// empty values are omitted from API requests. However, any non-pointer,
1527	// non-interface field appearing in ForceSendFields will be sent to the
1528	// server regardless of whether the field is empty or not. This may be
1529	// used to include empty fields in Patch requests.
1530	ForceSendFields []string `json:"-"`
1531
1532	// NullFields is a list of field names (e.g. "ArchiveUris") to include
1533	// in API requests with the JSON null value. By default, fields with
1534	// empty values are omitted from API requests. However, any field with
1535	// an empty value appearing in NullFields will be sent to the server as
1536	// null. It is an error if a field in this list has a non-empty value.
1537	// This may be used to include null fields in Patch requests.
1538	NullFields []string `json:"-"`
1539}
1540
1541func (s *HadoopJob) MarshalJSON() ([]byte, error) {
1542	type NoMethod HadoopJob
1543	raw := NoMethod(*s)
1544	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1545}
1546
1547// HiveJob: A Dataproc job for running Apache Hive
1548// (https://hive.apache.org/) queries on YARN.
1549type HiveJob struct {
1550	// ContinueOnFailure: Optional. Whether to continue executing queries if
1551	// a query fails. The default value is false. Setting to true can be
1552	// useful when executing independent parallel queries.
1553	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
1554
1555	// JarFileUris: Optional. HCFS URIs of jar files to add to the CLASSPATH
1556	// of the Hive server and Hadoop MapReduce (MR) tasks. Can contain Hive
1557	// SerDes and UDFs.
1558	JarFileUris []string `json:"jarFileUris,omitempty"`
1559
1560	// Properties: Optional. A mapping of property names and values, used to
1561	// configure Hive. Properties that conflict with values set by the
1562	// Dataproc API may be overwritten. Can include properties set in
1563	// /etc/hadoop/conf/*-site.xml, /etc/hive/conf/hive-site.xml, and
1564	// classes in user code.
1565	Properties map[string]string `json:"properties,omitempty"`
1566
1567	// QueryFileUri: The HCFS URI of the script that contains Hive queries.
1568	QueryFileUri string `json:"queryFileUri,omitempty"`
1569
1570	// QueryList: A list of queries.
1571	QueryList *QueryList `json:"queryList,omitempty"`
1572
1573	// ScriptVariables: Optional. Mapping of query variable names to values
1574	// (equivalent to the Hive command: SET name="value";).
1575	ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
1576
1577	// ForceSendFields is a list of field names (e.g. "ContinueOnFailure")
1578	// to unconditionally include in API requests. By default, fields with
1579	// empty values are omitted from API requests. However, any non-pointer,
1580	// non-interface field appearing in ForceSendFields will be sent to the
1581	// server regardless of whether the field is empty or not. This may be
1582	// used to include empty fields in Patch requests.
1583	ForceSendFields []string `json:"-"`
1584
1585	// NullFields is a list of field names (e.g. "ContinueOnFailure") to
1586	// include in API requests with the JSON null value. By default, fields
1587	// with empty values are omitted from API requests. However, any field
1588	// with an empty value appearing in NullFields will be sent to the
1589	// server as null. It is an error if a field in this list has a
1590	// non-empty value. This may be used to include null fields in Patch
1591	// requests.
1592	NullFields []string `json:"-"`
1593}
1594
1595func (s *HiveJob) MarshalJSON() ([]byte, error) {
1596	type NoMethod HiveJob
1597	raw := NoMethod(*s)
1598	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1599}
1600
1601// InjectCredentialsRequest: A request to inject credentials into a
1602// cluster.
1603type InjectCredentialsRequest struct {
1604	// ClusterUuid: Required. The cluster UUID.
1605	ClusterUuid string `json:"clusterUuid,omitempty"`
1606
1607	// CredentialsCiphertext: Required. The encrypted credentials being
1608	// injected in to the cluster.The client is responsible for encrypting
1609	// the credentials in a way that is supported by the cluster.A wrapped
1610	// value is used here so that the actual contents of the encrypted
1611	// credentials are not written to audit logs.
1612	CredentialsCiphertext string `json:"credentialsCiphertext,omitempty"`
1613
1614	// ForceSendFields is a list of field names (e.g. "ClusterUuid") to
1615	// unconditionally include in API requests. By default, fields with
1616	// empty values are omitted from API requests. However, any non-pointer,
1617	// non-interface field appearing in ForceSendFields will be sent to the
1618	// server regardless of whether the field is empty or not. This may be
1619	// used to include empty fields in Patch requests.
1620	ForceSendFields []string `json:"-"`
1621
1622	// NullFields is a list of field names (e.g. "ClusterUuid") to include
1623	// in API requests with the JSON null value. By default, fields with
1624	// empty values are omitted from API requests. However, any field with
1625	// an empty value appearing in NullFields will be sent to the server as
1626	// null. It is an error if a field in this list has a non-empty value.
1627	// This may be used to include null fields in Patch requests.
1628	NullFields []string `json:"-"`
1629}
1630
1631func (s *InjectCredentialsRequest) MarshalJSON() ([]byte, error) {
1632	type NoMethod InjectCredentialsRequest
1633	raw := NoMethod(*s)
1634	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1635}
1636
1637// InstanceGroupAutoscalingPolicyConfig: Configuration for the size
1638// bounds of an instance group, including its proportional size to other
1639// groups.
1640type InstanceGroupAutoscalingPolicyConfig struct {
1641	// MaxInstances: Optional. Maximum number of instances for this group.
1642	// Required for primary workers. Note that by default, clusters will not
1643	// use secondary workers. Required for secondary workers if the minimum
1644	// secondary instances is set.Primary workers - Bounds: [min_instances,
1645	// ). Required. Secondary workers - Bounds: [min_instances, ). Default:
1646	// 0.
1647	MaxInstances int64 `json:"maxInstances,omitempty"`
1648
1649	// MinInstances: Optional. Minimum number of instances for this
1650	// group.Primary workers - Bounds: 2, max_instances. Default: 2.
1651	// Secondary workers - Bounds: 0, max_instances. Default: 0.
1652	MinInstances int64 `json:"minInstances,omitempty"`
1653
1654	// Weight: Optional. Weight for the instance group, which is used to
1655	// determine the fraction of total workers in the cluster from this
1656	// instance group. For example, if primary workers have weight 2, and
1657	// secondary workers have weight 1, the cluster will have approximately
1658	// 2 primary workers for each secondary worker.The cluster may not reach
1659	// the specified balance if constrained by min/max bounds or other
1660	// autoscaling settings. For example, if max_instances for secondary
1661	// workers is 0, then only primary workers will be added. The cluster
1662	// can also be out of balance when created.If weight is not set on any
1663	// instance group, the cluster will default to equal weight for all
1664	// groups: the cluster will attempt to maintain an equal number of
1665	// workers in each group within the configured size bounds for each
1666	// group. If weight is set for one group only, the cluster will default
1667	// to zero weight on the unset group. For example if weight is set only
1668	// on primary workers, the cluster will use primary workers only and no
1669	// secondary workers.
1670	Weight int64 `json:"weight,omitempty"`
1671
1672	// ForceSendFields is a list of field names (e.g. "MaxInstances") to
1673	// unconditionally include in API requests. By default, fields with
1674	// empty values are omitted from API requests. However, any non-pointer,
1675	// non-interface field appearing in ForceSendFields will be sent to the
1676	// server regardless of whether the field is empty or not. This may be
1677	// used to include empty fields in Patch requests.
1678	ForceSendFields []string `json:"-"`
1679
1680	// NullFields is a list of field names (e.g. "MaxInstances") to include
1681	// in API requests with the JSON null value. By default, fields with
1682	// empty values are omitted from API requests. However, any field with
1683	// an empty value appearing in NullFields will be sent to the server as
1684	// null. It is an error if a field in this list has a non-empty value.
1685	// This may be used to include null fields in Patch requests.
1686	NullFields []string `json:"-"`
1687}
1688
1689func (s *InstanceGroupAutoscalingPolicyConfig) MarshalJSON() ([]byte, error) {
1690	type NoMethod InstanceGroupAutoscalingPolicyConfig
1691	raw := NoMethod(*s)
1692	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1693}
1694
1695// InstanceGroupConfig: The config settings for Compute Engine resources
1696// in an instance group, such as a master or worker group.
1697type InstanceGroupConfig struct {
1698	// Accelerators: Optional. The Compute Engine accelerator configuration
1699	// for these instances.
1700	Accelerators []*AcceleratorConfig `json:"accelerators,omitempty"`
1701
1702	// DiskConfig: Optional. Disk option config settings.
1703	DiskConfig *DiskConfig `json:"diskConfig,omitempty"`
1704
1705	// ImageUri: Optional. The Compute Engine image resource used for
1706	// cluster instances.The URI can represent an image or image
1707	// family.Image examples:
1708	// https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/[image-id]
1709	// projects/[project_id]/global/images/[image-id] image-idImage family
1710	// examples. Dataproc will use the most recent image from the family:
1711	// https://www.googleapis.com/compute/beta/projects/[project_id]/global/images/family/[custom-image-family-name]
1712	// projects/[project_id]/global/images/family/[custom-image-family-name]I
1713	// f the URI is unspecified, it will be inferred from
1714	// SoftwareConfig.image_version or the system default.
1715	ImageUri string `json:"imageUri,omitempty"`
1716
1717	// InstanceNames: Output only. The list of instance names. Dataproc
1718	// derives the names from cluster_name, num_instances, and the instance
1719	// group.
1720	InstanceNames []string `json:"instanceNames,omitempty"`
1721
1722	// InstanceReferences: Output only. List of references to Compute Engine
1723	// instances.
1724	InstanceReferences []*InstanceReference `json:"instanceReferences,omitempty"`
1725
1726	// IsPreemptible: Output only. Specifies that this instance group
1727	// contains preemptible instances.
1728	IsPreemptible bool `json:"isPreemptible,omitempty"`
1729
1730	// MachineTypeUri: Optional. The Compute Engine machine type used for
1731	// cluster instances.A full URL, partial URI, or short name are valid.
1732	// Examples:
1733	// https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
1734	// projects/[project_id]/zones/us-east1-a/machineTypes/n1-standard-2
1735	// n1-standard-2Auto Zone Exception: If you are using the Dataproc Auto
1736	// Zone Placement
1737	// (https://cloud.google.com/dataproc/docs/concepts/configuring-clusters/auto-zone#using_auto_zone_placement)
1738	// feature, you must use the short name of the machine type resource,
1739	// for example, n1-standard-2.
1740	MachineTypeUri string `json:"machineTypeUri,omitempty"`
1741
1742	// ManagedGroupConfig: Output only. The config for Compute Engine
1743	// Instance Group Manager that manages this group. This is only used for
1744	// preemptible instance groups.
1745	ManagedGroupConfig *ManagedGroupConfig `json:"managedGroupConfig,omitempty"`
1746
1747	// MinCpuPlatform: Specifies the minimum cpu platform for the Instance
1748	// Group. See Dataproc -> Minimum CPU Platform
1749	// (https://cloud.google.com/dataproc/docs/concepts/compute/dataproc-min-cpu).
1750	MinCpuPlatform string `json:"minCpuPlatform,omitempty"`
1751
1752	// NumInstances: Optional. The number of VM instances in the instance
1753	// group. For HA cluster master_config groups, must be set to 3. For
1754	// standard cluster master_config groups, must be set to 1.
1755	NumInstances int64 `json:"numInstances,omitempty"`
1756
1757	// Preemptibility: Optional. Specifies the preemptibility of the
1758	// instance group.The default value for master and worker groups is
1759	// NON_PREEMPTIBLE. This default cannot be changed.The default value for
1760	// secondary instances is PREEMPTIBLE.
1761	//
1762	// Possible values:
1763	//   "PREEMPTIBILITY_UNSPECIFIED" - Preemptibility is unspecified, the
1764	// system will choose the appropriate setting for each instance group.
1765	//   "NON_PREEMPTIBLE" - Instances are non-preemptible.This option is
1766	// allowed for all instance groups and is the only valid value for
1767	// Master and Worker instance groups.
1768	//   "PREEMPTIBLE" - Instances are preemptible.This option is allowed
1769	// only for secondary worker groups.
1770	Preemptibility string `json:"preemptibility,omitempty"`
1771
1772	// ForceSendFields is a list of field names (e.g. "Accelerators") to
1773	// unconditionally include in API requests. By default, fields with
1774	// empty values are omitted from API requests. However, any non-pointer,
1775	// non-interface field appearing in ForceSendFields will be sent to the
1776	// server regardless of whether the field is empty or not. This may be
1777	// used to include empty fields in Patch requests.
1778	ForceSendFields []string `json:"-"`
1779
1780	// NullFields is a list of field names (e.g. "Accelerators") to include
1781	// in API requests with the JSON null value. By default, fields with
1782	// empty values are omitted from API requests. However, any field with
1783	// an empty value appearing in NullFields will be sent to the server as
1784	// null. It is an error if a field in this list has a non-empty value.
1785	// This may be used to include null fields in Patch requests.
1786	NullFields []string `json:"-"`
1787}
1788
1789func (s *InstanceGroupConfig) MarshalJSON() ([]byte, error) {
1790	type NoMethod InstanceGroupConfig
1791	raw := NoMethod(*s)
1792	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1793}
1794
1795// InstanceReference: A reference to a Compute Engine instance.
1796type InstanceReference struct {
1797	// InstanceId: The unique identifier of the Compute Engine instance.
1798	InstanceId string `json:"instanceId,omitempty"`
1799
1800	// InstanceName: The user-friendly name of the Compute Engine instance.
1801	InstanceName string `json:"instanceName,omitempty"`
1802
1803	// PublicKey: The public key used for sharing data with this instance.
1804	PublicKey string `json:"publicKey,omitempty"`
1805
1806	// ForceSendFields is a list of field names (e.g. "InstanceId") to
1807	// unconditionally include in API requests. By default, fields with
1808	// empty values are omitted from API requests. However, any non-pointer,
1809	// non-interface field appearing in ForceSendFields will be sent to the
1810	// server regardless of whether the field is empty or not. This may be
1811	// used to include empty fields in Patch requests.
1812	ForceSendFields []string `json:"-"`
1813
1814	// NullFields is a list of field names (e.g. "InstanceId") to include in
1815	// API requests with the JSON null value. By default, fields with empty
1816	// values are omitted from API requests. However, any field with an
1817	// empty value appearing in NullFields will be sent to the server as
1818	// null. It is an error if a field in this list has a non-empty value.
1819	// This may be used to include null fields in Patch requests.
1820	NullFields []string `json:"-"`
1821}
1822
1823func (s *InstanceReference) MarshalJSON() ([]byte, error) {
1824	type NoMethod InstanceReference
1825	raw := NoMethod(*s)
1826	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1827}
1828
1829// InstantiateWorkflowTemplateRequest: A request to instantiate a
1830// workflow template.
1831type InstantiateWorkflowTemplateRequest struct {
1832	// InstanceId: Deprecated. Please use request_id field instead.
1833	InstanceId string `json:"instanceId,omitempty"`
1834
1835	// Parameters: Optional. Map from parameter names to values that should
1836	// be used for those parameters. Values may not exceed 1000 characters.
1837	Parameters map[string]string `json:"parameters,omitempty"`
1838
1839	// RequestId: Optional. A tag that prevents multiple concurrent workflow
1840	// instances with the same tag from running. This mitigates risk of
1841	// concurrent instances started due to retries.It is recommended to
1842	// always set this value to a UUID
1843	// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag
1844	// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
1845	// and hyphens (-). The maximum length is 40 characters.
1846	RequestId string `json:"requestId,omitempty"`
1847
1848	// Version: Optional. The version of workflow template to instantiate.
1849	// If specified, the workflow will be instantiated only if the current
1850	// version of the workflow template has the supplied version.This option
1851	// cannot be used to instantiate a previous version of workflow
1852	// template.
1853	Version int64 `json:"version,omitempty"`
1854
1855	// ForceSendFields is a list of field names (e.g. "InstanceId") to
1856	// unconditionally include in API requests. By default, fields with
1857	// empty values are omitted from API requests. However, any non-pointer,
1858	// non-interface field appearing in ForceSendFields will be sent to the
1859	// server regardless of whether the field is empty or not. This may be
1860	// used to include empty fields in Patch requests.
1861	ForceSendFields []string `json:"-"`
1862
1863	// NullFields is a list of field names (e.g. "InstanceId") to include in
1864	// API requests with the JSON null value. By default, fields with empty
1865	// values are omitted from API requests. However, any field with an
1866	// empty value appearing in NullFields will be sent to the server as
1867	// null. It is an error if a field in this list has a non-empty value.
1868	// This may be used to include null fields in Patch requests.
1869	NullFields []string `json:"-"`
1870}
1871
1872func (s *InstantiateWorkflowTemplateRequest) MarshalJSON() ([]byte, error) {
1873	type NoMethod InstantiateWorkflowTemplateRequest
1874	raw := NoMethod(*s)
1875	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1876}
1877
1878// Job: A Dataproc job resource.
1879type Job struct {
1880	// Done: Output only. Indicates whether the job is completed. If the
1881	// value is false, the job is still in progress. If true, the job is
1882	// completed, and status.state field will indicate if it was successful,
1883	// failed, or cancelled.
1884	Done bool `json:"done,omitempty"`
1885
1886	// DriverControlFilesUri: Output only. If present, the location of
1887	// miscellaneous control files which may be used as part of job setup
1888	// and handling. If not present, control files may be placed in the same
1889	// location as driver_output_uri.
1890	DriverControlFilesUri string `json:"driverControlFilesUri,omitempty"`
1891
1892	// DriverOutputResourceUri: Output only. A URI pointing to the location
1893	// of the stdout of the job's driver program.
1894	DriverOutputResourceUri string `json:"driverOutputResourceUri,omitempty"`
1895
1896	// HadoopJob: Optional. Job is a Hadoop job.
1897	HadoopJob *HadoopJob `json:"hadoopJob,omitempty"`
1898
1899	// HiveJob: Optional. Job is a Hive job.
1900	HiveJob *HiveJob `json:"hiveJob,omitempty"`
1901
1902	// JobUuid: Output only. A UUID that uniquely identifies a job within
1903	// the project over time. This is in contrast to a user-settable
1904	// reference.job_id that may be reused over time.
1905	JobUuid string `json:"jobUuid,omitempty"`
1906
1907	// Labels: Optional. The labels to associate with this job. Label keys
1908	// must contain 1 to 63 characters, and must conform to RFC 1035
1909	// (https://www.ietf.org/rfc/rfc1035.txt). Label values may be empty,
1910	// but, if present, must contain 1 to 63 characters, and must conform to
1911	// RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt). No more than 32
1912	// labels can be associated with a job.
1913	Labels map[string]string `json:"labels,omitempty"`
1914
1915	// PigJob: Optional. Job is a Pig job.
1916	PigJob *PigJob `json:"pigJob,omitempty"`
1917
1918	// Placement: Required. Job information, including how, when, and where
1919	// to run the job.
1920	Placement *JobPlacement `json:"placement,omitempty"`
1921
1922	// PrestoJob: Optional. Job is a Presto job.
1923	PrestoJob *PrestoJob `json:"prestoJob,omitempty"`
1924
1925	// PysparkJob: Optional. Job is a PySpark job.
1926	PysparkJob *PySparkJob `json:"pysparkJob,omitempty"`
1927
1928	// Reference: Optional. The fully qualified reference to the job, which
1929	// can be used to obtain the equivalent REST path of the job resource.
1930	// If this property is not specified when a job is created, the server
1931	// generates a job_id.
1932	Reference *JobReference `json:"reference,omitempty"`
1933
1934	// Scheduling: Optional. Job scheduling configuration.
1935	Scheduling *JobScheduling `json:"scheduling,omitempty"`
1936
1937	// SparkJob: Optional. Job is a Spark job.
1938	SparkJob *SparkJob `json:"sparkJob,omitempty"`
1939
1940	// SparkRJob: Optional. Job is a SparkR job.
1941	SparkRJob *SparkRJob `json:"sparkRJob,omitempty"`
1942
1943	// SparkSqlJob: Optional. Job is a SparkSql job.
1944	SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"`
1945
1946	// Status: Output only. The job status. Additional application-specific
1947	// status information may be contained in the type_job and
1948	// yarn_applications fields.
1949	Status *JobStatus `json:"status,omitempty"`
1950
1951	// StatusHistory: Output only. The previous job status.
1952	StatusHistory []*JobStatus `json:"statusHistory,omitempty"`
1953
1954	// SubmittedBy: Output only. The email address of the user submitting
1955	// the job. For jobs submitted on the cluster, the address is
1956	// username@hostname.
1957	SubmittedBy string `json:"submittedBy,omitempty"`
1958
1959	// YarnApplications: Output only. The collection of YARN applications
1960	// spun up by this job.Beta Feature: This report is available for
1961	// testing purposes only. It may be changed before final release.
1962	YarnApplications []*YarnApplication `json:"yarnApplications,omitempty"`
1963
1964	// ServerResponse contains the HTTP response code and headers from the
1965	// server.
1966	googleapi.ServerResponse `json:"-"`
1967
1968	// ForceSendFields is a list of field names (e.g. "Done") to
1969	// unconditionally include in API requests. By default, fields with
1970	// empty values are omitted from API requests. However, any non-pointer,
1971	// non-interface field appearing in ForceSendFields will be sent to the
1972	// server regardless of whether the field is empty or not. This may be
1973	// used to include empty fields in Patch requests.
1974	ForceSendFields []string `json:"-"`
1975
1976	// NullFields is a list of field names (e.g. "Done") to include in API
1977	// requests with the JSON null value. By default, fields with empty
1978	// values are omitted from API requests. However, any field with an
1979	// empty value appearing in NullFields will be sent to the server as
1980	// null. It is an error if a field in this list has a non-empty value.
1981	// This may be used to include null fields in Patch requests.
1982	NullFields []string `json:"-"`
1983}
1984
1985func (s *Job) MarshalJSON() ([]byte, error) {
1986	type NoMethod Job
1987	raw := NoMethod(*s)
1988	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1989}
1990
1991// JobMetadata: Job Operation metadata.
1992type JobMetadata struct {
1993	// JobId: Output only. The job id.
1994	JobId string `json:"jobId,omitempty"`
1995
1996	// OperationType: Output only. Operation type.
1997	OperationType string `json:"operationType,omitempty"`
1998
1999	// StartTime: Output only. Job submission time.
2000	StartTime string `json:"startTime,omitempty"`
2001
2002	// Status: Output only. Most recent job status.
2003	Status *JobStatus `json:"status,omitempty"`
2004
2005	// ForceSendFields is a list of field names (e.g. "JobId") to
2006	// unconditionally include in API requests. By default, fields with
2007	// empty values are omitted from API requests. However, any non-pointer,
2008	// non-interface field appearing in ForceSendFields will be sent to the
2009	// server regardless of whether the field is empty or not. This may be
2010	// used to include empty fields in Patch requests.
2011	ForceSendFields []string `json:"-"`
2012
2013	// NullFields is a list of field names (e.g. "JobId") to include in API
2014	// requests with the JSON null value. By default, fields with empty
2015	// values are omitted from API requests. However, any field with an
2016	// empty value appearing in NullFields will be sent to the server as
2017	// null. It is an error if a field in this list has a non-empty value.
2018	// This may be used to include null fields in Patch requests.
2019	NullFields []string `json:"-"`
2020}
2021
2022func (s *JobMetadata) MarshalJSON() ([]byte, error) {
2023	type NoMethod JobMetadata
2024	raw := NoMethod(*s)
2025	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2026}
2027
2028// JobPlacement: Dataproc job config.
2029type JobPlacement struct {
2030	// ClusterLabels: Optional. Cluster labels to identify a cluster where
2031	// the job will be submitted.
2032	ClusterLabels map[string]string `json:"clusterLabels,omitempty"`
2033
2034	// ClusterName: Required. The name of the cluster where the job will be
2035	// submitted.
2036	ClusterName string `json:"clusterName,omitempty"`
2037
2038	// ClusterUuid: Output only. A cluster UUID generated by the Dataproc
2039	// service when the job is submitted.
2040	ClusterUuid string `json:"clusterUuid,omitempty"`
2041
2042	// ForceSendFields is a list of field names (e.g. "ClusterLabels") to
2043	// unconditionally include in API requests. By default, fields with
2044	// empty values are omitted from API requests. However, any non-pointer,
2045	// non-interface field appearing in ForceSendFields will be sent to the
2046	// server regardless of whether the field is empty or not. This may be
2047	// used to include empty fields in Patch requests.
2048	ForceSendFields []string `json:"-"`
2049
2050	// NullFields is a list of field names (e.g. "ClusterLabels") to include
2051	// in API requests with the JSON null value. By default, fields with
2052	// empty values are omitted from API requests. However, any field with
2053	// an empty value appearing in NullFields will be sent to the server as
2054	// null. It is an error if a field in this list has a non-empty value.
2055	// This may be used to include null fields in Patch requests.
2056	NullFields []string `json:"-"`
2057}
2058
2059func (s *JobPlacement) MarshalJSON() ([]byte, error) {
2060	type NoMethod JobPlacement
2061	raw := NoMethod(*s)
2062	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2063}
2064
2065// JobReference: Encapsulates the full scoping used to reference a job.
2066type JobReference struct {
2067	// JobId: Optional. The job ID, which must be unique within the project.
2068	// The ID must contain only letters (a-z, A-Z), numbers (0-9),
2069	// underscores (_), or hyphens (-). The maximum length is 100
2070	// characters.If not specified by the caller, the job ID will be
2071	// provided by the server.
2072	JobId string `json:"jobId,omitempty"`
2073
2074	// ProjectId: Optional. The ID of the Google Cloud Platform project that
2075	// the job belongs to. If specified, must match the request project ID.
2076	ProjectId string `json:"projectId,omitempty"`
2077
2078	// ForceSendFields is a list of field names (e.g. "JobId") to
2079	// unconditionally include in API requests. By default, fields with
2080	// empty values are omitted from API requests. However, any non-pointer,
2081	// non-interface field appearing in ForceSendFields will be sent to the
2082	// server regardless of whether the field is empty or not. This may be
2083	// used to include empty fields in Patch requests.
2084	ForceSendFields []string `json:"-"`
2085
2086	// NullFields is a list of field names (e.g. "JobId") to include in API
2087	// requests with the JSON null value. By default, fields with empty
2088	// values are omitted from API requests. However, any field with an
2089	// empty value appearing in NullFields will be sent to the server as
2090	// null. It is an error if a field in this list has a non-empty value.
2091	// This may be used to include null fields in Patch requests.
2092	NullFields []string `json:"-"`
2093}
2094
2095func (s *JobReference) MarshalJSON() ([]byte, error) {
2096	type NoMethod JobReference
2097	raw := NoMethod(*s)
2098	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2099}
2100
2101// JobScheduling: Job scheduling options.
2102type JobScheduling struct {
2103	// MaxFailuresPerHour: Optional. Maximum number of times per hour a
2104	// driver may be restarted as a result of driver terminating with
2105	// non-zero code before job is reported failed.A job may be reported as
2106	// thrashing if driver exits with non-zero code 4 times within 10 minute
2107	// window.Maximum value is 10.
2108	MaxFailuresPerHour int64 `json:"maxFailuresPerHour,omitempty"`
2109
2110	// MaxFailuresTotal: Optional. Maximum number of times in total a driver
2111	// may be restarted as a result of driver exiting with non-zero code
2112	// before job is reported failed. Maximum value is 240.
2113	MaxFailuresTotal int64 `json:"maxFailuresTotal,omitempty"`
2114
2115	// ForceSendFields is a list of field names (e.g. "MaxFailuresPerHour")
2116	// to unconditionally include in API requests. By default, fields with
2117	// empty values are omitted from API requests. However, any non-pointer,
2118	// non-interface field appearing in ForceSendFields will be sent to the
2119	// server regardless of whether the field is empty or not. This may be
2120	// used to include empty fields in Patch requests.
2121	ForceSendFields []string `json:"-"`
2122
2123	// NullFields is a list of field names (e.g. "MaxFailuresPerHour") to
2124	// include in API requests with the JSON null value. By default, fields
2125	// with empty values are omitted from API requests. However, any field
2126	// with an empty value appearing in NullFields will be sent to the
2127	// server as null. It is an error if a field in this list has a
2128	// non-empty value. This may be used to include null fields in Patch
2129	// requests.
2130	NullFields []string `json:"-"`
2131}
2132
2133func (s *JobScheduling) MarshalJSON() ([]byte, error) {
2134	type NoMethod JobScheduling
2135	raw := NoMethod(*s)
2136	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2137}
2138
2139// JobStatus: Dataproc job status.
2140type JobStatus struct {
2141	// Details: Output only. Optional Job state details, such as an error
2142	// description if the state is ERROR.
2143	Details string `json:"details,omitempty"`
2144
2145	// State: Output only. A state message specifying the overall job state.
2146	//
2147	// Possible values:
2148	//   "STATE_UNSPECIFIED" - The job state is unknown.
2149	//   "PENDING" - The job is pending; it has been submitted, but is not
2150	// yet running.
2151	//   "SETUP_DONE" - Job has been received by the service and completed
2152	// initial setup; it will soon be submitted to the cluster.
2153	//   "RUNNING" - The job is running on the cluster.
2154	//   "CANCEL_PENDING" - A CancelJob request has been received, but is
2155	// pending.
2156	//   "CANCEL_STARTED" - Transient in-flight resources have been
2157	// canceled, and the request to cancel the running job has been issued
2158	// to the cluster.
2159	//   "CANCELLED" - The job cancellation was successful.
2160	//   "DONE" - The job has completed successfully.
2161	//   "ERROR" - The job has completed, but encountered an error.
2162	//   "ATTEMPT_FAILURE" - Job attempt has failed. The detail field
2163	// contains failure details for this attempt.Applies to restartable jobs
2164	// only.
2165	State string `json:"state,omitempty"`
2166
2167	// StateStartTime: Output only. The time when this state was entered.
2168	StateStartTime string `json:"stateStartTime,omitempty"`
2169
2170	// Substate: Output only. Additional state information, which includes
2171	// status reported by the agent.
2172	//
2173	// Possible values:
2174	//   "UNSPECIFIED" - The job substate is unknown.
2175	//   "SUBMITTED" - The Job is submitted to the agent.Applies to RUNNING
2176	// state.
2177	//   "QUEUED" - The Job has been received and is awaiting execution (it
2178	// may be waiting for a condition to be met). See the "details" field
2179	// for the reason for the delay.Applies to RUNNING state.
2180	//   "STALE_STATUS" - The agent-reported status is out of date, which
2181	// may be caused by a loss of communication between the agent and
2182	// Dataproc. If the agent does not send a timely update, the job will
2183	// fail.Applies to RUNNING state.
2184	Substate string `json:"substate,omitempty"`
2185
2186	// ForceSendFields is a list of field names (e.g. "Details") to
2187	// unconditionally include in API requests. By default, fields with
2188	// empty values are omitted from API requests. However, any non-pointer,
2189	// non-interface field appearing in ForceSendFields will be sent to the
2190	// server regardless of whether the field is empty or not. This may be
2191	// used to include empty fields in Patch requests.
2192	ForceSendFields []string `json:"-"`
2193
2194	// NullFields is a list of field names (e.g. "Details") to include in
2195	// API requests with the JSON null value. By default, fields with empty
2196	// values are omitted from API requests. However, any field with an
2197	// empty value appearing in NullFields will be sent to the server as
2198	// null. It is an error if a field in this list has a non-empty value.
2199	// This may be used to include null fields in Patch requests.
2200	NullFields []string `json:"-"`
2201}
2202
2203func (s *JobStatus) MarshalJSON() ([]byte, error) {
2204	type NoMethod JobStatus
2205	raw := NoMethod(*s)
2206	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2207}
2208
2209// KerberosConfig: Specifies Kerberos related configuration.
2210type KerberosConfig struct {
2211	// CrossRealmTrustAdminServer: Optional. The admin server (IP or
2212	// hostname) for the remote trusted realm in a cross realm trust
2213	// relationship.
2214	CrossRealmTrustAdminServer string `json:"crossRealmTrustAdminServer,omitempty"`
2215
2216	// CrossRealmTrustKdc: Optional. The KDC (IP or hostname) for the remote
2217	// trusted realm in a cross realm trust relationship.
2218	CrossRealmTrustKdc string `json:"crossRealmTrustKdc,omitempty"`
2219
2220	// CrossRealmTrustRealm: Optional. The remote realm the Dataproc
2221	// on-cluster KDC will trust, should the user enable cross realm trust.
2222	CrossRealmTrustRealm string `json:"crossRealmTrustRealm,omitempty"`
2223
2224	// CrossRealmTrustSharedPasswordUri: Optional. The Cloud Storage URI of
2225	// a KMS encrypted file containing the shared password between the
2226	// on-cluster Kerberos realm and the remote trusted realm, in a cross
2227	// realm trust relationship.
2228	CrossRealmTrustSharedPasswordUri string `json:"crossRealmTrustSharedPasswordUri,omitempty"`
2229
2230	// EnableKerberos: Optional. Flag to indicate whether to Kerberize the
2231	// cluster (default: false). Set this field to true to enable Kerberos
2232	// on a cluster.
2233	EnableKerberos bool `json:"enableKerberos,omitempty"`
2234
2235	// KdcDbKeyUri: Optional. The Cloud Storage URI of a KMS encrypted file
2236	// containing the master key of the KDC database.
2237	KdcDbKeyUri string `json:"kdcDbKeyUri,omitempty"`
2238
2239	// KeyPasswordUri: Optional. The Cloud Storage URI of a KMS encrypted
2240	// file containing the password to the user provided key. For the
2241	// self-signed certificate, this password is generated by Dataproc.
2242	KeyPasswordUri string `json:"keyPasswordUri,omitempty"`
2243
2244	// KeystorePasswordUri: Optional. The Cloud Storage URI of a KMS
2245	// encrypted file containing the password to the user provided keystore.
2246	// For the self-signed certificate, this password is generated by
2247	// Dataproc.
2248	KeystorePasswordUri string `json:"keystorePasswordUri,omitempty"`
2249
2250	// KeystoreUri: Optional. The Cloud Storage URI of the keystore file
2251	// used for SSL encryption. If not provided, Dataproc will provide a
2252	// self-signed certificate.
2253	KeystoreUri string `json:"keystoreUri,omitempty"`
2254
2255	// KmsKeyUri: Optional. The uri of the KMS key used to encrypt various
2256	// sensitive files.
2257	KmsKeyUri string `json:"kmsKeyUri,omitempty"`
2258
2259	// Realm: Optional. The name of the on-cluster Kerberos realm. If not
2260	// specified, the uppercased domain of hostnames will be the realm.
2261	Realm string `json:"realm,omitempty"`
2262
2263	// RootPrincipalPasswordUri: Optional. The Cloud Storage URI of a KMS
2264	// encrypted file containing the root principal password.
2265	RootPrincipalPasswordUri string `json:"rootPrincipalPasswordUri,omitempty"`
2266
2267	// TgtLifetimeHours: Optional. The lifetime of the ticket granting
2268	// ticket, in hours. If not specified, or user specifies 0, then default
2269	// value 10 will be used.
2270	TgtLifetimeHours int64 `json:"tgtLifetimeHours,omitempty"`
2271
2272	// TruststorePasswordUri: Optional. The Cloud Storage URI of a KMS
2273	// encrypted file containing the password to the user provided
2274	// truststore. For the self-signed certificate, this password is
2275	// generated by Dataproc.
2276	TruststorePasswordUri string `json:"truststorePasswordUri,omitempty"`
2277
2278	// TruststoreUri: Optional. The Cloud Storage URI of the truststore file
2279	// used for SSL encryption. If not provided, Dataproc will provide a
2280	// self-signed certificate.
2281	TruststoreUri string `json:"truststoreUri,omitempty"`
2282
2283	// ForceSendFields is a list of field names (e.g.
2284	// "CrossRealmTrustAdminServer") to unconditionally include in API
2285	// requests. By default, fields with empty values are omitted from API
2286	// requests. However, any non-pointer, non-interface field appearing in
2287	// ForceSendFields will be sent to the server regardless of whether the
2288	// field is empty or not. This may be used to include empty fields in
2289	// Patch requests.
2290	ForceSendFields []string `json:"-"`
2291
2292	// NullFields is a list of field names (e.g.
2293	// "CrossRealmTrustAdminServer") to include in API requests with the
2294	// JSON null value. By default, fields with empty values are omitted
2295	// from API requests. However, any field with an empty value appearing
2296	// in NullFields will be sent to the server as null. It is an error if a
2297	// field in this list has a non-empty value. This may be used to include
2298	// null fields in Patch requests.
2299	NullFields []string `json:"-"`
2300}
2301
2302func (s *KerberosConfig) MarshalJSON() ([]byte, error) {
2303	type NoMethod KerberosConfig
2304	raw := NoMethod(*s)
2305	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2306}
2307
2308// LifecycleConfig: Specifies the cluster auto-delete schedule
2309// configuration.
2310type LifecycleConfig struct {
2311	// AutoDeleteTime: Optional. The time when cluster will be auto-deleted.
2312	// (see JSON representation of Timestamp
2313	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
2314	AutoDeleteTime string `json:"autoDeleteTime,omitempty"`
2315
2316	// AutoDeleteTtl: Optional. The lifetime duration of cluster. The
2317	// cluster will be auto-deleted at the end of this period. Minimum value
2318	// is 10 minutes; maximum value is 14 days (see JSON representation of
2319	// Duration
2320	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
2321	AutoDeleteTtl string `json:"autoDeleteTtl,omitempty"`
2322
2323	// IdleDeleteTtl: Optional. The duration to keep the cluster alive while
2324	// idling (when no jobs are running). Passing this threshold will cause
2325	// the cluster to be deleted. Minimum value is 5 minutes; maximum value
2326	// is 14 days (see JSON representation of Duration
2327	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
2328	IdleDeleteTtl string `json:"idleDeleteTtl,omitempty"`
2329
2330	// IdleStartTime: Output only. The time when cluster became idle (most
2331	// recent job finished) and became eligible for deletion due to idleness
2332	// (see JSON representation of Timestamp
2333	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
2334	IdleStartTime string `json:"idleStartTime,omitempty"`
2335
2336	// ForceSendFields is a list of field names (e.g. "AutoDeleteTime") to
2337	// unconditionally include in API requests. By default, fields with
2338	// empty values are omitted from API requests. However, any non-pointer,
2339	// non-interface field appearing in ForceSendFields will be sent to the
2340	// server regardless of whether the field is empty or not. This may be
2341	// used to include empty fields in Patch requests.
2342	ForceSendFields []string `json:"-"`
2343
2344	// NullFields is a list of field names (e.g. "AutoDeleteTime") to
2345	// include in API requests with the JSON null value. By default, fields
2346	// with empty values are omitted from API requests. However, any field
2347	// with an empty value appearing in NullFields will be sent to the
2348	// server as null. It is an error if a field in this list has a
2349	// non-empty value. This may be used to include null fields in Patch
2350	// requests.
2351	NullFields []string `json:"-"`
2352}
2353
2354func (s *LifecycleConfig) MarshalJSON() ([]byte, error) {
2355	type NoMethod LifecycleConfig
2356	raw := NoMethod(*s)
2357	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2358}
2359
2360// ListAutoscalingPoliciesResponse: A response to a request to list
2361// autoscaling policies in a project.
2362type ListAutoscalingPoliciesResponse struct {
2363	// NextPageToken: Output only. This token is included in the response if
2364	// there are more results to fetch.
2365	NextPageToken string `json:"nextPageToken,omitempty"`
2366
2367	// Policies: Output only. Autoscaling policies list.
2368	Policies []*AutoscalingPolicy `json:"policies,omitempty"`
2369
2370	// ServerResponse contains the HTTP response code and headers from the
2371	// server.
2372	googleapi.ServerResponse `json:"-"`
2373
2374	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2375	// unconditionally include in API requests. By default, fields with
2376	// empty values are omitted from API requests. However, any non-pointer,
2377	// non-interface field appearing in ForceSendFields will be sent to the
2378	// server regardless of whether the field is empty or not. This may be
2379	// used to include empty fields in Patch requests.
2380	ForceSendFields []string `json:"-"`
2381
2382	// NullFields is a list of field names (e.g. "NextPageToken") to include
2383	// in API requests with the JSON null value. By default, fields with
2384	// empty values are omitted from API requests. However, any field with
2385	// an empty value appearing in NullFields will be sent to the server as
2386	// null. It is an error if a field in this list has a non-empty value.
2387	// This may be used to include null fields in Patch requests.
2388	NullFields []string `json:"-"`
2389}
2390
2391func (s *ListAutoscalingPoliciesResponse) MarshalJSON() ([]byte, error) {
2392	type NoMethod ListAutoscalingPoliciesResponse
2393	raw := NoMethod(*s)
2394	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2395}
2396
2397// ListClustersResponse: The list of all clusters in a project.
2398type ListClustersResponse struct {
2399	// Clusters: Output only. The clusters in the project.
2400	Clusters []*Cluster `json:"clusters,omitempty"`
2401
2402	// NextPageToken: Output only. This token is included in the response if
2403	// there are more results to fetch. To fetch additional results, provide
2404	// this value as the page_token in a subsequent ListClustersRequest.
2405	NextPageToken string `json:"nextPageToken,omitempty"`
2406
2407	// ServerResponse contains the HTTP response code and headers from the
2408	// server.
2409	googleapi.ServerResponse `json:"-"`
2410
2411	// ForceSendFields is a list of field names (e.g. "Clusters") to
2412	// unconditionally include in API requests. By default, fields with
2413	// empty values are omitted from API requests. However, any non-pointer,
2414	// non-interface field appearing in ForceSendFields will be sent to the
2415	// server regardless of whether the field is empty or not. This may be
2416	// used to include empty fields in Patch requests.
2417	ForceSendFields []string `json:"-"`
2418
2419	// NullFields is a list of field names (e.g. "Clusters") to include in
2420	// API requests with the JSON null value. By default, fields with empty
2421	// values are omitted from API requests. However, any field with an
2422	// empty value appearing in NullFields will be sent to the server as
2423	// null. It is an error if a field in this list has a non-empty value.
2424	// This may be used to include null fields in Patch requests.
2425	NullFields []string `json:"-"`
2426}
2427
2428func (s *ListClustersResponse) MarshalJSON() ([]byte, error) {
2429	type NoMethod ListClustersResponse
2430	raw := NoMethod(*s)
2431	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2432}
2433
2434// ListJobsResponse: A list of jobs in a project.
2435type ListJobsResponse struct {
2436	// Jobs: Output only. Jobs list.
2437	Jobs []*Job `json:"jobs,omitempty"`
2438
2439	// NextPageToken: Optional. This token is included in the response if
2440	// there are more results to fetch. To fetch additional results, provide
2441	// this value as the page_token in a subsequent ListJobsRequest.
2442	NextPageToken string `json:"nextPageToken,omitempty"`
2443
2444	// ServerResponse contains the HTTP response code and headers from the
2445	// server.
2446	googleapi.ServerResponse `json:"-"`
2447
2448	// ForceSendFields is a list of field names (e.g. "Jobs") to
2449	// unconditionally include in API requests. By default, fields with
2450	// empty values are omitted from API requests. However, any non-pointer,
2451	// non-interface field appearing in ForceSendFields will be sent to the
2452	// server regardless of whether the field is empty or not. This may be
2453	// used to include empty fields in Patch requests.
2454	ForceSendFields []string `json:"-"`
2455
2456	// NullFields is a list of field names (e.g. "Jobs") to include in API
2457	// requests with the JSON null value. By default, fields with empty
2458	// values are omitted from API requests. However, any field with an
2459	// empty value appearing in NullFields will be sent to the server as
2460	// null. It is an error if a field in this list has a non-empty value.
2461	// This may be used to include null fields in Patch requests.
2462	NullFields []string `json:"-"`
2463}
2464
2465func (s *ListJobsResponse) MarshalJSON() ([]byte, error) {
2466	type NoMethod ListJobsResponse
2467	raw := NoMethod(*s)
2468	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2469}
2470
2471// ListOperationsResponse: The response message for
2472// Operations.ListOperations.
2473type ListOperationsResponse struct {
2474	// NextPageToken: The standard List next-page token.
2475	NextPageToken string `json:"nextPageToken,omitempty"`
2476
2477	// Operations: A list of operations that matches the specified filter in
2478	// the request.
2479	Operations []*Operation `json:"operations,omitempty"`
2480
2481	// ServerResponse contains the HTTP response code and headers from the
2482	// server.
2483	googleapi.ServerResponse `json:"-"`
2484
2485	// ForceSendFields is a list of field names (e.g. "NextPageToken") 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. "NextPageToken") to include
2494	// in API requests with the JSON null value. By default, fields with
2495	// empty values are omitted from API requests. However, any field with
2496	// an empty value appearing in NullFields will be sent to the server as
2497	// null. It is an error if a field in this list has a non-empty value.
2498	// This may be used to include null fields in Patch requests.
2499	NullFields []string `json:"-"`
2500}
2501
2502func (s *ListOperationsResponse) MarshalJSON() ([]byte, error) {
2503	type NoMethod ListOperationsResponse
2504	raw := NoMethod(*s)
2505	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2506}
2507
2508// ListWorkflowTemplatesResponse: A response to a request to list
2509// workflow templates in a project.
2510type ListWorkflowTemplatesResponse struct {
2511	// NextPageToken: Output only. This token is included in the response if
2512	// there are more results to fetch. To fetch additional results, provide
2513	// this value as the page_token in a subsequent
2514	// ListWorkflowTemplatesRequest.
2515	NextPageToken string `json:"nextPageToken,omitempty"`
2516
2517	// Templates: Output only. WorkflowTemplates list.
2518	Templates []*WorkflowTemplate `json:"templates,omitempty"`
2519
2520	// ServerResponse contains the HTTP response code and headers from the
2521	// server.
2522	googleapi.ServerResponse `json:"-"`
2523
2524	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
2525	// unconditionally include in API requests. By default, fields with
2526	// empty values are omitted from API requests. However, any non-pointer,
2527	// non-interface field appearing in ForceSendFields will be sent to the
2528	// server regardless of whether the field is empty or not. This may be
2529	// used to include empty fields in Patch requests.
2530	ForceSendFields []string `json:"-"`
2531
2532	// NullFields is a list of field names (e.g. "NextPageToken") to include
2533	// in API requests with the JSON null value. By default, fields with
2534	// empty values are omitted from API requests. However, any field with
2535	// an empty value appearing in NullFields will be sent to the server as
2536	// null. It is an error if a field in this list has a non-empty value.
2537	// This may be used to include null fields in Patch requests.
2538	NullFields []string `json:"-"`
2539}
2540
2541func (s *ListWorkflowTemplatesResponse) MarshalJSON() ([]byte, error) {
2542	type NoMethod ListWorkflowTemplatesResponse
2543	raw := NoMethod(*s)
2544	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2545}
2546
2547// LoggingConfig: The runtime logging config of the job.
2548type LoggingConfig struct {
2549	// DriverLogLevels: The per-package log levels for the driver. This may
2550	// include "root" package name to configure rootLogger. Examples:
2551	// 'com.google = FATAL', 'root = INFO', 'org.apache = DEBUG'
2552	DriverLogLevels map[string]string `json:"driverLogLevels,omitempty"`
2553
2554	// ForceSendFields is a list of field names (e.g. "DriverLogLevels") to
2555	// unconditionally include in API requests. By default, fields with
2556	// empty values are omitted from API requests. However, any non-pointer,
2557	// non-interface field appearing in ForceSendFields will be sent to the
2558	// server regardless of whether the field is empty or not. This may be
2559	// used to include empty fields in Patch requests.
2560	ForceSendFields []string `json:"-"`
2561
2562	// NullFields is a list of field names (e.g. "DriverLogLevels") to
2563	// include in API requests with the JSON null value. By default, fields
2564	// with empty values are omitted from API requests. However, any field
2565	// with an empty value appearing in NullFields will be sent to the
2566	// server as null. It is an error if a field in this list has a
2567	// non-empty value. This may be used to include null fields in Patch
2568	// requests.
2569	NullFields []string `json:"-"`
2570}
2571
2572func (s *LoggingConfig) MarshalJSON() ([]byte, error) {
2573	type NoMethod LoggingConfig
2574	raw := NoMethod(*s)
2575	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2576}
2577
2578// ManagedCluster: Cluster that is managed by the workflow.
2579type ManagedCluster struct {
2580	// ClusterName: Required. The cluster name prefix. A unique cluster name
2581	// will be formed by appending a random suffix.The name must contain
2582	// only lower-case letters (a-z), numbers (0-9), and hyphens (-). Must
2583	// begin with a letter. Cannot begin or end with hyphen. Must consist of
2584	// between 2 and 35 characters.
2585	ClusterName string `json:"clusterName,omitempty"`
2586
2587	// Config: Required. The cluster configuration.
2588	Config *ClusterConfig `json:"config,omitempty"`
2589
2590	// Labels: Optional. The labels to associate with this cluster.Label
2591	// keys must be between 1 and 63 characters long, and must conform to
2592	// the following PCRE regular expression: \p{Ll}\p{Lo}{0,62}Label values
2593	// must be between 1 and 63 characters long, and must conform to the
2594	// following PCRE regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more
2595	// than 32 labels can be associated with a given cluster.
2596	Labels map[string]string `json:"labels,omitempty"`
2597
2598	// ForceSendFields is a list of field names (e.g. "ClusterName") to
2599	// unconditionally include in API requests. By default, fields with
2600	// empty values are omitted from API requests. However, any non-pointer,
2601	// non-interface field appearing in ForceSendFields will be sent to the
2602	// server regardless of whether the field is empty or not. This may be
2603	// used to include empty fields in Patch requests.
2604	ForceSendFields []string `json:"-"`
2605
2606	// NullFields is a list of field names (e.g. "ClusterName") to include
2607	// in API requests with the JSON null value. By default, fields with
2608	// empty values are omitted from API requests. However, any field with
2609	// an empty value appearing in NullFields will be sent to the server as
2610	// null. It is an error if a field in this list has a non-empty value.
2611	// This may be used to include null fields in Patch requests.
2612	NullFields []string `json:"-"`
2613}
2614
2615func (s *ManagedCluster) MarshalJSON() ([]byte, error) {
2616	type NoMethod ManagedCluster
2617	raw := NoMethod(*s)
2618	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2619}
2620
2621// ManagedGroupConfig: Specifies the resources used to actively manage
2622// an instance group.
2623type ManagedGroupConfig struct {
2624	// InstanceGroupManagerName: Output only. The name of the Instance Group
2625	// Manager for this group.
2626	InstanceGroupManagerName string `json:"instanceGroupManagerName,omitempty"`
2627
2628	// InstanceTemplateName: Output only. The name of the Instance Template
2629	// used for the Managed Instance Group.
2630	InstanceTemplateName string `json:"instanceTemplateName,omitempty"`
2631
2632	// ForceSendFields is a list of field names (e.g.
2633	// "InstanceGroupManagerName") to unconditionally include in API
2634	// requests. By default, fields with empty values are omitted from API
2635	// requests. However, any non-pointer, non-interface field appearing in
2636	// ForceSendFields will be sent to the server regardless of whether the
2637	// field is empty or not. This may be used to include empty fields in
2638	// Patch requests.
2639	ForceSendFields []string `json:"-"`
2640
2641	// NullFields is a list of field names (e.g. "InstanceGroupManagerName")
2642	// to include in API requests with the JSON null value. By default,
2643	// fields with empty values are omitted from API requests. However, any
2644	// field 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 *ManagedGroupConfig) MarshalJSON() ([]byte, error) {
2652	type NoMethod ManagedGroupConfig
2653	raw := NoMethod(*s)
2654	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2655}
2656
2657// MetastoreConfig: Specifies a Metastore configuration.
2658type MetastoreConfig struct {
2659	// DataprocMetastoreService: Required. Resource name of an existing
2660	// Dataproc Metastore service.Example:
2661	// projects/[project_id]/locations/[dataproc_region]/services/[service-na
2662	// me]
2663	DataprocMetastoreService string `json:"dataprocMetastoreService,omitempty"`
2664
2665	// ForceSendFields is a list of field names (e.g.
2666	// "DataprocMetastoreService") to unconditionally include in API
2667	// requests. By default, fields with empty values are omitted from API
2668	// requests. However, any non-pointer, non-interface field appearing in
2669	// ForceSendFields will be sent to the server regardless of whether the
2670	// field is empty or not. This may be used to include empty fields in
2671	// Patch requests.
2672	ForceSendFields []string `json:"-"`
2673
2674	// NullFields is a list of field names (e.g. "DataprocMetastoreService")
2675	// to include in API requests with the JSON null value. By default,
2676	// fields with empty values are omitted from API requests. However, any
2677	// field with an empty value appearing in NullFields will be sent to the
2678	// server as null. It is an error if a field in this list has a
2679	// non-empty value. This may be used to include null fields in Patch
2680	// requests.
2681	NullFields []string `json:"-"`
2682}
2683
2684func (s *MetastoreConfig) MarshalJSON() ([]byte, error) {
2685	type NoMethod MetastoreConfig
2686	raw := NoMethod(*s)
2687	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2688}
2689
2690// NamespacedGkeDeploymentTarget: A full, namespace-isolated deployment
2691// target for an existing GKE cluster.
2692type NamespacedGkeDeploymentTarget struct {
2693	// ClusterNamespace: Optional. A namespace within the GKE cluster to
2694	// deploy into.
2695	ClusterNamespace string `json:"clusterNamespace,omitempty"`
2696
2697	// TargetGkeCluster: Optional. The target GKE cluster to deploy to.
2698	// Format:
2699	// 'projects/{project}/locations/{location}/clusters/{cluster_id}'
2700	TargetGkeCluster string `json:"targetGkeCluster,omitempty"`
2701
2702	// ForceSendFields is a list of field names (e.g. "ClusterNamespace") to
2703	// unconditionally include in API requests. By default, fields with
2704	// empty values are omitted from API requests. However, any non-pointer,
2705	// non-interface field appearing in ForceSendFields will be sent to the
2706	// server regardless of whether the field is empty or not. This may be
2707	// used to include empty fields in Patch requests.
2708	ForceSendFields []string `json:"-"`
2709
2710	// NullFields is a list of field names (e.g. "ClusterNamespace") to
2711	// include in API requests with the JSON null value. By default, fields
2712	// with empty values are omitted from API requests. However, any field
2713	// with an empty value appearing in NullFields will be sent to the
2714	// server as null. It is an error if a field in this list has a
2715	// non-empty value. This may be used to include null fields in Patch
2716	// requests.
2717	NullFields []string `json:"-"`
2718}
2719
2720func (s *NamespacedGkeDeploymentTarget) MarshalJSON() ([]byte, error) {
2721	type NoMethod NamespacedGkeDeploymentTarget
2722	raw := NoMethod(*s)
2723	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2724}
2725
2726// NodeGroupAffinity: Node Group Affinity for clusters using sole-tenant
2727// node groups.
2728type NodeGroupAffinity struct {
2729	// NodeGroupUri: Required. The URI of a sole-tenant node group resource
2730	// (https://cloud.google.com/compute/docs/reference/rest/v1/nodeGroups)
2731	// that the cluster will be created on.A full URL, partial URI, or node
2732	// group name are valid. Examples:
2733	// https://www.googleapis.com/compute/v1/projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1
2734	// projects/[project_id]/zones/us-central1-a/nodeGroups/node-group-1
2735	// node-group-1
2736	NodeGroupUri string `json:"nodeGroupUri,omitempty"`
2737
2738	// ForceSendFields is a list of field names (e.g. "NodeGroupUri") to
2739	// unconditionally include in API requests. By default, fields with
2740	// empty values are omitted from API requests. However, any non-pointer,
2741	// non-interface field appearing in ForceSendFields will be sent to the
2742	// server regardless of whether the field is empty or not. This may be
2743	// used to include empty fields in Patch requests.
2744	ForceSendFields []string `json:"-"`
2745
2746	// NullFields is a list of field names (e.g. "NodeGroupUri") to include
2747	// in API requests with the JSON null value. By default, fields with
2748	// empty values are omitted from API requests. However, any field with
2749	// an empty value appearing in NullFields will be sent to the server as
2750	// null. It is an error if a field in this list has a non-empty value.
2751	// This may be used to include null fields in Patch requests.
2752	NullFields []string `json:"-"`
2753}
2754
2755func (s *NodeGroupAffinity) MarshalJSON() ([]byte, error) {
2756	type NoMethod NodeGroupAffinity
2757	raw := NoMethod(*s)
2758	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2759}
2760
2761// NodeInitializationAction: Specifies an executable to run on a fully
2762// configured node and a timeout period for executable completion.
2763type NodeInitializationAction struct {
2764	// ExecutableFile: Required. Cloud Storage URI of executable file.
2765	ExecutableFile string `json:"executableFile,omitempty"`
2766
2767	// ExecutionTimeout: Optional. Amount of time executable has to
2768	// complete. Default is 10 minutes (see JSON representation of Duration
2769	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).Cluster
2770	// creation fails with an explanatory error message (the name of the
2771	// executable that caused the error and the exceeded timeout period) if
2772	// the executable is not completed at end of the timeout period.
2773	ExecutionTimeout string `json:"executionTimeout,omitempty"`
2774
2775	// ForceSendFields is a list of field names (e.g. "ExecutableFile") to
2776	// unconditionally include in API requests. By default, fields with
2777	// empty values are omitted from API requests. However, any non-pointer,
2778	// non-interface field appearing in ForceSendFields will be sent to the
2779	// server regardless of whether the field is empty or not. This may be
2780	// used to include empty fields in Patch requests.
2781	ForceSendFields []string `json:"-"`
2782
2783	// NullFields is a list of field names (e.g. "ExecutableFile") to
2784	// include in API requests with the JSON null value. By default, fields
2785	// with empty values are omitted from API requests. However, any field
2786	// with an empty value appearing in NullFields will be sent to the
2787	// server as null. It is an error if a field in this list has a
2788	// non-empty value. This may be used to include null fields in Patch
2789	// requests.
2790	NullFields []string `json:"-"`
2791}
2792
2793func (s *NodeInitializationAction) MarshalJSON() ([]byte, error) {
2794	type NoMethod NodeInitializationAction
2795	raw := NoMethod(*s)
2796	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2797}
2798
2799// Operation: This resource represents a long-running operation that is
2800// the result of a network API call.
2801type Operation struct {
2802	// Done: If the value is false, it means the operation is still in
2803	// progress. If true, the operation is completed, and either error or
2804	// response is available.
2805	Done bool `json:"done,omitempty"`
2806
2807	// Error: The error result of the operation in case of failure or
2808	// cancellation.
2809	Error *Status `json:"error,omitempty"`
2810
2811	// Metadata: Service-specific metadata associated with the operation. It
2812	// typically contains progress information and common metadata such as
2813	// create time. Some services might not provide such metadata. Any
2814	// method that returns a long-running operation should document the
2815	// metadata type, if any.
2816	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
2817
2818	// Name: The server-assigned name, which is only unique within the same
2819	// service that originally returns it. If you use the default HTTP
2820	// mapping, the name should be a resource name ending with
2821	// operations/{unique_id}.
2822	Name string `json:"name,omitempty"`
2823
2824	// Response: The normal response of the operation in case of success. If
2825	// the original method returns no data on success, such as Delete, the
2826	// response is google.protobuf.Empty. If the original method is standard
2827	// Get/Create/Update, the response should be the resource. For other
2828	// methods, the response should have the type XxxResponse, where Xxx is
2829	// the original method name. For example, if the original method name is
2830	// TakeSnapshot(), the inferred response type is TakeSnapshotResponse.
2831	Response googleapi.RawMessage `json:"response,omitempty"`
2832
2833	// ServerResponse contains the HTTP response code and headers from the
2834	// server.
2835	googleapi.ServerResponse `json:"-"`
2836
2837	// ForceSendFields is a list of field names (e.g. "Done") to
2838	// unconditionally include in API requests. By default, fields with
2839	// empty values are omitted from API requests. However, any non-pointer,
2840	// non-interface field appearing in ForceSendFields will be sent to the
2841	// server regardless of whether the field is empty or not. This may be
2842	// used to include empty fields in Patch requests.
2843	ForceSendFields []string `json:"-"`
2844
2845	// NullFields is a list of field names (e.g. "Done") to include in API
2846	// requests with the JSON null value. By default, fields with empty
2847	// values are omitted from API requests. However, any field with an
2848	// empty value appearing in NullFields will be sent to the server as
2849	// null. It is an error if a field in this list has a non-empty value.
2850	// This may be used to include null fields in Patch requests.
2851	NullFields []string `json:"-"`
2852}
2853
2854func (s *Operation) MarshalJSON() ([]byte, error) {
2855	type NoMethod Operation
2856	raw := NoMethod(*s)
2857	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2858}
2859
2860// OrderedJob: A job executed by the workflow.
2861type OrderedJob struct {
2862	// HadoopJob: Optional. Job is a Hadoop job.
2863	HadoopJob *HadoopJob `json:"hadoopJob,omitempty"`
2864
2865	// HiveJob: Optional. Job is a Hive job.
2866	HiveJob *HiveJob `json:"hiveJob,omitempty"`
2867
2868	// Labels: Optional. The labels to associate with this job.Label keys
2869	// must be between 1 and 63 characters long, and must conform to the
2870	// following regular expression: \p{Ll}\p{Lo}{0,62}Label values must be
2871	// between 1 and 63 characters long, and must conform to the following
2872	// regular expression: \p{Ll}\p{Lo}\p{N}_-{0,63}No more than 32 labels
2873	// can be associated with a given job.
2874	Labels map[string]string `json:"labels,omitempty"`
2875
2876	// PigJob: Optional. Job is a Pig job.
2877	PigJob *PigJob `json:"pigJob,omitempty"`
2878
2879	// PrerequisiteStepIds: Optional. The optional list of prerequisite job
2880	// step_ids. If not specified, the job will start at the beginning of
2881	// workflow.
2882	PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"`
2883
2884	// PrestoJob: Optional. Job is a Presto job.
2885	PrestoJob *PrestoJob `json:"prestoJob,omitempty"`
2886
2887	// PysparkJob: Optional. Job is a PySpark job.
2888	PysparkJob *PySparkJob `json:"pysparkJob,omitempty"`
2889
2890	// Scheduling: Optional. Job scheduling configuration.
2891	Scheduling *JobScheduling `json:"scheduling,omitempty"`
2892
2893	// SparkJob: Optional. Job is a Spark job.
2894	SparkJob *SparkJob `json:"sparkJob,omitempty"`
2895
2896	// SparkRJob: Optional. Job is a SparkR job.
2897	SparkRJob *SparkRJob `json:"sparkRJob,omitempty"`
2898
2899	// SparkSqlJob: Optional. Job is a SparkSql job.
2900	SparkSqlJob *SparkSqlJob `json:"sparkSqlJob,omitempty"`
2901
2902	// StepId: Required. The step id. The id must be unique among all jobs
2903	// within the template.The step id is used as prefix for job id, as job
2904	// goog-dataproc-workflow-step-id label, and in prerequisiteStepIds
2905	// field from other steps.The id must contain only letters (a-z, A-Z),
2906	// numbers (0-9), underscores (_), and hyphens (-). Cannot begin or end
2907	// with underscore or hyphen. Must consist of between 3 and 50
2908	// characters.
2909	StepId string `json:"stepId,omitempty"`
2910
2911	// ForceSendFields is a list of field names (e.g. "HadoopJob") to
2912	// unconditionally include in API requests. By default, fields with
2913	// empty values are omitted from API requests. However, any non-pointer,
2914	// non-interface field appearing in ForceSendFields will be sent to the
2915	// server regardless of whether the field is empty or not. This may be
2916	// used to include empty fields in Patch requests.
2917	ForceSendFields []string `json:"-"`
2918
2919	// NullFields is a list of field names (e.g. "HadoopJob") to include in
2920	// API requests with the JSON null value. By default, fields with empty
2921	// values are omitted from API requests. However, any field with an
2922	// empty value appearing in NullFields will be sent to the server as
2923	// null. It is an error if a field in this list has a non-empty value.
2924	// This may be used to include null fields in Patch requests.
2925	NullFields []string `json:"-"`
2926}
2927
2928func (s *OrderedJob) MarshalJSON() ([]byte, error) {
2929	type NoMethod OrderedJob
2930	raw := NoMethod(*s)
2931	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2932}
2933
2934// ParameterValidation: Configuration for parameter validation.
2935type ParameterValidation struct {
2936	// Regex: Validation based on regular expressions.
2937	Regex *RegexValidation `json:"regex,omitempty"`
2938
2939	// Values: Validation based on a list of allowed values.
2940	Values *ValueValidation `json:"values,omitempty"`
2941
2942	// ForceSendFields is a list of field names (e.g. "Regex") to
2943	// unconditionally include in API requests. By default, fields with
2944	// empty values are omitted from API requests. However, any non-pointer,
2945	// non-interface field appearing in ForceSendFields will be sent to the
2946	// server regardless of whether the field is empty or not. This may be
2947	// used to include empty fields in Patch requests.
2948	ForceSendFields []string `json:"-"`
2949
2950	// NullFields is a list of field names (e.g. "Regex") to include in API
2951	// requests with the JSON null value. By default, fields with empty
2952	// values are omitted from API requests. However, any field with an
2953	// empty value appearing in NullFields will be sent to the server as
2954	// null. It is an error if a field in this list has a non-empty value.
2955	// This may be used to include null fields in Patch requests.
2956	NullFields []string `json:"-"`
2957}
2958
2959func (s *ParameterValidation) MarshalJSON() ([]byte, error) {
2960	type NoMethod ParameterValidation
2961	raw := NoMethod(*s)
2962	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2963}
2964
2965// PigJob: A Dataproc job for running Apache Pig
2966// (https://pig.apache.org/) queries on YARN.
2967type PigJob struct {
2968	// ContinueOnFailure: Optional. Whether to continue executing queries if
2969	// a query fails. The default value is false. Setting to true can be
2970	// useful when executing independent parallel queries.
2971	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
2972
2973	// JarFileUris: Optional. HCFS URIs of jar files to add to the CLASSPATH
2974	// of the Pig Client and Hadoop MapReduce (MR) tasks. Can contain Pig
2975	// UDFs.
2976	JarFileUris []string `json:"jarFileUris,omitempty"`
2977
2978	// LoggingConfig: Optional. The runtime log config for job execution.
2979	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
2980
2981	// Properties: Optional. A mapping of property names to values, used to
2982	// configure Pig. Properties that conflict with values set by the
2983	// Dataproc API may be overwritten. Can include properties set in
2984	// /etc/hadoop/conf/*-site.xml, /etc/pig/conf/pig.properties, and
2985	// classes in user code.
2986	Properties map[string]string `json:"properties,omitempty"`
2987
2988	// QueryFileUri: The HCFS URI of the script that contains the Pig
2989	// queries.
2990	QueryFileUri string `json:"queryFileUri,omitempty"`
2991
2992	// QueryList: A list of queries.
2993	QueryList *QueryList `json:"queryList,omitempty"`
2994
2995	// ScriptVariables: Optional. Mapping of query variable names to values
2996	// (equivalent to the Pig command: name=[value]).
2997	ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
2998
2999	// ForceSendFields is a list of field names (e.g. "ContinueOnFailure")
3000	// to unconditionally include in API requests. By default, fields with
3001	// empty values are omitted from API requests. However, any non-pointer,
3002	// non-interface field appearing in ForceSendFields will be sent to the
3003	// server regardless of whether the field is empty or not. This may be
3004	// used to include empty fields in Patch requests.
3005	ForceSendFields []string `json:"-"`
3006
3007	// NullFields is a list of field names (e.g. "ContinueOnFailure") to
3008	// include in API requests with the JSON null value. By default, fields
3009	// with empty values are omitted from API requests. However, any field
3010	// with an empty value appearing in NullFields will be sent to the
3011	// server as null. It is an error if a field in this list has a
3012	// non-empty value. This may be used to include null fields in Patch
3013	// requests.
3014	NullFields []string `json:"-"`
3015}
3016
3017func (s *PigJob) MarshalJSON() ([]byte, error) {
3018	type NoMethod PigJob
3019	raw := NoMethod(*s)
3020	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3021}
3022
3023// Policy: An Identity and Access Management (IAM) policy, which
3024// specifies access controls for Google Cloud resources.A Policy is a
3025// collection of bindings. A binding binds one or more members to a
3026// single role. Members can be user accounts, service accounts, Google
3027// groups, and domains (such as G Suite). A role is a named list of
3028// permissions; each role can be an IAM predefined role or a
3029// user-created custom role.For some types of Google Cloud resources, a
3030// binding can also specify a condition, which is a logical expression
3031// that allows access to a resource only if the expression evaluates to
3032// true. A condition can add constraints based on attributes of the
3033// request, the resource, or both. To learn which resources support
3034// conditions in their IAM policies, see the IAM documentation
3035// (https://cloud.google.com/iam/help/conditions/resource-policies).JSON
3036// example: { "bindings": [ { "role":
3037// "roles/resourcemanager.organizationAdmin", "members": [
3038// "user:mike@example.com", "group:admins@example.com",
3039// "domain:google.com",
3040// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, {
3041// "role": "roles/resourcemanager.organizationViewer", "members": [
3042// "user:eve@example.com" ], "condition": { "title": "expirable access",
3043// "description": "Does not grant access after Sep 2020", "expression":
3044// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ],
3045// "etag": "BwWWja0YfJA=", "version": 3 } YAML example: bindings: -
3046// members: - user:mike@example.com - group:admins@example.com -
3047// domain:google.com -
3048// serviceAccount:my-project-id@appspot.gserviceaccount.com role:
3049// roles/resourcemanager.organizationAdmin - members: -
3050// user:eve@example.com role: roles/resourcemanager.organizationViewer
3051// condition: title: expirable access description: Does not grant access
3052// after Sep 2020 expression: request.time <
3053// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version:
3054// 3 For a description of IAM and its features, see the IAM
3055// documentation (https://cloud.google.com/iam/docs/).
3056type Policy struct {
3057	// Bindings: Associates a list of members to a role. Optionally, may
3058	// specify a condition that determines how and when the bindings are
3059	// applied. Each of the bindings must contain at least one member.
3060	Bindings []*Binding `json:"bindings,omitempty"`
3061
3062	// Etag: etag is used for optimistic concurrency control as a way to
3063	// help prevent simultaneous updates of a policy from overwriting each
3064	// other. It is strongly suggested that systems make use of the etag in
3065	// the read-modify-write cycle to perform policy updates in order to
3066	// avoid race conditions: An etag is returned in the response to
3067	// getIamPolicy, and systems are expected to put that etag in the
3068	// request to setIamPolicy to ensure that their change will be applied
3069	// to the same version of the policy.Important: If you use IAM
3070	// Conditions, you must include the etag field whenever you call
3071	// setIamPolicy. If you omit this field, then IAM allows you to
3072	// overwrite a version 3 policy with a version 1 policy, and all of the
3073	// conditions in the version 3 policy are lost.
3074	Etag string `json:"etag,omitempty"`
3075
3076	// Version: Specifies the format of the policy.Valid values are 0, 1,
3077	// and 3. Requests that specify an invalid value are rejected.Any
3078	// operation that affects conditional role bindings must specify version
3079	// 3. This requirement applies to the following operations: Getting a
3080	// policy that includes a conditional role binding Adding a conditional
3081	// role binding to a policy Changing a conditional role binding in a
3082	// policy Removing any role binding, with or without a condition, from a
3083	// policy that includes conditionsImportant: If you use IAM Conditions,
3084	// you must include the etag field whenever you call setIamPolicy. If
3085	// you omit this field, then IAM allows you to overwrite a version 3
3086	// policy with a version 1 policy, and all of the conditions in the
3087	// version 3 policy are lost.If a policy does not include any
3088	// conditions, operations on that policy may specify any valid version
3089	// or leave the field unset.To learn which resources support conditions
3090	// in their IAM policies, see the IAM documentation
3091	// (https://cloud.google.com/iam/help/conditions/resource-policies).
3092	Version int64 `json:"version,omitempty"`
3093
3094	// ServerResponse contains the HTTP response code and headers from the
3095	// server.
3096	googleapi.ServerResponse `json:"-"`
3097
3098	// ForceSendFields is a list of field names (e.g. "Bindings") to
3099	// unconditionally include in API requests. By default, fields with
3100	// empty values are omitted from API requests. However, any non-pointer,
3101	// non-interface field appearing in ForceSendFields will be sent to the
3102	// server regardless of whether the field is empty or not. This may be
3103	// used to include empty fields in Patch requests.
3104	ForceSendFields []string `json:"-"`
3105
3106	// NullFields is a list of field names (e.g. "Bindings") to include in
3107	// API requests with the JSON null value. By default, fields with empty
3108	// values are omitted from API requests. However, any field with an
3109	// empty value appearing in NullFields will be sent to the server as
3110	// null. It is an error if a field in this list has a non-empty value.
3111	// This may be used to include null fields in Patch requests.
3112	NullFields []string `json:"-"`
3113}
3114
3115func (s *Policy) MarshalJSON() ([]byte, error) {
3116	type NoMethod Policy
3117	raw := NoMethod(*s)
3118	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3119}
3120
3121// PrestoJob: A Dataproc job for running Presto (https://prestosql.io/)
3122// queries. IMPORTANT: The Dataproc Presto Optional Component
3123// (https://cloud.google.com/dataproc/docs/concepts/components/presto)
3124// must be enabled when the cluster is created to submit a Presto job to
3125// the cluster.
3126type PrestoJob struct {
3127	// ClientTags: Optional. Presto client tags to attach to this query
3128	ClientTags []string `json:"clientTags,omitempty"`
3129
3130	// ContinueOnFailure: Optional. Whether to continue executing queries if
3131	// a query fails. The default value is false. Setting to true can be
3132	// useful when executing independent parallel queries.
3133	ContinueOnFailure bool `json:"continueOnFailure,omitempty"`
3134
3135	// LoggingConfig: Optional. The runtime log config for job execution.
3136	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3137
3138	// OutputFormat: Optional. The format in which query output will be
3139	// displayed. See the Presto documentation for supported output formats
3140	OutputFormat string `json:"outputFormat,omitempty"`
3141
3142	// Properties: Optional. A mapping of property names to values. Used to
3143	// set Presto session properties
3144	// (https://prestodb.io/docs/current/sql/set-session.html) Equivalent to
3145	// using the --session flag in the Presto CLI
3146	Properties map[string]string `json:"properties,omitempty"`
3147
3148	// QueryFileUri: The HCFS URI of the script that contains SQL queries.
3149	QueryFileUri string `json:"queryFileUri,omitempty"`
3150
3151	// QueryList: A list of queries.
3152	QueryList *QueryList `json:"queryList,omitempty"`
3153
3154	// ForceSendFields is a list of field names (e.g. "ClientTags") to
3155	// unconditionally include in API requests. By default, fields with
3156	// empty values are omitted from API requests. However, any non-pointer,
3157	// non-interface field appearing in ForceSendFields will be sent to the
3158	// server regardless of whether the field is empty or not. This may be
3159	// used to include empty fields in Patch requests.
3160	ForceSendFields []string `json:"-"`
3161
3162	// NullFields is a list of field names (e.g. "ClientTags") to include in
3163	// API requests with the JSON null value. By default, fields with empty
3164	// values are omitted from API requests. However, any field with an
3165	// empty value appearing in NullFields will be sent to the server as
3166	// null. It is an error if a field in this list has a non-empty value.
3167	// This may be used to include null fields in Patch requests.
3168	NullFields []string `json:"-"`
3169}
3170
3171func (s *PrestoJob) MarshalJSON() ([]byte, error) {
3172	type NoMethod PrestoJob
3173	raw := NoMethod(*s)
3174	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3175}
3176
3177// PySparkJob: A Dataproc job for running Apache PySpark
3178// (https://spark.apache.org/docs/0.9.0/python-programming-guide.html)
3179// applications on YARN.
3180type PySparkJob struct {
3181	// ArchiveUris: Optional. HCFS URIs of archives to be extracted into the
3182	// working directory of each executor. Supported file types: .jar, .tar,
3183	// .tar.gz, .tgz, and .zip.
3184	ArchiveUris []string `json:"archiveUris,omitempty"`
3185
3186	// Args: Optional. The arguments to pass to the driver. Do not include
3187	// arguments, such as --conf, that can be set as job properties, since a
3188	// collision may occur that causes an incorrect job submission.
3189	Args []string `json:"args,omitempty"`
3190
3191	// FileUris: Optional. HCFS URIs of files to be placed in the working
3192	// directory of each executor. Useful for naively parallel tasks.
3193	FileUris []string `json:"fileUris,omitempty"`
3194
3195	// JarFileUris: Optional. HCFS URIs of jar files to add to the
3196	// CLASSPATHs of the Python driver and tasks.
3197	JarFileUris []string `json:"jarFileUris,omitempty"`
3198
3199	// LoggingConfig: Optional. The runtime log config for job execution.
3200	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3201
3202	// MainPythonFileUri: Required. The HCFS URI of the main Python file to
3203	// use as the driver. Must be a .py file.
3204	MainPythonFileUri string `json:"mainPythonFileUri,omitempty"`
3205
3206	// Properties: Optional. A mapping of property names to values, used to
3207	// configure PySpark. Properties that conflict with values set by the
3208	// Dataproc API may be overwritten. Can include properties set in
3209	// /etc/spark/conf/spark-defaults.conf and classes in user code.
3210	Properties map[string]string `json:"properties,omitempty"`
3211
3212	// PythonFileUris: Optional. HCFS file URIs of Python files to pass to
3213	// the PySpark framework. Supported file types: .py, .egg, and .zip.
3214	PythonFileUris []string `json:"pythonFileUris,omitempty"`
3215
3216	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
3217	// unconditionally include in API requests. By default, fields with
3218	// empty values are omitted from API requests. However, any non-pointer,
3219	// non-interface field appearing in ForceSendFields will be sent to the
3220	// server regardless of whether the field is empty or not. This may be
3221	// used to include empty fields in Patch requests.
3222	ForceSendFields []string `json:"-"`
3223
3224	// NullFields is a list of field names (e.g. "ArchiveUris") to include
3225	// in API requests with the JSON null value. By default, fields with
3226	// empty values are omitted from API requests. However, any field with
3227	// an empty value appearing in NullFields will be sent to the server as
3228	// null. It is an error if a field in this list has a non-empty value.
3229	// This may be used to include null fields in Patch requests.
3230	NullFields []string `json:"-"`
3231}
3232
3233func (s *PySparkJob) MarshalJSON() ([]byte, error) {
3234	type NoMethod PySparkJob
3235	raw := NoMethod(*s)
3236	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3237}
3238
3239// QueryList: A list of queries to run on a cluster.
3240type QueryList struct {
3241	// Queries: Required. The queries to execute. You do not need to end a
3242	// query expression with a semicolon. Multiple queries can be specified
3243	// in one string by separating each with a semicolon. Here is an example
3244	// of a Dataproc API snippet that uses a QueryList to specify a HiveJob:
3245	// "hiveJob": { "queryList": { "queries": [ "query1", "query2",
3246	// "query3;query4", ] } }
3247	Queries []string `json:"queries,omitempty"`
3248
3249	// ForceSendFields is a list of field names (e.g. "Queries") to
3250	// unconditionally include in API requests. By default, fields with
3251	// empty values are omitted from API requests. However, any non-pointer,
3252	// non-interface field appearing in ForceSendFields will be sent to the
3253	// server regardless of whether the field is empty or not. This may be
3254	// used to include empty fields in Patch requests.
3255	ForceSendFields []string `json:"-"`
3256
3257	// NullFields is a list of field names (e.g. "Queries") to include in
3258	// API requests with the JSON null value. By default, fields with empty
3259	// values are omitted from API requests. However, any field with an
3260	// empty value appearing in NullFields will be sent to the server as
3261	// null. It is an error if a field in this list has a non-empty value.
3262	// This may be used to include null fields in Patch requests.
3263	NullFields []string `json:"-"`
3264}
3265
3266func (s *QueryList) MarshalJSON() ([]byte, error) {
3267	type NoMethod QueryList
3268	raw := NoMethod(*s)
3269	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3270}
3271
3272// RegexValidation: Validation based on regular expressions.
3273type RegexValidation struct {
3274	// Regexes: Required. RE2 regular expressions used to validate the
3275	// parameter's value. The value must match the regex in its entirety
3276	// (substring matches are not sufficient).
3277	Regexes []string `json:"regexes,omitempty"`
3278
3279	// ForceSendFields is a list of field names (e.g. "Regexes") to
3280	// unconditionally include in API requests. By default, fields with
3281	// empty values are omitted from API requests. However, any non-pointer,
3282	// non-interface field appearing in ForceSendFields will be sent to the
3283	// server regardless of whether the field is empty or not. This may be
3284	// used to include empty fields in Patch requests.
3285	ForceSendFields []string `json:"-"`
3286
3287	// NullFields is a list of field names (e.g. "Regexes") to include in
3288	// API requests with the JSON null value. By default, fields with empty
3289	// values are omitted from API requests. However, any field with an
3290	// empty value appearing in NullFields will be sent to the server as
3291	// null. It is an error if a field in this list has a non-empty value.
3292	// This may be used to include null fields in Patch requests.
3293	NullFields []string `json:"-"`
3294}
3295
3296func (s *RegexValidation) MarshalJSON() ([]byte, error) {
3297	type NoMethod RegexValidation
3298	raw := NoMethod(*s)
3299	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3300}
3301
3302// ReservationAffinity: Reservation Affinity for consuming Zonal
3303// reservation.
3304type ReservationAffinity struct {
3305	// ConsumeReservationType: Optional. Type of reservation to consume
3306	//
3307	// Possible values:
3308	//   "TYPE_UNSPECIFIED"
3309	//   "NO_RESERVATION" - Do not consume from any allocated capacity.
3310	//   "ANY_RESERVATION" - Consume any reservation available.
3311	//   "SPECIFIC_RESERVATION" - Must consume from a specific reservation.
3312	// Must specify key value fields for specifying the reservations.
3313	ConsumeReservationType string `json:"consumeReservationType,omitempty"`
3314
3315	// Key: Optional. Corresponds to the label key of reservation resource.
3316	Key string `json:"key,omitempty"`
3317
3318	// Values: Optional. Corresponds to the label values of reservation
3319	// resource.
3320	Values []string `json:"values,omitempty"`
3321
3322	// ForceSendFields is a list of field names (e.g.
3323	// "ConsumeReservationType") to unconditionally include in API requests.
3324	// By default, fields with empty values are omitted from API requests.
3325	// However, any non-pointer, non-interface field appearing in
3326	// ForceSendFields will be sent to the server regardless of whether the
3327	// field is empty or not. This may be used to include empty fields in
3328	// Patch requests.
3329	ForceSendFields []string `json:"-"`
3330
3331	// NullFields is a list of field names (e.g. "ConsumeReservationType")
3332	// to include in API requests with the JSON null value. By default,
3333	// fields with empty values are omitted from API requests. However, any
3334	// field with an empty value appearing in NullFields will be sent to the
3335	// server as null. It is an error if a field in this list has a
3336	// non-empty value. This may be used to include null fields in Patch
3337	// requests.
3338	NullFields []string `json:"-"`
3339}
3340
3341func (s *ReservationAffinity) MarshalJSON() ([]byte, error) {
3342	type NoMethod ReservationAffinity
3343	raw := NoMethod(*s)
3344	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3345}
3346
3347// SecurityConfig: Security related configuration, including encryption,
3348// Kerberos, etc.
3349type SecurityConfig struct {
3350	// KerberosConfig: Optional. Kerberos related configuration.
3351	KerberosConfig *KerberosConfig `json:"kerberosConfig,omitempty"`
3352
3353	// ForceSendFields is a list of field names (e.g. "KerberosConfig") to
3354	// unconditionally include in API requests. By default, fields with
3355	// empty values are omitted from API requests. However, any non-pointer,
3356	// non-interface field appearing in ForceSendFields will be sent to the
3357	// server regardless of whether the field is empty or not. This may be
3358	// used to include empty fields in Patch requests.
3359	ForceSendFields []string `json:"-"`
3360
3361	// NullFields is a list of field names (e.g. "KerberosConfig") to
3362	// include in API requests with the JSON null value. By default, fields
3363	// with empty values are omitted from API requests. However, any field
3364	// with an empty value appearing in NullFields will be sent to the
3365	// server as null. It is an error if a field in this list has a
3366	// non-empty value. This may be used to include null fields in Patch
3367	// requests.
3368	NullFields []string `json:"-"`
3369}
3370
3371func (s *SecurityConfig) MarshalJSON() ([]byte, error) {
3372	type NoMethod SecurityConfig
3373	raw := NoMethod(*s)
3374	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3375}
3376
3377// SetIamPolicyRequest: Request message for SetIamPolicy method.
3378type SetIamPolicyRequest struct {
3379	// Policy: REQUIRED: The complete policy to be applied to the resource.
3380	// The size of the policy is limited to a few 10s of KB. An empty policy
3381	// is a valid policy but certain Cloud Platform services (such as
3382	// Projects) might reject them.
3383	Policy *Policy `json:"policy,omitempty"`
3384
3385	// ForceSendFields is a list of field names (e.g. "Policy") to
3386	// unconditionally include in API requests. By default, fields with
3387	// empty values are omitted from API requests. However, any non-pointer,
3388	// non-interface field appearing in ForceSendFields will be sent to the
3389	// server regardless of whether the field is empty or not. This may be
3390	// used to include empty fields in Patch requests.
3391	ForceSendFields []string `json:"-"`
3392
3393	// NullFields is a list of field names (e.g. "Policy") to include in API
3394	// requests with the JSON null value. By default, fields with empty
3395	// values are omitted from API requests. However, any field with an
3396	// empty value appearing in NullFields will be sent to the server as
3397	// null. It is an error if a field in this list has a non-empty value.
3398	// This may be used to include null fields in Patch requests.
3399	NullFields []string `json:"-"`
3400}
3401
3402func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
3403	type NoMethod SetIamPolicyRequest
3404	raw := NoMethod(*s)
3405	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3406}
3407
3408// ShieldedInstanceConfig: Shielded Instance Config for clusters using
3409// Compute Engine Shielded VMs
3410// (https://cloud.google.com/security/shielded-cloud/shielded-vm).
3411type ShieldedInstanceConfig struct {
3412	// EnableIntegrityMonitoring: Optional. Defines whether instances have
3413	// integrity monitoring enabled.
3414	EnableIntegrityMonitoring bool `json:"enableIntegrityMonitoring,omitempty"`
3415
3416	// EnableSecureBoot: Optional. Defines whether instances have Secure
3417	// Boot enabled.
3418	EnableSecureBoot bool `json:"enableSecureBoot,omitempty"`
3419
3420	// EnableVtpm: Optional. Defines whether instances have the vTPM
3421	// enabled.
3422	EnableVtpm bool `json:"enableVtpm,omitempty"`
3423
3424	// ForceSendFields is a list of field names (e.g.
3425	// "EnableIntegrityMonitoring") to unconditionally include in API
3426	// requests. By default, fields with empty values are omitted from API
3427	// requests. However, any non-pointer, non-interface field appearing in
3428	// ForceSendFields will be sent to the server regardless of whether the
3429	// field is empty or not. This may be used to include empty fields in
3430	// Patch requests.
3431	ForceSendFields []string `json:"-"`
3432
3433	// NullFields is a list of field names (e.g.
3434	// "EnableIntegrityMonitoring") to include in API requests with the JSON
3435	// null value. By default, fields with empty values are omitted from API
3436	// requests. However, any field with an empty value appearing in
3437	// NullFields will be sent to the server as null. It is an error if a
3438	// field in this list has a non-empty value. This may be used to include
3439	// null fields in Patch requests.
3440	NullFields []string `json:"-"`
3441}
3442
3443func (s *ShieldedInstanceConfig) MarshalJSON() ([]byte, error) {
3444	type NoMethod ShieldedInstanceConfig
3445	raw := NoMethod(*s)
3446	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3447}
3448
3449// SoftwareConfig: Specifies the selection and config of software inside
3450// the cluster.
3451type SoftwareConfig struct {
3452	// ImageVersion: Optional. The version of software inside the cluster.
3453	// It must be one of the supported Dataproc Versions
3454	// (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#supported_dataproc_versions),
3455	// such as "1.2" (including a subminor version, such as "1.2.29"), or
3456	// the "preview" version
3457	// (https://cloud.google.com/dataproc/docs/concepts/versioning/dataproc-versions#other_versions).
3458	// If unspecified, it defaults to the latest Debian version.
3459	ImageVersion string `json:"imageVersion,omitempty"`
3460
3461	// OptionalComponents: The set of optional components to activate on the
3462	// cluster.
3463	//
3464	// Possible values:
3465	//   "COMPONENT_UNSPECIFIED" - Unspecified component. Specifying this
3466	// will cause Cluster creation to fail.
3467	//   "ANACONDA" - The Anaconda python distribution. The Anaconda
3468	// component is not supported in the Dataproc 2.0 image. The 2.0 image
3469	// is pre-installed with Miniconda.
3470	//   "DOCKER" - Docker
3471	//   "DRUID" - The Druid query engine.
3472	//   "FLINK" - Flink
3473	//   "HBASE" - HBase.
3474	//   "HIVE_WEBHCAT" - The Hive Web HCatalog (the REST service for
3475	// accessing HCatalog).
3476	//   "JUPYTER" - The Jupyter Notebook.
3477	//   "KERBEROS" - The Kerberos security feature.
3478	//   "PRESTO" - The Presto query engine.
3479	//   "RANGER" - The Ranger service.
3480	//   "SOLR" - The Solr service.
3481	//   "ZEPPELIN" - The Zeppelin notebook.
3482	//   "ZOOKEEPER" - The Zookeeper service.
3483	OptionalComponents []string `json:"optionalComponents,omitempty"`
3484
3485	// Properties: Optional. The properties to set on daemon config
3486	// files.Property keys are specified in prefix:property format, for
3487	// example core:hadoop.tmp.dir. The following are supported prefixes and
3488	// their mappings: capacity-scheduler: capacity-scheduler.xml core:
3489	// core-site.xml distcp: distcp-default.xml hdfs: hdfs-site.xml hive:
3490	// hive-site.xml mapred: mapred-site.xml pig: pig.properties spark:
3491	// spark-defaults.conf yarn: yarn-site.xmlFor more information, see
3492	// Cluster properties
3493	// (https://cloud.google.com/dataproc/docs/concepts/cluster-properties).
3494	Properties map[string]string `json:"properties,omitempty"`
3495
3496	// ForceSendFields is a list of field names (e.g. "ImageVersion") to
3497	// unconditionally include in API requests. By default, fields with
3498	// empty values are omitted from API requests. However, any non-pointer,
3499	// non-interface field appearing in ForceSendFields will be sent to the
3500	// server regardless of whether the field is empty or not. This may be
3501	// used to include empty fields in Patch requests.
3502	ForceSendFields []string `json:"-"`
3503
3504	// NullFields is a list of field names (e.g. "ImageVersion") to include
3505	// in API requests with the JSON null value. By default, fields with
3506	// empty values are omitted from API requests. However, any field with
3507	// an empty value appearing in NullFields will be sent to the server as
3508	// null. It is an error if a field in this list has a non-empty value.
3509	// This may be used to include null fields in Patch requests.
3510	NullFields []string `json:"-"`
3511}
3512
3513func (s *SoftwareConfig) MarshalJSON() ([]byte, error) {
3514	type NoMethod SoftwareConfig
3515	raw := NoMethod(*s)
3516	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3517}
3518
3519// SparkJob: A Dataproc job for running Apache Spark
3520// (http://spark.apache.org/) applications on YARN. The specification of
3521// the main method to call to drive the job. Specify either the jar file
3522// that contains the main class or the main class name. To pass both a
3523// main jar and a main class in that jar, add the jar to
3524// CommonJob.jar_file_uris, and then specify the main class name in
3525// main_class.
3526type SparkJob struct {
3527	// ArchiveUris: Optional. HCFS URIs of archives to be extracted into the
3528	// working directory of each executor. Supported file types: .jar, .tar,
3529	// .tar.gz, .tgz, and .zip.
3530	ArchiveUris []string `json:"archiveUris,omitempty"`
3531
3532	// Args: Optional. The arguments to pass to the driver. Do not include
3533	// arguments, such as --conf, that can be set as job properties, since a
3534	// collision may occur that causes an incorrect job submission.
3535	Args []string `json:"args,omitempty"`
3536
3537	// FileUris: Optional. HCFS URIs of files to be placed in the working
3538	// directory of each executor. Useful for naively parallel tasks.
3539	FileUris []string `json:"fileUris,omitempty"`
3540
3541	// JarFileUris: Optional. HCFS URIs of jar files to add to the
3542	// CLASSPATHs of the Spark driver and tasks.
3543	JarFileUris []string `json:"jarFileUris,omitempty"`
3544
3545	// LoggingConfig: Optional. The runtime log config for job execution.
3546	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3547
3548	// MainClass: The name of the driver's main class. The jar file that
3549	// contains the class must be in the default CLASSPATH or specified in
3550	// jar_file_uris.
3551	MainClass string `json:"mainClass,omitempty"`
3552
3553	// MainJarFileUri: The HCFS URI of the jar file that contains the main
3554	// class.
3555	MainJarFileUri string `json:"mainJarFileUri,omitempty"`
3556
3557	// Properties: Optional. A mapping of property names to values, used to
3558	// configure Spark. Properties that conflict with values set by the
3559	// Dataproc API may be overwritten. Can include properties set in
3560	// /etc/spark/conf/spark-defaults.conf and classes in user code.
3561	Properties map[string]string `json:"properties,omitempty"`
3562
3563	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
3564	// unconditionally include in API requests. By default, fields with
3565	// empty values are omitted from API requests. However, any non-pointer,
3566	// non-interface field appearing in ForceSendFields will be sent to the
3567	// server regardless of whether the field is empty or not. This may be
3568	// used to include empty fields in Patch requests.
3569	ForceSendFields []string `json:"-"`
3570
3571	// NullFields is a list of field names (e.g. "ArchiveUris") to include
3572	// in API requests with the JSON null value. By default, fields with
3573	// empty values are omitted from API requests. However, any field with
3574	// an empty value appearing in NullFields will be sent to the server as
3575	// null. It is an error if a field in this list has a non-empty value.
3576	// This may be used to include null fields in Patch requests.
3577	NullFields []string `json:"-"`
3578}
3579
3580func (s *SparkJob) MarshalJSON() ([]byte, error) {
3581	type NoMethod SparkJob
3582	raw := NoMethod(*s)
3583	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3584}
3585
3586// SparkRJob: A Dataproc job for running Apache SparkR
3587// (https://spark.apache.org/docs/latest/sparkr.html) applications on
3588// YARN.
3589type SparkRJob struct {
3590	// ArchiveUris: Optional. HCFS URIs of archives to be extracted into the
3591	// working directory of each executor. Supported file types: .jar, .tar,
3592	// .tar.gz, .tgz, and .zip.
3593	ArchiveUris []string `json:"archiveUris,omitempty"`
3594
3595	// Args: Optional. The arguments to pass to the driver. Do not include
3596	// arguments, such as --conf, that can be set as job properties, since a
3597	// collision may occur that causes an incorrect job submission.
3598	Args []string `json:"args,omitempty"`
3599
3600	// FileUris: Optional. HCFS URIs of files to be placed in the working
3601	// directory of each executor. Useful for naively parallel tasks.
3602	FileUris []string `json:"fileUris,omitempty"`
3603
3604	// LoggingConfig: Optional. The runtime log config for job execution.
3605	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3606
3607	// MainRFileUri: Required. The HCFS URI of the main R file to use as the
3608	// driver. Must be a .R file.
3609	MainRFileUri string `json:"mainRFileUri,omitempty"`
3610
3611	// Properties: Optional. A mapping of property names to values, used to
3612	// configure SparkR. Properties that conflict with values set by the
3613	// Dataproc API may be overwritten. Can include properties set in
3614	// /etc/spark/conf/spark-defaults.conf and classes in user code.
3615	Properties map[string]string `json:"properties,omitempty"`
3616
3617	// ForceSendFields is a list of field names (e.g. "ArchiveUris") to
3618	// unconditionally include in API requests. By default, fields with
3619	// empty values are omitted from API requests. However, any non-pointer,
3620	// non-interface field appearing in ForceSendFields will be sent to the
3621	// server regardless of whether the field is empty or not. This may be
3622	// used to include empty fields in Patch requests.
3623	ForceSendFields []string `json:"-"`
3624
3625	// NullFields is a list of field names (e.g. "ArchiveUris") to include
3626	// in API requests with the JSON null value. By default, fields with
3627	// empty values are omitted from API requests. However, any field with
3628	// an empty value appearing in NullFields will be sent to the server as
3629	// null. It is an error if a field in this list has a non-empty value.
3630	// This may be used to include null fields in Patch requests.
3631	NullFields []string `json:"-"`
3632}
3633
3634func (s *SparkRJob) MarshalJSON() ([]byte, error) {
3635	type NoMethod SparkRJob
3636	raw := NoMethod(*s)
3637	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3638}
3639
3640// SparkSqlJob: A Dataproc job for running Apache Spark SQL
3641// (http://spark.apache.org/sql/) queries.
3642type SparkSqlJob struct {
3643	// JarFileUris: Optional. HCFS URIs of jar files to be added to the
3644	// Spark CLASSPATH.
3645	JarFileUris []string `json:"jarFileUris,omitempty"`
3646
3647	// LoggingConfig: Optional. The runtime log config for job execution.
3648	LoggingConfig *LoggingConfig `json:"loggingConfig,omitempty"`
3649
3650	// Properties: Optional. A mapping of property names to values, used to
3651	// configure Spark SQL's SparkConf. Properties that conflict with values
3652	// set by the Dataproc API may be overwritten.
3653	Properties map[string]string `json:"properties,omitempty"`
3654
3655	// QueryFileUri: The HCFS URI of the script that contains SQL queries.
3656	QueryFileUri string `json:"queryFileUri,omitempty"`
3657
3658	// QueryList: A list of queries.
3659	QueryList *QueryList `json:"queryList,omitempty"`
3660
3661	// ScriptVariables: Optional. Mapping of query variable names to values
3662	// (equivalent to the Spark SQL command: SET name="value";).
3663	ScriptVariables map[string]string `json:"scriptVariables,omitempty"`
3664
3665	// ForceSendFields is a list of field names (e.g. "JarFileUris") to
3666	// unconditionally include in API requests. By default, fields with
3667	// empty values are omitted from API requests. However, any non-pointer,
3668	// non-interface field appearing in ForceSendFields will be sent to the
3669	// server regardless of whether the field is empty or not. This may be
3670	// used to include empty fields in Patch requests.
3671	ForceSendFields []string `json:"-"`
3672
3673	// NullFields is a list of field names (e.g. "JarFileUris") to include
3674	// in API requests with the JSON null value. By default, fields with
3675	// empty values are omitted from API requests. However, any field with
3676	// an empty value appearing in NullFields will be sent to the server as
3677	// null. It is an error if a field in this list has a non-empty value.
3678	// This may be used to include null fields in Patch requests.
3679	NullFields []string `json:"-"`
3680}
3681
3682func (s *SparkSqlJob) MarshalJSON() ([]byte, error) {
3683	type NoMethod SparkSqlJob
3684	raw := NoMethod(*s)
3685	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3686}
3687
3688// StartClusterRequest: A request to start a cluster.
3689type StartClusterRequest struct {
3690	// ClusterUuid: Optional. Specifying the cluster_uuid means the RPC will
3691	// fail (with error NOT_FOUND) if a cluster with the specified UUID does
3692	// not exist.
3693	ClusterUuid string `json:"clusterUuid,omitempty"`
3694
3695	// RequestId: Optional. A unique id used to identify the request. If the
3696	// server receives two StartClusterRequest
3697	// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#google.cloud.dataproc.v1beta2.StartClusterRequest)s
3698	// with the same id, then the second request will be ignored and the
3699	// first google.longrunning.Operation created and stored in the backend
3700	// is returned.Recommendation: Set this value to a UUID
3701	// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
3702	// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
3703	// and hyphens (-). The maximum length is 40 characters.
3704	RequestId string `json:"requestId,omitempty"`
3705
3706	// ForceSendFields is a list of field names (e.g. "ClusterUuid") to
3707	// unconditionally include in API requests. By default, fields with
3708	// empty values are omitted from API requests. However, any non-pointer,
3709	// non-interface field appearing in ForceSendFields will be sent to the
3710	// server regardless of whether the field is empty or not. This may be
3711	// used to include empty fields in Patch requests.
3712	ForceSendFields []string `json:"-"`
3713
3714	// NullFields is a list of field names (e.g. "ClusterUuid") to include
3715	// in API requests with the JSON null value. By default, fields with
3716	// empty values are omitted from API requests. However, any field with
3717	// an empty value appearing in NullFields will be sent to the server as
3718	// null. It is an error if a field in this list has a non-empty value.
3719	// This may be used to include null fields in Patch requests.
3720	NullFields []string `json:"-"`
3721}
3722
3723func (s *StartClusterRequest) MarshalJSON() ([]byte, error) {
3724	type NoMethod StartClusterRequest
3725	raw := NoMethod(*s)
3726	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3727}
3728
3729// Status: The Status type defines a logical error model that is
3730// suitable for different programming environments, including REST APIs
3731// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
3732// Status message contains three pieces of data: error code, error
3733// message, and error details.You can find out more about this error
3734// model and how to work with it in the API Design Guide
3735// (https://cloud.google.com/apis/design/errors).
3736type Status struct {
3737	// Code: The status code, which should be an enum value of
3738	// google.rpc.Code.
3739	Code int64 `json:"code,omitempty"`
3740
3741	// Details: A list of messages that carry the error details. There is a
3742	// common set of message types for APIs to use.
3743	Details []googleapi.RawMessage `json:"details,omitempty"`
3744
3745	// Message: A developer-facing error message, which should be in
3746	// English. Any user-facing error message should be localized and sent
3747	// in the google.rpc.Status.details field, or localized by the client.
3748	Message string `json:"message,omitempty"`
3749
3750	// ForceSendFields is a list of field names (e.g. "Code") to
3751	// unconditionally include in API requests. By default, fields with
3752	// empty values are omitted from API requests. However, any non-pointer,
3753	// non-interface field appearing in ForceSendFields will be sent to the
3754	// server regardless of whether the field is empty or not. This may be
3755	// used to include empty fields in Patch requests.
3756	ForceSendFields []string `json:"-"`
3757
3758	// NullFields is a list of field names (e.g. "Code") to include in API
3759	// requests with the JSON null value. By default, fields with empty
3760	// values are omitted from API requests. However, any field with an
3761	// empty value appearing in NullFields will be sent to the server as
3762	// null. It is an error if a field in this list has a non-empty value.
3763	// This may be used to include null fields in Patch requests.
3764	NullFields []string `json:"-"`
3765}
3766
3767func (s *Status) MarshalJSON() ([]byte, error) {
3768	type NoMethod Status
3769	raw := NoMethod(*s)
3770	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3771}
3772
3773// StopClusterRequest: A request to stop a cluster.
3774type StopClusterRequest struct {
3775	// ClusterUuid: Optional. Specifying the cluster_uuid means the RPC will
3776	// fail (with error NOT_FOUND) if a cluster with the specified UUID does
3777	// not exist.
3778	ClusterUuid string `json:"clusterUuid,omitempty"`
3779
3780	// RequestId: Optional. A unique id used to identify the request. If the
3781	// server receives two StopClusterRequest
3782	// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#google.cloud.dataproc.v1beta2.StopClusterRequest)s
3783	// with the same id, then the second request will be ignored and the
3784	// first google.longrunning.Operation created and stored in the backend
3785	// is returned.Recommendation: Set this value to a UUID
3786	// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
3787	// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
3788	// and hyphens (-). The maximum length is 40 characters.
3789	RequestId string `json:"requestId,omitempty"`
3790
3791	// ForceSendFields is a list of field names (e.g. "ClusterUuid") 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. "ClusterUuid") 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 *StopClusterRequest) MarshalJSON() ([]byte, error) {
3809	type NoMethod StopClusterRequest
3810	raw := NoMethod(*s)
3811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3812}
3813
3814// SubmitJobRequest: A request to submit a job.
3815type SubmitJobRequest struct {
3816	// Job: Required. The job resource.
3817	Job *Job `json:"job,omitempty"`
3818
3819	// RequestId: Optional. A unique id used to identify the request. If the
3820	// server receives two SubmitJobRequest
3821	// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#google.cloud.dataproc.v1.SubmitJobRequest)s
3822	// with the same id, then the second request will be ignored and the
3823	// first Job created and stored in the backend is returned.It is
3824	// recommended to always set this value to a UUID
3825	// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
3826	// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
3827	// and hyphens (-). The maximum length is 40 characters.
3828	RequestId string `json:"requestId,omitempty"`
3829
3830	// ForceSendFields is a list of field names (e.g. "Job") to
3831	// unconditionally include in API requests. By default, fields with
3832	// empty values are omitted from API requests. However, any non-pointer,
3833	// non-interface field appearing in ForceSendFields will be sent to the
3834	// server regardless of whether the field is empty or not. This may be
3835	// used to include empty fields in Patch requests.
3836	ForceSendFields []string `json:"-"`
3837
3838	// NullFields is a list of field names (e.g. "Job") to include in API
3839	// requests with the JSON null value. By default, fields with empty
3840	// values are omitted from API requests. However, any field with an
3841	// empty value appearing in NullFields will be sent to the server as
3842	// null. It is an error if a field in this list has a non-empty value.
3843	// This may be used to include null fields in Patch requests.
3844	NullFields []string `json:"-"`
3845}
3846
3847func (s *SubmitJobRequest) MarshalJSON() ([]byte, error) {
3848	type NoMethod SubmitJobRequest
3849	raw := NoMethod(*s)
3850	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3851}
3852
3853// TemplateParameter: A configurable parameter that replaces one or more
3854// fields in the template. Parameterizable fields: - Labels - File uris
3855// - Job properties - Job arguments - Script variables - Main class (in
3856// HadoopJob and SparkJob) - Zone (in ClusterSelector)
3857type TemplateParameter struct {
3858	// Description: Optional. Brief description of the parameter. Must not
3859	// exceed 1024 characters.
3860	Description string `json:"description,omitempty"`
3861
3862	// Fields: Required. Paths to all fields that the parameter replaces. A
3863	// field is allowed to appear in at most one parameter's list of field
3864	// paths.A field path is similar in syntax to a
3865	// google.protobuf.FieldMask. For example, a field path that references
3866	// the zone field of a workflow template's cluster selector would be
3867	// specified as placement.clusterSelector.zone.Also, field paths can
3868	// reference fields using the following syntax: Values in maps can be
3869	// referenced by key: labels'key'
3870	// placement.clusterSelector.clusterLabels'key'
3871	// placement.managedCluster.labels'key'
3872	// placement.clusterSelector.clusterLabels'key'
3873	// jobs'step-id'.labels'key' Jobs in the jobs list can be referenced by
3874	// step-id: jobs'step-id'.hadoopJob.mainJarFileUri
3875	// jobs'step-id'.hiveJob.queryFileUri
3876	// jobs'step-id'.pySparkJob.mainPythonFileUri
3877	// jobs'step-id'.hadoopJob.jarFileUris0
3878	// jobs'step-id'.hadoopJob.archiveUris0
3879	// jobs'step-id'.hadoopJob.fileUris0
3880	// jobs'step-id'.pySparkJob.pythonFileUris0 Items in repeated fields can
3881	// be referenced by a zero-based index: jobs'step-id'.sparkJob.args0
3882	// Other examples: jobs'step-id'.hadoopJob.properties'key'
3883	// jobs'step-id'.hadoopJob.args0
3884	// jobs'step-id'.hiveJob.scriptVariables'key'
3885	// jobs'step-id'.hadoopJob.mainJarFileUri
3886	// placement.clusterSelector.zoneIt may not be possible to parameterize
3887	// maps and repeated fields in their entirety since only individual map
3888	// values and individual items in repeated fields can be referenced. For
3889	// example, the following field paths are invalid:
3890	// placement.clusterSelector.clusterLabels jobs'step-id'.sparkJob.args
3891	Fields []string `json:"fields,omitempty"`
3892
3893	// Name: Required. Parameter name. The parameter name is used as the
3894	// key, and paired with the parameter value, which are passed to the
3895	// template when the template is instantiated. The name must contain
3896	// only capital letters (A-Z), numbers (0-9), and underscores (_), and
3897	// must not start with a number. The maximum length is 40 characters.
3898	Name string `json:"name,omitempty"`
3899
3900	// Validation: Optional. Validation rules to be applied to this
3901	// parameter's value.
3902	Validation *ParameterValidation `json:"validation,omitempty"`
3903
3904	// ForceSendFields is a list of field names (e.g. "Description") to
3905	// unconditionally include in API requests. By default, fields with
3906	// empty values are omitted from API requests. However, any non-pointer,
3907	// non-interface field appearing in ForceSendFields will be sent to the
3908	// server regardless of whether the field is empty or not. This may be
3909	// used to include empty fields in Patch requests.
3910	ForceSendFields []string `json:"-"`
3911
3912	// NullFields is a list of field names (e.g. "Description") to include
3913	// in API requests with the JSON null value. By default, fields with
3914	// empty values are omitted from API requests. However, any field with
3915	// an empty value appearing in NullFields will be sent to the server as
3916	// null. It is an error if a field in this list has a non-empty value.
3917	// This may be used to include null fields in Patch requests.
3918	NullFields []string `json:"-"`
3919}
3920
3921func (s *TemplateParameter) MarshalJSON() ([]byte, error) {
3922	type NoMethod TemplateParameter
3923	raw := NoMethod(*s)
3924	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3925}
3926
3927// TestIamPermissionsRequest: Request message for TestIamPermissions
3928// method.
3929type TestIamPermissionsRequest struct {
3930	// Permissions: The set of permissions to check for the resource.
3931	// Permissions with wildcards (such as '*' or 'storage.*') are not
3932	// allowed. For more information see IAM Overview
3933	// (https://cloud.google.com/iam/docs/overview#permissions).
3934	Permissions []string `json:"permissions,omitempty"`
3935
3936	// ForceSendFields is a list of field names (e.g. "Permissions") to
3937	// unconditionally include in API requests. By default, fields with
3938	// empty values are omitted from API requests. However, any non-pointer,
3939	// non-interface field appearing in ForceSendFields will be sent to the
3940	// server regardless of whether the field is empty or not. This may be
3941	// used to include empty fields in Patch requests.
3942	ForceSendFields []string `json:"-"`
3943
3944	// NullFields is a list of field names (e.g. "Permissions") to include
3945	// in API requests with the JSON null value. By default, fields with
3946	// empty values are omitted from API requests. However, any field with
3947	// an empty value appearing in NullFields will be sent to the server as
3948	// null. It is an error if a field in this list has a non-empty value.
3949	// This may be used to include null fields in Patch requests.
3950	NullFields []string `json:"-"`
3951}
3952
3953func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
3954	type NoMethod TestIamPermissionsRequest
3955	raw := NoMethod(*s)
3956	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3957}
3958
3959// TestIamPermissionsResponse: Response message for TestIamPermissions
3960// method.
3961type TestIamPermissionsResponse struct {
3962	// Permissions: A subset of TestPermissionsRequest.permissions that the
3963	// caller is allowed.
3964	Permissions []string `json:"permissions,omitempty"`
3965
3966	// ServerResponse contains the HTTP response code and headers from the
3967	// server.
3968	googleapi.ServerResponse `json:"-"`
3969
3970	// ForceSendFields is a list of field names (e.g. "Permissions") to
3971	// unconditionally include in API requests. By default, fields with
3972	// empty values are omitted from API requests. However, any non-pointer,
3973	// non-interface field appearing in ForceSendFields will be sent to the
3974	// server regardless of whether the field is empty or not. This may be
3975	// used to include empty fields in Patch requests.
3976	ForceSendFields []string `json:"-"`
3977
3978	// NullFields is a list of field names (e.g. "Permissions") to include
3979	// in API requests with the JSON null value. By default, fields with
3980	// empty values are omitted from API requests. However, any field with
3981	// an empty value appearing in NullFields will be sent to the server as
3982	// null. It is an error if a field in this list has a non-empty value.
3983	// This may be used to include null fields in Patch requests.
3984	NullFields []string `json:"-"`
3985}
3986
3987func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
3988	type NoMethod TestIamPermissionsResponse
3989	raw := NoMethod(*s)
3990	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
3991}
3992
3993// ValueValidation: Validation based on a list of allowed values.
3994type ValueValidation struct {
3995	// Values: Required. List of allowed values for the parameter.
3996	Values []string `json:"values,omitempty"`
3997
3998	// ForceSendFields is a list of field names (e.g. "Values") to
3999	// unconditionally include in API requests. By default, fields with
4000	// empty values are omitted from API requests. However, any non-pointer,
4001	// non-interface field appearing in ForceSendFields will be sent to the
4002	// server regardless of whether the field is empty or not. This may be
4003	// used to include empty fields in Patch requests.
4004	ForceSendFields []string `json:"-"`
4005
4006	// NullFields is a list of field names (e.g. "Values") to include in API
4007	// requests with the JSON null value. By default, fields with empty
4008	// values are omitted from API requests. However, any field with an
4009	// empty value appearing in NullFields will be sent to the server as
4010	// null. It is an error if a field in this list has a non-empty value.
4011	// This may be used to include null fields in Patch requests.
4012	NullFields []string `json:"-"`
4013}
4014
4015func (s *ValueValidation) MarshalJSON() ([]byte, error) {
4016	type NoMethod ValueValidation
4017	raw := NoMethod(*s)
4018	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4019}
4020
4021// WorkflowGraph: The workflow graph.
4022type WorkflowGraph struct {
4023	// Nodes: Output only. The workflow nodes.
4024	Nodes []*WorkflowNode `json:"nodes,omitempty"`
4025
4026	// ForceSendFields is a list of field names (e.g. "Nodes") to
4027	// unconditionally include in API requests. By default, fields with
4028	// empty values are omitted from API requests. However, any non-pointer,
4029	// non-interface field appearing in ForceSendFields will be sent to the
4030	// server regardless of whether the field is empty or not. This may be
4031	// used to include empty fields in Patch requests.
4032	ForceSendFields []string `json:"-"`
4033
4034	// NullFields is a list of field names (e.g. "Nodes") to include in API
4035	// requests with the JSON null value. By default, fields with empty
4036	// values are omitted from API requests. However, any field with an
4037	// empty value appearing in NullFields will be sent to the server as
4038	// null. It is an error if a field in this list has a non-empty value.
4039	// This may be used to include null fields in Patch requests.
4040	NullFields []string `json:"-"`
4041}
4042
4043func (s *WorkflowGraph) MarshalJSON() ([]byte, error) {
4044	type NoMethod WorkflowGraph
4045	raw := NoMethod(*s)
4046	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4047}
4048
4049// WorkflowMetadata: A Dataproc workflow template resource.
4050type WorkflowMetadata struct {
4051	// ClusterName: Output only. The name of the target cluster.
4052	ClusterName string `json:"clusterName,omitempty"`
4053
4054	// ClusterUuid: Output only. The UUID of target cluster.
4055	ClusterUuid string `json:"clusterUuid,omitempty"`
4056
4057	// CreateCluster: Output only. The create cluster operation metadata.
4058	CreateCluster *ClusterOperation `json:"createCluster,omitempty"`
4059
4060	// DagEndTime: Output only. DAG end time, which is only set for
4061	// workflows with dag_timeout when the DAG ends.
4062	DagEndTime string `json:"dagEndTime,omitempty"`
4063
4064	// DagStartTime: Output only. DAG start time, which is only set for
4065	// workflows with dag_timeout when the DAG begins.
4066	DagStartTime string `json:"dagStartTime,omitempty"`
4067
4068	// DagTimeout: Output only. The timeout duration for the DAG of jobs,
4069	// expressed in seconds (see JSON representation of duration
4070	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
4071	DagTimeout string `json:"dagTimeout,omitempty"`
4072
4073	// DeleteCluster: Output only. The delete cluster operation metadata.
4074	DeleteCluster *ClusterOperation `json:"deleteCluster,omitempty"`
4075
4076	// EndTime: Output only. Workflow end time.
4077	EndTime string `json:"endTime,omitempty"`
4078
4079	// Graph: Output only. The workflow graph.
4080	Graph *WorkflowGraph `json:"graph,omitempty"`
4081
4082	// Parameters: Map from parameter names to values that were used for
4083	// those parameters.
4084	Parameters map[string]string `json:"parameters,omitempty"`
4085
4086	// StartTime: Output only. Workflow start time.
4087	StartTime string `json:"startTime,omitempty"`
4088
4089	// State: Output only. The workflow state.
4090	//
4091	// Possible values:
4092	//   "UNKNOWN" - Unused.
4093	//   "PENDING" - The operation has been created.
4094	//   "RUNNING" - The operation is running.
4095	//   "DONE" - The operation is done; either cancelled or completed.
4096	State string `json:"state,omitempty"`
4097
4098	// Template: Output only. The resource name of the workflow template as
4099	// described in https://cloud.google.com/apis/design/resource_names. For
4100	// projects.regions.workflowTemplates, the resource name of the template
4101	// has the following format:
4102	// projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
4103	//  For projects.locations.workflowTemplates, the resource name of the
4104	// template has the following format:
4105	// projects/{project_id}/locations/{location}/workflowTemplates/{template
4106	// _id}
4107	Template string `json:"template,omitempty"`
4108
4109	// Version: Output only. The version of template at the time of workflow
4110	// instantiation.
4111	Version int64 `json:"version,omitempty"`
4112
4113	// ForceSendFields is a list of field names (e.g. "ClusterName") to
4114	// unconditionally include in API requests. By default, fields with
4115	// empty values are omitted from API requests. However, any non-pointer,
4116	// non-interface field appearing in ForceSendFields will be sent to the
4117	// server regardless of whether the field is empty or not. This may be
4118	// used to include empty fields in Patch requests.
4119	ForceSendFields []string `json:"-"`
4120
4121	// NullFields is a list of field names (e.g. "ClusterName") to include
4122	// in API requests with the JSON null value. By default, fields with
4123	// empty values are omitted from API requests. However, any field with
4124	// an empty value appearing in NullFields will be sent to the server as
4125	// null. It is an error if a field in this list has a non-empty value.
4126	// This may be used to include null fields in Patch requests.
4127	NullFields []string `json:"-"`
4128}
4129
4130func (s *WorkflowMetadata) MarshalJSON() ([]byte, error) {
4131	type NoMethod WorkflowMetadata
4132	raw := NoMethod(*s)
4133	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4134}
4135
4136// WorkflowNode: The workflow node.
4137type WorkflowNode struct {
4138	// Error: Output only. The error detail.
4139	Error string `json:"error,omitempty"`
4140
4141	// JobId: Output only. The job id; populated after the node enters
4142	// RUNNING state.
4143	JobId string `json:"jobId,omitempty"`
4144
4145	// PrerequisiteStepIds: Output only. Node's prerequisite nodes.
4146	PrerequisiteStepIds []string `json:"prerequisiteStepIds,omitempty"`
4147
4148	// State: Output only. The node state.
4149	//
4150	// Possible values:
4151	//   "NODE_STATUS_UNSPECIFIED" - State is unspecified.
4152	//   "BLOCKED" - The node is awaiting prerequisite node to finish.
4153	//   "RUNNABLE" - The node is runnable but not running.
4154	//   "RUNNING" - The node is running.
4155	//   "COMPLETED" - The node completed successfully.
4156	//   "FAILED" - The node failed. A node can be marked FAILED because its
4157	// ancestor or peer failed.
4158	State string `json:"state,omitempty"`
4159
4160	// StepId: Output only. The name of the node.
4161	StepId string `json:"stepId,omitempty"`
4162
4163	// ForceSendFields is a list of field names (e.g. "Error") to
4164	// unconditionally include in API requests. By default, fields with
4165	// empty values are omitted from API requests. However, any non-pointer,
4166	// non-interface field appearing in ForceSendFields will be sent to the
4167	// server regardless of whether the field is empty or not. This may be
4168	// used to include empty fields in Patch requests.
4169	ForceSendFields []string `json:"-"`
4170
4171	// NullFields is a list of field names (e.g. "Error") to include in API
4172	// requests with the JSON null value. By default, fields with empty
4173	// values are omitted from API requests. However, any field with an
4174	// empty value appearing in NullFields will be sent to the server as
4175	// null. It is an error if a field in this list has a non-empty value.
4176	// This may be used to include null fields in Patch requests.
4177	NullFields []string `json:"-"`
4178}
4179
4180func (s *WorkflowNode) MarshalJSON() ([]byte, error) {
4181	type NoMethod WorkflowNode
4182	raw := NoMethod(*s)
4183	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4184}
4185
4186// WorkflowTemplate: A Dataproc workflow template resource.
4187type WorkflowTemplate struct {
4188	// CreateTime: Output only. The time template was created.
4189	CreateTime string `json:"createTime,omitempty"`
4190
4191	// DagTimeout: Optional. Timeout duration for the DAG of jobs, expressed
4192	// in seconds (see JSON representation of duration
4193	// (https://developers.google.com/protocol-buffers/docs/proto3#json)).
4194	// The timeout duration must be from 10 minutes ("600s") to 24 hours
4195	// ("86400s"). The timer begins when the first job is submitted. If the
4196	// workflow is running at the end of the timeout period, any remaining
4197	// jobs are cancelled, the workflow is ended, and if the workflow was
4198	// running on a managed cluster, the cluster is deleted.
4199	DagTimeout string `json:"dagTimeout,omitempty"`
4200
4201	// Id: Required. The template id.The id must contain only letters (a-z,
4202	// A-Z), numbers (0-9), underscores (_), and hyphens (-). Cannot begin
4203	// or end with underscore or hyphen. Must consist of between 3 and 50
4204	// characters..
4205	Id string `json:"id,omitempty"`
4206
4207	// Jobs: Required. The Directed Acyclic Graph of Jobs to submit.
4208	Jobs []*OrderedJob `json:"jobs,omitempty"`
4209
4210	// Labels: Optional. The labels to associate with this template. These
4211	// labels will be propagated to all jobs and clusters created by the
4212	// workflow instance.Label keys must contain 1 to 63 characters, and
4213	// must conform to RFC 1035 (https://www.ietf.org/rfc/rfc1035.txt).Label
4214	// values may be empty, but, if present, must contain 1 to 63
4215	// characters, and must conform to RFC 1035
4216	// (https://www.ietf.org/rfc/rfc1035.txt).No more than 32 labels can be
4217	// associated with a template.
4218	Labels map[string]string `json:"labels,omitempty"`
4219
4220	// Name: Output only. The resource name of the workflow template, as
4221	// described in https://cloud.google.com/apis/design/resource_names. For
4222	// projects.regions.workflowTemplates, the resource name of the template
4223	// has the following format:
4224	// projects/{project_id}/regions/{region}/workflowTemplates/{template_id}
4225	//  For projects.locations.workflowTemplates, the resource name of the
4226	// template has the following format:
4227	// projects/{project_id}/locations/{location}/workflowTemplates/{template
4228	// _id}
4229	Name string `json:"name,omitempty"`
4230
4231	// Parameters: Optional. Template parameters whose values are
4232	// substituted into the template. Values for parameters must be provided
4233	// when the template is instantiated.
4234	Parameters []*TemplateParameter `json:"parameters,omitempty"`
4235
4236	// Placement: Required. WorkflowTemplate scheduling information.
4237	Placement *WorkflowTemplatePlacement `json:"placement,omitempty"`
4238
4239	// UpdateTime: Output only. The time template was last updated.
4240	UpdateTime string `json:"updateTime,omitempty"`
4241
4242	// Version: Optional. Used to perform a consistent
4243	// read-modify-write.This field should be left blank for a
4244	// CreateWorkflowTemplate request. It is required for an
4245	// UpdateWorkflowTemplate request, and must match the current server
4246	// version. A typical update template flow would fetch the current
4247	// template with a GetWorkflowTemplate request, which will return the
4248	// current template with the version field filled in with the current
4249	// server version. The user updates other fields in the template, then
4250	// returns it as part of the UpdateWorkflowTemplate request.
4251	Version int64 `json:"version,omitempty"`
4252
4253	// ServerResponse contains the HTTP response code and headers from the
4254	// server.
4255	googleapi.ServerResponse `json:"-"`
4256
4257	// ForceSendFields is a list of field names (e.g. "CreateTime") to
4258	// unconditionally include in API requests. By default, fields with
4259	// empty values are omitted from API requests. However, any non-pointer,
4260	// non-interface field appearing in ForceSendFields will be sent to the
4261	// server regardless of whether the field is empty or not. This may be
4262	// used to include empty fields in Patch requests.
4263	ForceSendFields []string `json:"-"`
4264
4265	// NullFields is a list of field names (e.g. "CreateTime") to include in
4266	// API requests with the JSON null value. By default, fields with empty
4267	// values are omitted from API requests. However, any field with an
4268	// empty value appearing in NullFields will be sent to the server as
4269	// null. It is an error if a field in this list has a non-empty value.
4270	// This may be used to include null fields in Patch requests.
4271	NullFields []string `json:"-"`
4272}
4273
4274func (s *WorkflowTemplate) MarshalJSON() ([]byte, error) {
4275	type NoMethod WorkflowTemplate
4276	raw := NoMethod(*s)
4277	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4278}
4279
4280// WorkflowTemplatePlacement: Specifies workflow execution target.Either
4281// managed_cluster or cluster_selector is required.
4282type WorkflowTemplatePlacement struct {
4283	// ClusterSelector: Optional. A selector that chooses target cluster for
4284	// jobs based on metadata.The selector is evaluated at the time each job
4285	// is submitted.
4286	ClusterSelector *ClusterSelector `json:"clusterSelector,omitempty"`
4287
4288	// ManagedCluster: Optional. A cluster that is managed by the workflow.
4289	ManagedCluster *ManagedCluster `json:"managedCluster,omitempty"`
4290
4291	// ForceSendFields is a list of field names (e.g. "ClusterSelector") to
4292	// unconditionally include in API requests. By default, fields with
4293	// empty values are omitted from API requests. However, any non-pointer,
4294	// non-interface field appearing in ForceSendFields will be sent to the
4295	// server regardless of whether the field is empty or not. This may be
4296	// used to include empty fields in Patch requests.
4297	ForceSendFields []string `json:"-"`
4298
4299	// NullFields is a list of field names (e.g. "ClusterSelector") to
4300	// include in API requests with the JSON null value. By default, fields
4301	// with empty values are omitted from API requests. However, any field
4302	// with an empty value appearing in NullFields will be sent to the
4303	// server as null. It is an error if a field in this list has a
4304	// non-empty value. This may be used to include null fields in Patch
4305	// requests.
4306	NullFields []string `json:"-"`
4307}
4308
4309func (s *WorkflowTemplatePlacement) MarshalJSON() ([]byte, error) {
4310	type NoMethod WorkflowTemplatePlacement
4311	raw := NoMethod(*s)
4312	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4313}
4314
4315// YarnApplication: A YARN application created by a job. Application
4316// information is a subset of
4317// org.apache.hadoop.yarn.proto.YarnProtos.ApplicationReportProto.Beta
4318// Feature: This report is available for testing purposes only. It may
4319// be changed before final release.
4320type YarnApplication struct {
4321	// Name: Output only. The application name.
4322	Name string `json:"name,omitempty"`
4323
4324	// Progress: Output only. The numerical progress of the application,
4325	// from 1 to 100.
4326	Progress float64 `json:"progress,omitempty"`
4327
4328	// State: Output only. The application state.
4329	//
4330	// Possible values:
4331	//   "STATE_UNSPECIFIED" - Status is unspecified.
4332	//   "NEW" - Status is NEW.
4333	//   "NEW_SAVING" - Status is NEW_SAVING.
4334	//   "SUBMITTED" - Status is SUBMITTED.
4335	//   "ACCEPTED" - Status is ACCEPTED.
4336	//   "RUNNING" - Status is RUNNING.
4337	//   "FINISHED" - Status is FINISHED.
4338	//   "FAILED" - Status is FAILED.
4339	//   "KILLED" - Status is KILLED.
4340	State string `json:"state,omitempty"`
4341
4342	// TrackingUrl: Output only. The HTTP URL of the ApplicationMaster,
4343	// HistoryServer, or TimelineServer that provides application-specific
4344	// information. The URL uses the internal hostname, and requires a proxy
4345	// server for resolution and, possibly, access.
4346	TrackingUrl string `json:"trackingUrl,omitempty"`
4347
4348	// ForceSendFields is a list of field names (e.g. "Name") to
4349	// unconditionally include in API requests. By default, fields with
4350	// empty values are omitted from API requests. However, any non-pointer,
4351	// non-interface field appearing in ForceSendFields will be sent to the
4352	// server regardless of whether the field is empty or not. This may be
4353	// used to include empty fields in Patch requests.
4354	ForceSendFields []string `json:"-"`
4355
4356	// NullFields is a list of field names (e.g. "Name") to include in API
4357	// requests with the JSON null value. By default, fields with empty
4358	// values are omitted from API requests. However, any field with an
4359	// empty value appearing in NullFields will be sent to the server as
4360	// null. It is an error if a field in this list has a non-empty value.
4361	// This may be used to include null fields in Patch requests.
4362	NullFields []string `json:"-"`
4363}
4364
4365func (s *YarnApplication) MarshalJSON() ([]byte, error) {
4366	type NoMethod YarnApplication
4367	raw := NoMethod(*s)
4368	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
4369}
4370
4371func (s *YarnApplication) UnmarshalJSON(data []byte) error {
4372	type NoMethod YarnApplication
4373	var s1 struct {
4374		Progress gensupport.JSONFloat64 `json:"progress"`
4375		*NoMethod
4376	}
4377	s1.NoMethod = (*NoMethod)(s)
4378	if err := json.Unmarshal(data, &s1); err != nil {
4379		return err
4380	}
4381	s.Progress = float64(s1.Progress)
4382	return nil
4383}
4384
4385// method id "dataproc.projects.locations.autoscalingPolicies.create":
4386
4387type ProjectsLocationsAutoscalingPoliciesCreateCall struct {
4388	s                 *Service
4389	parent            string
4390	autoscalingpolicy *AutoscalingPolicy
4391	urlParams_        gensupport.URLParams
4392	ctx_              context.Context
4393	header_           http.Header
4394}
4395
4396// Create: Creates new autoscaling policy.
4397//
4398// - parent: The "resource name" of the region or location, as described
4399//   in https://cloud.google.com/apis/design/resource_names. For
4400//   projects.regions.autoscalingPolicies.create, the resource name has
4401//   the following format: projects/{project_id}/regions/{region} For
4402//   projects.locations.autoscalingPolicies.create, the resource name
4403//   has the following format:
4404//   projects/{project_id}/locations/{location}.
4405func (r *ProjectsLocationsAutoscalingPoliciesService) Create(parent string, autoscalingpolicy *AutoscalingPolicy) *ProjectsLocationsAutoscalingPoliciesCreateCall {
4406	c := &ProjectsLocationsAutoscalingPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4407	c.parent = parent
4408	c.autoscalingpolicy = autoscalingpolicy
4409	return c
4410}
4411
4412// Fields allows partial responses to be retrieved. See
4413// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4414// for more information.
4415func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesCreateCall {
4416	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4417	return c
4418}
4419
4420// Context sets the context to be used in this call's Do method. Any
4421// pending HTTP request will be aborted if the provided context is
4422// canceled.
4423func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesCreateCall {
4424	c.ctx_ = ctx
4425	return c
4426}
4427
4428// Header returns an http.Header that can be modified by the caller to
4429// add HTTP headers to the request.
4430func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Header() http.Header {
4431	if c.header_ == nil {
4432		c.header_ = make(http.Header)
4433	}
4434	return c.header_
4435}
4436
4437func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
4438	reqHeaders := make(http.Header)
4439	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
4440	for k, v := range c.header_ {
4441		reqHeaders[k] = v
4442	}
4443	reqHeaders.Set("User-Agent", c.s.userAgent())
4444	var body io.Reader = nil
4445	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
4446	if err != nil {
4447		return nil, err
4448	}
4449	reqHeaders.Set("Content-Type", "application/json")
4450	c.urlParams_.Set("alt", alt)
4451	c.urlParams_.Set("prettyPrint", "false")
4452	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/autoscalingPolicies")
4453	urls += "?" + c.urlParams_.Encode()
4454	req, err := http.NewRequest("POST", urls, body)
4455	if err != nil {
4456		return nil, err
4457	}
4458	req.Header = reqHeaders
4459	googleapi.Expand(req.URL, map[string]string{
4460		"parent": c.parent,
4461	})
4462	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4463}
4464
4465// Do executes the "dataproc.projects.locations.autoscalingPolicies.create" call.
4466// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
4467// non-2xx status code is an error. Response headers are in either
4468// *AutoscalingPolicy.ServerResponse.Header or (if a response was
4469// returned at all) in error.(*googleapi.Error).Header. Use
4470// googleapi.IsNotModified to check whether the returned error was
4471// because http.StatusNotModified was returned.
4472func (c *ProjectsLocationsAutoscalingPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
4473	gensupport.SetOptions(c.urlParams_, opts...)
4474	res, err := c.doRequest("json")
4475	if res != nil && res.StatusCode == http.StatusNotModified {
4476		if res.Body != nil {
4477			res.Body.Close()
4478		}
4479		return nil, &googleapi.Error{
4480			Code:   res.StatusCode,
4481			Header: res.Header,
4482		}
4483	}
4484	if err != nil {
4485		return nil, err
4486	}
4487	defer googleapi.CloseBody(res)
4488	if err := googleapi.CheckResponse(res); err != nil {
4489		return nil, err
4490	}
4491	ret := &AutoscalingPolicy{
4492		ServerResponse: googleapi.ServerResponse{
4493			Header:         res.Header,
4494			HTTPStatusCode: res.StatusCode,
4495		},
4496	}
4497	target := &ret
4498	if err := gensupport.DecodeResponse(target, res); err != nil {
4499		return nil, err
4500	}
4501	return ret, nil
4502	// {
4503	//   "description": "Creates new autoscaling policy.",
4504	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies",
4505	//   "httpMethod": "POST",
4506	//   "id": "dataproc.projects.locations.autoscalingPolicies.create",
4507	//   "parameterOrder": [
4508	//     "parent"
4509	//   ],
4510	//   "parameters": {
4511	//     "parent": {
4512	//       "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}",
4513	//       "location": "path",
4514	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
4515	//       "required": true,
4516	//       "type": "string"
4517	//     }
4518	//   },
4519	//   "path": "v1beta2/{+parent}/autoscalingPolicies",
4520	//   "request": {
4521	//     "$ref": "AutoscalingPolicy"
4522	//   },
4523	//   "response": {
4524	//     "$ref": "AutoscalingPolicy"
4525	//   },
4526	//   "scopes": [
4527	//     "https://www.googleapis.com/auth/cloud-platform"
4528	//   ]
4529	// }
4530
4531}
4532
4533// method id "dataproc.projects.locations.autoscalingPolicies.delete":
4534
4535type ProjectsLocationsAutoscalingPoliciesDeleteCall struct {
4536	s          *Service
4537	name       string
4538	urlParams_ gensupport.URLParams
4539	ctx_       context.Context
4540	header_    http.Header
4541}
4542
4543// Delete: Deletes an autoscaling policy. It is an error to delete an
4544// autoscaling policy that is in use by one or more clusters.
4545//
4546// - name: The "resource name" of the autoscaling policy, as described
4547//   in https://cloud.google.com/apis/design/resource_names. For
4548//   projects.regions.autoscalingPolicies.delete, the resource name of
4549//   the policy has the following format:
4550//   projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_i
4551//   d} For projects.locations.autoscalingPolicies.delete, the resource
4552//   name of the policy has the following format:
4553//   projects/{project_id}/locations/{location}/autoscalingPolicies/{poli
4554//   cy_id}.
4555func (r *ProjectsLocationsAutoscalingPoliciesService) Delete(name string) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
4556	c := &ProjectsLocationsAutoscalingPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4557	c.name = name
4558	return c
4559}
4560
4561// Fields allows partial responses to be retrieved. See
4562// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4563// for more information.
4564func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
4565	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4566	return c
4567}
4568
4569// Context sets the context to be used in this call's Do method. Any
4570// pending HTTP request will be aborted if the provided context is
4571// canceled.
4572func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesDeleteCall {
4573	c.ctx_ = ctx
4574	return c
4575}
4576
4577// Header returns an http.Header that can be modified by the caller to
4578// add HTTP headers to the request.
4579func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Header() http.Header {
4580	if c.header_ == nil {
4581		c.header_ = make(http.Header)
4582	}
4583	return c.header_
4584}
4585
4586func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
4587	reqHeaders := make(http.Header)
4588	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
4589	for k, v := range c.header_ {
4590		reqHeaders[k] = v
4591	}
4592	reqHeaders.Set("User-Agent", c.s.userAgent())
4593	var body io.Reader = nil
4594	c.urlParams_.Set("alt", alt)
4595	c.urlParams_.Set("prettyPrint", "false")
4596	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
4597	urls += "?" + c.urlParams_.Encode()
4598	req, err := http.NewRequest("DELETE", urls, body)
4599	if err != nil {
4600		return nil, err
4601	}
4602	req.Header = reqHeaders
4603	googleapi.Expand(req.URL, map[string]string{
4604		"name": c.name,
4605	})
4606	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4607}
4608
4609// Do executes the "dataproc.projects.locations.autoscalingPolicies.delete" call.
4610// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4611// code is an error. Response headers are in either
4612// *Empty.ServerResponse.Header or (if a response was returned at all)
4613// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4614// check whether the returned error was because http.StatusNotModified
4615// was returned.
4616func (c *ProjectsLocationsAutoscalingPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4617	gensupport.SetOptions(c.urlParams_, opts...)
4618	res, err := c.doRequest("json")
4619	if res != nil && res.StatusCode == http.StatusNotModified {
4620		if res.Body != nil {
4621			res.Body.Close()
4622		}
4623		return nil, &googleapi.Error{
4624			Code:   res.StatusCode,
4625			Header: res.Header,
4626		}
4627	}
4628	if err != nil {
4629		return nil, err
4630	}
4631	defer googleapi.CloseBody(res)
4632	if err := googleapi.CheckResponse(res); err != nil {
4633		return nil, err
4634	}
4635	ret := &Empty{
4636		ServerResponse: googleapi.ServerResponse{
4637			Header:         res.Header,
4638			HTTPStatusCode: res.StatusCode,
4639		},
4640	}
4641	target := &ret
4642	if err := gensupport.DecodeResponse(target, res); err != nil {
4643		return nil, err
4644	}
4645	return ret, nil
4646	// {
4647	//   "description": "Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.",
4648	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}",
4649	//   "httpMethod": "DELETE",
4650	//   "id": "dataproc.projects.locations.autoscalingPolicies.delete",
4651	//   "parameterOrder": [
4652	//     "name"
4653	//   ],
4654	//   "parameters": {
4655	//     "name": {
4656	//       "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}",
4657	//       "location": "path",
4658	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
4659	//       "required": true,
4660	//       "type": "string"
4661	//     }
4662	//   },
4663	//   "path": "v1beta2/{+name}",
4664	//   "response": {
4665	//     "$ref": "Empty"
4666	//   },
4667	//   "scopes": [
4668	//     "https://www.googleapis.com/auth/cloud-platform"
4669	//   ]
4670	// }
4671
4672}
4673
4674// method id "dataproc.projects.locations.autoscalingPolicies.get":
4675
4676type ProjectsLocationsAutoscalingPoliciesGetCall struct {
4677	s            *Service
4678	name         string
4679	urlParams_   gensupport.URLParams
4680	ifNoneMatch_ string
4681	ctx_         context.Context
4682	header_      http.Header
4683}
4684
4685// Get: Retrieves autoscaling policy.
4686//
4687// - name: The "resource name" of the autoscaling policy, as described
4688//   in https://cloud.google.com/apis/design/resource_names. For
4689//   projects.regions.autoscalingPolicies.get, the resource name of the
4690//   policy has the following format:
4691//   projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_i
4692//   d} For projects.locations.autoscalingPolicies.get, the resource
4693//   name of the policy has the following format:
4694//   projects/{project_id}/locations/{location}/autoscalingPolicies/{poli
4695//   cy_id}.
4696func (r *ProjectsLocationsAutoscalingPoliciesService) Get(name string) *ProjectsLocationsAutoscalingPoliciesGetCall {
4697	c := &ProjectsLocationsAutoscalingPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4698	c.name = name
4699	return c
4700}
4701
4702// Fields allows partial responses to be retrieved. See
4703// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4704// for more information.
4705func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesGetCall {
4706	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4707	return c
4708}
4709
4710// IfNoneMatch sets the optional parameter which makes the operation
4711// fail if the object's ETag matches the given value. This is useful for
4712// getting updates only after the object has changed since the last
4713// request. Use googleapi.IsNotModified to check whether the response
4714// error from Do is the result of In-None-Match.
4715func (c *ProjectsLocationsAutoscalingPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutoscalingPoliciesGetCall {
4716	c.ifNoneMatch_ = entityTag
4717	return c
4718}
4719
4720// Context sets the context to be used in this call's Do method. Any
4721// pending HTTP request will be aborted if the provided context is
4722// canceled.
4723func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesGetCall {
4724	c.ctx_ = ctx
4725	return c
4726}
4727
4728// Header returns an http.Header that can be modified by the caller to
4729// add HTTP headers to the request.
4730func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Header() http.Header {
4731	if c.header_ == nil {
4732		c.header_ = make(http.Header)
4733	}
4734	return c.header_
4735}
4736
4737func (c *ProjectsLocationsAutoscalingPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
4738	reqHeaders := make(http.Header)
4739	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
4740	for k, v := range c.header_ {
4741		reqHeaders[k] = v
4742	}
4743	reqHeaders.Set("User-Agent", c.s.userAgent())
4744	if c.ifNoneMatch_ != "" {
4745		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4746	}
4747	var body io.Reader = nil
4748	c.urlParams_.Set("alt", alt)
4749	c.urlParams_.Set("prettyPrint", "false")
4750	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
4751	urls += "?" + c.urlParams_.Encode()
4752	req, err := http.NewRequest("GET", urls, body)
4753	if err != nil {
4754		return nil, err
4755	}
4756	req.Header = reqHeaders
4757	googleapi.Expand(req.URL, map[string]string{
4758		"name": c.name,
4759	})
4760	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4761}
4762
4763// Do executes the "dataproc.projects.locations.autoscalingPolicies.get" call.
4764// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
4765// non-2xx status code is an error. Response headers are in either
4766// *AutoscalingPolicy.ServerResponse.Header or (if a response was
4767// returned at all) in error.(*googleapi.Error).Header. Use
4768// googleapi.IsNotModified to check whether the returned error was
4769// because http.StatusNotModified was returned.
4770func (c *ProjectsLocationsAutoscalingPoliciesGetCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
4771	gensupport.SetOptions(c.urlParams_, opts...)
4772	res, err := c.doRequest("json")
4773	if res != nil && res.StatusCode == http.StatusNotModified {
4774		if res.Body != nil {
4775			res.Body.Close()
4776		}
4777		return nil, &googleapi.Error{
4778			Code:   res.StatusCode,
4779			Header: res.Header,
4780		}
4781	}
4782	if err != nil {
4783		return nil, err
4784	}
4785	defer googleapi.CloseBody(res)
4786	if err := googleapi.CheckResponse(res); err != nil {
4787		return nil, err
4788	}
4789	ret := &AutoscalingPolicy{
4790		ServerResponse: googleapi.ServerResponse{
4791			Header:         res.Header,
4792			HTTPStatusCode: res.StatusCode,
4793		},
4794	}
4795	target := &ret
4796	if err := gensupport.DecodeResponse(target, res); err != nil {
4797		return nil, err
4798	}
4799	return ret, nil
4800	// {
4801	//   "description": "Retrieves autoscaling policy.",
4802	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}",
4803	//   "httpMethod": "GET",
4804	//   "id": "dataproc.projects.locations.autoscalingPolicies.get",
4805	//   "parameterOrder": [
4806	//     "name"
4807	//   ],
4808	//   "parameters": {
4809	//     "name": {
4810	//       "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}",
4811	//       "location": "path",
4812	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
4813	//       "required": true,
4814	//       "type": "string"
4815	//     }
4816	//   },
4817	//   "path": "v1beta2/{+name}",
4818	//   "response": {
4819	//     "$ref": "AutoscalingPolicy"
4820	//   },
4821	//   "scopes": [
4822	//     "https://www.googleapis.com/auth/cloud-platform"
4823	//   ]
4824	// }
4825
4826}
4827
4828// method id "dataproc.projects.locations.autoscalingPolicies.getIamPolicy":
4829
4830type ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall struct {
4831	s            *Service
4832	resource     string
4833	urlParams_   gensupport.URLParams
4834	ifNoneMatch_ string
4835	ctx_         context.Context
4836	header_      http.Header
4837}
4838
4839// GetIamPolicy: Gets the access control policy for a resource. Returns
4840// an empty policy if the resource exists and does not have a policy
4841// set.
4842//
4843// - resource: REQUIRED: The resource for which the policy is being
4844//   requested. See the operation documentation for the appropriate
4845//   value for this field.
4846func (r *ProjectsLocationsAutoscalingPoliciesService) GetIamPolicy(resource string) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4847	c := &ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4848	c.resource = resource
4849	return c
4850}
4851
4852// OptionsRequestedPolicyVersion sets the optional parameter
4853// "options.requestedPolicyVersion": The policy format version to be
4854// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
4855// value will be rejected.Requests for policies with any conditional
4856// bindings must specify version 3. Policies without any conditional
4857// bindings may specify any valid value or leave the field unset.To
4858// learn which resources support conditions in their IAM policies, see
4859// the IAM documentation
4860// (https://cloud.google.com/iam/help/conditions/resource-policies).
4861func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4862	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
4863	return c
4864}
4865
4866// Fields allows partial responses to be retrieved. See
4867// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4868// for more information.
4869func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4870	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4871	return c
4872}
4873
4874// IfNoneMatch sets the optional parameter which makes the operation
4875// fail if the object's ETag matches the given value. This is useful for
4876// getting updates only after the object has changed since the last
4877// request. Use googleapi.IsNotModified to check whether the response
4878// error from Do is the result of In-None-Match.
4879func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4880	c.ifNoneMatch_ = entityTag
4881	return c
4882}
4883
4884// Context sets the context to be used in this call's Do method. Any
4885// pending HTTP request will be aborted if the provided context is
4886// canceled.
4887func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall {
4888	c.ctx_ = ctx
4889	return c
4890}
4891
4892// Header returns an http.Header that can be modified by the caller to
4893// add HTTP headers to the request.
4894func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Header() http.Header {
4895	if c.header_ == nil {
4896		c.header_ = make(http.Header)
4897	}
4898	return c.header_
4899}
4900
4901func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
4902	reqHeaders := make(http.Header)
4903	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
4904	for k, v := range c.header_ {
4905		reqHeaders[k] = v
4906	}
4907	reqHeaders.Set("User-Agent", c.s.userAgent())
4908	if c.ifNoneMatch_ != "" {
4909		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4910	}
4911	var body io.Reader = nil
4912	c.urlParams_.Set("alt", alt)
4913	c.urlParams_.Set("prettyPrint", "false")
4914	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
4915	urls += "?" + c.urlParams_.Encode()
4916	req, err := http.NewRequest("GET", urls, body)
4917	if err != nil {
4918		return nil, err
4919	}
4920	req.Header = reqHeaders
4921	googleapi.Expand(req.URL, map[string]string{
4922		"resource": c.resource,
4923	})
4924	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4925}
4926
4927// Do executes the "dataproc.projects.locations.autoscalingPolicies.getIamPolicy" call.
4928// Exactly one of *Policy or error will be non-nil. Any non-2xx status
4929// code is an error. Response headers are in either
4930// *Policy.ServerResponse.Header or (if a response was returned at all)
4931// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4932// check whether the returned error was because http.StatusNotModified
4933// was returned.
4934func (c *ProjectsLocationsAutoscalingPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
4935	gensupport.SetOptions(c.urlParams_, opts...)
4936	res, err := c.doRequest("json")
4937	if res != nil && res.StatusCode == http.StatusNotModified {
4938		if res.Body != nil {
4939			res.Body.Close()
4940		}
4941		return nil, &googleapi.Error{
4942			Code:   res.StatusCode,
4943			Header: res.Header,
4944		}
4945	}
4946	if err != nil {
4947		return nil, err
4948	}
4949	defer googleapi.CloseBody(res)
4950	if err := googleapi.CheckResponse(res); err != nil {
4951		return nil, err
4952	}
4953	ret := &Policy{
4954		ServerResponse: googleapi.ServerResponse{
4955			Header:         res.Header,
4956			HTTPStatusCode: res.StatusCode,
4957		},
4958	}
4959	target := &ret
4960	if err := gensupport.DecodeResponse(target, res); err != nil {
4961		return nil, err
4962	}
4963	return ret, nil
4964	// {
4965	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
4966	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}:getIamPolicy",
4967	//   "httpMethod": "GET",
4968	//   "id": "dataproc.projects.locations.autoscalingPolicies.getIamPolicy",
4969	//   "parameterOrder": [
4970	//     "resource"
4971	//   ],
4972	//   "parameters": {
4973	//     "options.requestedPolicyVersion": {
4974	//       "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).",
4975	//       "format": "int32",
4976	//       "location": "query",
4977	//       "type": "integer"
4978	//     },
4979	//     "resource": {
4980	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
4981	//       "location": "path",
4982	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
4983	//       "required": true,
4984	//       "type": "string"
4985	//     }
4986	//   },
4987	//   "path": "v1beta2/{+resource}:getIamPolicy",
4988	//   "response": {
4989	//     "$ref": "Policy"
4990	//   },
4991	//   "scopes": [
4992	//     "https://www.googleapis.com/auth/cloud-platform"
4993	//   ]
4994	// }
4995
4996}
4997
4998// method id "dataproc.projects.locations.autoscalingPolicies.list":
4999
5000type ProjectsLocationsAutoscalingPoliciesListCall struct {
5001	s            *Service
5002	parent       string
5003	urlParams_   gensupport.URLParams
5004	ifNoneMatch_ string
5005	ctx_         context.Context
5006	header_      http.Header
5007}
5008
5009// List: Lists autoscaling policies in the project.
5010//
5011// - parent: The "resource name" of the region or location, as described
5012//   in https://cloud.google.com/apis/design/resource_names. For
5013//   projects.regions.autoscalingPolicies.list, the resource name of the
5014//   region has the following format:
5015//   projects/{project_id}/regions/{region} For
5016//   projects.locations.autoscalingPolicies.list, the resource name of
5017//   the location has the following format:
5018//   projects/{project_id}/locations/{location}.
5019func (r *ProjectsLocationsAutoscalingPoliciesService) List(parent string) *ProjectsLocationsAutoscalingPoliciesListCall {
5020	c := &ProjectsLocationsAutoscalingPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5021	c.parent = parent
5022	return c
5023}
5024
5025// PageSize sets the optional parameter "pageSize": The maximum number
5026// of results to return in each response. Must be less than or equal to
5027// 1000. Defaults to 100.
5028func (c *ProjectsLocationsAutoscalingPoliciesListCall) PageSize(pageSize int64) *ProjectsLocationsAutoscalingPoliciesListCall {
5029	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
5030	return c
5031}
5032
5033// PageToken sets the optional parameter "pageToken": The page token,
5034// returned by a previous call, to request the next page of results.
5035func (c *ProjectsLocationsAutoscalingPoliciesListCall) PageToken(pageToken string) *ProjectsLocationsAutoscalingPoliciesListCall {
5036	c.urlParams_.Set("pageToken", pageToken)
5037	return c
5038}
5039
5040// Fields allows partial responses to be retrieved. See
5041// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5042// for more information.
5043func (c *ProjectsLocationsAutoscalingPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesListCall {
5044	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5045	return c
5046}
5047
5048// IfNoneMatch sets the optional parameter which makes the operation
5049// fail if the object's ETag matches the given value. This is useful for
5050// getting updates only after the object has changed since the last
5051// request. Use googleapi.IsNotModified to check whether the response
5052// error from Do is the result of In-None-Match.
5053func (c *ProjectsLocationsAutoscalingPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsAutoscalingPoliciesListCall {
5054	c.ifNoneMatch_ = entityTag
5055	return c
5056}
5057
5058// Context sets the context to be used in this call's Do method. Any
5059// pending HTTP request will be aborted if the provided context is
5060// canceled.
5061func (c *ProjectsLocationsAutoscalingPoliciesListCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesListCall {
5062	c.ctx_ = ctx
5063	return c
5064}
5065
5066// Header returns an http.Header that can be modified by the caller to
5067// add HTTP headers to the request.
5068func (c *ProjectsLocationsAutoscalingPoliciesListCall) Header() http.Header {
5069	if c.header_ == nil {
5070		c.header_ = make(http.Header)
5071	}
5072	return c.header_
5073}
5074
5075func (c *ProjectsLocationsAutoscalingPoliciesListCall) doRequest(alt string) (*http.Response, error) {
5076	reqHeaders := make(http.Header)
5077	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
5078	for k, v := range c.header_ {
5079		reqHeaders[k] = v
5080	}
5081	reqHeaders.Set("User-Agent", c.s.userAgent())
5082	if c.ifNoneMatch_ != "" {
5083		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
5084	}
5085	var body io.Reader = nil
5086	c.urlParams_.Set("alt", alt)
5087	c.urlParams_.Set("prettyPrint", "false")
5088	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/autoscalingPolicies")
5089	urls += "?" + c.urlParams_.Encode()
5090	req, err := http.NewRequest("GET", urls, body)
5091	if err != nil {
5092		return nil, err
5093	}
5094	req.Header = reqHeaders
5095	googleapi.Expand(req.URL, map[string]string{
5096		"parent": c.parent,
5097	})
5098	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5099}
5100
5101// Do executes the "dataproc.projects.locations.autoscalingPolicies.list" call.
5102// Exactly one of *ListAutoscalingPoliciesResponse or error will be
5103// non-nil. Any non-2xx status code is an error. Response headers are in
5104// either *ListAutoscalingPoliciesResponse.ServerResponse.Header or (if
5105// a response was returned at all) in error.(*googleapi.Error).Header.
5106// Use googleapi.IsNotModified to check whether the returned error was
5107// because http.StatusNotModified was returned.
5108func (c *ProjectsLocationsAutoscalingPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListAutoscalingPoliciesResponse, error) {
5109	gensupport.SetOptions(c.urlParams_, opts...)
5110	res, err := c.doRequest("json")
5111	if res != nil && res.StatusCode == http.StatusNotModified {
5112		if res.Body != nil {
5113			res.Body.Close()
5114		}
5115		return nil, &googleapi.Error{
5116			Code:   res.StatusCode,
5117			Header: res.Header,
5118		}
5119	}
5120	if err != nil {
5121		return nil, err
5122	}
5123	defer googleapi.CloseBody(res)
5124	if err := googleapi.CheckResponse(res); err != nil {
5125		return nil, err
5126	}
5127	ret := &ListAutoscalingPoliciesResponse{
5128		ServerResponse: googleapi.ServerResponse{
5129			Header:         res.Header,
5130			HTTPStatusCode: res.StatusCode,
5131		},
5132	}
5133	target := &ret
5134	if err := gensupport.DecodeResponse(target, res); err != nil {
5135		return nil, err
5136	}
5137	return ret, nil
5138	// {
5139	//   "description": "Lists autoscaling policies in the project.",
5140	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies",
5141	//   "httpMethod": "GET",
5142	//   "id": "dataproc.projects.locations.autoscalingPolicies.list",
5143	//   "parameterOrder": [
5144	//     "parent"
5145	//   ],
5146	//   "parameters": {
5147	//     "pageSize": {
5148	//       "description": "Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.",
5149	//       "format": "int32",
5150	//       "location": "query",
5151	//       "type": "integer"
5152	//     },
5153	//     "pageToken": {
5154	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
5155	//       "location": "query",
5156	//       "type": "string"
5157	//     },
5158	//     "parent": {
5159	//       "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}",
5160	//       "location": "path",
5161	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
5162	//       "required": true,
5163	//       "type": "string"
5164	//     }
5165	//   },
5166	//   "path": "v1beta2/{+parent}/autoscalingPolicies",
5167	//   "response": {
5168	//     "$ref": "ListAutoscalingPoliciesResponse"
5169	//   },
5170	//   "scopes": [
5171	//     "https://www.googleapis.com/auth/cloud-platform"
5172	//   ]
5173	// }
5174
5175}
5176
5177// Pages invokes f for each page of results.
5178// A non-nil error returned from f will halt the iteration.
5179// The provided context supersedes any context provided to the Context method.
5180func (c *ProjectsLocationsAutoscalingPoliciesListCall) Pages(ctx context.Context, f func(*ListAutoscalingPoliciesResponse) error) error {
5181	c.ctx_ = ctx
5182	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
5183	for {
5184		x, err := c.Do()
5185		if err != nil {
5186			return err
5187		}
5188		if err := f(x); err != nil {
5189			return err
5190		}
5191		if x.NextPageToken == "" {
5192			return nil
5193		}
5194		c.PageToken(x.NextPageToken)
5195	}
5196}
5197
5198// method id "dataproc.projects.locations.autoscalingPolicies.setIamPolicy":
5199
5200type ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall struct {
5201	s                   *Service
5202	resource            string
5203	setiampolicyrequest *SetIamPolicyRequest
5204	urlParams_          gensupport.URLParams
5205	ctx_                context.Context
5206	header_             http.Header
5207}
5208
5209// SetIamPolicy: Sets the access control policy on the specified
5210// resource. Replaces any existing policy.Can return NOT_FOUND,
5211// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
5212//
5213// - resource: REQUIRED: The resource for which the policy is being
5214//   specified. See the operation documentation for the appropriate
5215//   value for this field.
5216func (r *ProjectsLocationsAutoscalingPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
5217	c := &ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5218	c.resource = resource
5219	c.setiampolicyrequest = setiampolicyrequest
5220	return c
5221}
5222
5223// Fields allows partial responses to be retrieved. See
5224// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5225// for more information.
5226func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
5227	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5228	return c
5229}
5230
5231// Context sets the context to be used in this call's Do method. Any
5232// pending HTTP request will be aborted if the provided context is
5233// canceled.
5234func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall {
5235	c.ctx_ = ctx
5236	return c
5237}
5238
5239// Header returns an http.Header that can be modified by the caller to
5240// add HTTP headers to the request.
5241func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Header() http.Header {
5242	if c.header_ == nil {
5243		c.header_ = make(http.Header)
5244	}
5245	return c.header_
5246}
5247
5248func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
5249	reqHeaders := make(http.Header)
5250	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
5251	for k, v := range c.header_ {
5252		reqHeaders[k] = v
5253	}
5254	reqHeaders.Set("User-Agent", c.s.userAgent())
5255	var body io.Reader = nil
5256	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
5257	if err != nil {
5258		return nil, err
5259	}
5260	reqHeaders.Set("Content-Type", "application/json")
5261	c.urlParams_.Set("alt", alt)
5262	c.urlParams_.Set("prettyPrint", "false")
5263	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
5264	urls += "?" + c.urlParams_.Encode()
5265	req, err := http.NewRequest("POST", urls, body)
5266	if err != nil {
5267		return nil, err
5268	}
5269	req.Header = reqHeaders
5270	googleapi.Expand(req.URL, map[string]string{
5271		"resource": c.resource,
5272	})
5273	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5274}
5275
5276// Do executes the "dataproc.projects.locations.autoscalingPolicies.setIamPolicy" call.
5277// Exactly one of *Policy or error will be non-nil. Any non-2xx status
5278// code is an error. Response headers are in either
5279// *Policy.ServerResponse.Header or (if a response was returned at all)
5280// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5281// check whether the returned error was because http.StatusNotModified
5282// was returned.
5283func (c *ProjectsLocationsAutoscalingPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
5284	gensupport.SetOptions(c.urlParams_, opts...)
5285	res, err := c.doRequest("json")
5286	if res != nil && res.StatusCode == http.StatusNotModified {
5287		if res.Body != nil {
5288			res.Body.Close()
5289		}
5290		return nil, &googleapi.Error{
5291			Code:   res.StatusCode,
5292			Header: res.Header,
5293		}
5294	}
5295	if err != nil {
5296		return nil, err
5297	}
5298	defer googleapi.CloseBody(res)
5299	if err := googleapi.CheckResponse(res); err != nil {
5300		return nil, err
5301	}
5302	ret := &Policy{
5303		ServerResponse: googleapi.ServerResponse{
5304			Header:         res.Header,
5305			HTTPStatusCode: res.StatusCode,
5306		},
5307	}
5308	target := &ret
5309	if err := gensupport.DecodeResponse(target, res); err != nil {
5310		return nil, err
5311	}
5312	return ret, nil
5313	// {
5314	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
5315	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}:setIamPolicy",
5316	//   "httpMethod": "POST",
5317	//   "id": "dataproc.projects.locations.autoscalingPolicies.setIamPolicy",
5318	//   "parameterOrder": [
5319	//     "resource"
5320	//   ],
5321	//   "parameters": {
5322	//     "resource": {
5323	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
5324	//       "location": "path",
5325	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
5326	//       "required": true,
5327	//       "type": "string"
5328	//     }
5329	//   },
5330	//   "path": "v1beta2/{+resource}:setIamPolicy",
5331	//   "request": {
5332	//     "$ref": "SetIamPolicyRequest"
5333	//   },
5334	//   "response": {
5335	//     "$ref": "Policy"
5336	//   },
5337	//   "scopes": [
5338	//     "https://www.googleapis.com/auth/cloud-platform"
5339	//   ]
5340	// }
5341
5342}
5343
5344// method id "dataproc.projects.locations.autoscalingPolicies.testIamPermissions":
5345
5346type ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall struct {
5347	s                         *Service
5348	resource                  string
5349	testiampermissionsrequest *TestIamPermissionsRequest
5350	urlParams_                gensupport.URLParams
5351	ctx_                      context.Context
5352	header_                   http.Header
5353}
5354
5355// TestIamPermissions: Returns permissions that a caller has on the
5356// specified resource. If the resource does not exist, this will return
5357// an empty set of permissions, not a NOT_FOUND error.Note: This
5358// operation is designed to be used for building permission-aware UIs
5359// and command-line tools, not for authorization checking. This
5360// operation may "fail open" without warning.
5361//
5362// - resource: REQUIRED: The resource for which the policy detail is
5363//   being requested. See the operation documentation for the
5364//   appropriate value for this field.
5365func (r *ProjectsLocationsAutoscalingPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
5366	c := &ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5367	c.resource = resource
5368	c.testiampermissionsrequest = testiampermissionsrequest
5369	return c
5370}
5371
5372// Fields allows partial responses to be retrieved. See
5373// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5374// for more information.
5375func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
5376	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5377	return c
5378}
5379
5380// Context sets the context to be used in this call's Do method. Any
5381// pending HTTP request will be aborted if the provided context is
5382// canceled.
5383func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall {
5384	c.ctx_ = ctx
5385	return c
5386}
5387
5388// Header returns an http.Header that can be modified by the caller to
5389// add HTTP headers to the request.
5390func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Header() http.Header {
5391	if c.header_ == nil {
5392		c.header_ = make(http.Header)
5393	}
5394	return c.header_
5395}
5396
5397func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
5398	reqHeaders := make(http.Header)
5399	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
5400	for k, v := range c.header_ {
5401		reqHeaders[k] = v
5402	}
5403	reqHeaders.Set("User-Agent", c.s.userAgent())
5404	var body io.Reader = nil
5405	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
5406	if err != nil {
5407		return nil, err
5408	}
5409	reqHeaders.Set("Content-Type", "application/json")
5410	c.urlParams_.Set("alt", alt)
5411	c.urlParams_.Set("prettyPrint", "false")
5412	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
5413	urls += "?" + c.urlParams_.Encode()
5414	req, err := http.NewRequest("POST", urls, body)
5415	if err != nil {
5416		return nil, err
5417	}
5418	req.Header = reqHeaders
5419	googleapi.Expand(req.URL, map[string]string{
5420		"resource": c.resource,
5421	})
5422	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5423}
5424
5425// Do executes the "dataproc.projects.locations.autoscalingPolicies.testIamPermissions" call.
5426// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
5427// Any non-2xx status code is an error. Response headers are in either
5428// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
5429// was returned at all) in error.(*googleapi.Error).Header. Use
5430// googleapi.IsNotModified to check whether the returned error was
5431// because http.StatusNotModified was returned.
5432func (c *ProjectsLocationsAutoscalingPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
5433	gensupport.SetOptions(c.urlParams_, opts...)
5434	res, err := c.doRequest("json")
5435	if res != nil && res.StatusCode == http.StatusNotModified {
5436		if res.Body != nil {
5437			res.Body.Close()
5438		}
5439		return nil, &googleapi.Error{
5440			Code:   res.StatusCode,
5441			Header: res.Header,
5442		}
5443	}
5444	if err != nil {
5445		return nil, err
5446	}
5447	defer googleapi.CloseBody(res)
5448	if err := googleapi.CheckResponse(res); err != nil {
5449		return nil, err
5450	}
5451	ret := &TestIamPermissionsResponse{
5452		ServerResponse: googleapi.ServerResponse{
5453			Header:         res.Header,
5454			HTTPStatusCode: res.StatusCode,
5455		},
5456	}
5457	target := &ret
5458	if err := gensupport.DecodeResponse(target, res); err != nil {
5459		return nil, err
5460	}
5461	return ret, nil
5462	// {
5463	//   "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.",
5464	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}:testIamPermissions",
5465	//   "httpMethod": "POST",
5466	//   "id": "dataproc.projects.locations.autoscalingPolicies.testIamPermissions",
5467	//   "parameterOrder": [
5468	//     "resource"
5469	//   ],
5470	//   "parameters": {
5471	//     "resource": {
5472	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
5473	//       "location": "path",
5474	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
5475	//       "required": true,
5476	//       "type": "string"
5477	//     }
5478	//   },
5479	//   "path": "v1beta2/{+resource}:testIamPermissions",
5480	//   "request": {
5481	//     "$ref": "TestIamPermissionsRequest"
5482	//   },
5483	//   "response": {
5484	//     "$ref": "TestIamPermissionsResponse"
5485	//   },
5486	//   "scopes": [
5487	//     "https://www.googleapis.com/auth/cloud-platform"
5488	//   ]
5489	// }
5490
5491}
5492
5493// method id "dataproc.projects.locations.autoscalingPolicies.update":
5494
5495type ProjectsLocationsAutoscalingPoliciesUpdateCall struct {
5496	s                 *Service
5497	name              string
5498	autoscalingpolicy *AutoscalingPolicy
5499	urlParams_        gensupport.URLParams
5500	ctx_              context.Context
5501	header_           http.Header
5502}
5503
5504// Update: Updates (replaces) autoscaling policy.Disabled check for
5505// update_mask, because all updates will be full replacements.
5506//
5507// - name: Output only. The "resource name" of the autoscaling policy,
5508//   as described in
5509//   https://cloud.google.com/apis/design/resource_names. For
5510//   projects.regions.autoscalingPolicies, the resource name of the
5511//   policy has the following format:
5512//   projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_i
5513//   d} For projects.locations.autoscalingPolicies, the resource name of
5514//   the policy has the following format:
5515//   projects/{project_id}/locations/{location}/autoscalingPolicies/{poli
5516//   cy_id}.
5517func (r *ProjectsLocationsAutoscalingPoliciesService) Update(name string, autoscalingpolicy *AutoscalingPolicy) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
5518	c := &ProjectsLocationsAutoscalingPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5519	c.name = name
5520	c.autoscalingpolicy = autoscalingpolicy
5521	return c
5522}
5523
5524// Fields allows partial responses to be retrieved. See
5525// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5526// for more information.
5527func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
5528	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5529	return c
5530}
5531
5532// Context sets the context to be used in this call's Do method. Any
5533// pending HTTP request will be aborted if the provided context is
5534// canceled.
5535func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Context(ctx context.Context) *ProjectsLocationsAutoscalingPoliciesUpdateCall {
5536	c.ctx_ = ctx
5537	return c
5538}
5539
5540// Header returns an http.Header that can be modified by the caller to
5541// add HTTP headers to the request.
5542func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Header() http.Header {
5543	if c.header_ == nil {
5544		c.header_ = make(http.Header)
5545	}
5546	return c.header_
5547}
5548
5549func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
5550	reqHeaders := make(http.Header)
5551	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
5552	for k, v := range c.header_ {
5553		reqHeaders[k] = v
5554	}
5555	reqHeaders.Set("User-Agent", c.s.userAgent())
5556	var body io.Reader = nil
5557	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
5558	if err != nil {
5559		return nil, err
5560	}
5561	reqHeaders.Set("Content-Type", "application/json")
5562	c.urlParams_.Set("alt", alt)
5563	c.urlParams_.Set("prettyPrint", "false")
5564	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
5565	urls += "?" + c.urlParams_.Encode()
5566	req, err := http.NewRequest("PUT", urls, body)
5567	if err != nil {
5568		return nil, err
5569	}
5570	req.Header = reqHeaders
5571	googleapi.Expand(req.URL, map[string]string{
5572		"name": c.name,
5573	})
5574	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5575}
5576
5577// Do executes the "dataproc.projects.locations.autoscalingPolicies.update" call.
5578// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
5579// non-2xx status code is an error. Response headers are in either
5580// *AutoscalingPolicy.ServerResponse.Header or (if a response was
5581// returned at all) in error.(*googleapi.Error).Header. Use
5582// googleapi.IsNotModified to check whether the returned error was
5583// because http.StatusNotModified was returned.
5584func (c *ProjectsLocationsAutoscalingPoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
5585	gensupport.SetOptions(c.urlParams_, opts...)
5586	res, err := c.doRequest("json")
5587	if res != nil && res.StatusCode == http.StatusNotModified {
5588		if res.Body != nil {
5589			res.Body.Close()
5590		}
5591		return nil, &googleapi.Error{
5592			Code:   res.StatusCode,
5593			Header: res.Header,
5594		}
5595	}
5596	if err != nil {
5597		return nil, err
5598	}
5599	defer googleapi.CloseBody(res)
5600	if err := googleapi.CheckResponse(res); err != nil {
5601		return nil, err
5602	}
5603	ret := &AutoscalingPolicy{
5604		ServerResponse: googleapi.ServerResponse{
5605			Header:         res.Header,
5606			HTTPStatusCode: res.StatusCode,
5607		},
5608	}
5609	target := &ret
5610	if err := gensupport.DecodeResponse(target, res); err != nil {
5611		return nil, err
5612	}
5613	return ret, nil
5614	// {
5615	//   "description": "Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.",
5616	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/autoscalingPolicies/{autoscalingPoliciesId}",
5617	//   "httpMethod": "PUT",
5618	//   "id": "dataproc.projects.locations.autoscalingPolicies.update",
5619	//   "parameterOrder": [
5620	//     "name"
5621	//   ],
5622	//   "parameters": {
5623	//     "name": {
5624	//       "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}",
5625	//       "location": "path",
5626	//       "pattern": "^projects/[^/]+/locations/[^/]+/autoscalingPolicies/[^/]+$",
5627	//       "required": true,
5628	//       "type": "string"
5629	//     }
5630	//   },
5631	//   "path": "v1beta2/{+name}",
5632	//   "request": {
5633	//     "$ref": "AutoscalingPolicy"
5634	//   },
5635	//   "response": {
5636	//     "$ref": "AutoscalingPolicy"
5637	//   },
5638	//   "scopes": [
5639	//     "https://www.googleapis.com/auth/cloud-platform"
5640	//   ]
5641	// }
5642
5643}
5644
5645// method id "dataproc.projects.locations.workflowTemplates.create":
5646
5647type ProjectsLocationsWorkflowTemplatesCreateCall struct {
5648	s                *Service
5649	parent           string
5650	workflowtemplate *WorkflowTemplate
5651	urlParams_       gensupport.URLParams
5652	ctx_             context.Context
5653	header_          http.Header
5654}
5655
5656// Create: Creates new workflow template.
5657//
5658// - parent: The resource name of the region or location, as described
5659//   in https://cloud.google.com/apis/design/resource_names. For
5660//   projects.regions.workflowTemplates,create, the resource name of the
5661//   region has the following format:
5662//   projects/{project_id}/regions/{region} For
5663//   projects.locations.workflowTemplates.create, the resource name of
5664//   the location has the following format:
5665//   projects/{project_id}/locations/{location}.
5666func (r *ProjectsLocationsWorkflowTemplatesService) Create(parent string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesCreateCall {
5667	c := &ProjectsLocationsWorkflowTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5668	c.parent = parent
5669	c.workflowtemplate = workflowtemplate
5670	return c
5671}
5672
5673// Fields allows partial responses to be retrieved. See
5674// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5675// for more information.
5676func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesCreateCall {
5677	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5678	return c
5679}
5680
5681// Context sets the context to be used in this call's Do method. Any
5682// pending HTTP request will be aborted if the provided context is
5683// canceled.
5684func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesCreateCall {
5685	c.ctx_ = ctx
5686	return c
5687}
5688
5689// Header returns an http.Header that can be modified by the caller to
5690// add HTTP headers to the request.
5691func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Header() http.Header {
5692	if c.header_ == nil {
5693		c.header_ = make(http.Header)
5694	}
5695	return c.header_
5696}
5697
5698func (c *ProjectsLocationsWorkflowTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
5699	reqHeaders := make(http.Header)
5700	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
5701	for k, v := range c.header_ {
5702		reqHeaders[k] = v
5703	}
5704	reqHeaders.Set("User-Agent", c.s.userAgent())
5705	var body io.Reader = nil
5706	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
5707	if err != nil {
5708		return nil, err
5709	}
5710	reqHeaders.Set("Content-Type", "application/json")
5711	c.urlParams_.Set("alt", alt)
5712	c.urlParams_.Set("prettyPrint", "false")
5713	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates")
5714	urls += "?" + c.urlParams_.Encode()
5715	req, err := http.NewRequest("POST", urls, body)
5716	if err != nil {
5717		return nil, err
5718	}
5719	req.Header = reqHeaders
5720	googleapi.Expand(req.URL, map[string]string{
5721		"parent": c.parent,
5722	})
5723	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5724}
5725
5726// Do executes the "dataproc.projects.locations.workflowTemplates.create" call.
5727// Exactly one of *WorkflowTemplate or error will be non-nil. Any
5728// non-2xx status code is an error. Response headers are in either
5729// *WorkflowTemplate.ServerResponse.Header or (if a response was
5730// returned at all) in error.(*googleapi.Error).Header. Use
5731// googleapi.IsNotModified to check whether the returned error was
5732// because http.StatusNotModified was returned.
5733func (c *ProjectsLocationsWorkflowTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
5734	gensupport.SetOptions(c.urlParams_, opts...)
5735	res, err := c.doRequest("json")
5736	if res != nil && res.StatusCode == http.StatusNotModified {
5737		if res.Body != nil {
5738			res.Body.Close()
5739		}
5740		return nil, &googleapi.Error{
5741			Code:   res.StatusCode,
5742			Header: res.Header,
5743		}
5744	}
5745	if err != nil {
5746		return nil, err
5747	}
5748	defer googleapi.CloseBody(res)
5749	if err := googleapi.CheckResponse(res); err != nil {
5750		return nil, err
5751	}
5752	ret := &WorkflowTemplate{
5753		ServerResponse: googleapi.ServerResponse{
5754			Header:         res.Header,
5755			HTTPStatusCode: res.StatusCode,
5756		},
5757	}
5758	target := &ret
5759	if err := gensupport.DecodeResponse(target, res); err != nil {
5760		return nil, err
5761	}
5762	return ret, nil
5763	// {
5764	//   "description": "Creates new workflow template.",
5765	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates",
5766	//   "httpMethod": "POST",
5767	//   "id": "dataproc.projects.locations.workflowTemplates.create",
5768	//   "parameterOrder": [
5769	//     "parent"
5770	//   ],
5771	//   "parameters": {
5772	//     "parent": {
5773	//       "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}",
5774	//       "location": "path",
5775	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
5776	//       "required": true,
5777	//       "type": "string"
5778	//     }
5779	//   },
5780	//   "path": "v1beta2/{+parent}/workflowTemplates",
5781	//   "request": {
5782	//     "$ref": "WorkflowTemplate"
5783	//   },
5784	//   "response": {
5785	//     "$ref": "WorkflowTemplate"
5786	//   },
5787	//   "scopes": [
5788	//     "https://www.googleapis.com/auth/cloud-platform"
5789	//   ]
5790	// }
5791
5792}
5793
5794// method id "dataproc.projects.locations.workflowTemplates.delete":
5795
5796type ProjectsLocationsWorkflowTemplatesDeleteCall struct {
5797	s          *Service
5798	name       string
5799	urlParams_ gensupport.URLParams
5800	ctx_       context.Context
5801	header_    http.Header
5802}
5803
5804// Delete: Deletes a workflow template. It does not cancel in-progress
5805// workflows.
5806//
5807// - name: The resource name of the workflow template, as described in
5808//   https://cloud.google.com/apis/design/resource_names. For
5809//   projects.regions.workflowTemplates.delete, the resource name of the
5810//   template has the following format:
5811//   projects/{project_id}/regions/{region}/workflowTemplates/{template_i
5812//   d} For projects.locations.workflowTemplates.instantiate, the
5813//   resource name of the template has the following format:
5814//   projects/{project_id}/locations/{location}/workflowTemplates/{templa
5815//   te_id}.
5816func (r *ProjectsLocationsWorkflowTemplatesService) Delete(name string) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5817	c := &ProjectsLocationsWorkflowTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5818	c.name = name
5819	return c
5820}
5821
5822// Version sets the optional parameter "version": The version of
5823// workflow template to delete. If specified, will only delete the
5824// template if the current server version matches specified version.
5825func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Version(version int64) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5826	c.urlParams_.Set("version", fmt.Sprint(version))
5827	return c
5828}
5829
5830// Fields allows partial responses to be retrieved. See
5831// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5832// for more information.
5833func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5834	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5835	return c
5836}
5837
5838// Context sets the context to be used in this call's Do method. Any
5839// pending HTTP request will be aborted if the provided context is
5840// canceled.
5841func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesDeleteCall {
5842	c.ctx_ = ctx
5843	return c
5844}
5845
5846// Header returns an http.Header that can be modified by the caller to
5847// add HTTP headers to the request.
5848func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Header() http.Header {
5849	if c.header_ == nil {
5850		c.header_ = make(http.Header)
5851	}
5852	return c.header_
5853}
5854
5855func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
5856	reqHeaders := make(http.Header)
5857	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
5858	for k, v := range c.header_ {
5859		reqHeaders[k] = v
5860	}
5861	reqHeaders.Set("User-Agent", c.s.userAgent())
5862	var body io.Reader = nil
5863	c.urlParams_.Set("alt", alt)
5864	c.urlParams_.Set("prettyPrint", "false")
5865	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
5866	urls += "?" + c.urlParams_.Encode()
5867	req, err := http.NewRequest("DELETE", urls, body)
5868	if err != nil {
5869		return nil, err
5870	}
5871	req.Header = reqHeaders
5872	googleapi.Expand(req.URL, map[string]string{
5873		"name": c.name,
5874	})
5875	return gensupport.SendRequest(c.ctx_, c.s.client, req)
5876}
5877
5878// Do executes the "dataproc.projects.locations.workflowTemplates.delete" call.
5879// Exactly one of *Empty or error will be non-nil. Any non-2xx status
5880// code is an error. Response headers are in either
5881// *Empty.ServerResponse.Header or (if a response was returned at all)
5882// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
5883// check whether the returned error was because http.StatusNotModified
5884// was returned.
5885func (c *ProjectsLocationsWorkflowTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
5886	gensupport.SetOptions(c.urlParams_, opts...)
5887	res, err := c.doRequest("json")
5888	if res != nil && res.StatusCode == http.StatusNotModified {
5889		if res.Body != nil {
5890			res.Body.Close()
5891		}
5892		return nil, &googleapi.Error{
5893			Code:   res.StatusCode,
5894			Header: res.Header,
5895		}
5896	}
5897	if err != nil {
5898		return nil, err
5899	}
5900	defer googleapi.CloseBody(res)
5901	if err := googleapi.CheckResponse(res); err != nil {
5902		return nil, err
5903	}
5904	ret := &Empty{
5905		ServerResponse: googleapi.ServerResponse{
5906			Header:         res.Header,
5907			HTTPStatusCode: res.StatusCode,
5908		},
5909	}
5910	target := &ret
5911	if err := gensupport.DecodeResponse(target, res); err != nil {
5912		return nil, err
5913	}
5914	return ret, nil
5915	// {
5916	//   "description": "Deletes a workflow template. It does not cancel in-progress workflows.",
5917	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}",
5918	//   "httpMethod": "DELETE",
5919	//   "id": "dataproc.projects.locations.workflowTemplates.delete",
5920	//   "parameterOrder": [
5921	//     "name"
5922	//   ],
5923	//   "parameters": {
5924	//     "name": {
5925	//       "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}",
5926	//       "location": "path",
5927	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
5928	//       "required": true,
5929	//       "type": "string"
5930	//     },
5931	//     "version": {
5932	//       "description": "Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.",
5933	//       "format": "int32",
5934	//       "location": "query",
5935	//       "type": "integer"
5936	//     }
5937	//   },
5938	//   "path": "v1beta2/{+name}",
5939	//   "response": {
5940	//     "$ref": "Empty"
5941	//   },
5942	//   "scopes": [
5943	//     "https://www.googleapis.com/auth/cloud-platform"
5944	//   ]
5945	// }
5946
5947}
5948
5949// method id "dataproc.projects.locations.workflowTemplates.get":
5950
5951type ProjectsLocationsWorkflowTemplatesGetCall struct {
5952	s            *Service
5953	name         string
5954	urlParams_   gensupport.URLParams
5955	ifNoneMatch_ string
5956	ctx_         context.Context
5957	header_      http.Header
5958}
5959
5960// Get: Retrieves the latest workflow template.Can retrieve previously
5961// instantiated template by specifying optional version parameter.
5962//
5963// - name: The resource name of the workflow template, as described in
5964//   https://cloud.google.com/apis/design/resource_names. For
5965//   projects.regions.workflowTemplates.get, the resource name of the
5966//   template has the following format:
5967//   projects/{project_id}/regions/{region}/workflowTemplates/{template_i
5968//   d} For projects.locations.workflowTemplates.get, the resource name
5969//   of the template has the following format:
5970//   projects/{project_id}/locations/{location}/workflowTemplates/{templa
5971//   te_id}.
5972func (r *ProjectsLocationsWorkflowTemplatesService) Get(name string) *ProjectsLocationsWorkflowTemplatesGetCall {
5973	c := &ProjectsLocationsWorkflowTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
5974	c.name = name
5975	return c
5976}
5977
5978// Version sets the optional parameter "version": The version of
5979// workflow template to retrieve. Only previously instantiated versions
5980// can be retrieved.If unspecified, retrieves the current version.
5981func (c *ProjectsLocationsWorkflowTemplatesGetCall) Version(version int64) *ProjectsLocationsWorkflowTemplatesGetCall {
5982	c.urlParams_.Set("version", fmt.Sprint(version))
5983	return c
5984}
5985
5986// Fields allows partial responses to be retrieved. See
5987// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
5988// for more information.
5989func (c *ProjectsLocationsWorkflowTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesGetCall {
5990	c.urlParams_.Set("fields", googleapi.CombineFields(s))
5991	return c
5992}
5993
5994// IfNoneMatch sets the optional parameter which makes the operation
5995// fail if the object's ETag matches the given value. This is useful for
5996// getting updates only after the object has changed since the last
5997// request. Use googleapi.IsNotModified to check whether the response
5998// error from Do is the result of In-None-Match.
5999func (c *ProjectsLocationsWorkflowTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowTemplatesGetCall {
6000	c.ifNoneMatch_ = entityTag
6001	return c
6002}
6003
6004// Context sets the context to be used in this call's Do method. Any
6005// pending HTTP request will be aborted if the provided context is
6006// canceled.
6007func (c *ProjectsLocationsWorkflowTemplatesGetCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesGetCall {
6008	c.ctx_ = ctx
6009	return c
6010}
6011
6012// Header returns an http.Header that can be modified by the caller to
6013// add HTTP headers to the request.
6014func (c *ProjectsLocationsWorkflowTemplatesGetCall) Header() http.Header {
6015	if c.header_ == nil {
6016		c.header_ = make(http.Header)
6017	}
6018	return c.header_
6019}
6020
6021func (c *ProjectsLocationsWorkflowTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
6022	reqHeaders := make(http.Header)
6023	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
6024	for k, v := range c.header_ {
6025		reqHeaders[k] = v
6026	}
6027	reqHeaders.Set("User-Agent", c.s.userAgent())
6028	if c.ifNoneMatch_ != "" {
6029		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6030	}
6031	var body io.Reader = nil
6032	c.urlParams_.Set("alt", alt)
6033	c.urlParams_.Set("prettyPrint", "false")
6034	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
6035	urls += "?" + c.urlParams_.Encode()
6036	req, err := http.NewRequest("GET", urls, body)
6037	if err != nil {
6038		return nil, err
6039	}
6040	req.Header = reqHeaders
6041	googleapi.Expand(req.URL, map[string]string{
6042		"name": c.name,
6043	})
6044	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6045}
6046
6047// Do executes the "dataproc.projects.locations.workflowTemplates.get" call.
6048// Exactly one of *WorkflowTemplate or error will be non-nil. Any
6049// non-2xx status code is an error. Response headers are in either
6050// *WorkflowTemplate.ServerResponse.Header or (if a response was
6051// returned at all) in error.(*googleapi.Error).Header. Use
6052// googleapi.IsNotModified to check whether the returned error was
6053// because http.StatusNotModified was returned.
6054func (c *ProjectsLocationsWorkflowTemplatesGetCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
6055	gensupport.SetOptions(c.urlParams_, opts...)
6056	res, err := c.doRequest("json")
6057	if res != nil && res.StatusCode == http.StatusNotModified {
6058		if res.Body != nil {
6059			res.Body.Close()
6060		}
6061		return nil, &googleapi.Error{
6062			Code:   res.StatusCode,
6063			Header: res.Header,
6064		}
6065	}
6066	if err != nil {
6067		return nil, err
6068	}
6069	defer googleapi.CloseBody(res)
6070	if err := googleapi.CheckResponse(res); err != nil {
6071		return nil, err
6072	}
6073	ret := &WorkflowTemplate{
6074		ServerResponse: googleapi.ServerResponse{
6075			Header:         res.Header,
6076			HTTPStatusCode: res.StatusCode,
6077		},
6078	}
6079	target := &ret
6080	if err := gensupport.DecodeResponse(target, res); err != nil {
6081		return nil, err
6082	}
6083	return ret, nil
6084	// {
6085	//   "description": "Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.",
6086	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}",
6087	//   "httpMethod": "GET",
6088	//   "id": "dataproc.projects.locations.workflowTemplates.get",
6089	//   "parameterOrder": [
6090	//     "name"
6091	//   ],
6092	//   "parameters": {
6093	//     "name": {
6094	//       "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}",
6095	//       "location": "path",
6096	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6097	//       "required": true,
6098	//       "type": "string"
6099	//     },
6100	//     "version": {
6101	//       "description": "Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.If unspecified, retrieves the current version.",
6102	//       "format": "int32",
6103	//       "location": "query",
6104	//       "type": "integer"
6105	//     }
6106	//   },
6107	//   "path": "v1beta2/{+name}",
6108	//   "response": {
6109	//     "$ref": "WorkflowTemplate"
6110	//   },
6111	//   "scopes": [
6112	//     "https://www.googleapis.com/auth/cloud-platform"
6113	//   ]
6114	// }
6115
6116}
6117
6118// method id "dataproc.projects.locations.workflowTemplates.getIamPolicy":
6119
6120type ProjectsLocationsWorkflowTemplatesGetIamPolicyCall struct {
6121	s            *Service
6122	resource     string
6123	urlParams_   gensupport.URLParams
6124	ifNoneMatch_ string
6125	ctx_         context.Context
6126	header_      http.Header
6127}
6128
6129// GetIamPolicy: Gets the access control policy for a resource. Returns
6130// an empty policy if the resource exists and does not have a policy
6131// set.
6132//
6133// - resource: REQUIRED: The resource for which the policy is being
6134//   requested. See the operation documentation for the appropriate
6135//   value for this field.
6136func (r *ProjectsLocationsWorkflowTemplatesService) GetIamPolicy(resource string) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
6137	c := &ProjectsLocationsWorkflowTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6138	c.resource = resource
6139	return c
6140}
6141
6142// OptionsRequestedPolicyVersion sets the optional parameter
6143// "options.requestedPolicyVersion": The policy format version to be
6144// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
6145// value will be rejected.Requests for policies with any conditional
6146// bindings must specify version 3. Policies without any conditional
6147// bindings may specify any valid value or leave the field unset.To
6148// learn which resources support conditions in their IAM policies, see
6149// the IAM documentation
6150// (https://cloud.google.com/iam/help/conditions/resource-policies).
6151func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
6152	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
6153	return c
6154}
6155
6156// Fields allows partial responses to be retrieved. See
6157// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6158// for more information.
6159func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
6160	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6161	return c
6162}
6163
6164// IfNoneMatch sets the optional parameter which makes the operation
6165// fail if the object's ETag matches the given value. This is useful for
6166// getting updates only after the object has changed since the last
6167// request. Use googleapi.IsNotModified to check whether the response
6168// error from Do is the result of In-None-Match.
6169func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
6170	c.ifNoneMatch_ = entityTag
6171	return c
6172}
6173
6174// Context sets the context to be used in this call's Do method. Any
6175// pending HTTP request will be aborted if the provided context is
6176// canceled.
6177func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall {
6178	c.ctx_ = ctx
6179	return c
6180}
6181
6182// Header returns an http.Header that can be modified by the caller to
6183// add HTTP headers to the request.
6184func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Header() http.Header {
6185	if c.header_ == nil {
6186		c.header_ = make(http.Header)
6187	}
6188	return c.header_
6189}
6190
6191func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6192	reqHeaders := make(http.Header)
6193	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
6194	for k, v := range c.header_ {
6195		reqHeaders[k] = v
6196	}
6197	reqHeaders.Set("User-Agent", c.s.userAgent())
6198	if c.ifNoneMatch_ != "" {
6199		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6200	}
6201	var body io.Reader = nil
6202	c.urlParams_.Set("alt", alt)
6203	c.urlParams_.Set("prettyPrint", "false")
6204	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
6205	urls += "?" + c.urlParams_.Encode()
6206	req, err := http.NewRequest("GET", urls, body)
6207	if err != nil {
6208		return nil, err
6209	}
6210	req.Header = reqHeaders
6211	googleapi.Expand(req.URL, map[string]string{
6212		"resource": c.resource,
6213	})
6214	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6215}
6216
6217// Do executes the "dataproc.projects.locations.workflowTemplates.getIamPolicy" call.
6218// Exactly one of *Policy or error will be non-nil. Any non-2xx status
6219// code is an error. Response headers are in either
6220// *Policy.ServerResponse.Header or (if a response was returned at all)
6221// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6222// check whether the returned error was because http.StatusNotModified
6223// was returned.
6224func (c *ProjectsLocationsWorkflowTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6225	gensupport.SetOptions(c.urlParams_, opts...)
6226	res, err := c.doRequest("json")
6227	if res != nil && res.StatusCode == http.StatusNotModified {
6228		if res.Body != nil {
6229			res.Body.Close()
6230		}
6231		return nil, &googleapi.Error{
6232			Code:   res.StatusCode,
6233			Header: res.Header,
6234		}
6235	}
6236	if err != nil {
6237		return nil, err
6238	}
6239	defer googleapi.CloseBody(res)
6240	if err := googleapi.CheckResponse(res); err != nil {
6241		return nil, err
6242	}
6243	ret := &Policy{
6244		ServerResponse: googleapi.ServerResponse{
6245			Header:         res.Header,
6246			HTTPStatusCode: res.StatusCode,
6247		},
6248	}
6249	target := &ret
6250	if err := gensupport.DecodeResponse(target, res); err != nil {
6251		return nil, err
6252	}
6253	return ret, nil
6254	// {
6255	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
6256	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:getIamPolicy",
6257	//   "httpMethod": "GET",
6258	//   "id": "dataproc.projects.locations.workflowTemplates.getIamPolicy",
6259	//   "parameterOrder": [
6260	//     "resource"
6261	//   ],
6262	//   "parameters": {
6263	//     "options.requestedPolicyVersion": {
6264	//       "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).",
6265	//       "format": "int32",
6266	//       "location": "query",
6267	//       "type": "integer"
6268	//     },
6269	//     "resource": {
6270	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
6271	//       "location": "path",
6272	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6273	//       "required": true,
6274	//       "type": "string"
6275	//     }
6276	//   },
6277	//   "path": "v1beta2/{+resource}:getIamPolicy",
6278	//   "response": {
6279	//     "$ref": "Policy"
6280	//   },
6281	//   "scopes": [
6282	//     "https://www.googleapis.com/auth/cloud-platform"
6283	//   ]
6284	// }
6285
6286}
6287
6288// method id "dataproc.projects.locations.workflowTemplates.instantiate":
6289
6290type ProjectsLocationsWorkflowTemplatesInstantiateCall struct {
6291	s                                  *Service
6292	name                               string
6293	instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest
6294	urlParams_                         gensupport.URLParams
6295	ctx_                               context.Context
6296	header_                            http.Header
6297}
6298
6299// Instantiate: Instantiates a template and begins execution.The
6300// returned Operation can be used to track execution of workflow by
6301// polling operations.get. The Operation will complete when entire
6302// workflow is finished.The running workflow can be aborted via
6303// operations.cancel. This will cause any inflight jobs to be cancelled
6304// and workflow-owned clusters to be deleted.The Operation.metadata will
6305// be WorkflowMetadata
6306// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#workflowmetadata).
6307// Also see Using WorkflowMetadata
6308// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On
6309// successful completion, Operation.response will be Empty.
6310//
6311// - name: The resource name of the workflow template, as described in
6312//   https://cloud.google.com/apis/design/resource_names. For
6313//   projects.regions.workflowTemplates.instantiate, the resource name
6314//   of the template has the following format:
6315//   projects/{project_id}/regions/{region}/workflowTemplates/{template_i
6316//   d} For projects.locations.workflowTemplates.instantiate, the
6317//   resource name of the template has the following format:
6318//   projects/{project_id}/locations/{location}/workflowTemplates/{templa
6319//   te_id}.
6320func (r *ProjectsLocationsWorkflowTemplatesService) Instantiate(name string, instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
6321	c := &ProjectsLocationsWorkflowTemplatesInstantiateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6322	c.name = name
6323	c.instantiateworkflowtemplaterequest = instantiateworkflowtemplaterequest
6324	return c
6325}
6326
6327// Fields allows partial responses to be retrieved. See
6328// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6329// for more information.
6330func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
6331	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6332	return c
6333}
6334
6335// Context sets the context to be used in this call's Do method. Any
6336// pending HTTP request will be aborted if the provided context is
6337// canceled.
6338func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesInstantiateCall {
6339	c.ctx_ = ctx
6340	return c
6341}
6342
6343// Header returns an http.Header that can be modified by the caller to
6344// add HTTP headers to the request.
6345func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Header() http.Header {
6346	if c.header_ == nil {
6347		c.header_ = make(http.Header)
6348	}
6349	return c.header_
6350}
6351
6352func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) doRequest(alt string) (*http.Response, error) {
6353	reqHeaders := make(http.Header)
6354	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
6355	for k, v := range c.header_ {
6356		reqHeaders[k] = v
6357	}
6358	reqHeaders.Set("User-Agent", c.s.userAgent())
6359	var body io.Reader = nil
6360	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantiateworkflowtemplaterequest)
6361	if err != nil {
6362		return nil, err
6363	}
6364	reqHeaders.Set("Content-Type", "application/json")
6365	c.urlParams_.Set("alt", alt)
6366	c.urlParams_.Set("prettyPrint", "false")
6367	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:instantiate")
6368	urls += "?" + c.urlParams_.Encode()
6369	req, err := http.NewRequest("POST", urls, body)
6370	if err != nil {
6371		return nil, err
6372	}
6373	req.Header = reqHeaders
6374	googleapi.Expand(req.URL, map[string]string{
6375		"name": c.name,
6376	})
6377	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6378}
6379
6380// Do executes the "dataproc.projects.locations.workflowTemplates.instantiate" call.
6381// Exactly one of *Operation or error will be non-nil. Any non-2xx
6382// status code is an error. Response headers are in either
6383// *Operation.ServerResponse.Header or (if a response was returned at
6384// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6385// to check whether the returned error was because
6386// http.StatusNotModified was returned.
6387func (c *ProjectsLocationsWorkflowTemplatesInstantiateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6388	gensupport.SetOptions(c.urlParams_, opts...)
6389	res, err := c.doRequest("json")
6390	if res != nil && res.StatusCode == http.StatusNotModified {
6391		if res.Body != nil {
6392			res.Body.Close()
6393		}
6394		return nil, &googleapi.Error{
6395			Code:   res.StatusCode,
6396			Header: res.Header,
6397		}
6398	}
6399	if err != nil {
6400		return nil, err
6401	}
6402	defer googleapi.CloseBody(res)
6403	if err := googleapi.CheckResponse(res); err != nil {
6404		return nil, err
6405	}
6406	ret := &Operation{
6407		ServerResponse: googleapi.ServerResponse{
6408			Header:         res.Header,
6409			HTTPStatusCode: res.StatusCode,
6410		},
6411	}
6412	target := &ret
6413	if err := gensupport.DecodeResponse(target, res); err != nil {
6414		return nil, err
6415	}
6416	return ret, nil
6417	// {
6418	//   "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.",
6419	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:instantiate",
6420	//   "httpMethod": "POST",
6421	//   "id": "dataproc.projects.locations.workflowTemplates.instantiate",
6422	//   "parameterOrder": [
6423	//     "name"
6424	//   ],
6425	//   "parameters": {
6426	//     "name": {
6427	//       "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}",
6428	//       "location": "path",
6429	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6430	//       "required": true,
6431	//       "type": "string"
6432	//     }
6433	//   },
6434	//   "path": "v1beta2/{+name}:instantiate",
6435	//   "request": {
6436	//     "$ref": "InstantiateWorkflowTemplateRequest"
6437	//   },
6438	//   "response": {
6439	//     "$ref": "Operation"
6440	//   },
6441	//   "scopes": [
6442	//     "https://www.googleapis.com/auth/cloud-platform"
6443	//   ]
6444	// }
6445
6446}
6447
6448// method id "dataproc.projects.locations.workflowTemplates.instantiateInline":
6449
6450type ProjectsLocationsWorkflowTemplatesInstantiateInlineCall struct {
6451	s                *Service
6452	parent           string
6453	workflowtemplate *WorkflowTemplate
6454	urlParams_       gensupport.URLParams
6455	ctx_             context.Context
6456	header_          http.Header
6457}
6458
6459// InstantiateInline: Instantiates a template and begins execution.This
6460// method is equivalent to executing the sequence
6461// CreateWorkflowTemplate, InstantiateWorkflowTemplate,
6462// DeleteWorkflowTemplate.The returned Operation can be used to track
6463// execution of workflow by polling operations.get. The Operation will
6464// complete when entire workflow is finished.The running workflow can be
6465// aborted via operations.cancel. This will cause any inflight jobs to
6466// be cancelled and workflow-owned clusters to be deleted.The
6467// Operation.metadata will be WorkflowMetadata
6468// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
6469// Also see Using WorkflowMetadata
6470// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On
6471// successful completion, Operation.response will be Empty.
6472//
6473// - parent: The resource name of the region or location, as described
6474//   in https://cloud.google.com/apis/design/resource_names. For
6475//   projects.regions.workflowTemplates,instantiateinline, the resource
6476//   name of the region has the following format:
6477//   projects/{project_id}/regions/{region} For
6478//   projects.locations.workflowTemplates.instantiateinline, the
6479//   resource name of the location has the following format:
6480//   projects/{project_id}/locations/{location}.
6481func (r *ProjectsLocationsWorkflowTemplatesService) InstantiateInline(parent string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
6482	c := &ProjectsLocationsWorkflowTemplatesInstantiateInlineCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6483	c.parent = parent
6484	c.workflowtemplate = workflowtemplate
6485	return c
6486}
6487
6488// InstanceId sets the optional parameter "instanceId": Deprecated.
6489// Please use request_id field instead.
6490func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) InstanceId(instanceId string) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
6491	c.urlParams_.Set("instanceId", instanceId)
6492	return c
6493}
6494
6495// RequestId sets the optional parameter "requestId": A tag that
6496// prevents multiple concurrent workflow instances with the same tag
6497// from running. This mitigates risk of concurrent instances started due
6498// to retries.It is recommended to always set this value to a UUID
6499// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag
6500// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
6501// and hyphens (-). The maximum length is 40 characters.
6502func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) RequestId(requestId string) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
6503	c.urlParams_.Set("requestId", requestId)
6504	return c
6505}
6506
6507// Fields allows partial responses to be retrieved. See
6508// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6509// for more information.
6510func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
6511	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6512	return c
6513}
6514
6515// Context sets the context to be used in this call's Do method. Any
6516// pending HTTP request will be aborted if the provided context is
6517// canceled.
6518func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall {
6519	c.ctx_ = ctx
6520	return c
6521}
6522
6523// Header returns an http.Header that can be modified by the caller to
6524// add HTTP headers to the request.
6525func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Header() http.Header {
6526	if c.header_ == nil {
6527		c.header_ = make(http.Header)
6528	}
6529	return c.header_
6530}
6531
6532func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) doRequest(alt string) (*http.Response, error) {
6533	reqHeaders := make(http.Header)
6534	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
6535	for k, v := range c.header_ {
6536		reqHeaders[k] = v
6537	}
6538	reqHeaders.Set("User-Agent", c.s.userAgent())
6539	var body io.Reader = nil
6540	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
6541	if err != nil {
6542		return nil, err
6543	}
6544	reqHeaders.Set("Content-Type", "application/json")
6545	c.urlParams_.Set("alt", alt)
6546	c.urlParams_.Set("prettyPrint", "false")
6547	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates:instantiateInline")
6548	urls += "?" + c.urlParams_.Encode()
6549	req, err := http.NewRequest("POST", urls, body)
6550	if err != nil {
6551		return nil, err
6552	}
6553	req.Header = reqHeaders
6554	googleapi.Expand(req.URL, map[string]string{
6555		"parent": c.parent,
6556	})
6557	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6558}
6559
6560// Do executes the "dataproc.projects.locations.workflowTemplates.instantiateInline" call.
6561// Exactly one of *Operation or error will be non-nil. Any non-2xx
6562// status code is an error. Response headers are in either
6563// *Operation.ServerResponse.Header or (if a response was returned at
6564// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
6565// to check whether the returned error was because
6566// http.StatusNotModified was returned.
6567func (c *ProjectsLocationsWorkflowTemplatesInstantiateInlineCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
6568	gensupport.SetOptions(c.urlParams_, opts...)
6569	res, err := c.doRequest("json")
6570	if res != nil && res.StatusCode == http.StatusNotModified {
6571		if res.Body != nil {
6572			res.Body.Close()
6573		}
6574		return nil, &googleapi.Error{
6575			Code:   res.StatusCode,
6576			Header: res.Header,
6577		}
6578	}
6579	if err != nil {
6580		return nil, err
6581	}
6582	defer googleapi.CloseBody(res)
6583	if err := googleapi.CheckResponse(res); err != nil {
6584		return nil, err
6585	}
6586	ret := &Operation{
6587		ServerResponse: googleapi.ServerResponse{
6588			Header:         res.Header,
6589			HTTPStatusCode: res.StatusCode,
6590		},
6591	}
6592	target := &ret
6593	if err := gensupport.DecodeResponse(target, res); err != nil {
6594		return nil, err
6595	}
6596	return ret, nil
6597	// {
6598	//   "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.",
6599	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates:instantiateInline",
6600	//   "httpMethod": "POST",
6601	//   "id": "dataproc.projects.locations.workflowTemplates.instantiateInline",
6602	//   "parameterOrder": [
6603	//     "parent"
6604	//   ],
6605	//   "parameters": {
6606	//     "instanceId": {
6607	//       "description": "Deprecated. Please use request_id field instead.",
6608	//       "location": "query",
6609	//       "type": "string"
6610	//     },
6611	//     "parent": {
6612	//       "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}",
6613	//       "location": "path",
6614	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
6615	//       "required": true,
6616	//       "type": "string"
6617	//     },
6618	//     "requestId": {
6619	//       "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.",
6620	//       "location": "query",
6621	//       "type": "string"
6622	//     }
6623	//   },
6624	//   "path": "v1beta2/{+parent}/workflowTemplates:instantiateInline",
6625	//   "request": {
6626	//     "$ref": "WorkflowTemplate"
6627	//   },
6628	//   "response": {
6629	//     "$ref": "Operation"
6630	//   },
6631	//   "scopes": [
6632	//     "https://www.googleapis.com/auth/cloud-platform"
6633	//   ]
6634	// }
6635
6636}
6637
6638// method id "dataproc.projects.locations.workflowTemplates.list":
6639
6640type ProjectsLocationsWorkflowTemplatesListCall struct {
6641	s            *Service
6642	parent       string
6643	urlParams_   gensupport.URLParams
6644	ifNoneMatch_ string
6645	ctx_         context.Context
6646	header_      http.Header
6647}
6648
6649// List: Lists workflows that match the specified filter in the request.
6650//
6651// - parent: The resource name of the region or location, as described
6652//   in https://cloud.google.com/apis/design/resource_names. For
6653//   projects.regions.workflowTemplates,list, the resource name of the
6654//   region has the following format:
6655//   projects/{project_id}/regions/{region} For
6656//   projects.locations.workflowTemplates.list, the resource name of the
6657//   location has the following format:
6658//   projects/{project_id}/locations/{location}.
6659func (r *ProjectsLocationsWorkflowTemplatesService) List(parent string) *ProjectsLocationsWorkflowTemplatesListCall {
6660	c := &ProjectsLocationsWorkflowTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6661	c.parent = parent
6662	return c
6663}
6664
6665// PageSize sets the optional parameter "pageSize": The maximum number
6666// of results to return in each response.
6667func (c *ProjectsLocationsWorkflowTemplatesListCall) PageSize(pageSize int64) *ProjectsLocationsWorkflowTemplatesListCall {
6668	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
6669	return c
6670}
6671
6672// PageToken sets the optional parameter "pageToken": The page token,
6673// returned by a previous call, to request the next page of results.
6674func (c *ProjectsLocationsWorkflowTemplatesListCall) PageToken(pageToken string) *ProjectsLocationsWorkflowTemplatesListCall {
6675	c.urlParams_.Set("pageToken", pageToken)
6676	return c
6677}
6678
6679// Fields allows partial responses to be retrieved. See
6680// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6681// for more information.
6682func (c *ProjectsLocationsWorkflowTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesListCall {
6683	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6684	return c
6685}
6686
6687// IfNoneMatch sets the optional parameter which makes the operation
6688// fail if the object's ETag matches the given value. This is useful for
6689// getting updates only after the object has changed since the last
6690// request. Use googleapi.IsNotModified to check whether the response
6691// error from Do is the result of In-None-Match.
6692func (c *ProjectsLocationsWorkflowTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsWorkflowTemplatesListCall {
6693	c.ifNoneMatch_ = entityTag
6694	return c
6695}
6696
6697// Context sets the context to be used in this call's Do method. Any
6698// pending HTTP request will be aborted if the provided context is
6699// canceled.
6700func (c *ProjectsLocationsWorkflowTemplatesListCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesListCall {
6701	c.ctx_ = ctx
6702	return c
6703}
6704
6705// Header returns an http.Header that can be modified by the caller to
6706// add HTTP headers to the request.
6707func (c *ProjectsLocationsWorkflowTemplatesListCall) Header() http.Header {
6708	if c.header_ == nil {
6709		c.header_ = make(http.Header)
6710	}
6711	return c.header_
6712}
6713
6714func (c *ProjectsLocationsWorkflowTemplatesListCall) doRequest(alt string) (*http.Response, error) {
6715	reqHeaders := make(http.Header)
6716	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
6717	for k, v := range c.header_ {
6718		reqHeaders[k] = v
6719	}
6720	reqHeaders.Set("User-Agent", c.s.userAgent())
6721	if c.ifNoneMatch_ != "" {
6722		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
6723	}
6724	var body io.Reader = nil
6725	c.urlParams_.Set("alt", alt)
6726	c.urlParams_.Set("prettyPrint", "false")
6727	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates")
6728	urls += "?" + c.urlParams_.Encode()
6729	req, err := http.NewRequest("GET", urls, body)
6730	if err != nil {
6731		return nil, err
6732	}
6733	req.Header = reqHeaders
6734	googleapi.Expand(req.URL, map[string]string{
6735		"parent": c.parent,
6736	})
6737	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6738}
6739
6740// Do executes the "dataproc.projects.locations.workflowTemplates.list" call.
6741// Exactly one of *ListWorkflowTemplatesResponse or error will be
6742// non-nil. Any non-2xx status code is an error. Response headers are in
6743// either *ListWorkflowTemplatesResponse.ServerResponse.Header or (if a
6744// response was returned at all) in error.(*googleapi.Error).Header. Use
6745// googleapi.IsNotModified to check whether the returned error was
6746// because http.StatusNotModified was returned.
6747func (c *ProjectsLocationsWorkflowTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListWorkflowTemplatesResponse, error) {
6748	gensupport.SetOptions(c.urlParams_, opts...)
6749	res, err := c.doRequest("json")
6750	if res != nil && res.StatusCode == http.StatusNotModified {
6751		if res.Body != nil {
6752			res.Body.Close()
6753		}
6754		return nil, &googleapi.Error{
6755			Code:   res.StatusCode,
6756			Header: res.Header,
6757		}
6758	}
6759	if err != nil {
6760		return nil, err
6761	}
6762	defer googleapi.CloseBody(res)
6763	if err := googleapi.CheckResponse(res); err != nil {
6764		return nil, err
6765	}
6766	ret := &ListWorkflowTemplatesResponse{
6767		ServerResponse: googleapi.ServerResponse{
6768			Header:         res.Header,
6769			HTTPStatusCode: res.StatusCode,
6770		},
6771	}
6772	target := &ret
6773	if err := gensupport.DecodeResponse(target, res); err != nil {
6774		return nil, err
6775	}
6776	return ret, nil
6777	// {
6778	//   "description": "Lists workflows that match the specified filter in the request.",
6779	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates",
6780	//   "httpMethod": "GET",
6781	//   "id": "dataproc.projects.locations.workflowTemplates.list",
6782	//   "parameterOrder": [
6783	//     "parent"
6784	//   ],
6785	//   "parameters": {
6786	//     "pageSize": {
6787	//       "description": "Optional. The maximum number of results to return in each response.",
6788	//       "format": "int32",
6789	//       "location": "query",
6790	//       "type": "integer"
6791	//     },
6792	//     "pageToken": {
6793	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
6794	//       "location": "query",
6795	//       "type": "string"
6796	//     },
6797	//     "parent": {
6798	//       "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}",
6799	//       "location": "path",
6800	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
6801	//       "required": true,
6802	//       "type": "string"
6803	//     }
6804	//   },
6805	//   "path": "v1beta2/{+parent}/workflowTemplates",
6806	//   "response": {
6807	//     "$ref": "ListWorkflowTemplatesResponse"
6808	//   },
6809	//   "scopes": [
6810	//     "https://www.googleapis.com/auth/cloud-platform"
6811	//   ]
6812	// }
6813
6814}
6815
6816// Pages invokes f for each page of results.
6817// A non-nil error returned from f will halt the iteration.
6818// The provided context supersedes any context provided to the Context method.
6819func (c *ProjectsLocationsWorkflowTemplatesListCall) Pages(ctx context.Context, f func(*ListWorkflowTemplatesResponse) error) error {
6820	c.ctx_ = ctx
6821	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
6822	for {
6823		x, err := c.Do()
6824		if err != nil {
6825			return err
6826		}
6827		if err := f(x); err != nil {
6828			return err
6829		}
6830		if x.NextPageToken == "" {
6831			return nil
6832		}
6833		c.PageToken(x.NextPageToken)
6834	}
6835}
6836
6837// method id "dataproc.projects.locations.workflowTemplates.setIamPolicy":
6838
6839type ProjectsLocationsWorkflowTemplatesSetIamPolicyCall struct {
6840	s                   *Service
6841	resource            string
6842	setiampolicyrequest *SetIamPolicyRequest
6843	urlParams_          gensupport.URLParams
6844	ctx_                context.Context
6845	header_             http.Header
6846}
6847
6848// SetIamPolicy: Sets the access control policy on the specified
6849// resource. Replaces any existing policy.Can return NOT_FOUND,
6850// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
6851//
6852// - resource: REQUIRED: The resource for which the policy is being
6853//   specified. See the operation documentation for the appropriate
6854//   value for this field.
6855func (r *ProjectsLocationsWorkflowTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
6856	c := &ProjectsLocationsWorkflowTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
6857	c.resource = resource
6858	c.setiampolicyrequest = setiampolicyrequest
6859	return c
6860}
6861
6862// Fields allows partial responses to be retrieved. See
6863// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
6864// for more information.
6865func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
6866	c.urlParams_.Set("fields", googleapi.CombineFields(s))
6867	return c
6868}
6869
6870// Context sets the context to be used in this call's Do method. Any
6871// pending HTTP request will be aborted if the provided context is
6872// canceled.
6873func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall {
6874	c.ctx_ = ctx
6875	return c
6876}
6877
6878// Header returns an http.Header that can be modified by the caller to
6879// add HTTP headers to the request.
6880func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Header() http.Header {
6881	if c.header_ == nil {
6882		c.header_ = make(http.Header)
6883	}
6884	return c.header_
6885}
6886
6887func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
6888	reqHeaders := make(http.Header)
6889	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
6890	for k, v := range c.header_ {
6891		reqHeaders[k] = v
6892	}
6893	reqHeaders.Set("User-Agent", c.s.userAgent())
6894	var body io.Reader = nil
6895	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
6896	if err != nil {
6897		return nil, err
6898	}
6899	reqHeaders.Set("Content-Type", "application/json")
6900	c.urlParams_.Set("alt", alt)
6901	c.urlParams_.Set("prettyPrint", "false")
6902	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
6903	urls += "?" + c.urlParams_.Encode()
6904	req, err := http.NewRequest("POST", urls, body)
6905	if err != nil {
6906		return nil, err
6907	}
6908	req.Header = reqHeaders
6909	googleapi.Expand(req.URL, map[string]string{
6910		"resource": c.resource,
6911	})
6912	return gensupport.SendRequest(c.ctx_, c.s.client, req)
6913}
6914
6915// Do executes the "dataproc.projects.locations.workflowTemplates.setIamPolicy" call.
6916// Exactly one of *Policy or error will be non-nil. Any non-2xx status
6917// code is an error. Response headers are in either
6918// *Policy.ServerResponse.Header or (if a response was returned at all)
6919// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
6920// check whether the returned error was because http.StatusNotModified
6921// was returned.
6922func (c *ProjectsLocationsWorkflowTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
6923	gensupport.SetOptions(c.urlParams_, opts...)
6924	res, err := c.doRequest("json")
6925	if res != nil && res.StatusCode == http.StatusNotModified {
6926		if res.Body != nil {
6927			res.Body.Close()
6928		}
6929		return nil, &googleapi.Error{
6930			Code:   res.StatusCode,
6931			Header: res.Header,
6932		}
6933	}
6934	if err != nil {
6935		return nil, err
6936	}
6937	defer googleapi.CloseBody(res)
6938	if err := googleapi.CheckResponse(res); err != nil {
6939		return nil, err
6940	}
6941	ret := &Policy{
6942		ServerResponse: googleapi.ServerResponse{
6943			Header:         res.Header,
6944			HTTPStatusCode: res.StatusCode,
6945		},
6946	}
6947	target := &ret
6948	if err := gensupport.DecodeResponse(target, res); err != nil {
6949		return nil, err
6950	}
6951	return ret, nil
6952	// {
6953	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
6954	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:setIamPolicy",
6955	//   "httpMethod": "POST",
6956	//   "id": "dataproc.projects.locations.workflowTemplates.setIamPolicy",
6957	//   "parameterOrder": [
6958	//     "resource"
6959	//   ],
6960	//   "parameters": {
6961	//     "resource": {
6962	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
6963	//       "location": "path",
6964	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
6965	//       "required": true,
6966	//       "type": "string"
6967	//     }
6968	//   },
6969	//   "path": "v1beta2/{+resource}:setIamPolicy",
6970	//   "request": {
6971	//     "$ref": "SetIamPolicyRequest"
6972	//   },
6973	//   "response": {
6974	//     "$ref": "Policy"
6975	//   },
6976	//   "scopes": [
6977	//     "https://www.googleapis.com/auth/cloud-platform"
6978	//   ]
6979	// }
6980
6981}
6982
6983// method id "dataproc.projects.locations.workflowTemplates.testIamPermissions":
6984
6985type ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall struct {
6986	s                         *Service
6987	resource                  string
6988	testiampermissionsrequest *TestIamPermissionsRequest
6989	urlParams_                gensupport.URLParams
6990	ctx_                      context.Context
6991	header_                   http.Header
6992}
6993
6994// TestIamPermissions: Returns permissions that a caller has on the
6995// specified resource. If the resource does not exist, this will return
6996// an empty set of permissions, not a NOT_FOUND error.Note: This
6997// operation is designed to be used for building permission-aware UIs
6998// and command-line tools, not for authorization checking. This
6999// operation may "fail open" without warning.
7000//
7001// - resource: REQUIRED: The resource for which the policy detail is
7002//   being requested. See the operation documentation for the
7003//   appropriate value for this field.
7004func (r *ProjectsLocationsWorkflowTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
7005	c := &ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7006	c.resource = resource
7007	c.testiampermissionsrequest = testiampermissionsrequest
7008	return c
7009}
7010
7011// Fields allows partial responses to be retrieved. See
7012// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7013// for more information.
7014func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
7015	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7016	return c
7017}
7018
7019// Context sets the context to be used in this call's Do method. Any
7020// pending HTTP request will be aborted if the provided context is
7021// canceled.
7022func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall {
7023	c.ctx_ = ctx
7024	return c
7025}
7026
7027// Header returns an http.Header that can be modified by the caller to
7028// add HTTP headers to the request.
7029func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Header() http.Header {
7030	if c.header_ == nil {
7031		c.header_ = make(http.Header)
7032	}
7033	return c.header_
7034}
7035
7036func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
7037	reqHeaders := make(http.Header)
7038	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
7039	for k, v := range c.header_ {
7040		reqHeaders[k] = v
7041	}
7042	reqHeaders.Set("User-Agent", c.s.userAgent())
7043	var body io.Reader = nil
7044	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
7045	if err != nil {
7046		return nil, err
7047	}
7048	reqHeaders.Set("Content-Type", "application/json")
7049	c.urlParams_.Set("alt", alt)
7050	c.urlParams_.Set("prettyPrint", "false")
7051	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
7052	urls += "?" + c.urlParams_.Encode()
7053	req, err := http.NewRequest("POST", urls, body)
7054	if err != nil {
7055		return nil, err
7056	}
7057	req.Header = reqHeaders
7058	googleapi.Expand(req.URL, map[string]string{
7059		"resource": c.resource,
7060	})
7061	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7062}
7063
7064// Do executes the "dataproc.projects.locations.workflowTemplates.testIamPermissions" call.
7065// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
7066// Any non-2xx status code is an error. Response headers are in either
7067// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
7068// was returned at all) in error.(*googleapi.Error).Header. Use
7069// googleapi.IsNotModified to check whether the returned error was
7070// because http.StatusNotModified was returned.
7071func (c *ProjectsLocationsWorkflowTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
7072	gensupport.SetOptions(c.urlParams_, opts...)
7073	res, err := c.doRequest("json")
7074	if res != nil && res.StatusCode == http.StatusNotModified {
7075		if res.Body != nil {
7076			res.Body.Close()
7077		}
7078		return nil, &googleapi.Error{
7079			Code:   res.StatusCode,
7080			Header: res.Header,
7081		}
7082	}
7083	if err != nil {
7084		return nil, err
7085	}
7086	defer googleapi.CloseBody(res)
7087	if err := googleapi.CheckResponse(res); err != nil {
7088		return nil, err
7089	}
7090	ret := &TestIamPermissionsResponse{
7091		ServerResponse: googleapi.ServerResponse{
7092			Header:         res.Header,
7093			HTTPStatusCode: res.StatusCode,
7094		},
7095	}
7096	target := &ret
7097	if err := gensupport.DecodeResponse(target, res); err != nil {
7098		return nil, err
7099	}
7100	return ret, nil
7101	// {
7102	//   "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.",
7103	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}:testIamPermissions",
7104	//   "httpMethod": "POST",
7105	//   "id": "dataproc.projects.locations.workflowTemplates.testIamPermissions",
7106	//   "parameterOrder": [
7107	//     "resource"
7108	//   ],
7109	//   "parameters": {
7110	//     "resource": {
7111	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
7112	//       "location": "path",
7113	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
7114	//       "required": true,
7115	//       "type": "string"
7116	//     }
7117	//   },
7118	//   "path": "v1beta2/{+resource}:testIamPermissions",
7119	//   "request": {
7120	//     "$ref": "TestIamPermissionsRequest"
7121	//   },
7122	//   "response": {
7123	//     "$ref": "TestIamPermissionsResponse"
7124	//   },
7125	//   "scopes": [
7126	//     "https://www.googleapis.com/auth/cloud-platform"
7127	//   ]
7128	// }
7129
7130}
7131
7132// method id "dataproc.projects.locations.workflowTemplates.update":
7133
7134type ProjectsLocationsWorkflowTemplatesUpdateCall struct {
7135	s                *Service
7136	name             string
7137	workflowtemplate *WorkflowTemplate
7138	urlParams_       gensupport.URLParams
7139	ctx_             context.Context
7140	header_          http.Header
7141}
7142
7143// Update: Updates (replaces) workflow template. The updated template
7144// must contain version that matches the current server version.
7145//
7146// - name: Output only. The resource name of the workflow template, as
7147//   described in https://cloud.google.com/apis/design/resource_names.
7148//   For projects.regions.workflowTemplates, the resource name of the
7149//   template has the following format:
7150//   projects/{project_id}/regions/{region}/workflowTemplates/{template_i
7151//   d} For projects.locations.workflowTemplates, the resource name of
7152//   the template has the following format:
7153//   projects/{project_id}/locations/{location}/workflowTemplates/{templa
7154//   te_id}.
7155func (r *ProjectsLocationsWorkflowTemplatesService) Update(name string, workflowtemplate *WorkflowTemplate) *ProjectsLocationsWorkflowTemplatesUpdateCall {
7156	c := &ProjectsLocationsWorkflowTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7157	c.name = name
7158	c.workflowtemplate = workflowtemplate
7159	return c
7160}
7161
7162// Fields allows partial responses to be retrieved. See
7163// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7164// for more information.
7165func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Fields(s ...googleapi.Field) *ProjectsLocationsWorkflowTemplatesUpdateCall {
7166	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7167	return c
7168}
7169
7170// Context sets the context to be used in this call's Do method. Any
7171// pending HTTP request will be aborted if the provided context is
7172// canceled.
7173func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Context(ctx context.Context) *ProjectsLocationsWorkflowTemplatesUpdateCall {
7174	c.ctx_ = ctx
7175	return c
7176}
7177
7178// Header returns an http.Header that can be modified by the caller to
7179// add HTTP headers to the request.
7180func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Header() http.Header {
7181	if c.header_ == nil {
7182		c.header_ = make(http.Header)
7183	}
7184	return c.header_
7185}
7186
7187func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
7188	reqHeaders := make(http.Header)
7189	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
7190	for k, v := range c.header_ {
7191		reqHeaders[k] = v
7192	}
7193	reqHeaders.Set("User-Agent", c.s.userAgent())
7194	var body io.Reader = nil
7195	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
7196	if err != nil {
7197		return nil, err
7198	}
7199	reqHeaders.Set("Content-Type", "application/json")
7200	c.urlParams_.Set("alt", alt)
7201	c.urlParams_.Set("prettyPrint", "false")
7202	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
7203	urls += "?" + c.urlParams_.Encode()
7204	req, err := http.NewRequest("PUT", urls, body)
7205	if err != nil {
7206		return nil, err
7207	}
7208	req.Header = reqHeaders
7209	googleapi.Expand(req.URL, map[string]string{
7210		"name": c.name,
7211	})
7212	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7213}
7214
7215// Do executes the "dataproc.projects.locations.workflowTemplates.update" call.
7216// Exactly one of *WorkflowTemplate or error will be non-nil. Any
7217// non-2xx status code is an error. Response headers are in either
7218// *WorkflowTemplate.ServerResponse.Header or (if a response was
7219// returned at all) in error.(*googleapi.Error).Header. Use
7220// googleapi.IsNotModified to check whether the returned error was
7221// because http.StatusNotModified was returned.
7222func (c *ProjectsLocationsWorkflowTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
7223	gensupport.SetOptions(c.urlParams_, opts...)
7224	res, err := c.doRequest("json")
7225	if res != nil && res.StatusCode == http.StatusNotModified {
7226		if res.Body != nil {
7227			res.Body.Close()
7228		}
7229		return nil, &googleapi.Error{
7230			Code:   res.StatusCode,
7231			Header: res.Header,
7232		}
7233	}
7234	if err != nil {
7235		return nil, err
7236	}
7237	defer googleapi.CloseBody(res)
7238	if err := googleapi.CheckResponse(res); err != nil {
7239		return nil, err
7240	}
7241	ret := &WorkflowTemplate{
7242		ServerResponse: googleapi.ServerResponse{
7243			Header:         res.Header,
7244			HTTPStatusCode: res.StatusCode,
7245		},
7246	}
7247	target := &ret
7248	if err := gensupport.DecodeResponse(target, res); err != nil {
7249		return nil, err
7250	}
7251	return ret, nil
7252	// {
7253	//   "description": "Updates (replaces) workflow template. The updated template must contain version that matches the current server version.",
7254	//   "flatPath": "v1beta2/projects/{projectsId}/locations/{locationsId}/workflowTemplates/{workflowTemplatesId}",
7255	//   "httpMethod": "PUT",
7256	//   "id": "dataproc.projects.locations.workflowTemplates.update",
7257	//   "parameterOrder": [
7258	//     "name"
7259	//   ],
7260	//   "parameters": {
7261	//     "name": {
7262	//       "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}",
7263	//       "location": "path",
7264	//       "pattern": "^projects/[^/]+/locations/[^/]+/workflowTemplates/[^/]+$",
7265	//       "required": true,
7266	//       "type": "string"
7267	//     }
7268	//   },
7269	//   "path": "v1beta2/{+name}",
7270	//   "request": {
7271	//     "$ref": "WorkflowTemplate"
7272	//   },
7273	//   "response": {
7274	//     "$ref": "WorkflowTemplate"
7275	//   },
7276	//   "scopes": [
7277	//     "https://www.googleapis.com/auth/cloud-platform"
7278	//   ]
7279	// }
7280
7281}
7282
7283// method id "dataproc.projects.regions.autoscalingPolicies.create":
7284
7285type ProjectsRegionsAutoscalingPoliciesCreateCall struct {
7286	s                 *Service
7287	parent            string
7288	autoscalingpolicy *AutoscalingPolicy
7289	urlParams_        gensupport.URLParams
7290	ctx_              context.Context
7291	header_           http.Header
7292}
7293
7294// Create: Creates new autoscaling policy.
7295//
7296// - parent: The "resource name" of the region or location, as described
7297//   in https://cloud.google.com/apis/design/resource_names. For
7298//   projects.regions.autoscalingPolicies.create, the resource name has
7299//   the following format: projects/{project_id}/regions/{region} For
7300//   projects.locations.autoscalingPolicies.create, the resource name
7301//   has the following format:
7302//   projects/{project_id}/locations/{location}.
7303func (r *ProjectsRegionsAutoscalingPoliciesService) Create(parent string, autoscalingpolicy *AutoscalingPolicy) *ProjectsRegionsAutoscalingPoliciesCreateCall {
7304	c := &ProjectsRegionsAutoscalingPoliciesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7305	c.parent = parent
7306	c.autoscalingpolicy = autoscalingpolicy
7307	return c
7308}
7309
7310// Fields allows partial responses to be retrieved. See
7311// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7312// for more information.
7313func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesCreateCall {
7314	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7315	return c
7316}
7317
7318// Context sets the context to be used in this call's Do method. Any
7319// pending HTTP request will be aborted if the provided context is
7320// canceled.
7321func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesCreateCall {
7322	c.ctx_ = ctx
7323	return c
7324}
7325
7326// Header returns an http.Header that can be modified by the caller to
7327// add HTTP headers to the request.
7328func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Header() http.Header {
7329	if c.header_ == nil {
7330		c.header_ = make(http.Header)
7331	}
7332	return c.header_
7333}
7334
7335func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) doRequest(alt string) (*http.Response, error) {
7336	reqHeaders := make(http.Header)
7337	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
7338	for k, v := range c.header_ {
7339		reqHeaders[k] = v
7340	}
7341	reqHeaders.Set("User-Agent", c.s.userAgent())
7342	var body io.Reader = nil
7343	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
7344	if err != nil {
7345		return nil, err
7346	}
7347	reqHeaders.Set("Content-Type", "application/json")
7348	c.urlParams_.Set("alt", alt)
7349	c.urlParams_.Set("prettyPrint", "false")
7350	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/autoscalingPolicies")
7351	urls += "?" + c.urlParams_.Encode()
7352	req, err := http.NewRequest("POST", urls, body)
7353	if err != nil {
7354		return nil, err
7355	}
7356	req.Header = reqHeaders
7357	googleapi.Expand(req.URL, map[string]string{
7358		"parent": c.parent,
7359	})
7360	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7361}
7362
7363// Do executes the "dataproc.projects.regions.autoscalingPolicies.create" call.
7364// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
7365// non-2xx status code is an error. Response headers are in either
7366// *AutoscalingPolicy.ServerResponse.Header or (if a response was
7367// returned at all) in error.(*googleapi.Error).Header. Use
7368// googleapi.IsNotModified to check whether the returned error was
7369// because http.StatusNotModified was returned.
7370func (c *ProjectsRegionsAutoscalingPoliciesCreateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
7371	gensupport.SetOptions(c.urlParams_, opts...)
7372	res, err := c.doRequest("json")
7373	if res != nil && res.StatusCode == http.StatusNotModified {
7374		if res.Body != nil {
7375			res.Body.Close()
7376		}
7377		return nil, &googleapi.Error{
7378			Code:   res.StatusCode,
7379			Header: res.Header,
7380		}
7381	}
7382	if err != nil {
7383		return nil, err
7384	}
7385	defer googleapi.CloseBody(res)
7386	if err := googleapi.CheckResponse(res); err != nil {
7387		return nil, err
7388	}
7389	ret := &AutoscalingPolicy{
7390		ServerResponse: googleapi.ServerResponse{
7391			Header:         res.Header,
7392			HTTPStatusCode: res.StatusCode,
7393		},
7394	}
7395	target := &ret
7396	if err := gensupport.DecodeResponse(target, res); err != nil {
7397		return nil, err
7398	}
7399	return ret, nil
7400	// {
7401	//   "description": "Creates new autoscaling policy.",
7402	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies",
7403	//   "httpMethod": "POST",
7404	//   "id": "dataproc.projects.regions.autoscalingPolicies.create",
7405	//   "parameterOrder": [
7406	//     "parent"
7407	//   ],
7408	//   "parameters": {
7409	//     "parent": {
7410	//       "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}",
7411	//       "location": "path",
7412	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
7413	//       "required": true,
7414	//       "type": "string"
7415	//     }
7416	//   },
7417	//   "path": "v1beta2/{+parent}/autoscalingPolicies",
7418	//   "request": {
7419	//     "$ref": "AutoscalingPolicy"
7420	//   },
7421	//   "response": {
7422	//     "$ref": "AutoscalingPolicy"
7423	//   },
7424	//   "scopes": [
7425	//     "https://www.googleapis.com/auth/cloud-platform"
7426	//   ]
7427	// }
7428
7429}
7430
7431// method id "dataproc.projects.regions.autoscalingPolicies.delete":
7432
7433type ProjectsRegionsAutoscalingPoliciesDeleteCall struct {
7434	s          *Service
7435	name       string
7436	urlParams_ gensupport.URLParams
7437	ctx_       context.Context
7438	header_    http.Header
7439}
7440
7441// Delete: Deletes an autoscaling policy. It is an error to delete an
7442// autoscaling policy that is in use by one or more clusters.
7443//
7444// - name: The "resource name" of the autoscaling policy, as described
7445//   in https://cloud.google.com/apis/design/resource_names. For
7446//   projects.regions.autoscalingPolicies.delete, the resource name of
7447//   the policy has the following format:
7448//   projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_i
7449//   d} For projects.locations.autoscalingPolicies.delete, the resource
7450//   name of the policy has the following format:
7451//   projects/{project_id}/locations/{location}/autoscalingPolicies/{poli
7452//   cy_id}.
7453func (r *ProjectsRegionsAutoscalingPoliciesService) Delete(name string) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
7454	c := &ProjectsRegionsAutoscalingPoliciesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7455	c.name = name
7456	return c
7457}
7458
7459// Fields allows partial responses to be retrieved. See
7460// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7461// for more information.
7462func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
7463	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7464	return c
7465}
7466
7467// Context sets the context to be used in this call's Do method. Any
7468// pending HTTP request will be aborted if the provided context is
7469// canceled.
7470func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesDeleteCall {
7471	c.ctx_ = ctx
7472	return c
7473}
7474
7475// Header returns an http.Header that can be modified by the caller to
7476// add HTTP headers to the request.
7477func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Header() http.Header {
7478	if c.header_ == nil {
7479		c.header_ = make(http.Header)
7480	}
7481	return c.header_
7482}
7483
7484func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) doRequest(alt string) (*http.Response, error) {
7485	reqHeaders := make(http.Header)
7486	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
7487	for k, v := range c.header_ {
7488		reqHeaders[k] = v
7489	}
7490	reqHeaders.Set("User-Agent", c.s.userAgent())
7491	var body io.Reader = nil
7492	c.urlParams_.Set("alt", alt)
7493	c.urlParams_.Set("prettyPrint", "false")
7494	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
7495	urls += "?" + c.urlParams_.Encode()
7496	req, err := http.NewRequest("DELETE", urls, body)
7497	if err != nil {
7498		return nil, err
7499	}
7500	req.Header = reqHeaders
7501	googleapi.Expand(req.URL, map[string]string{
7502		"name": c.name,
7503	})
7504	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7505}
7506
7507// Do executes the "dataproc.projects.regions.autoscalingPolicies.delete" call.
7508// Exactly one of *Empty or error will be non-nil. Any non-2xx status
7509// code is an error. Response headers are in either
7510// *Empty.ServerResponse.Header or (if a response was returned at all)
7511// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7512// check whether the returned error was because http.StatusNotModified
7513// was returned.
7514func (c *ProjectsRegionsAutoscalingPoliciesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
7515	gensupport.SetOptions(c.urlParams_, opts...)
7516	res, err := c.doRequest("json")
7517	if res != nil && res.StatusCode == http.StatusNotModified {
7518		if res.Body != nil {
7519			res.Body.Close()
7520		}
7521		return nil, &googleapi.Error{
7522			Code:   res.StatusCode,
7523			Header: res.Header,
7524		}
7525	}
7526	if err != nil {
7527		return nil, err
7528	}
7529	defer googleapi.CloseBody(res)
7530	if err := googleapi.CheckResponse(res); err != nil {
7531		return nil, err
7532	}
7533	ret := &Empty{
7534		ServerResponse: googleapi.ServerResponse{
7535			Header:         res.Header,
7536			HTTPStatusCode: res.StatusCode,
7537		},
7538	}
7539	target := &ret
7540	if err := gensupport.DecodeResponse(target, res); err != nil {
7541		return nil, err
7542	}
7543	return ret, nil
7544	// {
7545	//   "description": "Deletes an autoscaling policy. It is an error to delete an autoscaling policy that is in use by one or more clusters.",
7546	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}",
7547	//   "httpMethod": "DELETE",
7548	//   "id": "dataproc.projects.regions.autoscalingPolicies.delete",
7549	//   "parameterOrder": [
7550	//     "name"
7551	//   ],
7552	//   "parameters": {
7553	//     "name": {
7554	//       "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}",
7555	//       "location": "path",
7556	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7557	//       "required": true,
7558	//       "type": "string"
7559	//     }
7560	//   },
7561	//   "path": "v1beta2/{+name}",
7562	//   "response": {
7563	//     "$ref": "Empty"
7564	//   },
7565	//   "scopes": [
7566	//     "https://www.googleapis.com/auth/cloud-platform"
7567	//   ]
7568	// }
7569
7570}
7571
7572// method id "dataproc.projects.regions.autoscalingPolicies.get":
7573
7574type ProjectsRegionsAutoscalingPoliciesGetCall struct {
7575	s            *Service
7576	name         string
7577	urlParams_   gensupport.URLParams
7578	ifNoneMatch_ string
7579	ctx_         context.Context
7580	header_      http.Header
7581}
7582
7583// Get: Retrieves autoscaling policy.
7584//
7585// - name: The "resource name" of the autoscaling policy, as described
7586//   in https://cloud.google.com/apis/design/resource_names. For
7587//   projects.regions.autoscalingPolicies.get, the resource name of the
7588//   policy has the following format:
7589//   projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_i
7590//   d} For projects.locations.autoscalingPolicies.get, the resource
7591//   name of the policy has the following format:
7592//   projects/{project_id}/locations/{location}/autoscalingPolicies/{poli
7593//   cy_id}.
7594func (r *ProjectsRegionsAutoscalingPoliciesService) Get(name string) *ProjectsRegionsAutoscalingPoliciesGetCall {
7595	c := &ProjectsRegionsAutoscalingPoliciesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7596	c.name = name
7597	return c
7598}
7599
7600// Fields allows partial responses to be retrieved. See
7601// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7602// for more information.
7603func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesGetCall {
7604	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7605	return c
7606}
7607
7608// IfNoneMatch sets the optional parameter which makes the operation
7609// fail if the object's ETag matches the given value. This is useful for
7610// getting updates only after the object has changed since the last
7611// request. Use googleapi.IsNotModified to check whether the response
7612// error from Do is the result of In-None-Match.
7613func (c *ProjectsRegionsAutoscalingPoliciesGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsAutoscalingPoliciesGetCall {
7614	c.ifNoneMatch_ = entityTag
7615	return c
7616}
7617
7618// Context sets the context to be used in this call's Do method. Any
7619// pending HTTP request will be aborted if the provided context is
7620// canceled.
7621func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesGetCall {
7622	c.ctx_ = ctx
7623	return c
7624}
7625
7626// Header returns an http.Header that can be modified by the caller to
7627// add HTTP headers to the request.
7628func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Header() http.Header {
7629	if c.header_ == nil {
7630		c.header_ = make(http.Header)
7631	}
7632	return c.header_
7633}
7634
7635func (c *ProjectsRegionsAutoscalingPoliciesGetCall) doRequest(alt string) (*http.Response, error) {
7636	reqHeaders := make(http.Header)
7637	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
7638	for k, v := range c.header_ {
7639		reqHeaders[k] = v
7640	}
7641	reqHeaders.Set("User-Agent", c.s.userAgent())
7642	if c.ifNoneMatch_ != "" {
7643		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7644	}
7645	var body io.Reader = nil
7646	c.urlParams_.Set("alt", alt)
7647	c.urlParams_.Set("prettyPrint", "false")
7648	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
7649	urls += "?" + c.urlParams_.Encode()
7650	req, err := http.NewRequest("GET", urls, body)
7651	if err != nil {
7652		return nil, err
7653	}
7654	req.Header = reqHeaders
7655	googleapi.Expand(req.URL, map[string]string{
7656		"name": c.name,
7657	})
7658	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7659}
7660
7661// Do executes the "dataproc.projects.regions.autoscalingPolicies.get" call.
7662// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
7663// non-2xx status code is an error. Response headers are in either
7664// *AutoscalingPolicy.ServerResponse.Header or (if a response was
7665// returned at all) in error.(*googleapi.Error).Header. Use
7666// googleapi.IsNotModified to check whether the returned error was
7667// because http.StatusNotModified was returned.
7668func (c *ProjectsRegionsAutoscalingPoliciesGetCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
7669	gensupport.SetOptions(c.urlParams_, opts...)
7670	res, err := c.doRequest("json")
7671	if res != nil && res.StatusCode == http.StatusNotModified {
7672		if res.Body != nil {
7673			res.Body.Close()
7674		}
7675		return nil, &googleapi.Error{
7676			Code:   res.StatusCode,
7677			Header: res.Header,
7678		}
7679	}
7680	if err != nil {
7681		return nil, err
7682	}
7683	defer googleapi.CloseBody(res)
7684	if err := googleapi.CheckResponse(res); err != nil {
7685		return nil, err
7686	}
7687	ret := &AutoscalingPolicy{
7688		ServerResponse: googleapi.ServerResponse{
7689			Header:         res.Header,
7690			HTTPStatusCode: res.StatusCode,
7691		},
7692	}
7693	target := &ret
7694	if err := gensupport.DecodeResponse(target, res); err != nil {
7695		return nil, err
7696	}
7697	return ret, nil
7698	// {
7699	//   "description": "Retrieves autoscaling policy.",
7700	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}",
7701	//   "httpMethod": "GET",
7702	//   "id": "dataproc.projects.regions.autoscalingPolicies.get",
7703	//   "parameterOrder": [
7704	//     "name"
7705	//   ],
7706	//   "parameters": {
7707	//     "name": {
7708	//       "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}",
7709	//       "location": "path",
7710	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7711	//       "required": true,
7712	//       "type": "string"
7713	//     }
7714	//   },
7715	//   "path": "v1beta2/{+name}",
7716	//   "response": {
7717	//     "$ref": "AutoscalingPolicy"
7718	//   },
7719	//   "scopes": [
7720	//     "https://www.googleapis.com/auth/cloud-platform"
7721	//   ]
7722	// }
7723
7724}
7725
7726// method id "dataproc.projects.regions.autoscalingPolicies.getIamPolicy":
7727
7728type ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall struct {
7729	s            *Service
7730	resource     string
7731	urlParams_   gensupport.URLParams
7732	ifNoneMatch_ string
7733	ctx_         context.Context
7734	header_      http.Header
7735}
7736
7737// GetIamPolicy: Gets the access control policy for a resource. Returns
7738// an empty policy if the resource exists and does not have a policy
7739// set.
7740//
7741// - resource: REQUIRED: The resource for which the policy is being
7742//   requested. See the operation documentation for the appropriate
7743//   value for this field.
7744func (r *ProjectsRegionsAutoscalingPoliciesService) GetIamPolicy(resource string) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7745	c := &ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7746	c.resource = resource
7747	return c
7748}
7749
7750// OptionsRequestedPolicyVersion sets the optional parameter
7751// "options.requestedPolicyVersion": The policy format version to be
7752// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
7753// value will be rejected.Requests for policies with any conditional
7754// bindings must specify version 3. Policies without any conditional
7755// bindings may specify any valid value or leave the field unset.To
7756// learn which resources support conditions in their IAM policies, see
7757// the IAM documentation
7758// (https://cloud.google.com/iam/help/conditions/resource-policies).
7759func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7760	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
7761	return c
7762}
7763
7764// Fields allows partial responses to be retrieved. See
7765// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7766// for more information.
7767func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7768	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7769	return c
7770}
7771
7772// IfNoneMatch sets the optional parameter which makes the operation
7773// fail if the object's ETag matches the given value. This is useful for
7774// getting updates only after the object has changed since the last
7775// request. Use googleapi.IsNotModified to check whether the response
7776// error from Do is the result of In-None-Match.
7777func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7778	c.ifNoneMatch_ = entityTag
7779	return c
7780}
7781
7782// Context sets the context to be used in this call's Do method. Any
7783// pending HTTP request will be aborted if the provided context is
7784// canceled.
7785func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall {
7786	c.ctx_ = ctx
7787	return c
7788}
7789
7790// Header returns an http.Header that can be modified by the caller to
7791// add HTTP headers to the request.
7792func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Header() http.Header {
7793	if c.header_ == nil {
7794		c.header_ = make(http.Header)
7795	}
7796	return c.header_
7797}
7798
7799func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
7800	reqHeaders := make(http.Header)
7801	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
7802	for k, v := range c.header_ {
7803		reqHeaders[k] = v
7804	}
7805	reqHeaders.Set("User-Agent", c.s.userAgent())
7806	if c.ifNoneMatch_ != "" {
7807		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7808	}
7809	var body io.Reader = nil
7810	c.urlParams_.Set("alt", alt)
7811	c.urlParams_.Set("prettyPrint", "false")
7812	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
7813	urls += "?" + c.urlParams_.Encode()
7814	req, err := http.NewRequest("GET", urls, body)
7815	if err != nil {
7816		return nil, err
7817	}
7818	req.Header = reqHeaders
7819	googleapi.Expand(req.URL, map[string]string{
7820		"resource": c.resource,
7821	})
7822	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7823}
7824
7825// Do executes the "dataproc.projects.regions.autoscalingPolicies.getIamPolicy" call.
7826// Exactly one of *Policy or error will be non-nil. Any non-2xx status
7827// code is an error. Response headers are in either
7828// *Policy.ServerResponse.Header or (if a response was returned at all)
7829// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
7830// check whether the returned error was because http.StatusNotModified
7831// was returned.
7832func (c *ProjectsRegionsAutoscalingPoliciesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
7833	gensupport.SetOptions(c.urlParams_, opts...)
7834	res, err := c.doRequest("json")
7835	if res != nil && res.StatusCode == http.StatusNotModified {
7836		if res.Body != nil {
7837			res.Body.Close()
7838		}
7839		return nil, &googleapi.Error{
7840			Code:   res.StatusCode,
7841			Header: res.Header,
7842		}
7843	}
7844	if err != nil {
7845		return nil, err
7846	}
7847	defer googleapi.CloseBody(res)
7848	if err := googleapi.CheckResponse(res); err != nil {
7849		return nil, err
7850	}
7851	ret := &Policy{
7852		ServerResponse: googleapi.ServerResponse{
7853			Header:         res.Header,
7854			HTTPStatusCode: res.StatusCode,
7855		},
7856	}
7857	target := &ret
7858	if err := gensupport.DecodeResponse(target, res); err != nil {
7859		return nil, err
7860	}
7861	return ret, nil
7862	// {
7863	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
7864	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}:getIamPolicy",
7865	//   "httpMethod": "GET",
7866	//   "id": "dataproc.projects.regions.autoscalingPolicies.getIamPolicy",
7867	//   "parameterOrder": [
7868	//     "resource"
7869	//   ],
7870	//   "parameters": {
7871	//     "options.requestedPolicyVersion": {
7872	//       "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).",
7873	//       "format": "int32",
7874	//       "location": "query",
7875	//       "type": "integer"
7876	//     },
7877	//     "resource": {
7878	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
7879	//       "location": "path",
7880	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
7881	//       "required": true,
7882	//       "type": "string"
7883	//     }
7884	//   },
7885	//   "path": "v1beta2/{+resource}:getIamPolicy",
7886	//   "response": {
7887	//     "$ref": "Policy"
7888	//   },
7889	//   "scopes": [
7890	//     "https://www.googleapis.com/auth/cloud-platform"
7891	//   ]
7892	// }
7893
7894}
7895
7896// method id "dataproc.projects.regions.autoscalingPolicies.list":
7897
7898type ProjectsRegionsAutoscalingPoliciesListCall struct {
7899	s            *Service
7900	parent       string
7901	urlParams_   gensupport.URLParams
7902	ifNoneMatch_ string
7903	ctx_         context.Context
7904	header_      http.Header
7905}
7906
7907// List: Lists autoscaling policies in the project.
7908//
7909// - parent: The "resource name" of the region or location, as described
7910//   in https://cloud.google.com/apis/design/resource_names. For
7911//   projects.regions.autoscalingPolicies.list, the resource name of the
7912//   region has the following format:
7913//   projects/{project_id}/regions/{region} For
7914//   projects.locations.autoscalingPolicies.list, the resource name of
7915//   the location has the following format:
7916//   projects/{project_id}/locations/{location}.
7917func (r *ProjectsRegionsAutoscalingPoliciesService) List(parent string) *ProjectsRegionsAutoscalingPoliciesListCall {
7918	c := &ProjectsRegionsAutoscalingPoliciesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
7919	c.parent = parent
7920	return c
7921}
7922
7923// PageSize sets the optional parameter "pageSize": The maximum number
7924// of results to return in each response. Must be less than or equal to
7925// 1000. Defaults to 100.
7926func (c *ProjectsRegionsAutoscalingPoliciesListCall) PageSize(pageSize int64) *ProjectsRegionsAutoscalingPoliciesListCall {
7927	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
7928	return c
7929}
7930
7931// PageToken sets the optional parameter "pageToken": The page token,
7932// returned by a previous call, to request the next page of results.
7933func (c *ProjectsRegionsAutoscalingPoliciesListCall) PageToken(pageToken string) *ProjectsRegionsAutoscalingPoliciesListCall {
7934	c.urlParams_.Set("pageToken", pageToken)
7935	return c
7936}
7937
7938// Fields allows partial responses to be retrieved. See
7939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
7940// for more information.
7941func (c *ProjectsRegionsAutoscalingPoliciesListCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesListCall {
7942	c.urlParams_.Set("fields", googleapi.CombineFields(s))
7943	return c
7944}
7945
7946// IfNoneMatch sets the optional parameter which makes the operation
7947// fail if the object's ETag matches the given value. This is useful for
7948// getting updates only after the object has changed since the last
7949// request. Use googleapi.IsNotModified to check whether the response
7950// error from Do is the result of In-None-Match.
7951func (c *ProjectsRegionsAutoscalingPoliciesListCall) IfNoneMatch(entityTag string) *ProjectsRegionsAutoscalingPoliciesListCall {
7952	c.ifNoneMatch_ = entityTag
7953	return c
7954}
7955
7956// Context sets the context to be used in this call's Do method. Any
7957// pending HTTP request will be aborted if the provided context is
7958// canceled.
7959func (c *ProjectsRegionsAutoscalingPoliciesListCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesListCall {
7960	c.ctx_ = ctx
7961	return c
7962}
7963
7964// Header returns an http.Header that can be modified by the caller to
7965// add HTTP headers to the request.
7966func (c *ProjectsRegionsAutoscalingPoliciesListCall) Header() http.Header {
7967	if c.header_ == nil {
7968		c.header_ = make(http.Header)
7969	}
7970	return c.header_
7971}
7972
7973func (c *ProjectsRegionsAutoscalingPoliciesListCall) doRequest(alt string) (*http.Response, error) {
7974	reqHeaders := make(http.Header)
7975	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
7976	for k, v := range c.header_ {
7977		reqHeaders[k] = v
7978	}
7979	reqHeaders.Set("User-Agent", c.s.userAgent())
7980	if c.ifNoneMatch_ != "" {
7981		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
7982	}
7983	var body io.Reader = nil
7984	c.urlParams_.Set("alt", alt)
7985	c.urlParams_.Set("prettyPrint", "false")
7986	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/autoscalingPolicies")
7987	urls += "?" + c.urlParams_.Encode()
7988	req, err := http.NewRequest("GET", urls, body)
7989	if err != nil {
7990		return nil, err
7991	}
7992	req.Header = reqHeaders
7993	googleapi.Expand(req.URL, map[string]string{
7994		"parent": c.parent,
7995	})
7996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
7997}
7998
7999// Do executes the "dataproc.projects.regions.autoscalingPolicies.list" call.
8000// Exactly one of *ListAutoscalingPoliciesResponse or error will be
8001// non-nil. Any non-2xx status code is an error. Response headers are in
8002// either *ListAutoscalingPoliciesResponse.ServerResponse.Header or (if
8003// a response was returned at all) in error.(*googleapi.Error).Header.
8004// Use googleapi.IsNotModified to check whether the returned error was
8005// because http.StatusNotModified was returned.
8006func (c *ProjectsRegionsAutoscalingPoliciesListCall) Do(opts ...googleapi.CallOption) (*ListAutoscalingPoliciesResponse, error) {
8007	gensupport.SetOptions(c.urlParams_, opts...)
8008	res, err := c.doRequest("json")
8009	if res != nil && res.StatusCode == http.StatusNotModified {
8010		if res.Body != nil {
8011			res.Body.Close()
8012		}
8013		return nil, &googleapi.Error{
8014			Code:   res.StatusCode,
8015			Header: res.Header,
8016		}
8017	}
8018	if err != nil {
8019		return nil, err
8020	}
8021	defer googleapi.CloseBody(res)
8022	if err := googleapi.CheckResponse(res); err != nil {
8023		return nil, err
8024	}
8025	ret := &ListAutoscalingPoliciesResponse{
8026		ServerResponse: googleapi.ServerResponse{
8027			Header:         res.Header,
8028			HTTPStatusCode: res.StatusCode,
8029		},
8030	}
8031	target := &ret
8032	if err := gensupport.DecodeResponse(target, res); err != nil {
8033		return nil, err
8034	}
8035	return ret, nil
8036	// {
8037	//   "description": "Lists autoscaling policies in the project.",
8038	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies",
8039	//   "httpMethod": "GET",
8040	//   "id": "dataproc.projects.regions.autoscalingPolicies.list",
8041	//   "parameterOrder": [
8042	//     "parent"
8043	//   ],
8044	//   "parameters": {
8045	//     "pageSize": {
8046	//       "description": "Optional. The maximum number of results to return in each response. Must be less than or equal to 1000. Defaults to 100.",
8047	//       "format": "int32",
8048	//       "location": "query",
8049	//       "type": "integer"
8050	//     },
8051	//     "pageToken": {
8052	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
8053	//       "location": "query",
8054	//       "type": "string"
8055	//     },
8056	//     "parent": {
8057	//       "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}",
8058	//       "location": "path",
8059	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
8060	//       "required": true,
8061	//       "type": "string"
8062	//     }
8063	//   },
8064	//   "path": "v1beta2/{+parent}/autoscalingPolicies",
8065	//   "response": {
8066	//     "$ref": "ListAutoscalingPoliciesResponse"
8067	//   },
8068	//   "scopes": [
8069	//     "https://www.googleapis.com/auth/cloud-platform"
8070	//   ]
8071	// }
8072
8073}
8074
8075// Pages invokes f for each page of results.
8076// A non-nil error returned from f will halt the iteration.
8077// The provided context supersedes any context provided to the Context method.
8078func (c *ProjectsRegionsAutoscalingPoliciesListCall) Pages(ctx context.Context, f func(*ListAutoscalingPoliciesResponse) error) error {
8079	c.ctx_ = ctx
8080	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
8081	for {
8082		x, err := c.Do()
8083		if err != nil {
8084			return err
8085		}
8086		if err := f(x); err != nil {
8087			return err
8088		}
8089		if x.NextPageToken == "" {
8090			return nil
8091		}
8092		c.PageToken(x.NextPageToken)
8093	}
8094}
8095
8096// method id "dataproc.projects.regions.autoscalingPolicies.setIamPolicy":
8097
8098type ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall struct {
8099	s                   *Service
8100	resource            string
8101	setiampolicyrequest *SetIamPolicyRequest
8102	urlParams_          gensupport.URLParams
8103	ctx_                context.Context
8104	header_             http.Header
8105}
8106
8107// SetIamPolicy: Sets the access control policy on the specified
8108// resource. Replaces any existing policy.Can return NOT_FOUND,
8109// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
8110//
8111// - resource: REQUIRED: The resource for which the policy is being
8112//   specified. See the operation documentation for the appropriate
8113//   value for this field.
8114func (r *ProjectsRegionsAutoscalingPoliciesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
8115	c := &ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8116	c.resource = resource
8117	c.setiampolicyrequest = setiampolicyrequest
8118	return c
8119}
8120
8121// Fields allows partial responses to be retrieved. See
8122// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8123// for more information.
8124func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
8125	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8126	return c
8127}
8128
8129// Context sets the context to be used in this call's Do method. Any
8130// pending HTTP request will be aborted if the provided context is
8131// canceled.
8132func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall {
8133	c.ctx_ = ctx
8134	return c
8135}
8136
8137// Header returns an http.Header that can be modified by the caller to
8138// add HTTP headers to the request.
8139func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Header() http.Header {
8140	if c.header_ == nil {
8141		c.header_ = make(http.Header)
8142	}
8143	return c.header_
8144}
8145
8146func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
8147	reqHeaders := make(http.Header)
8148	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
8149	for k, v := range c.header_ {
8150		reqHeaders[k] = v
8151	}
8152	reqHeaders.Set("User-Agent", c.s.userAgent())
8153	var body io.Reader = nil
8154	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
8155	if err != nil {
8156		return nil, err
8157	}
8158	reqHeaders.Set("Content-Type", "application/json")
8159	c.urlParams_.Set("alt", alt)
8160	c.urlParams_.Set("prettyPrint", "false")
8161	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
8162	urls += "?" + c.urlParams_.Encode()
8163	req, err := http.NewRequest("POST", urls, body)
8164	if err != nil {
8165		return nil, err
8166	}
8167	req.Header = reqHeaders
8168	googleapi.Expand(req.URL, map[string]string{
8169		"resource": c.resource,
8170	})
8171	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8172}
8173
8174// Do executes the "dataproc.projects.regions.autoscalingPolicies.setIamPolicy" call.
8175// Exactly one of *Policy or error will be non-nil. Any non-2xx status
8176// code is an error. Response headers are in either
8177// *Policy.ServerResponse.Header or (if a response was returned at all)
8178// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
8179// check whether the returned error was because http.StatusNotModified
8180// was returned.
8181func (c *ProjectsRegionsAutoscalingPoliciesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
8182	gensupport.SetOptions(c.urlParams_, opts...)
8183	res, err := c.doRequest("json")
8184	if res != nil && res.StatusCode == http.StatusNotModified {
8185		if res.Body != nil {
8186			res.Body.Close()
8187		}
8188		return nil, &googleapi.Error{
8189			Code:   res.StatusCode,
8190			Header: res.Header,
8191		}
8192	}
8193	if err != nil {
8194		return nil, err
8195	}
8196	defer googleapi.CloseBody(res)
8197	if err := googleapi.CheckResponse(res); err != nil {
8198		return nil, err
8199	}
8200	ret := &Policy{
8201		ServerResponse: googleapi.ServerResponse{
8202			Header:         res.Header,
8203			HTTPStatusCode: res.StatusCode,
8204		},
8205	}
8206	target := &ret
8207	if err := gensupport.DecodeResponse(target, res); err != nil {
8208		return nil, err
8209	}
8210	return ret, nil
8211	// {
8212	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
8213	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}:setIamPolicy",
8214	//   "httpMethod": "POST",
8215	//   "id": "dataproc.projects.regions.autoscalingPolicies.setIamPolicy",
8216	//   "parameterOrder": [
8217	//     "resource"
8218	//   ],
8219	//   "parameters": {
8220	//     "resource": {
8221	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
8222	//       "location": "path",
8223	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
8224	//       "required": true,
8225	//       "type": "string"
8226	//     }
8227	//   },
8228	//   "path": "v1beta2/{+resource}:setIamPolicy",
8229	//   "request": {
8230	//     "$ref": "SetIamPolicyRequest"
8231	//   },
8232	//   "response": {
8233	//     "$ref": "Policy"
8234	//   },
8235	//   "scopes": [
8236	//     "https://www.googleapis.com/auth/cloud-platform"
8237	//   ]
8238	// }
8239
8240}
8241
8242// method id "dataproc.projects.regions.autoscalingPolicies.testIamPermissions":
8243
8244type ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall struct {
8245	s                         *Service
8246	resource                  string
8247	testiampermissionsrequest *TestIamPermissionsRequest
8248	urlParams_                gensupport.URLParams
8249	ctx_                      context.Context
8250	header_                   http.Header
8251}
8252
8253// TestIamPermissions: Returns permissions that a caller has on the
8254// specified resource. If the resource does not exist, this will return
8255// an empty set of permissions, not a NOT_FOUND error.Note: This
8256// operation is designed to be used for building permission-aware UIs
8257// and command-line tools, not for authorization checking. This
8258// operation may "fail open" without warning.
8259//
8260// - resource: REQUIRED: The resource for which the policy detail is
8261//   being requested. See the operation documentation for the
8262//   appropriate value for this field.
8263func (r *ProjectsRegionsAutoscalingPoliciesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
8264	c := &ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8265	c.resource = resource
8266	c.testiampermissionsrequest = testiampermissionsrequest
8267	return c
8268}
8269
8270// Fields allows partial responses to be retrieved. See
8271// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8272// for more information.
8273func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
8274	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8275	return c
8276}
8277
8278// Context sets the context to be used in this call's Do method. Any
8279// pending HTTP request will be aborted if the provided context is
8280// canceled.
8281func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall {
8282	c.ctx_ = ctx
8283	return c
8284}
8285
8286// Header returns an http.Header that can be modified by the caller to
8287// add HTTP headers to the request.
8288func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Header() http.Header {
8289	if c.header_ == nil {
8290		c.header_ = make(http.Header)
8291	}
8292	return c.header_
8293}
8294
8295func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
8296	reqHeaders := make(http.Header)
8297	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
8298	for k, v := range c.header_ {
8299		reqHeaders[k] = v
8300	}
8301	reqHeaders.Set("User-Agent", c.s.userAgent())
8302	var body io.Reader = nil
8303	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
8304	if err != nil {
8305		return nil, err
8306	}
8307	reqHeaders.Set("Content-Type", "application/json")
8308	c.urlParams_.Set("alt", alt)
8309	c.urlParams_.Set("prettyPrint", "false")
8310	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
8311	urls += "?" + c.urlParams_.Encode()
8312	req, err := http.NewRequest("POST", urls, body)
8313	if err != nil {
8314		return nil, err
8315	}
8316	req.Header = reqHeaders
8317	googleapi.Expand(req.URL, map[string]string{
8318		"resource": c.resource,
8319	})
8320	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8321}
8322
8323// Do executes the "dataproc.projects.regions.autoscalingPolicies.testIamPermissions" call.
8324// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
8325// Any non-2xx status code is an error. Response headers are in either
8326// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
8327// was returned at all) in error.(*googleapi.Error).Header. Use
8328// googleapi.IsNotModified to check whether the returned error was
8329// because http.StatusNotModified was returned.
8330func (c *ProjectsRegionsAutoscalingPoliciesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
8331	gensupport.SetOptions(c.urlParams_, opts...)
8332	res, err := c.doRequest("json")
8333	if res != nil && res.StatusCode == http.StatusNotModified {
8334		if res.Body != nil {
8335			res.Body.Close()
8336		}
8337		return nil, &googleapi.Error{
8338			Code:   res.StatusCode,
8339			Header: res.Header,
8340		}
8341	}
8342	if err != nil {
8343		return nil, err
8344	}
8345	defer googleapi.CloseBody(res)
8346	if err := googleapi.CheckResponse(res); err != nil {
8347		return nil, err
8348	}
8349	ret := &TestIamPermissionsResponse{
8350		ServerResponse: googleapi.ServerResponse{
8351			Header:         res.Header,
8352			HTTPStatusCode: res.StatusCode,
8353		},
8354	}
8355	target := &ret
8356	if err := gensupport.DecodeResponse(target, res); err != nil {
8357		return nil, err
8358	}
8359	return ret, nil
8360	// {
8361	//   "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.",
8362	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}:testIamPermissions",
8363	//   "httpMethod": "POST",
8364	//   "id": "dataproc.projects.regions.autoscalingPolicies.testIamPermissions",
8365	//   "parameterOrder": [
8366	//     "resource"
8367	//   ],
8368	//   "parameters": {
8369	//     "resource": {
8370	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
8371	//       "location": "path",
8372	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
8373	//       "required": true,
8374	//       "type": "string"
8375	//     }
8376	//   },
8377	//   "path": "v1beta2/{+resource}:testIamPermissions",
8378	//   "request": {
8379	//     "$ref": "TestIamPermissionsRequest"
8380	//   },
8381	//   "response": {
8382	//     "$ref": "TestIamPermissionsResponse"
8383	//   },
8384	//   "scopes": [
8385	//     "https://www.googleapis.com/auth/cloud-platform"
8386	//   ]
8387	// }
8388
8389}
8390
8391// method id "dataproc.projects.regions.autoscalingPolicies.update":
8392
8393type ProjectsRegionsAutoscalingPoliciesUpdateCall struct {
8394	s                 *Service
8395	name              string
8396	autoscalingpolicy *AutoscalingPolicy
8397	urlParams_        gensupport.URLParams
8398	ctx_              context.Context
8399	header_           http.Header
8400}
8401
8402// Update: Updates (replaces) autoscaling policy.Disabled check for
8403// update_mask, because all updates will be full replacements.
8404//
8405// - name: Output only. The "resource name" of the autoscaling policy,
8406//   as described in
8407//   https://cloud.google.com/apis/design/resource_names. For
8408//   projects.regions.autoscalingPolicies, the resource name of the
8409//   policy has the following format:
8410//   projects/{project_id}/regions/{region}/autoscalingPolicies/{policy_i
8411//   d} For projects.locations.autoscalingPolicies, the resource name of
8412//   the policy has the following format:
8413//   projects/{project_id}/locations/{location}/autoscalingPolicies/{poli
8414//   cy_id}.
8415func (r *ProjectsRegionsAutoscalingPoliciesService) Update(name string, autoscalingpolicy *AutoscalingPolicy) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
8416	c := &ProjectsRegionsAutoscalingPoliciesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8417	c.name = name
8418	c.autoscalingpolicy = autoscalingpolicy
8419	return c
8420}
8421
8422// Fields allows partial responses to be retrieved. See
8423// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8424// for more information.
8425func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Fields(s ...googleapi.Field) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
8426	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8427	return c
8428}
8429
8430// Context sets the context to be used in this call's Do method. Any
8431// pending HTTP request will be aborted if the provided context is
8432// canceled.
8433func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Context(ctx context.Context) *ProjectsRegionsAutoscalingPoliciesUpdateCall {
8434	c.ctx_ = ctx
8435	return c
8436}
8437
8438// Header returns an http.Header that can be modified by the caller to
8439// add HTTP headers to the request.
8440func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Header() http.Header {
8441	if c.header_ == nil {
8442		c.header_ = make(http.Header)
8443	}
8444	return c.header_
8445}
8446
8447func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) doRequest(alt string) (*http.Response, error) {
8448	reqHeaders := make(http.Header)
8449	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
8450	for k, v := range c.header_ {
8451		reqHeaders[k] = v
8452	}
8453	reqHeaders.Set("User-Agent", c.s.userAgent())
8454	var body io.Reader = nil
8455	body, err := googleapi.WithoutDataWrapper.JSONReader(c.autoscalingpolicy)
8456	if err != nil {
8457		return nil, err
8458	}
8459	reqHeaders.Set("Content-Type", "application/json")
8460	c.urlParams_.Set("alt", alt)
8461	c.urlParams_.Set("prettyPrint", "false")
8462	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
8463	urls += "?" + c.urlParams_.Encode()
8464	req, err := http.NewRequest("PUT", urls, body)
8465	if err != nil {
8466		return nil, err
8467	}
8468	req.Header = reqHeaders
8469	googleapi.Expand(req.URL, map[string]string{
8470		"name": c.name,
8471	})
8472	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8473}
8474
8475// Do executes the "dataproc.projects.regions.autoscalingPolicies.update" call.
8476// Exactly one of *AutoscalingPolicy or error will be non-nil. Any
8477// non-2xx status code is an error. Response headers are in either
8478// *AutoscalingPolicy.ServerResponse.Header or (if a response was
8479// returned at all) in error.(*googleapi.Error).Header. Use
8480// googleapi.IsNotModified to check whether the returned error was
8481// because http.StatusNotModified was returned.
8482func (c *ProjectsRegionsAutoscalingPoliciesUpdateCall) Do(opts ...googleapi.CallOption) (*AutoscalingPolicy, error) {
8483	gensupport.SetOptions(c.urlParams_, opts...)
8484	res, err := c.doRequest("json")
8485	if res != nil && res.StatusCode == http.StatusNotModified {
8486		if res.Body != nil {
8487			res.Body.Close()
8488		}
8489		return nil, &googleapi.Error{
8490			Code:   res.StatusCode,
8491			Header: res.Header,
8492		}
8493	}
8494	if err != nil {
8495		return nil, err
8496	}
8497	defer googleapi.CloseBody(res)
8498	if err := googleapi.CheckResponse(res); err != nil {
8499		return nil, err
8500	}
8501	ret := &AutoscalingPolicy{
8502		ServerResponse: googleapi.ServerResponse{
8503			Header:         res.Header,
8504			HTTPStatusCode: res.StatusCode,
8505		},
8506	}
8507	target := &ret
8508	if err := gensupport.DecodeResponse(target, res); err != nil {
8509		return nil, err
8510	}
8511	return ret, nil
8512	// {
8513	//   "description": "Updates (replaces) autoscaling policy.Disabled check for update_mask, because all updates will be full replacements.",
8514	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/autoscalingPolicies/{autoscalingPoliciesId}",
8515	//   "httpMethod": "PUT",
8516	//   "id": "dataproc.projects.regions.autoscalingPolicies.update",
8517	//   "parameterOrder": [
8518	//     "name"
8519	//   ],
8520	//   "parameters": {
8521	//     "name": {
8522	//       "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}",
8523	//       "location": "path",
8524	//       "pattern": "^projects/[^/]+/regions/[^/]+/autoscalingPolicies/[^/]+$",
8525	//       "required": true,
8526	//       "type": "string"
8527	//     }
8528	//   },
8529	//   "path": "v1beta2/{+name}",
8530	//   "request": {
8531	//     "$ref": "AutoscalingPolicy"
8532	//   },
8533	//   "response": {
8534	//     "$ref": "AutoscalingPolicy"
8535	//   },
8536	//   "scopes": [
8537	//     "https://www.googleapis.com/auth/cloud-platform"
8538	//   ]
8539	// }
8540
8541}
8542
8543// method id "dataproc.projects.regions.clusters.create":
8544
8545type ProjectsRegionsClustersCreateCall struct {
8546	s          *Service
8547	projectId  string
8548	region     string
8549	cluster    *Cluster
8550	urlParams_ gensupport.URLParams
8551	ctx_       context.Context
8552	header_    http.Header
8553}
8554
8555// Create: Creates a cluster in a project. The returned
8556// Operation.metadata will be ClusterOperationMetadata
8557// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata).
8558//
8559// - projectId: The ID of the Google Cloud Platform project that the
8560//   cluster belongs to.
8561// - region: The Dataproc region in which to handle the request.
8562func (r *ProjectsRegionsClustersService) Create(projectId string, region string, cluster *Cluster) *ProjectsRegionsClustersCreateCall {
8563	c := &ProjectsRegionsClustersCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8564	c.projectId = projectId
8565	c.region = region
8566	c.cluster = cluster
8567	return c
8568}
8569
8570// RequestId sets the optional parameter "requestId": A unique id used
8571// to identify the request. If the server receives two
8572// CreateClusterRequest
8573// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#google.cloud.dataproc.v1beta2.CreateClusterRequest)s
8574// with the same id, then the second request will be ignored and the
8575// first google.longrunning.Operation created and stored in the backend
8576// is returned.It is recommended to always set this value to a UUID
8577// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
8578// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
8579// and hyphens (-). The maximum length is 40 characters.
8580func (c *ProjectsRegionsClustersCreateCall) RequestId(requestId string) *ProjectsRegionsClustersCreateCall {
8581	c.urlParams_.Set("requestId", requestId)
8582	return c
8583}
8584
8585// Fields allows partial responses to be retrieved. See
8586// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8587// for more information.
8588func (c *ProjectsRegionsClustersCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersCreateCall {
8589	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8590	return c
8591}
8592
8593// Context sets the context to be used in this call's Do method. Any
8594// pending HTTP request will be aborted if the provided context is
8595// canceled.
8596func (c *ProjectsRegionsClustersCreateCall) Context(ctx context.Context) *ProjectsRegionsClustersCreateCall {
8597	c.ctx_ = ctx
8598	return c
8599}
8600
8601// Header returns an http.Header that can be modified by the caller to
8602// add HTTP headers to the request.
8603func (c *ProjectsRegionsClustersCreateCall) Header() http.Header {
8604	if c.header_ == nil {
8605		c.header_ = make(http.Header)
8606	}
8607	return c.header_
8608}
8609
8610func (c *ProjectsRegionsClustersCreateCall) doRequest(alt string) (*http.Response, error) {
8611	reqHeaders := make(http.Header)
8612	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
8613	for k, v := range c.header_ {
8614		reqHeaders[k] = v
8615	}
8616	reqHeaders.Set("User-Agent", c.s.userAgent())
8617	var body io.Reader = nil
8618	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
8619	if err != nil {
8620		return nil, err
8621	}
8622	reqHeaders.Set("Content-Type", "application/json")
8623	c.urlParams_.Set("alt", alt)
8624	c.urlParams_.Set("prettyPrint", "false")
8625	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters")
8626	urls += "?" + c.urlParams_.Encode()
8627	req, err := http.NewRequest("POST", urls, body)
8628	if err != nil {
8629		return nil, err
8630	}
8631	req.Header = reqHeaders
8632	googleapi.Expand(req.URL, map[string]string{
8633		"projectId": c.projectId,
8634		"region":    c.region,
8635	})
8636	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8637}
8638
8639// Do executes the "dataproc.projects.regions.clusters.create" call.
8640// Exactly one of *Operation or error will be non-nil. Any non-2xx
8641// status code is an error. Response headers are in either
8642// *Operation.ServerResponse.Header or (if a response was returned at
8643// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8644// to check whether the returned error was because
8645// http.StatusNotModified was returned.
8646func (c *ProjectsRegionsClustersCreateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8647	gensupport.SetOptions(c.urlParams_, opts...)
8648	res, err := c.doRequest("json")
8649	if res != nil && res.StatusCode == http.StatusNotModified {
8650		if res.Body != nil {
8651			res.Body.Close()
8652		}
8653		return nil, &googleapi.Error{
8654			Code:   res.StatusCode,
8655			Header: res.Header,
8656		}
8657	}
8658	if err != nil {
8659		return nil, err
8660	}
8661	defer googleapi.CloseBody(res)
8662	if err := googleapi.CheckResponse(res); err != nil {
8663		return nil, err
8664	}
8665	ret := &Operation{
8666		ServerResponse: googleapi.ServerResponse{
8667			Header:         res.Header,
8668			HTTPStatusCode: res.StatusCode,
8669		},
8670	}
8671	target := &ret
8672	if err := gensupport.DecodeResponse(target, res); err != nil {
8673		return nil, err
8674	}
8675	return ret, nil
8676	// {
8677	//   "description": "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).",
8678	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters",
8679	//   "httpMethod": "POST",
8680	//   "id": "dataproc.projects.regions.clusters.create",
8681	//   "parameterOrder": [
8682	//     "projectId",
8683	//     "region"
8684	//   ],
8685	//   "parameters": {
8686	//     "projectId": {
8687	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8688	//       "location": "path",
8689	//       "required": true,
8690	//       "type": "string"
8691	//     },
8692	//     "region": {
8693	//       "description": "Required. The Dataproc region in which to handle the request.",
8694	//       "location": "path",
8695	//       "required": true,
8696	//       "type": "string"
8697	//     },
8698	//     "requestId": {
8699	//       "description": "Optional. A unique id used to identify the request. If the server receives two CreateClusterRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#google.cloud.dataproc.v1beta2.CreateClusterRequest)s 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.",
8700	//       "location": "query",
8701	//       "type": "string"
8702	//     }
8703	//   },
8704	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters",
8705	//   "request": {
8706	//     "$ref": "Cluster"
8707	//   },
8708	//   "response": {
8709	//     "$ref": "Operation"
8710	//   },
8711	//   "scopes": [
8712	//     "https://www.googleapis.com/auth/cloud-platform"
8713	//   ]
8714	// }
8715
8716}
8717
8718// method id "dataproc.projects.regions.clusters.delete":
8719
8720type ProjectsRegionsClustersDeleteCall struct {
8721	s           *Service
8722	projectId   string
8723	region      string
8724	clusterName string
8725	urlParams_  gensupport.URLParams
8726	ctx_        context.Context
8727	header_     http.Header
8728}
8729
8730// Delete: Deletes a cluster in a project. The returned
8731// Operation.metadata will be ClusterOperationMetadata
8732// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata).
8733//
8734// - clusterName: The cluster name.
8735// - projectId: The ID of the Google Cloud Platform project that the
8736//   cluster belongs to.
8737// - region: The Dataproc region in which to handle the request.
8738func (r *ProjectsRegionsClustersService) Delete(projectId string, region string, clusterName string) *ProjectsRegionsClustersDeleteCall {
8739	c := &ProjectsRegionsClustersDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8740	c.projectId = projectId
8741	c.region = region
8742	c.clusterName = clusterName
8743	return c
8744}
8745
8746// ClusterUuid sets the optional parameter "clusterUuid": Specifying the
8747// cluster_uuid means the RPC should fail (with error NOT_FOUND) if
8748// cluster with specified UUID does not exist.
8749func (c *ProjectsRegionsClustersDeleteCall) ClusterUuid(clusterUuid string) *ProjectsRegionsClustersDeleteCall {
8750	c.urlParams_.Set("clusterUuid", clusterUuid)
8751	return c
8752}
8753
8754// RequestId sets the optional parameter "requestId": A unique id used
8755// to identify the request. If the server receives two
8756// DeleteClusterRequest
8757// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#google.cloud.dataproc.v1beta2.DeleteClusterRequest)s
8758// with the same id, then the second request will be ignored and the
8759// first google.longrunning.Operation created and stored in the backend
8760// is returned.It is recommended to always set this value to a UUID
8761// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
8762// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
8763// and hyphens (-). The maximum length is 40 characters.
8764func (c *ProjectsRegionsClustersDeleteCall) RequestId(requestId string) *ProjectsRegionsClustersDeleteCall {
8765	c.urlParams_.Set("requestId", requestId)
8766	return c
8767}
8768
8769// Fields allows partial responses to be retrieved. See
8770// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8771// for more information.
8772func (c *ProjectsRegionsClustersDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersDeleteCall {
8773	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8774	return c
8775}
8776
8777// Context sets the context to be used in this call's Do method. Any
8778// pending HTTP request will be aborted if the provided context is
8779// canceled.
8780func (c *ProjectsRegionsClustersDeleteCall) Context(ctx context.Context) *ProjectsRegionsClustersDeleteCall {
8781	c.ctx_ = ctx
8782	return c
8783}
8784
8785// Header returns an http.Header that can be modified by the caller to
8786// add HTTP headers to the request.
8787func (c *ProjectsRegionsClustersDeleteCall) Header() http.Header {
8788	if c.header_ == nil {
8789		c.header_ = make(http.Header)
8790	}
8791	return c.header_
8792}
8793
8794func (c *ProjectsRegionsClustersDeleteCall) doRequest(alt string) (*http.Response, error) {
8795	reqHeaders := make(http.Header)
8796	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
8797	for k, v := range c.header_ {
8798		reqHeaders[k] = v
8799	}
8800	reqHeaders.Set("User-Agent", c.s.userAgent())
8801	var body io.Reader = nil
8802	c.urlParams_.Set("alt", alt)
8803	c.urlParams_.Set("prettyPrint", "false")
8804	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}")
8805	urls += "?" + c.urlParams_.Encode()
8806	req, err := http.NewRequest("DELETE", urls, body)
8807	if err != nil {
8808		return nil, err
8809	}
8810	req.Header = reqHeaders
8811	googleapi.Expand(req.URL, map[string]string{
8812		"projectId":   c.projectId,
8813		"region":      c.region,
8814		"clusterName": c.clusterName,
8815	})
8816	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8817}
8818
8819// Do executes the "dataproc.projects.regions.clusters.delete" call.
8820// Exactly one of *Operation or error will be non-nil. Any non-2xx
8821// status code is an error. Response headers are in either
8822// *Operation.ServerResponse.Header or (if a response was returned at
8823// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8824// to check whether the returned error was because
8825// http.StatusNotModified was returned.
8826func (c *ProjectsRegionsClustersDeleteCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
8827	gensupport.SetOptions(c.urlParams_, opts...)
8828	res, err := c.doRequest("json")
8829	if res != nil && res.StatusCode == http.StatusNotModified {
8830		if res.Body != nil {
8831			res.Body.Close()
8832		}
8833		return nil, &googleapi.Error{
8834			Code:   res.StatusCode,
8835			Header: res.Header,
8836		}
8837	}
8838	if err != nil {
8839		return nil, err
8840	}
8841	defer googleapi.CloseBody(res)
8842	if err := googleapi.CheckResponse(res); err != nil {
8843		return nil, err
8844	}
8845	ret := &Operation{
8846		ServerResponse: googleapi.ServerResponse{
8847			Header:         res.Header,
8848			HTTPStatusCode: res.StatusCode,
8849		},
8850	}
8851	target := &ret
8852	if err := gensupport.DecodeResponse(target, res); err != nil {
8853		return nil, err
8854	}
8855	return ret, nil
8856	// {
8857	//   "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).",
8858	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
8859	//   "httpMethod": "DELETE",
8860	//   "id": "dataproc.projects.regions.clusters.delete",
8861	//   "parameterOrder": [
8862	//     "projectId",
8863	//     "region",
8864	//     "clusterName"
8865	//   ],
8866	//   "parameters": {
8867	//     "clusterName": {
8868	//       "description": "Required. The cluster name.",
8869	//       "location": "path",
8870	//       "required": true,
8871	//       "type": "string"
8872	//     },
8873	//     "clusterUuid": {
8874	//       "description": "Optional. Specifying the cluster_uuid means the RPC should fail (with error NOT_FOUND) if cluster with specified UUID does not exist.",
8875	//       "location": "query",
8876	//       "type": "string"
8877	//     },
8878	//     "projectId": {
8879	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
8880	//       "location": "path",
8881	//       "required": true,
8882	//       "type": "string"
8883	//     },
8884	//     "region": {
8885	//       "description": "Required. The Dataproc region in which to handle the request.",
8886	//       "location": "path",
8887	//       "required": true,
8888	//       "type": "string"
8889	//     },
8890	//     "requestId": {
8891	//       "description": "Optional. A unique id used to identify the request. If the server receives two DeleteClusterRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#google.cloud.dataproc.v1beta2.DeleteClusterRequest)s 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.",
8892	//       "location": "query",
8893	//       "type": "string"
8894	//     }
8895	//   },
8896	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
8897	//   "response": {
8898	//     "$ref": "Operation"
8899	//   },
8900	//   "scopes": [
8901	//     "https://www.googleapis.com/auth/cloud-platform"
8902	//   ]
8903	// }
8904
8905}
8906
8907// method id "dataproc.projects.regions.clusters.diagnose":
8908
8909type ProjectsRegionsClustersDiagnoseCall struct {
8910	s                      *Service
8911	projectId              string
8912	region                 string
8913	clusterName            string
8914	diagnoseclusterrequest *DiagnoseClusterRequest
8915	urlParams_             gensupport.URLParams
8916	ctx_                   context.Context
8917	header_                http.Header
8918}
8919
8920// Diagnose: Gets cluster diagnostic information. The returned
8921// Operation.metadata will be ClusterOperationMetadata
8922// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata).
8923// After the operation completes, Operation.response contains Empty.
8924//
8925// - clusterName: The cluster name.
8926// - projectId: The ID of the Google Cloud Platform project that the
8927//   cluster belongs to.
8928// - region: The Dataproc region in which to handle the request.
8929func (r *ProjectsRegionsClustersService) Diagnose(projectId string, region string, clusterName string, diagnoseclusterrequest *DiagnoseClusterRequest) *ProjectsRegionsClustersDiagnoseCall {
8930	c := &ProjectsRegionsClustersDiagnoseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
8931	c.projectId = projectId
8932	c.region = region
8933	c.clusterName = clusterName
8934	c.diagnoseclusterrequest = diagnoseclusterrequest
8935	return c
8936}
8937
8938// Fields allows partial responses to be retrieved. See
8939// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
8940// for more information.
8941func (c *ProjectsRegionsClustersDiagnoseCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersDiagnoseCall {
8942	c.urlParams_.Set("fields", googleapi.CombineFields(s))
8943	return c
8944}
8945
8946// Context sets the context to be used in this call's Do method. Any
8947// pending HTTP request will be aborted if the provided context is
8948// canceled.
8949func (c *ProjectsRegionsClustersDiagnoseCall) Context(ctx context.Context) *ProjectsRegionsClustersDiagnoseCall {
8950	c.ctx_ = ctx
8951	return c
8952}
8953
8954// Header returns an http.Header that can be modified by the caller to
8955// add HTTP headers to the request.
8956func (c *ProjectsRegionsClustersDiagnoseCall) Header() http.Header {
8957	if c.header_ == nil {
8958		c.header_ = make(http.Header)
8959	}
8960	return c.header_
8961}
8962
8963func (c *ProjectsRegionsClustersDiagnoseCall) doRequest(alt string) (*http.Response, error) {
8964	reqHeaders := make(http.Header)
8965	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
8966	for k, v := range c.header_ {
8967		reqHeaders[k] = v
8968	}
8969	reqHeaders.Set("User-Agent", c.s.userAgent())
8970	var body io.Reader = nil
8971	body, err := googleapi.WithoutDataWrapper.JSONReader(c.diagnoseclusterrequest)
8972	if err != nil {
8973		return nil, err
8974	}
8975	reqHeaders.Set("Content-Type", "application/json")
8976	c.urlParams_.Set("alt", alt)
8977	c.urlParams_.Set("prettyPrint", "false")
8978	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose")
8979	urls += "?" + c.urlParams_.Encode()
8980	req, err := http.NewRequest("POST", urls, body)
8981	if err != nil {
8982		return nil, err
8983	}
8984	req.Header = reqHeaders
8985	googleapi.Expand(req.URL, map[string]string{
8986		"projectId":   c.projectId,
8987		"region":      c.region,
8988		"clusterName": c.clusterName,
8989	})
8990	return gensupport.SendRequest(c.ctx_, c.s.client, req)
8991}
8992
8993// Do executes the "dataproc.projects.regions.clusters.diagnose" call.
8994// Exactly one of *Operation or error will be non-nil. Any non-2xx
8995// status code is an error. Response headers are in either
8996// *Operation.ServerResponse.Header or (if a response was returned at
8997// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
8998// to check whether the returned error was because
8999// http.StatusNotModified was returned.
9000func (c *ProjectsRegionsClustersDiagnoseCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9001	gensupport.SetOptions(c.urlParams_, opts...)
9002	res, err := c.doRequest("json")
9003	if res != nil && res.StatusCode == http.StatusNotModified {
9004		if res.Body != nil {
9005			res.Body.Close()
9006		}
9007		return nil, &googleapi.Error{
9008			Code:   res.StatusCode,
9009			Header: res.Header,
9010		}
9011	}
9012	if err != nil {
9013		return nil, err
9014	}
9015	defer googleapi.CloseBody(res)
9016	if err := googleapi.CheckResponse(res); err != nil {
9017		return nil, err
9018	}
9019	ret := &Operation{
9020		ServerResponse: googleapi.ServerResponse{
9021			Header:         res.Header,
9022			HTTPStatusCode: res.StatusCode,
9023		},
9024	}
9025	target := &ret
9026	if err := gensupport.DecodeResponse(target, res); err != nil {
9027		return nil, err
9028	}
9029	return ret, nil
9030	// {
9031	//   "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.",
9032	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose",
9033	//   "httpMethod": "POST",
9034	//   "id": "dataproc.projects.regions.clusters.diagnose",
9035	//   "parameterOrder": [
9036	//     "projectId",
9037	//     "region",
9038	//     "clusterName"
9039	//   ],
9040	//   "parameters": {
9041	//     "clusterName": {
9042	//       "description": "Required. The cluster name.",
9043	//       "location": "path",
9044	//       "required": true,
9045	//       "type": "string"
9046	//     },
9047	//     "projectId": {
9048	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
9049	//       "location": "path",
9050	//       "required": true,
9051	//       "type": "string"
9052	//     },
9053	//     "region": {
9054	//       "description": "Required. The Dataproc region in which to handle the request.",
9055	//       "location": "path",
9056	//       "required": true,
9057	//       "type": "string"
9058	//     }
9059	//   },
9060	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:diagnose",
9061	//   "request": {
9062	//     "$ref": "DiagnoseClusterRequest"
9063	//   },
9064	//   "response": {
9065	//     "$ref": "Operation"
9066	//   },
9067	//   "scopes": [
9068	//     "https://www.googleapis.com/auth/cloud-platform"
9069	//   ]
9070	// }
9071
9072}
9073
9074// method id "dataproc.projects.regions.clusters.get":
9075
9076type ProjectsRegionsClustersGetCall struct {
9077	s            *Service
9078	projectId    string
9079	region       string
9080	clusterName  string
9081	urlParams_   gensupport.URLParams
9082	ifNoneMatch_ string
9083	ctx_         context.Context
9084	header_      http.Header
9085}
9086
9087// Get: Gets the resource representation for a cluster in a project.
9088//
9089// - clusterName: The cluster name.
9090// - projectId: The ID of the Google Cloud Platform project that the
9091//   cluster belongs to.
9092// - region: The Dataproc region in which to handle the request.
9093func (r *ProjectsRegionsClustersService) Get(projectId string, region string, clusterName string) *ProjectsRegionsClustersGetCall {
9094	c := &ProjectsRegionsClustersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9095	c.projectId = projectId
9096	c.region = region
9097	c.clusterName = clusterName
9098	return c
9099}
9100
9101// Fields allows partial responses to be retrieved. See
9102// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9103// for more information.
9104func (c *ProjectsRegionsClustersGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersGetCall {
9105	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9106	return c
9107}
9108
9109// IfNoneMatch sets the optional parameter which makes the operation
9110// fail if the object's ETag matches the given value. This is useful for
9111// getting updates only after the object has changed since the last
9112// request. Use googleapi.IsNotModified to check whether the response
9113// error from Do is the result of In-None-Match.
9114func (c *ProjectsRegionsClustersGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersGetCall {
9115	c.ifNoneMatch_ = entityTag
9116	return c
9117}
9118
9119// Context sets the context to be used in this call's Do method. Any
9120// pending HTTP request will be aborted if the provided context is
9121// canceled.
9122func (c *ProjectsRegionsClustersGetCall) Context(ctx context.Context) *ProjectsRegionsClustersGetCall {
9123	c.ctx_ = ctx
9124	return c
9125}
9126
9127// Header returns an http.Header that can be modified by the caller to
9128// add HTTP headers to the request.
9129func (c *ProjectsRegionsClustersGetCall) Header() http.Header {
9130	if c.header_ == nil {
9131		c.header_ = make(http.Header)
9132	}
9133	return c.header_
9134}
9135
9136func (c *ProjectsRegionsClustersGetCall) doRequest(alt string) (*http.Response, error) {
9137	reqHeaders := make(http.Header)
9138	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
9139	for k, v := range c.header_ {
9140		reqHeaders[k] = v
9141	}
9142	reqHeaders.Set("User-Agent", c.s.userAgent())
9143	if c.ifNoneMatch_ != "" {
9144		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9145	}
9146	var body io.Reader = nil
9147	c.urlParams_.Set("alt", alt)
9148	c.urlParams_.Set("prettyPrint", "false")
9149	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}")
9150	urls += "?" + c.urlParams_.Encode()
9151	req, err := http.NewRequest("GET", urls, body)
9152	if err != nil {
9153		return nil, err
9154	}
9155	req.Header = reqHeaders
9156	googleapi.Expand(req.URL, map[string]string{
9157		"projectId":   c.projectId,
9158		"region":      c.region,
9159		"clusterName": c.clusterName,
9160	})
9161	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9162}
9163
9164// Do executes the "dataproc.projects.regions.clusters.get" call.
9165// Exactly one of *Cluster or error will be non-nil. Any non-2xx status
9166// code is an error. Response headers are in either
9167// *Cluster.ServerResponse.Header or (if a response was returned at all)
9168// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9169// check whether the returned error was because http.StatusNotModified
9170// was returned.
9171func (c *ProjectsRegionsClustersGetCall) Do(opts ...googleapi.CallOption) (*Cluster, error) {
9172	gensupport.SetOptions(c.urlParams_, opts...)
9173	res, err := c.doRequest("json")
9174	if res != nil && res.StatusCode == http.StatusNotModified {
9175		if res.Body != nil {
9176			res.Body.Close()
9177		}
9178		return nil, &googleapi.Error{
9179			Code:   res.StatusCode,
9180			Header: res.Header,
9181		}
9182	}
9183	if err != nil {
9184		return nil, err
9185	}
9186	defer googleapi.CloseBody(res)
9187	if err := googleapi.CheckResponse(res); err != nil {
9188		return nil, err
9189	}
9190	ret := &Cluster{
9191		ServerResponse: googleapi.ServerResponse{
9192			Header:         res.Header,
9193			HTTPStatusCode: res.StatusCode,
9194		},
9195	}
9196	target := &ret
9197	if err := gensupport.DecodeResponse(target, res); err != nil {
9198		return nil, err
9199	}
9200	return ret, nil
9201	// {
9202	//   "description": "Gets the resource representation for a cluster in a project.",
9203	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
9204	//   "httpMethod": "GET",
9205	//   "id": "dataproc.projects.regions.clusters.get",
9206	//   "parameterOrder": [
9207	//     "projectId",
9208	//     "region",
9209	//     "clusterName"
9210	//   ],
9211	//   "parameters": {
9212	//     "clusterName": {
9213	//       "description": "Required. The cluster name.",
9214	//       "location": "path",
9215	//       "required": true,
9216	//       "type": "string"
9217	//     },
9218	//     "projectId": {
9219	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
9220	//       "location": "path",
9221	//       "required": true,
9222	//       "type": "string"
9223	//     },
9224	//     "region": {
9225	//       "description": "Required. The Dataproc region in which to handle the request.",
9226	//       "location": "path",
9227	//       "required": true,
9228	//       "type": "string"
9229	//     }
9230	//   },
9231	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
9232	//   "response": {
9233	//     "$ref": "Cluster"
9234	//   },
9235	//   "scopes": [
9236	//     "https://www.googleapis.com/auth/cloud-platform"
9237	//   ]
9238	// }
9239
9240}
9241
9242// method id "dataproc.projects.regions.clusters.getIamPolicy":
9243
9244type ProjectsRegionsClustersGetIamPolicyCall struct {
9245	s            *Service
9246	resource     string
9247	urlParams_   gensupport.URLParams
9248	ifNoneMatch_ string
9249	ctx_         context.Context
9250	header_      http.Header
9251}
9252
9253// GetIamPolicy: Gets the access control policy for a resource. Returns
9254// an empty policy if the resource exists and does not have a policy
9255// set.
9256//
9257// - resource: REQUIRED: The resource for which the policy is being
9258//   requested. See the operation documentation for the appropriate
9259//   value for this field.
9260func (r *ProjectsRegionsClustersService) GetIamPolicy(resource string) *ProjectsRegionsClustersGetIamPolicyCall {
9261	c := &ProjectsRegionsClustersGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9262	c.resource = resource
9263	return c
9264}
9265
9266// OptionsRequestedPolicyVersion sets the optional parameter
9267// "options.requestedPolicyVersion": The policy format version to be
9268// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
9269// value will be rejected.Requests for policies with any conditional
9270// bindings must specify version 3. Policies without any conditional
9271// bindings may specify any valid value or leave the field unset.To
9272// learn which resources support conditions in their IAM policies, see
9273// the IAM documentation
9274// (https://cloud.google.com/iam/help/conditions/resource-policies).
9275func (c *ProjectsRegionsClustersGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsRegionsClustersGetIamPolicyCall {
9276	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
9277	return c
9278}
9279
9280// Fields allows partial responses to be retrieved. See
9281// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9282// for more information.
9283func (c *ProjectsRegionsClustersGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersGetIamPolicyCall {
9284	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9285	return c
9286}
9287
9288// IfNoneMatch sets the optional parameter which makes the operation
9289// fail if the object's ETag matches the given value. This is useful for
9290// getting updates only after the object has changed since the last
9291// request. Use googleapi.IsNotModified to check whether the response
9292// error from Do is the result of In-None-Match.
9293func (c *ProjectsRegionsClustersGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersGetIamPolicyCall {
9294	c.ifNoneMatch_ = entityTag
9295	return c
9296}
9297
9298// Context sets the context to be used in this call's Do method. Any
9299// pending HTTP request will be aborted if the provided context is
9300// canceled.
9301func (c *ProjectsRegionsClustersGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsClustersGetIamPolicyCall {
9302	c.ctx_ = ctx
9303	return c
9304}
9305
9306// Header returns an http.Header that can be modified by the caller to
9307// add HTTP headers to the request.
9308func (c *ProjectsRegionsClustersGetIamPolicyCall) Header() http.Header {
9309	if c.header_ == nil {
9310		c.header_ = make(http.Header)
9311	}
9312	return c.header_
9313}
9314
9315func (c *ProjectsRegionsClustersGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
9316	reqHeaders := make(http.Header)
9317	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
9318	for k, v := range c.header_ {
9319		reqHeaders[k] = v
9320	}
9321	reqHeaders.Set("User-Agent", c.s.userAgent())
9322	if c.ifNoneMatch_ != "" {
9323		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9324	}
9325	var body io.Reader = nil
9326	c.urlParams_.Set("alt", alt)
9327	c.urlParams_.Set("prettyPrint", "false")
9328	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
9329	urls += "?" + c.urlParams_.Encode()
9330	req, err := http.NewRequest("GET", urls, body)
9331	if err != nil {
9332		return nil, err
9333	}
9334	req.Header = reqHeaders
9335	googleapi.Expand(req.URL, map[string]string{
9336		"resource": c.resource,
9337	})
9338	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9339}
9340
9341// Do executes the "dataproc.projects.regions.clusters.getIamPolicy" call.
9342// Exactly one of *Policy or error will be non-nil. Any non-2xx status
9343// code is an error. Response headers are in either
9344// *Policy.ServerResponse.Header or (if a response was returned at all)
9345// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
9346// check whether the returned error was because http.StatusNotModified
9347// was returned.
9348func (c *ProjectsRegionsClustersGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
9349	gensupport.SetOptions(c.urlParams_, opts...)
9350	res, err := c.doRequest("json")
9351	if res != nil && res.StatusCode == http.StatusNotModified {
9352		if res.Body != nil {
9353			res.Body.Close()
9354		}
9355		return nil, &googleapi.Error{
9356			Code:   res.StatusCode,
9357			Header: res.Header,
9358		}
9359	}
9360	if err != nil {
9361		return nil, err
9362	}
9363	defer googleapi.CloseBody(res)
9364	if err := googleapi.CheckResponse(res); err != nil {
9365		return nil, err
9366	}
9367	ret := &Policy{
9368		ServerResponse: googleapi.ServerResponse{
9369			Header:         res.Header,
9370			HTTPStatusCode: res.StatusCode,
9371		},
9372	}
9373	target := &ret
9374	if err := gensupport.DecodeResponse(target, res); err != nil {
9375		return nil, err
9376	}
9377	return ret, nil
9378	// {
9379	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
9380	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:getIamPolicy",
9381	//   "httpMethod": "GET",
9382	//   "id": "dataproc.projects.regions.clusters.getIamPolicy",
9383	//   "parameterOrder": [
9384	//     "resource"
9385	//   ],
9386	//   "parameters": {
9387	//     "options.requestedPolicyVersion": {
9388	//       "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).",
9389	//       "format": "int32",
9390	//       "location": "query",
9391	//       "type": "integer"
9392	//     },
9393	//     "resource": {
9394	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
9395	//       "location": "path",
9396	//       "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$",
9397	//       "required": true,
9398	//       "type": "string"
9399	//     }
9400	//   },
9401	//   "path": "v1beta2/{+resource}:getIamPolicy",
9402	//   "response": {
9403	//     "$ref": "Policy"
9404	//   },
9405	//   "scopes": [
9406	//     "https://www.googleapis.com/auth/cloud-platform"
9407	//   ]
9408	// }
9409
9410}
9411
9412// method id "dataproc.projects.regions.clusters.injectCredentials":
9413
9414type ProjectsRegionsClustersInjectCredentialsCall struct {
9415	s                        *Service
9416	project                  string
9417	region                   string
9418	cluster                  string
9419	injectcredentialsrequest *InjectCredentialsRequest
9420	urlParams_               gensupport.URLParams
9421	ctx_                     context.Context
9422	header_                  http.Header
9423}
9424
9425// InjectCredentials: Inject encrypted credentials into all of the VMs
9426// in a cluster.The target cluster must be a personal auth cluster
9427// assigned to the user who is issuing the RPC.
9428//
9429// - cluster: The cluster, in the form clusters/.
9430// - project: The ID of the Google Cloud Platform project the cluster
9431//   belongs to, of the form projects/.
9432// - region: The region containing the cluster, of the form regions/.
9433func (r *ProjectsRegionsClustersService) InjectCredentials(project string, region string, cluster string, injectcredentialsrequest *InjectCredentialsRequest) *ProjectsRegionsClustersInjectCredentialsCall {
9434	c := &ProjectsRegionsClustersInjectCredentialsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9435	c.project = project
9436	c.region = region
9437	c.cluster = cluster
9438	c.injectcredentialsrequest = injectcredentialsrequest
9439	return c
9440}
9441
9442// Fields allows partial responses to be retrieved. See
9443// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9444// for more information.
9445func (c *ProjectsRegionsClustersInjectCredentialsCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersInjectCredentialsCall {
9446	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9447	return c
9448}
9449
9450// Context sets the context to be used in this call's Do method. Any
9451// pending HTTP request will be aborted if the provided context is
9452// canceled.
9453func (c *ProjectsRegionsClustersInjectCredentialsCall) Context(ctx context.Context) *ProjectsRegionsClustersInjectCredentialsCall {
9454	c.ctx_ = ctx
9455	return c
9456}
9457
9458// Header returns an http.Header that can be modified by the caller to
9459// add HTTP headers to the request.
9460func (c *ProjectsRegionsClustersInjectCredentialsCall) Header() http.Header {
9461	if c.header_ == nil {
9462		c.header_ = make(http.Header)
9463	}
9464	return c.header_
9465}
9466
9467func (c *ProjectsRegionsClustersInjectCredentialsCall) doRequest(alt string) (*http.Response, error) {
9468	reqHeaders := make(http.Header)
9469	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
9470	for k, v := range c.header_ {
9471		reqHeaders[k] = v
9472	}
9473	reqHeaders.Set("User-Agent", c.s.userAgent())
9474	var body io.Reader = nil
9475	body, err := googleapi.WithoutDataWrapper.JSONReader(c.injectcredentialsrequest)
9476	if err != nil {
9477		return nil, err
9478	}
9479	reqHeaders.Set("Content-Type", "application/json")
9480	c.urlParams_.Set("alt", alt)
9481	c.urlParams_.Set("prettyPrint", "false")
9482	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+project}/{+region}/{+cluster}:injectCredentials")
9483	urls += "?" + c.urlParams_.Encode()
9484	req, err := http.NewRequest("POST", urls, body)
9485	if err != nil {
9486		return nil, err
9487	}
9488	req.Header = reqHeaders
9489	googleapi.Expand(req.URL, map[string]string{
9490		"project": c.project,
9491		"region":  c.region,
9492		"cluster": c.cluster,
9493	})
9494	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9495}
9496
9497// Do executes the "dataproc.projects.regions.clusters.injectCredentials" call.
9498// Exactly one of *Operation or error will be non-nil. Any non-2xx
9499// status code is an error. Response headers are in either
9500// *Operation.ServerResponse.Header or (if a response was returned at
9501// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9502// to check whether the returned error was because
9503// http.StatusNotModified was returned.
9504func (c *ProjectsRegionsClustersInjectCredentialsCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9505	gensupport.SetOptions(c.urlParams_, opts...)
9506	res, err := c.doRequest("json")
9507	if res != nil && res.StatusCode == http.StatusNotModified {
9508		if res.Body != nil {
9509			res.Body.Close()
9510		}
9511		return nil, &googleapi.Error{
9512			Code:   res.StatusCode,
9513			Header: res.Header,
9514		}
9515	}
9516	if err != nil {
9517		return nil, err
9518	}
9519	defer googleapi.CloseBody(res)
9520	if err := googleapi.CheckResponse(res); err != nil {
9521		return nil, err
9522	}
9523	ret := &Operation{
9524		ServerResponse: googleapi.ServerResponse{
9525			Header:         res.Header,
9526			HTTPStatusCode: res.StatusCode,
9527		},
9528	}
9529	target := &ret
9530	if err := gensupport.DecodeResponse(target, res); err != nil {
9531		return nil, err
9532	}
9533	return ret, nil
9534	// {
9535	//   "description": "Inject encrypted credentials into all of the VMs in a cluster.The target cluster must be a personal auth cluster assigned to the user who is issuing the RPC.",
9536	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:injectCredentials",
9537	//   "httpMethod": "POST",
9538	//   "id": "dataproc.projects.regions.clusters.injectCredentials",
9539	//   "parameterOrder": [
9540	//     "project",
9541	//     "region",
9542	//     "cluster"
9543	//   ],
9544	//   "parameters": {
9545	//     "cluster": {
9546	//       "description": "Required. The cluster, in the form clusters/.",
9547	//       "location": "path",
9548	//       "pattern": "^clusters/[^/]+$",
9549	//       "required": true,
9550	//       "type": "string"
9551	//     },
9552	//     "project": {
9553	//       "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to, of the form projects/.",
9554	//       "location": "path",
9555	//       "pattern": "^projects/[^/]+$",
9556	//       "required": true,
9557	//       "type": "string"
9558	//     },
9559	//     "region": {
9560	//       "description": "Required. The region containing the cluster, of the form regions/.",
9561	//       "location": "path",
9562	//       "pattern": "^regions/[^/]+$",
9563	//       "required": true,
9564	//       "type": "string"
9565	//     }
9566	//   },
9567	//   "path": "v1beta2/{+project}/{+region}/{+cluster}:injectCredentials",
9568	//   "request": {
9569	//     "$ref": "InjectCredentialsRequest"
9570	//   },
9571	//   "response": {
9572	//     "$ref": "Operation"
9573	//   },
9574	//   "scopes": [
9575	//     "https://www.googleapis.com/auth/cloud-platform"
9576	//   ]
9577	// }
9578
9579}
9580
9581// method id "dataproc.projects.regions.clusters.list":
9582
9583type ProjectsRegionsClustersListCall struct {
9584	s            *Service
9585	projectId    string
9586	region       string
9587	urlParams_   gensupport.URLParams
9588	ifNoneMatch_ string
9589	ctx_         context.Context
9590	header_      http.Header
9591}
9592
9593// List: Lists all regions/{region}/clusters in a project
9594// alphabetically.
9595//
9596// - projectId: The ID of the Google Cloud Platform project that the
9597//   cluster belongs to.
9598// - region: The Dataproc region in which to handle the request.
9599func (r *ProjectsRegionsClustersService) List(projectId string, region string) *ProjectsRegionsClustersListCall {
9600	c := &ProjectsRegionsClustersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9601	c.projectId = projectId
9602	c.region = region
9603	return c
9604}
9605
9606// Filter sets the optional parameter "filter": A filter constraining
9607// the clusters to list. Filters are case-sensitive and have the
9608// following syntax:field = value AND field = value ...where field is
9609// one of status.state, clusterName, or labels.[KEY], and [KEY] is a
9610// label key. value can be * to match all values. status.state can be
9611// one of the following: ACTIVE, INACTIVE, CREATING, RUNNING, ERROR,
9612// DELETING, or UPDATING. ACTIVE contains the CREATING, UPDATING, and
9613// RUNNING states. INACTIVE contains the DELETING and ERROR states.
9614// clusterName is the name of the cluster provided at creation time.
9615// Only the logical AND operator is supported; space-separated items are
9616// treated as having an implicit AND operator.Example
9617// filter:status.state = ACTIVE AND clusterName = mycluster AND
9618// labels.env = staging AND labels.starred = *
9619func (c *ProjectsRegionsClustersListCall) Filter(filter string) *ProjectsRegionsClustersListCall {
9620	c.urlParams_.Set("filter", filter)
9621	return c
9622}
9623
9624// PageSize sets the optional parameter "pageSize": The standard List
9625// page size.
9626func (c *ProjectsRegionsClustersListCall) PageSize(pageSize int64) *ProjectsRegionsClustersListCall {
9627	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
9628	return c
9629}
9630
9631// PageToken sets the optional parameter "pageToken": The standard List
9632// page token.
9633func (c *ProjectsRegionsClustersListCall) PageToken(pageToken string) *ProjectsRegionsClustersListCall {
9634	c.urlParams_.Set("pageToken", pageToken)
9635	return c
9636}
9637
9638// Fields allows partial responses to be retrieved. See
9639// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9640// for more information.
9641func (c *ProjectsRegionsClustersListCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersListCall {
9642	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9643	return c
9644}
9645
9646// IfNoneMatch sets the optional parameter which makes the operation
9647// fail if the object's ETag matches the given value. This is useful for
9648// getting updates only after the object has changed since the last
9649// request. Use googleapi.IsNotModified to check whether the response
9650// error from Do is the result of In-None-Match.
9651func (c *ProjectsRegionsClustersListCall) IfNoneMatch(entityTag string) *ProjectsRegionsClustersListCall {
9652	c.ifNoneMatch_ = entityTag
9653	return c
9654}
9655
9656// Context sets the context to be used in this call's Do method. Any
9657// pending HTTP request will be aborted if the provided context is
9658// canceled.
9659func (c *ProjectsRegionsClustersListCall) Context(ctx context.Context) *ProjectsRegionsClustersListCall {
9660	c.ctx_ = ctx
9661	return c
9662}
9663
9664// Header returns an http.Header that can be modified by the caller to
9665// add HTTP headers to the request.
9666func (c *ProjectsRegionsClustersListCall) Header() http.Header {
9667	if c.header_ == nil {
9668		c.header_ = make(http.Header)
9669	}
9670	return c.header_
9671}
9672
9673func (c *ProjectsRegionsClustersListCall) doRequest(alt string) (*http.Response, error) {
9674	reqHeaders := make(http.Header)
9675	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
9676	for k, v := range c.header_ {
9677		reqHeaders[k] = v
9678	}
9679	reqHeaders.Set("User-Agent", c.s.userAgent())
9680	if c.ifNoneMatch_ != "" {
9681		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
9682	}
9683	var body io.Reader = nil
9684	c.urlParams_.Set("alt", alt)
9685	c.urlParams_.Set("prettyPrint", "false")
9686	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters")
9687	urls += "?" + c.urlParams_.Encode()
9688	req, err := http.NewRequest("GET", urls, body)
9689	if err != nil {
9690		return nil, err
9691	}
9692	req.Header = reqHeaders
9693	googleapi.Expand(req.URL, map[string]string{
9694		"projectId": c.projectId,
9695		"region":    c.region,
9696	})
9697	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9698}
9699
9700// Do executes the "dataproc.projects.regions.clusters.list" call.
9701// Exactly one of *ListClustersResponse or error will be non-nil. Any
9702// non-2xx status code is an error. Response headers are in either
9703// *ListClustersResponse.ServerResponse.Header or (if a response was
9704// returned at all) in error.(*googleapi.Error).Header. Use
9705// googleapi.IsNotModified to check whether the returned error was
9706// because http.StatusNotModified was returned.
9707func (c *ProjectsRegionsClustersListCall) Do(opts ...googleapi.CallOption) (*ListClustersResponse, error) {
9708	gensupport.SetOptions(c.urlParams_, opts...)
9709	res, err := c.doRequest("json")
9710	if res != nil && res.StatusCode == http.StatusNotModified {
9711		if res.Body != nil {
9712			res.Body.Close()
9713		}
9714		return nil, &googleapi.Error{
9715			Code:   res.StatusCode,
9716			Header: res.Header,
9717		}
9718	}
9719	if err != nil {
9720		return nil, err
9721	}
9722	defer googleapi.CloseBody(res)
9723	if err := googleapi.CheckResponse(res); err != nil {
9724		return nil, err
9725	}
9726	ret := &ListClustersResponse{
9727		ServerResponse: googleapi.ServerResponse{
9728			Header:         res.Header,
9729			HTTPStatusCode: res.StatusCode,
9730		},
9731	}
9732	target := &ret
9733	if err := gensupport.DecodeResponse(target, res); err != nil {
9734		return nil, err
9735	}
9736	return ret, nil
9737	// {
9738	//   "description": "Lists all regions/{region}/clusters in a project alphabetically.",
9739	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters",
9740	//   "httpMethod": "GET",
9741	//   "id": "dataproc.projects.regions.clusters.list",
9742	//   "parameterOrder": [
9743	//     "projectId",
9744	//     "region"
9745	//   ],
9746	//   "parameters": {
9747	//     "filter": {
9748	//       "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 = *",
9749	//       "location": "query",
9750	//       "type": "string"
9751	//     },
9752	//     "pageSize": {
9753	//       "description": "Optional. The standard List page size.",
9754	//       "format": "int32",
9755	//       "location": "query",
9756	//       "type": "integer"
9757	//     },
9758	//     "pageToken": {
9759	//       "description": "Optional. The standard List page token.",
9760	//       "location": "query",
9761	//       "type": "string"
9762	//     },
9763	//     "projectId": {
9764	//       "description": "Required. The ID of the Google Cloud Platform project that the cluster belongs to.",
9765	//       "location": "path",
9766	//       "required": true,
9767	//       "type": "string"
9768	//     },
9769	//     "region": {
9770	//       "description": "Required. The Dataproc region in which to handle the request.",
9771	//       "location": "path",
9772	//       "required": true,
9773	//       "type": "string"
9774	//     }
9775	//   },
9776	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters",
9777	//   "response": {
9778	//     "$ref": "ListClustersResponse"
9779	//   },
9780	//   "scopes": [
9781	//     "https://www.googleapis.com/auth/cloud-platform"
9782	//   ]
9783	// }
9784
9785}
9786
9787// Pages invokes f for each page of results.
9788// A non-nil error returned from f will halt the iteration.
9789// The provided context supersedes any context provided to the Context method.
9790func (c *ProjectsRegionsClustersListCall) Pages(ctx context.Context, f func(*ListClustersResponse) error) error {
9791	c.ctx_ = ctx
9792	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
9793	for {
9794		x, err := c.Do()
9795		if err != nil {
9796			return err
9797		}
9798		if err := f(x); err != nil {
9799			return err
9800		}
9801		if x.NextPageToken == "" {
9802			return nil
9803		}
9804		c.PageToken(x.NextPageToken)
9805	}
9806}
9807
9808// method id "dataproc.projects.regions.clusters.patch":
9809
9810type ProjectsRegionsClustersPatchCall struct {
9811	s           *Service
9812	projectId   string
9813	region      string
9814	clusterName string
9815	cluster     *Cluster
9816	urlParams_  gensupport.URLParams
9817	ctx_        context.Context
9818	header_     http.Header
9819}
9820
9821// Patch: Updates a cluster in a project. The returned
9822// Operation.metadata will be ClusterOperationMetadata
9823// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#clusteroperationmetadata).
9824// The cluster must be in a RUNNING state or an error is returned.
9825//
9826// - clusterName: The cluster name.
9827// - projectId: The ID of the Google Cloud Platform project the cluster
9828//   belongs to.
9829// - region: The Dataproc region in which to handle the request.
9830func (r *ProjectsRegionsClustersService) Patch(projectId string, region string, clusterName string, cluster *Cluster) *ProjectsRegionsClustersPatchCall {
9831	c := &ProjectsRegionsClustersPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
9832	c.projectId = projectId
9833	c.region = region
9834	c.clusterName = clusterName
9835	c.cluster = cluster
9836	return c
9837}
9838
9839// GracefulDecommissionTimeout sets the optional parameter
9840// "gracefulDecommissionTimeout": Timeout for graceful YARN
9841// decomissioning. Graceful decommissioning allows removing nodes from
9842// the cluster without interrupting jobs in progress. Timeout specifies
9843// how long to wait for jobs in progress to finish before forcefully
9844// removing nodes (and potentially interrupting jobs). Default timeout
9845// is 0 (for forceful decommission), and the maximum allowed timeout is
9846// 1 day (see JSON representation of Duration
9847// (https://developers.google.com/protocol-buffers/docs/proto3#json)).Only
9848// supported on Dataproc image versions 1.2 and higher.
9849func (c *ProjectsRegionsClustersPatchCall) GracefulDecommissionTimeout(gracefulDecommissionTimeout string) *ProjectsRegionsClustersPatchCall {
9850	c.urlParams_.Set("gracefulDecommissionTimeout", gracefulDecommissionTimeout)
9851	return c
9852}
9853
9854// RequestId sets the optional parameter "requestId": A unique id used
9855// to identify the request. If the server receives two
9856// UpdateClusterRequest
9857// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#google.cloud.dataproc.v1beta2.UpdateClusterRequest)s
9858// with the same id, then the second request will be ignored and the
9859// first google.longrunning.Operation created and stored in the backend
9860// is returned.It is recommended to always set this value to a UUID
9861// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The id
9862// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
9863// and hyphens (-). The maximum length is 40 characters.
9864func (c *ProjectsRegionsClustersPatchCall) RequestId(requestId string) *ProjectsRegionsClustersPatchCall {
9865	c.urlParams_.Set("requestId", requestId)
9866	return c
9867}
9868
9869// UpdateMask sets the optional parameter "updateMask": Required.
9870// Specifies the path, relative to Cluster, of the field to update. For
9871// example, to change the number of workers in a cluster to 5, the
9872// update_mask parameter would be specified as
9873// config.worker_config.num_instances, and the PATCH request body would
9874// specify the new value, as follows: { "config":{ "workerConfig":{
9875// "numInstances":"5" } } } Similarly, to change the number of
9876// preemptible workers in a cluster to 5, the update_mask parameter
9877// would be config.secondary_worker_config.num_instances, and the PATCH
9878// request body would be set as follows: { "config":{
9879// "secondaryWorkerConfig":{ "numInstances":"5" } } } *Note:* currently
9880// only the following fields can be updated: *Mask* *Purpose* labels
9881// Updates labels config.worker_config.num_instances Resize primary
9882// worker group config.secondary_worker_config.num_instances Resize
9883// secondary worker group config.lifecycle_config.auto_delete_ttl Reset
9884// MAX TTL duration config.lifecycle_config.auto_delete_time Update MAX
9885// TTL deletion timestamp config.lifecycle_config.idle_delete_ttl Update
9886// Idle TTL duration config.autoscaling_config.policy_uri Use, stop
9887// using, or change autoscaling policies
9888func (c *ProjectsRegionsClustersPatchCall) UpdateMask(updateMask string) *ProjectsRegionsClustersPatchCall {
9889	c.urlParams_.Set("updateMask", updateMask)
9890	return c
9891}
9892
9893// Fields allows partial responses to be retrieved. See
9894// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
9895// for more information.
9896func (c *ProjectsRegionsClustersPatchCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersPatchCall {
9897	c.urlParams_.Set("fields", googleapi.CombineFields(s))
9898	return c
9899}
9900
9901// Context sets the context to be used in this call's Do method. Any
9902// pending HTTP request will be aborted if the provided context is
9903// canceled.
9904func (c *ProjectsRegionsClustersPatchCall) Context(ctx context.Context) *ProjectsRegionsClustersPatchCall {
9905	c.ctx_ = ctx
9906	return c
9907}
9908
9909// Header returns an http.Header that can be modified by the caller to
9910// add HTTP headers to the request.
9911func (c *ProjectsRegionsClustersPatchCall) Header() http.Header {
9912	if c.header_ == nil {
9913		c.header_ = make(http.Header)
9914	}
9915	return c.header_
9916}
9917
9918func (c *ProjectsRegionsClustersPatchCall) doRequest(alt string) (*http.Response, error) {
9919	reqHeaders := make(http.Header)
9920	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
9921	for k, v := range c.header_ {
9922		reqHeaders[k] = v
9923	}
9924	reqHeaders.Set("User-Agent", c.s.userAgent())
9925	var body io.Reader = nil
9926	body, err := googleapi.WithoutDataWrapper.JSONReader(c.cluster)
9927	if err != nil {
9928		return nil, err
9929	}
9930	reqHeaders.Set("Content-Type", "application/json")
9931	c.urlParams_.Set("alt", alt)
9932	c.urlParams_.Set("prettyPrint", "false")
9933	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}")
9934	urls += "?" + c.urlParams_.Encode()
9935	req, err := http.NewRequest("PATCH", urls, body)
9936	if err != nil {
9937		return nil, err
9938	}
9939	req.Header = reqHeaders
9940	googleapi.Expand(req.URL, map[string]string{
9941		"projectId":   c.projectId,
9942		"region":      c.region,
9943		"clusterName": c.clusterName,
9944	})
9945	return gensupport.SendRequest(c.ctx_, c.s.client, req)
9946}
9947
9948// Do executes the "dataproc.projects.regions.clusters.patch" call.
9949// Exactly one of *Operation or error will be non-nil. Any non-2xx
9950// status code is an error. Response headers are in either
9951// *Operation.ServerResponse.Header or (if a response was returned at
9952// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
9953// to check whether the returned error was because
9954// http.StatusNotModified was returned.
9955func (c *ProjectsRegionsClustersPatchCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
9956	gensupport.SetOptions(c.urlParams_, opts...)
9957	res, err := c.doRequest("json")
9958	if res != nil && res.StatusCode == http.StatusNotModified {
9959		if res.Body != nil {
9960			res.Body.Close()
9961		}
9962		return nil, &googleapi.Error{
9963			Code:   res.StatusCode,
9964			Header: res.Header,
9965		}
9966	}
9967	if err != nil {
9968		return nil, err
9969	}
9970	defer googleapi.CloseBody(res)
9971	if err := googleapi.CheckResponse(res); err != nil {
9972		return nil, err
9973	}
9974	ret := &Operation{
9975		ServerResponse: googleapi.ServerResponse{
9976			Header:         res.Header,
9977			HTTPStatusCode: res.StatusCode,
9978		},
9979	}
9980	target := &ret
9981	if err := gensupport.DecodeResponse(target, res); err != nil {
9982		return nil, err
9983	}
9984	return ret, nil
9985	// {
9986	//   "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). The cluster must be in a RUNNING state or an error is returned.",
9987	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
9988	//   "httpMethod": "PATCH",
9989	//   "id": "dataproc.projects.regions.clusters.patch",
9990	//   "parameterOrder": [
9991	//     "projectId",
9992	//     "region",
9993	//     "clusterName"
9994	//   ],
9995	//   "parameters": {
9996	//     "clusterName": {
9997	//       "description": "Required. The cluster name.",
9998	//       "location": "path",
9999	//       "required": true,
10000	//       "type": "string"
10001	//     },
10002	//     "gracefulDecommissionTimeout": {
10003	//       "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.",
10004	//       "format": "google-duration",
10005	//       "location": "query",
10006	//       "type": "string"
10007	//     },
10008	//     "projectId": {
10009	//       "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.",
10010	//       "location": "path",
10011	//       "required": true,
10012	//       "type": "string"
10013	//     },
10014	//     "region": {
10015	//       "description": "Required. The Dataproc region in which to handle the request.",
10016	//       "location": "path",
10017	//       "required": true,
10018	//       "type": "string"
10019	//     },
10020	//     "requestId": {
10021	//       "description": "Optional. A unique id used to identify the request. If the server receives two UpdateClusterRequest (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#google.cloud.dataproc.v1beta2.UpdateClusterRequest)s 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.",
10022	//       "location": "query",
10023	//       "type": "string"
10024	//     },
10025	//     "updateMask": {
10026	//       "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 ",
10027	//       "format": "google-fieldmask",
10028	//       "location": "query",
10029	//       "type": "string"
10030	//     }
10031	//   },
10032	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}",
10033	//   "request": {
10034	//     "$ref": "Cluster"
10035	//   },
10036	//   "response": {
10037	//     "$ref": "Operation"
10038	//   },
10039	//   "scopes": [
10040	//     "https://www.googleapis.com/auth/cloud-platform"
10041	//   ]
10042	// }
10043
10044}
10045
10046// method id "dataproc.projects.regions.clusters.setIamPolicy":
10047
10048type ProjectsRegionsClustersSetIamPolicyCall struct {
10049	s                   *Service
10050	resource            string
10051	setiampolicyrequest *SetIamPolicyRequest
10052	urlParams_          gensupport.URLParams
10053	ctx_                context.Context
10054	header_             http.Header
10055}
10056
10057// SetIamPolicy: Sets the access control policy on the specified
10058// resource. Replaces any existing policy.Can return NOT_FOUND,
10059// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
10060//
10061// - resource: REQUIRED: The resource for which the policy is being
10062//   specified. See the operation documentation for the appropriate
10063//   value for this field.
10064func (r *ProjectsRegionsClustersService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsClustersSetIamPolicyCall {
10065	c := &ProjectsRegionsClustersSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10066	c.resource = resource
10067	c.setiampolicyrequest = setiampolicyrequest
10068	return c
10069}
10070
10071// Fields allows partial responses to be retrieved. See
10072// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10073// for more information.
10074func (c *ProjectsRegionsClustersSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersSetIamPolicyCall {
10075	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10076	return c
10077}
10078
10079// Context sets the context to be used in this call's Do method. Any
10080// pending HTTP request will be aborted if the provided context is
10081// canceled.
10082func (c *ProjectsRegionsClustersSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsClustersSetIamPolicyCall {
10083	c.ctx_ = ctx
10084	return c
10085}
10086
10087// Header returns an http.Header that can be modified by the caller to
10088// add HTTP headers to the request.
10089func (c *ProjectsRegionsClustersSetIamPolicyCall) Header() http.Header {
10090	if c.header_ == nil {
10091		c.header_ = make(http.Header)
10092	}
10093	return c.header_
10094}
10095
10096func (c *ProjectsRegionsClustersSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
10097	reqHeaders := make(http.Header)
10098	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
10099	for k, v := range c.header_ {
10100		reqHeaders[k] = v
10101	}
10102	reqHeaders.Set("User-Agent", c.s.userAgent())
10103	var body io.Reader = nil
10104	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
10105	if err != nil {
10106		return nil, err
10107	}
10108	reqHeaders.Set("Content-Type", "application/json")
10109	c.urlParams_.Set("alt", alt)
10110	c.urlParams_.Set("prettyPrint", "false")
10111	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
10112	urls += "?" + c.urlParams_.Encode()
10113	req, err := http.NewRequest("POST", urls, body)
10114	if err != nil {
10115		return nil, err
10116	}
10117	req.Header = reqHeaders
10118	googleapi.Expand(req.URL, map[string]string{
10119		"resource": c.resource,
10120	})
10121	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10122}
10123
10124// Do executes the "dataproc.projects.regions.clusters.setIamPolicy" call.
10125// Exactly one of *Policy or error will be non-nil. Any non-2xx status
10126// code is an error. Response headers are in either
10127// *Policy.ServerResponse.Header or (if a response was returned at all)
10128// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10129// check whether the returned error was because http.StatusNotModified
10130// was returned.
10131func (c *ProjectsRegionsClustersSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
10132	gensupport.SetOptions(c.urlParams_, opts...)
10133	res, err := c.doRequest("json")
10134	if res != nil && res.StatusCode == http.StatusNotModified {
10135		if res.Body != nil {
10136			res.Body.Close()
10137		}
10138		return nil, &googleapi.Error{
10139			Code:   res.StatusCode,
10140			Header: res.Header,
10141		}
10142	}
10143	if err != nil {
10144		return nil, err
10145	}
10146	defer googleapi.CloseBody(res)
10147	if err := googleapi.CheckResponse(res); err != nil {
10148		return nil, err
10149	}
10150	ret := &Policy{
10151		ServerResponse: googleapi.ServerResponse{
10152			Header:         res.Header,
10153			HTTPStatusCode: res.StatusCode,
10154		},
10155	}
10156	target := &ret
10157	if err := gensupport.DecodeResponse(target, res); err != nil {
10158		return nil, err
10159	}
10160	return ret, nil
10161	// {
10162	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
10163	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:setIamPolicy",
10164	//   "httpMethod": "POST",
10165	//   "id": "dataproc.projects.regions.clusters.setIamPolicy",
10166	//   "parameterOrder": [
10167	//     "resource"
10168	//   ],
10169	//   "parameters": {
10170	//     "resource": {
10171	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
10172	//       "location": "path",
10173	//       "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$",
10174	//       "required": true,
10175	//       "type": "string"
10176	//     }
10177	//   },
10178	//   "path": "v1beta2/{+resource}:setIamPolicy",
10179	//   "request": {
10180	//     "$ref": "SetIamPolicyRequest"
10181	//   },
10182	//   "response": {
10183	//     "$ref": "Policy"
10184	//   },
10185	//   "scopes": [
10186	//     "https://www.googleapis.com/auth/cloud-platform"
10187	//   ]
10188	// }
10189
10190}
10191
10192// method id "dataproc.projects.regions.clusters.start":
10193
10194type ProjectsRegionsClustersStartCall struct {
10195	s                   *Service
10196	projectId           string
10197	region              string
10198	clusterName         string
10199	startclusterrequest *StartClusterRequest
10200	urlParams_          gensupport.URLParams
10201	ctx_                context.Context
10202	header_             http.Header
10203}
10204
10205// Start: Starts a cluster in a project.
10206//
10207// - clusterName: The cluster name.
10208// - projectId: The ID of the Google Cloud Platform project the cluster
10209//   belongs to.
10210// - region: The Dataproc region in which to handle the request.
10211func (r *ProjectsRegionsClustersService) Start(projectId string, region string, clusterName string, startclusterrequest *StartClusterRequest) *ProjectsRegionsClustersStartCall {
10212	c := &ProjectsRegionsClustersStartCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10213	c.projectId = projectId
10214	c.region = region
10215	c.clusterName = clusterName
10216	c.startclusterrequest = startclusterrequest
10217	return c
10218}
10219
10220// Fields allows partial responses to be retrieved. See
10221// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10222// for more information.
10223func (c *ProjectsRegionsClustersStartCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersStartCall {
10224	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10225	return c
10226}
10227
10228// Context sets the context to be used in this call's Do method. Any
10229// pending HTTP request will be aborted if the provided context is
10230// canceled.
10231func (c *ProjectsRegionsClustersStartCall) Context(ctx context.Context) *ProjectsRegionsClustersStartCall {
10232	c.ctx_ = ctx
10233	return c
10234}
10235
10236// Header returns an http.Header that can be modified by the caller to
10237// add HTTP headers to the request.
10238func (c *ProjectsRegionsClustersStartCall) Header() http.Header {
10239	if c.header_ == nil {
10240		c.header_ = make(http.Header)
10241	}
10242	return c.header_
10243}
10244
10245func (c *ProjectsRegionsClustersStartCall) doRequest(alt string) (*http.Response, error) {
10246	reqHeaders := make(http.Header)
10247	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
10248	for k, v := range c.header_ {
10249		reqHeaders[k] = v
10250	}
10251	reqHeaders.Set("User-Agent", c.s.userAgent())
10252	var body io.Reader = nil
10253	body, err := googleapi.WithoutDataWrapper.JSONReader(c.startclusterrequest)
10254	if err != nil {
10255		return nil, err
10256	}
10257	reqHeaders.Set("Content-Type", "application/json")
10258	c.urlParams_.Set("alt", alt)
10259	c.urlParams_.Set("prettyPrint", "false")
10260	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:start")
10261	urls += "?" + c.urlParams_.Encode()
10262	req, err := http.NewRequest("POST", urls, body)
10263	if err != nil {
10264		return nil, err
10265	}
10266	req.Header = reqHeaders
10267	googleapi.Expand(req.URL, map[string]string{
10268		"projectId":   c.projectId,
10269		"region":      c.region,
10270		"clusterName": c.clusterName,
10271	})
10272	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10273}
10274
10275// Do executes the "dataproc.projects.regions.clusters.start" call.
10276// Exactly one of *Operation or error will be non-nil. Any non-2xx
10277// status code is an error. Response headers are in either
10278// *Operation.ServerResponse.Header or (if a response was returned at
10279// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10280// to check whether the returned error was because
10281// http.StatusNotModified was returned.
10282func (c *ProjectsRegionsClustersStartCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10283	gensupport.SetOptions(c.urlParams_, opts...)
10284	res, err := c.doRequest("json")
10285	if res != nil && res.StatusCode == http.StatusNotModified {
10286		if res.Body != nil {
10287			res.Body.Close()
10288		}
10289		return nil, &googleapi.Error{
10290			Code:   res.StatusCode,
10291			Header: res.Header,
10292		}
10293	}
10294	if err != nil {
10295		return nil, err
10296	}
10297	defer googleapi.CloseBody(res)
10298	if err := googleapi.CheckResponse(res); err != nil {
10299		return nil, err
10300	}
10301	ret := &Operation{
10302		ServerResponse: googleapi.ServerResponse{
10303			Header:         res.Header,
10304			HTTPStatusCode: res.StatusCode,
10305		},
10306	}
10307	target := &ret
10308	if err := gensupport.DecodeResponse(target, res); err != nil {
10309		return nil, err
10310	}
10311	return ret, nil
10312	// {
10313	//   "description": "Starts a cluster in a project.",
10314	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:start",
10315	//   "httpMethod": "POST",
10316	//   "id": "dataproc.projects.regions.clusters.start",
10317	//   "parameterOrder": [
10318	//     "projectId",
10319	//     "region",
10320	//     "clusterName"
10321	//   ],
10322	//   "parameters": {
10323	//     "clusterName": {
10324	//       "description": "Required. The cluster name.",
10325	//       "location": "path",
10326	//       "required": true,
10327	//       "type": "string"
10328	//     },
10329	//     "projectId": {
10330	//       "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.",
10331	//       "location": "path",
10332	//       "required": true,
10333	//       "type": "string"
10334	//     },
10335	//     "region": {
10336	//       "description": "Required. The Dataproc region in which to handle the request.",
10337	//       "location": "path",
10338	//       "required": true,
10339	//       "type": "string"
10340	//     }
10341	//   },
10342	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:start",
10343	//   "request": {
10344	//     "$ref": "StartClusterRequest"
10345	//   },
10346	//   "response": {
10347	//     "$ref": "Operation"
10348	//   },
10349	//   "scopes": [
10350	//     "https://www.googleapis.com/auth/cloud-platform"
10351	//   ]
10352	// }
10353
10354}
10355
10356// method id "dataproc.projects.regions.clusters.stop":
10357
10358type ProjectsRegionsClustersStopCall struct {
10359	s                  *Service
10360	projectId          string
10361	region             string
10362	clusterName        string
10363	stopclusterrequest *StopClusterRequest
10364	urlParams_         gensupport.URLParams
10365	ctx_               context.Context
10366	header_            http.Header
10367}
10368
10369// Stop: Stops a cluster in a project.
10370//
10371// - clusterName: The cluster name.
10372// - projectId: The ID of the Google Cloud Platform project the cluster
10373//   belongs to.
10374// - region: The Dataproc region in which to handle the request.
10375func (r *ProjectsRegionsClustersService) Stop(projectId string, region string, clusterName string, stopclusterrequest *StopClusterRequest) *ProjectsRegionsClustersStopCall {
10376	c := &ProjectsRegionsClustersStopCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10377	c.projectId = projectId
10378	c.region = region
10379	c.clusterName = clusterName
10380	c.stopclusterrequest = stopclusterrequest
10381	return c
10382}
10383
10384// Fields allows partial responses to be retrieved. See
10385// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10386// for more information.
10387func (c *ProjectsRegionsClustersStopCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersStopCall {
10388	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10389	return c
10390}
10391
10392// Context sets the context to be used in this call's Do method. Any
10393// pending HTTP request will be aborted if the provided context is
10394// canceled.
10395func (c *ProjectsRegionsClustersStopCall) Context(ctx context.Context) *ProjectsRegionsClustersStopCall {
10396	c.ctx_ = ctx
10397	return c
10398}
10399
10400// Header returns an http.Header that can be modified by the caller to
10401// add HTTP headers to the request.
10402func (c *ProjectsRegionsClustersStopCall) Header() http.Header {
10403	if c.header_ == nil {
10404		c.header_ = make(http.Header)
10405	}
10406	return c.header_
10407}
10408
10409func (c *ProjectsRegionsClustersStopCall) doRequest(alt string) (*http.Response, error) {
10410	reqHeaders := make(http.Header)
10411	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
10412	for k, v := range c.header_ {
10413		reqHeaders[k] = v
10414	}
10415	reqHeaders.Set("User-Agent", c.s.userAgent())
10416	var body io.Reader = nil
10417	body, err := googleapi.WithoutDataWrapper.JSONReader(c.stopclusterrequest)
10418	if err != nil {
10419		return nil, err
10420	}
10421	reqHeaders.Set("Content-Type", "application/json")
10422	c.urlParams_.Set("alt", alt)
10423	c.urlParams_.Set("prettyPrint", "false")
10424	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:stop")
10425	urls += "?" + c.urlParams_.Encode()
10426	req, err := http.NewRequest("POST", urls, body)
10427	if err != nil {
10428		return nil, err
10429	}
10430	req.Header = reqHeaders
10431	googleapi.Expand(req.URL, map[string]string{
10432		"projectId":   c.projectId,
10433		"region":      c.region,
10434		"clusterName": c.clusterName,
10435	})
10436	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10437}
10438
10439// Do executes the "dataproc.projects.regions.clusters.stop" call.
10440// Exactly one of *Operation or error will be non-nil. Any non-2xx
10441// status code is an error. Response headers are in either
10442// *Operation.ServerResponse.Header or (if a response was returned at
10443// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
10444// to check whether the returned error was because
10445// http.StatusNotModified was returned.
10446func (c *ProjectsRegionsClustersStopCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
10447	gensupport.SetOptions(c.urlParams_, opts...)
10448	res, err := c.doRequest("json")
10449	if res != nil && res.StatusCode == http.StatusNotModified {
10450		if res.Body != nil {
10451			res.Body.Close()
10452		}
10453		return nil, &googleapi.Error{
10454			Code:   res.StatusCode,
10455			Header: res.Header,
10456		}
10457	}
10458	if err != nil {
10459		return nil, err
10460	}
10461	defer googleapi.CloseBody(res)
10462	if err := googleapi.CheckResponse(res); err != nil {
10463		return nil, err
10464	}
10465	ret := &Operation{
10466		ServerResponse: googleapi.ServerResponse{
10467			Header:         res.Header,
10468			HTTPStatusCode: res.StatusCode,
10469		},
10470	}
10471	target := &ret
10472	if err := gensupport.DecodeResponse(target, res); err != nil {
10473		return nil, err
10474	}
10475	return ret, nil
10476	// {
10477	//   "description": "Stops a cluster in a project.",
10478	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:stop",
10479	//   "httpMethod": "POST",
10480	//   "id": "dataproc.projects.regions.clusters.stop",
10481	//   "parameterOrder": [
10482	//     "projectId",
10483	//     "region",
10484	//     "clusterName"
10485	//   ],
10486	//   "parameters": {
10487	//     "clusterName": {
10488	//       "description": "Required. The cluster name.",
10489	//       "location": "path",
10490	//       "required": true,
10491	//       "type": "string"
10492	//     },
10493	//     "projectId": {
10494	//       "description": "Required. The ID of the Google Cloud Platform project the cluster belongs to.",
10495	//       "location": "path",
10496	//       "required": true,
10497	//       "type": "string"
10498	//     },
10499	//     "region": {
10500	//       "description": "Required. The Dataproc region in which to handle the request.",
10501	//       "location": "path",
10502	//       "required": true,
10503	//       "type": "string"
10504	//     }
10505	//   },
10506	//   "path": "v1beta2/projects/{projectId}/regions/{region}/clusters/{clusterName}:stop",
10507	//   "request": {
10508	//     "$ref": "StopClusterRequest"
10509	//   },
10510	//   "response": {
10511	//     "$ref": "Operation"
10512	//   },
10513	//   "scopes": [
10514	//     "https://www.googleapis.com/auth/cloud-platform"
10515	//   ]
10516	// }
10517
10518}
10519
10520// method id "dataproc.projects.regions.clusters.testIamPermissions":
10521
10522type ProjectsRegionsClustersTestIamPermissionsCall struct {
10523	s                         *Service
10524	resource                  string
10525	testiampermissionsrequest *TestIamPermissionsRequest
10526	urlParams_                gensupport.URLParams
10527	ctx_                      context.Context
10528	header_                   http.Header
10529}
10530
10531// TestIamPermissions: Returns permissions that a caller has on the
10532// specified resource. If the resource does not exist, this will return
10533// an empty set of permissions, not a NOT_FOUND error.Note: This
10534// operation is designed to be used for building permission-aware UIs
10535// and command-line tools, not for authorization checking. This
10536// operation may "fail open" without warning.
10537//
10538// - resource: REQUIRED: The resource for which the policy detail is
10539//   being requested. See the operation documentation for the
10540//   appropriate value for this field.
10541func (r *ProjectsRegionsClustersService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsClustersTestIamPermissionsCall {
10542	c := &ProjectsRegionsClustersTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10543	c.resource = resource
10544	c.testiampermissionsrequest = testiampermissionsrequest
10545	return c
10546}
10547
10548// Fields allows partial responses to be retrieved. See
10549// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10550// for more information.
10551func (c *ProjectsRegionsClustersTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsClustersTestIamPermissionsCall {
10552	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10553	return c
10554}
10555
10556// Context sets the context to be used in this call's Do method. Any
10557// pending HTTP request will be aborted if the provided context is
10558// canceled.
10559func (c *ProjectsRegionsClustersTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsClustersTestIamPermissionsCall {
10560	c.ctx_ = ctx
10561	return c
10562}
10563
10564// Header returns an http.Header that can be modified by the caller to
10565// add HTTP headers to the request.
10566func (c *ProjectsRegionsClustersTestIamPermissionsCall) Header() http.Header {
10567	if c.header_ == nil {
10568		c.header_ = make(http.Header)
10569	}
10570	return c.header_
10571}
10572
10573func (c *ProjectsRegionsClustersTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
10574	reqHeaders := make(http.Header)
10575	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
10576	for k, v := range c.header_ {
10577		reqHeaders[k] = v
10578	}
10579	reqHeaders.Set("User-Agent", c.s.userAgent())
10580	var body io.Reader = nil
10581	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
10582	if err != nil {
10583		return nil, err
10584	}
10585	reqHeaders.Set("Content-Type", "application/json")
10586	c.urlParams_.Set("alt", alt)
10587	c.urlParams_.Set("prettyPrint", "false")
10588	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
10589	urls += "?" + c.urlParams_.Encode()
10590	req, err := http.NewRequest("POST", urls, body)
10591	if err != nil {
10592		return nil, err
10593	}
10594	req.Header = reqHeaders
10595	googleapi.Expand(req.URL, map[string]string{
10596		"resource": c.resource,
10597	})
10598	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10599}
10600
10601// Do executes the "dataproc.projects.regions.clusters.testIamPermissions" call.
10602// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
10603// Any non-2xx status code is an error. Response headers are in either
10604// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
10605// was returned at all) in error.(*googleapi.Error).Header. Use
10606// googleapi.IsNotModified to check whether the returned error was
10607// because http.StatusNotModified was returned.
10608func (c *ProjectsRegionsClustersTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
10609	gensupport.SetOptions(c.urlParams_, opts...)
10610	res, err := c.doRequest("json")
10611	if res != nil && res.StatusCode == http.StatusNotModified {
10612		if res.Body != nil {
10613			res.Body.Close()
10614		}
10615		return nil, &googleapi.Error{
10616			Code:   res.StatusCode,
10617			Header: res.Header,
10618		}
10619	}
10620	if err != nil {
10621		return nil, err
10622	}
10623	defer googleapi.CloseBody(res)
10624	if err := googleapi.CheckResponse(res); err != nil {
10625		return nil, err
10626	}
10627	ret := &TestIamPermissionsResponse{
10628		ServerResponse: googleapi.ServerResponse{
10629			Header:         res.Header,
10630			HTTPStatusCode: res.StatusCode,
10631		},
10632	}
10633	target := &ret
10634	if err := gensupport.DecodeResponse(target, res); err != nil {
10635		return nil, err
10636	}
10637	return ret, nil
10638	// {
10639	//   "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.",
10640	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/clusters/{clustersId}:testIamPermissions",
10641	//   "httpMethod": "POST",
10642	//   "id": "dataproc.projects.regions.clusters.testIamPermissions",
10643	//   "parameterOrder": [
10644	//     "resource"
10645	//   ],
10646	//   "parameters": {
10647	//     "resource": {
10648	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
10649	//       "location": "path",
10650	//       "pattern": "^projects/[^/]+/regions/[^/]+/clusters/[^/]+$",
10651	//       "required": true,
10652	//       "type": "string"
10653	//     }
10654	//   },
10655	//   "path": "v1beta2/{+resource}:testIamPermissions",
10656	//   "request": {
10657	//     "$ref": "TestIamPermissionsRequest"
10658	//   },
10659	//   "response": {
10660	//     "$ref": "TestIamPermissionsResponse"
10661	//   },
10662	//   "scopes": [
10663	//     "https://www.googleapis.com/auth/cloud-platform"
10664	//   ]
10665	// }
10666
10667}
10668
10669// method id "dataproc.projects.regions.jobs.cancel":
10670
10671type ProjectsRegionsJobsCancelCall struct {
10672	s                *Service
10673	projectId        string
10674	region           string
10675	jobId            string
10676	canceljobrequest *CancelJobRequest
10677	urlParams_       gensupport.URLParams
10678	ctx_             context.Context
10679	header_          http.Header
10680}
10681
10682// Cancel: Starts a job cancellation request. To access the job resource
10683// after cancellation, call regions/{region}/jobs.list
10684// (https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/list)
10685// or regions/{region}/jobs.get
10686// (https://cloud.google.com/dataproc/docs/reference/rest/v1beta2/projects.regions.jobs/get).
10687//
10688// - jobId: The job ID.
10689// - projectId: The ID of the Google Cloud Platform project that the job
10690//   belongs to.
10691// - region: The Dataproc region in which to handle the request.
10692func (r *ProjectsRegionsJobsService) Cancel(projectId string, region string, jobId string, canceljobrequest *CancelJobRequest) *ProjectsRegionsJobsCancelCall {
10693	c := &ProjectsRegionsJobsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10694	c.projectId = projectId
10695	c.region = region
10696	c.jobId = jobId
10697	c.canceljobrequest = canceljobrequest
10698	return c
10699}
10700
10701// Fields allows partial responses to be retrieved. See
10702// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10703// for more information.
10704func (c *ProjectsRegionsJobsCancelCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsCancelCall {
10705	c.urlParams_.Set("fields", googleapi.CombineFields(s))
10706	return c
10707}
10708
10709// Context sets the context to be used in this call's Do method. Any
10710// pending HTTP request will be aborted if the provided context is
10711// canceled.
10712func (c *ProjectsRegionsJobsCancelCall) Context(ctx context.Context) *ProjectsRegionsJobsCancelCall {
10713	c.ctx_ = ctx
10714	return c
10715}
10716
10717// Header returns an http.Header that can be modified by the caller to
10718// add HTTP headers to the request.
10719func (c *ProjectsRegionsJobsCancelCall) Header() http.Header {
10720	if c.header_ == nil {
10721		c.header_ = make(http.Header)
10722	}
10723	return c.header_
10724}
10725
10726func (c *ProjectsRegionsJobsCancelCall) doRequest(alt string) (*http.Response, error) {
10727	reqHeaders := make(http.Header)
10728	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
10729	for k, v := range c.header_ {
10730		reqHeaders[k] = v
10731	}
10732	reqHeaders.Set("User-Agent", c.s.userAgent())
10733	var body io.Reader = nil
10734	body, err := googleapi.WithoutDataWrapper.JSONReader(c.canceljobrequest)
10735	if err != nil {
10736		return nil, err
10737	}
10738	reqHeaders.Set("Content-Type", "application/json")
10739	c.urlParams_.Set("alt", alt)
10740	c.urlParams_.Set("prettyPrint", "false")
10741	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel")
10742	urls += "?" + c.urlParams_.Encode()
10743	req, err := http.NewRequest("POST", urls, body)
10744	if err != nil {
10745		return nil, err
10746	}
10747	req.Header = reqHeaders
10748	googleapi.Expand(req.URL, map[string]string{
10749		"projectId": c.projectId,
10750		"region":    c.region,
10751		"jobId":     c.jobId,
10752	})
10753	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10754}
10755
10756// Do executes the "dataproc.projects.regions.jobs.cancel" call.
10757// Exactly one of *Job or error will be non-nil. Any non-2xx status code
10758// is an error. Response headers are in either
10759// *Job.ServerResponse.Header or (if a response was returned at all) in
10760// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
10761// whether the returned error was because http.StatusNotModified was
10762// returned.
10763func (c *ProjectsRegionsJobsCancelCall) Do(opts ...googleapi.CallOption) (*Job, error) {
10764	gensupport.SetOptions(c.urlParams_, opts...)
10765	res, err := c.doRequest("json")
10766	if res != nil && res.StatusCode == http.StatusNotModified {
10767		if res.Body != nil {
10768			res.Body.Close()
10769		}
10770		return nil, &googleapi.Error{
10771			Code:   res.StatusCode,
10772			Header: res.Header,
10773		}
10774	}
10775	if err != nil {
10776		return nil, err
10777	}
10778	defer googleapi.CloseBody(res)
10779	if err := googleapi.CheckResponse(res); err != nil {
10780		return nil, err
10781	}
10782	ret := &Job{
10783		ServerResponse: googleapi.ServerResponse{
10784			Header:         res.Header,
10785			HTTPStatusCode: res.StatusCode,
10786		},
10787	}
10788	target := &ret
10789	if err := gensupport.DecodeResponse(target, res); err != nil {
10790		return nil, err
10791	}
10792	return ret, nil
10793	// {
10794	//   "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).",
10795	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel",
10796	//   "httpMethod": "POST",
10797	//   "id": "dataproc.projects.regions.jobs.cancel",
10798	//   "parameterOrder": [
10799	//     "projectId",
10800	//     "region",
10801	//     "jobId"
10802	//   ],
10803	//   "parameters": {
10804	//     "jobId": {
10805	//       "description": "Required. The job ID.",
10806	//       "location": "path",
10807	//       "required": true,
10808	//       "type": "string"
10809	//     },
10810	//     "projectId": {
10811	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
10812	//       "location": "path",
10813	//       "required": true,
10814	//       "type": "string"
10815	//     },
10816	//     "region": {
10817	//       "description": "Required. The Dataproc region in which to handle the request.",
10818	//       "location": "path",
10819	//       "required": true,
10820	//       "type": "string"
10821	//     }
10822	//   },
10823	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}:cancel",
10824	//   "request": {
10825	//     "$ref": "CancelJobRequest"
10826	//   },
10827	//   "response": {
10828	//     "$ref": "Job"
10829	//   },
10830	//   "scopes": [
10831	//     "https://www.googleapis.com/auth/cloud-platform"
10832	//   ]
10833	// }
10834
10835}
10836
10837// method id "dataproc.projects.regions.jobs.delete":
10838
10839type ProjectsRegionsJobsDeleteCall struct {
10840	s          *Service
10841	projectId  string
10842	region     string
10843	jobId      string
10844	urlParams_ gensupport.URLParams
10845	ctx_       context.Context
10846	header_    http.Header
10847}
10848
10849// Delete: Deletes the job from the project. If the job is active, the
10850// delete fails, and the response returns FAILED_PRECONDITION.
10851//
10852// - jobId: The job ID.
10853// - projectId: The ID of the Google Cloud Platform project that the job
10854//   belongs to.
10855// - region: The Dataproc region in which to handle the request.
10856func (r *ProjectsRegionsJobsService) Delete(projectId string, region string, jobId string) *ProjectsRegionsJobsDeleteCall {
10857	c := &ProjectsRegionsJobsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
10858	c.projectId = projectId
10859	c.region = region
10860	c.jobId = jobId
10861	return c
10862}
10863
10864// Fields allows partial responses to be retrieved. See
10865// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
10866// for more information.
10867func (c *ProjectsRegionsJobsDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsDeleteCall {
10868	c.urlParams_.Set("fields", googleapi.CombineFields(s))
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 *ProjectsRegionsJobsDeleteCall) Context(ctx context.Context) *ProjectsRegionsJobsDeleteCall {
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 *ProjectsRegionsJobsDeleteCall) Header() http.Header {
10883	if c.header_ == nil {
10884		c.header_ = make(http.Header)
10885	}
10886	return c.header_
10887}
10888
10889func (c *ProjectsRegionsJobsDeleteCall) doRequest(alt string) (*http.Response, error) {
10890	reqHeaders := make(http.Header)
10891	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
10892	for k, v := range c.header_ {
10893		reqHeaders[k] = v
10894	}
10895	reqHeaders.Set("User-Agent", c.s.userAgent())
10896	var body io.Reader = nil
10897	c.urlParams_.Set("alt", alt)
10898	c.urlParams_.Set("prettyPrint", "false")
10899	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}")
10900	urls += "?" + c.urlParams_.Encode()
10901	req, err := http.NewRequest("DELETE", urls, body)
10902	if err != nil {
10903		return nil, err
10904	}
10905	req.Header = reqHeaders
10906	googleapi.Expand(req.URL, map[string]string{
10907		"projectId": c.projectId,
10908		"region":    c.region,
10909		"jobId":     c.jobId,
10910	})
10911	return gensupport.SendRequest(c.ctx_, c.s.client, req)
10912}
10913
10914// Do executes the "dataproc.projects.regions.jobs.delete" call.
10915// Exactly one of *Empty or error will be non-nil. Any non-2xx status
10916// code is an error. Response headers are in either
10917// *Empty.ServerResponse.Header or (if a response was returned at all)
10918// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
10919// check whether the returned error was because http.StatusNotModified
10920// was returned.
10921func (c *ProjectsRegionsJobsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
10922	gensupport.SetOptions(c.urlParams_, opts...)
10923	res, err := c.doRequest("json")
10924	if res != nil && res.StatusCode == http.StatusNotModified {
10925		if res.Body != nil {
10926			res.Body.Close()
10927		}
10928		return nil, &googleapi.Error{
10929			Code:   res.StatusCode,
10930			Header: res.Header,
10931		}
10932	}
10933	if err != nil {
10934		return nil, err
10935	}
10936	defer googleapi.CloseBody(res)
10937	if err := googleapi.CheckResponse(res); err != nil {
10938		return nil, err
10939	}
10940	ret := &Empty{
10941		ServerResponse: googleapi.ServerResponse{
10942			Header:         res.Header,
10943			HTTPStatusCode: res.StatusCode,
10944		},
10945	}
10946	target := &ret
10947	if err := gensupport.DecodeResponse(target, res); err != nil {
10948		return nil, err
10949	}
10950	return ret, nil
10951	// {
10952	//   "description": "Deletes the job from the project. If the job is active, the delete fails, and the response returns FAILED_PRECONDITION.",
10953	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
10954	//   "httpMethod": "DELETE",
10955	//   "id": "dataproc.projects.regions.jobs.delete",
10956	//   "parameterOrder": [
10957	//     "projectId",
10958	//     "region",
10959	//     "jobId"
10960	//   ],
10961	//   "parameters": {
10962	//     "jobId": {
10963	//       "description": "Required. The job ID.",
10964	//       "location": "path",
10965	//       "required": true,
10966	//       "type": "string"
10967	//     },
10968	//     "projectId": {
10969	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
10970	//       "location": "path",
10971	//       "required": true,
10972	//       "type": "string"
10973	//     },
10974	//     "region": {
10975	//       "description": "Required. The Dataproc region in which to handle the request.",
10976	//       "location": "path",
10977	//       "required": true,
10978	//       "type": "string"
10979	//     }
10980	//   },
10981	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
10982	//   "response": {
10983	//     "$ref": "Empty"
10984	//   },
10985	//   "scopes": [
10986	//     "https://www.googleapis.com/auth/cloud-platform"
10987	//   ]
10988	// }
10989
10990}
10991
10992// method id "dataproc.projects.regions.jobs.get":
10993
10994type ProjectsRegionsJobsGetCall struct {
10995	s            *Service
10996	projectId    string
10997	region       string
10998	jobId        string
10999	urlParams_   gensupport.URLParams
11000	ifNoneMatch_ string
11001	ctx_         context.Context
11002	header_      http.Header
11003}
11004
11005// Get: Gets the resource representation for a job in a project.
11006//
11007// - jobId: The job ID.
11008// - projectId: The ID of the Google Cloud Platform project that the job
11009//   belongs to.
11010// - region: The Dataproc region in which to handle the request.
11011func (r *ProjectsRegionsJobsService) Get(projectId string, region string, jobId string) *ProjectsRegionsJobsGetCall {
11012	c := &ProjectsRegionsJobsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11013	c.projectId = projectId
11014	c.region = region
11015	c.jobId = jobId
11016	return c
11017}
11018
11019// Fields allows partial responses to be retrieved. See
11020// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11021// for more information.
11022func (c *ProjectsRegionsJobsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsGetCall {
11023	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11024	return c
11025}
11026
11027// IfNoneMatch sets the optional parameter which makes the operation
11028// fail if the object's ETag matches the given value. This is useful for
11029// getting updates only after the object has changed since the last
11030// request. Use googleapi.IsNotModified to check whether the response
11031// error from Do is the result of In-None-Match.
11032func (c *ProjectsRegionsJobsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsGetCall {
11033	c.ifNoneMatch_ = entityTag
11034	return c
11035}
11036
11037// Context sets the context to be used in this call's Do method. Any
11038// pending HTTP request will be aborted if the provided context is
11039// canceled.
11040func (c *ProjectsRegionsJobsGetCall) Context(ctx context.Context) *ProjectsRegionsJobsGetCall {
11041	c.ctx_ = ctx
11042	return c
11043}
11044
11045// Header returns an http.Header that can be modified by the caller to
11046// add HTTP headers to the request.
11047func (c *ProjectsRegionsJobsGetCall) Header() http.Header {
11048	if c.header_ == nil {
11049		c.header_ = make(http.Header)
11050	}
11051	return c.header_
11052}
11053
11054func (c *ProjectsRegionsJobsGetCall) doRequest(alt string) (*http.Response, error) {
11055	reqHeaders := make(http.Header)
11056	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
11057	for k, v := range c.header_ {
11058		reqHeaders[k] = v
11059	}
11060	reqHeaders.Set("User-Agent", c.s.userAgent())
11061	if c.ifNoneMatch_ != "" {
11062		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11063	}
11064	var body io.Reader = nil
11065	c.urlParams_.Set("alt", alt)
11066	c.urlParams_.Set("prettyPrint", "false")
11067	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}")
11068	urls += "?" + c.urlParams_.Encode()
11069	req, err := http.NewRequest("GET", urls, body)
11070	if err != nil {
11071		return nil, err
11072	}
11073	req.Header = reqHeaders
11074	googleapi.Expand(req.URL, map[string]string{
11075		"projectId": c.projectId,
11076		"region":    c.region,
11077		"jobId":     c.jobId,
11078	})
11079	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11080}
11081
11082// Do executes the "dataproc.projects.regions.jobs.get" call.
11083// Exactly one of *Job or error will be non-nil. Any non-2xx status code
11084// is an error. Response headers are in either
11085// *Job.ServerResponse.Header or (if a response was returned at all) in
11086// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11087// whether the returned error was because http.StatusNotModified was
11088// returned.
11089func (c *ProjectsRegionsJobsGetCall) Do(opts ...googleapi.CallOption) (*Job, error) {
11090	gensupport.SetOptions(c.urlParams_, opts...)
11091	res, err := c.doRequest("json")
11092	if res != nil && res.StatusCode == http.StatusNotModified {
11093		if res.Body != nil {
11094			res.Body.Close()
11095		}
11096		return nil, &googleapi.Error{
11097			Code:   res.StatusCode,
11098			Header: res.Header,
11099		}
11100	}
11101	if err != nil {
11102		return nil, err
11103	}
11104	defer googleapi.CloseBody(res)
11105	if err := googleapi.CheckResponse(res); err != nil {
11106		return nil, err
11107	}
11108	ret := &Job{
11109		ServerResponse: googleapi.ServerResponse{
11110			Header:         res.Header,
11111			HTTPStatusCode: res.StatusCode,
11112		},
11113	}
11114	target := &ret
11115	if err := gensupport.DecodeResponse(target, res); err != nil {
11116		return nil, err
11117	}
11118	return ret, nil
11119	// {
11120	//   "description": "Gets the resource representation for a job in a project.",
11121	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
11122	//   "httpMethod": "GET",
11123	//   "id": "dataproc.projects.regions.jobs.get",
11124	//   "parameterOrder": [
11125	//     "projectId",
11126	//     "region",
11127	//     "jobId"
11128	//   ],
11129	//   "parameters": {
11130	//     "jobId": {
11131	//       "description": "Required. The job ID.",
11132	//       "location": "path",
11133	//       "required": true,
11134	//       "type": "string"
11135	//     },
11136	//     "projectId": {
11137	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
11138	//       "location": "path",
11139	//       "required": true,
11140	//       "type": "string"
11141	//     },
11142	//     "region": {
11143	//       "description": "Required. The Dataproc region in which to handle the request.",
11144	//       "location": "path",
11145	//       "required": true,
11146	//       "type": "string"
11147	//     }
11148	//   },
11149	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
11150	//   "response": {
11151	//     "$ref": "Job"
11152	//   },
11153	//   "scopes": [
11154	//     "https://www.googleapis.com/auth/cloud-platform"
11155	//   ]
11156	// }
11157
11158}
11159
11160// method id "dataproc.projects.regions.jobs.getIamPolicy":
11161
11162type ProjectsRegionsJobsGetIamPolicyCall struct {
11163	s            *Service
11164	resource     string
11165	urlParams_   gensupport.URLParams
11166	ifNoneMatch_ string
11167	ctx_         context.Context
11168	header_      http.Header
11169}
11170
11171// GetIamPolicy: Gets the access control policy for a resource. Returns
11172// an empty policy if the resource exists and does not have a policy
11173// set.
11174//
11175// - resource: REQUIRED: The resource for which the policy is being
11176//   requested. See the operation documentation for the appropriate
11177//   value for this field.
11178func (r *ProjectsRegionsJobsService) GetIamPolicy(resource string) *ProjectsRegionsJobsGetIamPolicyCall {
11179	c := &ProjectsRegionsJobsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11180	c.resource = resource
11181	return c
11182}
11183
11184// OptionsRequestedPolicyVersion sets the optional parameter
11185// "options.requestedPolicyVersion": The policy format version to be
11186// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
11187// value will be rejected.Requests for policies with any conditional
11188// bindings must specify version 3. Policies without any conditional
11189// bindings may specify any valid value or leave the field unset.To
11190// learn which resources support conditions in their IAM policies, see
11191// the IAM documentation
11192// (https://cloud.google.com/iam/help/conditions/resource-policies).
11193func (c *ProjectsRegionsJobsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsRegionsJobsGetIamPolicyCall {
11194	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
11195	return c
11196}
11197
11198// Fields allows partial responses to be retrieved. See
11199// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11200// for more information.
11201func (c *ProjectsRegionsJobsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsGetIamPolicyCall {
11202	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11203	return c
11204}
11205
11206// IfNoneMatch sets the optional parameter which makes the operation
11207// fail if the object's ETag matches the given value. This is useful for
11208// getting updates only after the object has changed since the last
11209// request. Use googleapi.IsNotModified to check whether the response
11210// error from Do is the result of In-None-Match.
11211func (c *ProjectsRegionsJobsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsGetIamPolicyCall {
11212	c.ifNoneMatch_ = entityTag
11213	return c
11214}
11215
11216// Context sets the context to be used in this call's Do method. Any
11217// pending HTTP request will be aborted if the provided context is
11218// canceled.
11219func (c *ProjectsRegionsJobsGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsJobsGetIamPolicyCall {
11220	c.ctx_ = ctx
11221	return c
11222}
11223
11224// Header returns an http.Header that can be modified by the caller to
11225// add HTTP headers to the request.
11226func (c *ProjectsRegionsJobsGetIamPolicyCall) Header() http.Header {
11227	if c.header_ == nil {
11228		c.header_ = make(http.Header)
11229	}
11230	return c.header_
11231}
11232
11233func (c *ProjectsRegionsJobsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11234	reqHeaders := make(http.Header)
11235	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
11236	for k, v := range c.header_ {
11237		reqHeaders[k] = v
11238	}
11239	reqHeaders.Set("User-Agent", c.s.userAgent())
11240	if c.ifNoneMatch_ != "" {
11241		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11242	}
11243	var body io.Reader = nil
11244	c.urlParams_.Set("alt", alt)
11245	c.urlParams_.Set("prettyPrint", "false")
11246	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
11247	urls += "?" + c.urlParams_.Encode()
11248	req, err := http.NewRequest("GET", urls, body)
11249	if err != nil {
11250		return nil, err
11251	}
11252	req.Header = reqHeaders
11253	googleapi.Expand(req.URL, map[string]string{
11254		"resource": c.resource,
11255	})
11256	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11257}
11258
11259// Do executes the "dataproc.projects.regions.jobs.getIamPolicy" call.
11260// Exactly one of *Policy or error will be non-nil. Any non-2xx status
11261// code is an error. Response headers are in either
11262// *Policy.ServerResponse.Header or (if a response was returned at all)
11263// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11264// check whether the returned error was because http.StatusNotModified
11265// was returned.
11266func (c *ProjectsRegionsJobsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11267	gensupport.SetOptions(c.urlParams_, opts...)
11268	res, err := c.doRequest("json")
11269	if res != nil && res.StatusCode == http.StatusNotModified {
11270		if res.Body != nil {
11271			res.Body.Close()
11272		}
11273		return nil, &googleapi.Error{
11274			Code:   res.StatusCode,
11275			Header: res.Header,
11276		}
11277	}
11278	if err != nil {
11279		return nil, err
11280	}
11281	defer googleapi.CloseBody(res)
11282	if err := googleapi.CheckResponse(res); err != nil {
11283		return nil, err
11284	}
11285	ret := &Policy{
11286		ServerResponse: googleapi.ServerResponse{
11287			Header:         res.Header,
11288			HTTPStatusCode: res.StatusCode,
11289		},
11290	}
11291	target := &ret
11292	if err := gensupport.DecodeResponse(target, res); err != nil {
11293		return nil, err
11294	}
11295	return ret, nil
11296	// {
11297	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
11298	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:getIamPolicy",
11299	//   "httpMethod": "GET",
11300	//   "id": "dataproc.projects.regions.jobs.getIamPolicy",
11301	//   "parameterOrder": [
11302	//     "resource"
11303	//   ],
11304	//   "parameters": {
11305	//     "options.requestedPolicyVersion": {
11306	//       "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).",
11307	//       "format": "int32",
11308	//       "location": "query",
11309	//       "type": "integer"
11310	//     },
11311	//     "resource": {
11312	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
11313	//       "location": "path",
11314	//       "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$",
11315	//       "required": true,
11316	//       "type": "string"
11317	//     }
11318	//   },
11319	//   "path": "v1beta2/{+resource}:getIamPolicy",
11320	//   "response": {
11321	//     "$ref": "Policy"
11322	//   },
11323	//   "scopes": [
11324	//     "https://www.googleapis.com/auth/cloud-platform"
11325	//   ]
11326	// }
11327
11328}
11329
11330// method id "dataproc.projects.regions.jobs.list":
11331
11332type ProjectsRegionsJobsListCall struct {
11333	s            *Service
11334	projectId    string
11335	region       string
11336	urlParams_   gensupport.URLParams
11337	ifNoneMatch_ string
11338	ctx_         context.Context
11339	header_      http.Header
11340}
11341
11342// List: Lists regions/{region}/jobs in a project.
11343//
11344// - projectId: The ID of the Google Cloud Platform project that the job
11345//   belongs to.
11346// - region: The Dataproc region in which to handle the request.
11347func (r *ProjectsRegionsJobsService) List(projectId string, region string) *ProjectsRegionsJobsListCall {
11348	c := &ProjectsRegionsJobsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11349	c.projectId = projectId
11350	c.region = region
11351	return c
11352}
11353
11354// ClusterName sets the optional parameter "clusterName": If set, the
11355// returned jobs list includes only jobs that were submitted to the
11356// named cluster.
11357func (c *ProjectsRegionsJobsListCall) ClusterName(clusterName string) *ProjectsRegionsJobsListCall {
11358	c.urlParams_.Set("clusterName", clusterName)
11359	return c
11360}
11361
11362// Filter sets the optional parameter "filter": A filter constraining
11363// the jobs to list. Filters are case-sensitive and have the following
11364// syntax:field = value AND field = value ...where field is status.state
11365// or labels.[KEY], and [KEY] is a label key. value can be * to match
11366// all values. status.state can be either ACTIVE or NON_ACTIVE. Only the
11367// logical AND operator is supported; space-separated items are treated
11368// as having an implicit AND operator.Example filter:status.state =
11369// ACTIVE AND labels.env = staging AND labels.starred = *
11370func (c *ProjectsRegionsJobsListCall) Filter(filter string) *ProjectsRegionsJobsListCall {
11371	c.urlParams_.Set("filter", filter)
11372	return c
11373}
11374
11375// JobStateMatcher sets the optional parameter "jobStateMatcher":
11376// Specifies enumerated categories of jobs to list. (default = match ALL
11377// jobs).If filter is provided, jobStateMatcher will be ignored.
11378//
11379// Possible values:
11380//   "ALL" - Match all jobs, regardless of state.
11381//   "ACTIVE" - Only match jobs in non-terminal states: PENDING,
11382// RUNNING, or CANCEL_PENDING.
11383//   "NON_ACTIVE" - Only match jobs in terminal states: CANCELLED, DONE,
11384// or ERROR.
11385func (c *ProjectsRegionsJobsListCall) JobStateMatcher(jobStateMatcher string) *ProjectsRegionsJobsListCall {
11386	c.urlParams_.Set("jobStateMatcher", jobStateMatcher)
11387	return c
11388}
11389
11390// PageSize sets the optional parameter "pageSize": The number of
11391// results to return in each response.
11392func (c *ProjectsRegionsJobsListCall) PageSize(pageSize int64) *ProjectsRegionsJobsListCall {
11393	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
11394	return c
11395}
11396
11397// PageToken sets the optional parameter "pageToken": The page token,
11398// returned by a previous call, to request the next page of results.
11399func (c *ProjectsRegionsJobsListCall) PageToken(pageToken string) *ProjectsRegionsJobsListCall {
11400	c.urlParams_.Set("pageToken", pageToken)
11401	return c
11402}
11403
11404// Fields allows partial responses to be retrieved. See
11405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11406// for more information.
11407func (c *ProjectsRegionsJobsListCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsListCall {
11408	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11409	return c
11410}
11411
11412// IfNoneMatch sets the optional parameter which makes the operation
11413// fail if the object's ETag matches the given value. This is useful for
11414// getting updates only after the object has changed since the last
11415// request. Use googleapi.IsNotModified to check whether the response
11416// error from Do is the result of In-None-Match.
11417func (c *ProjectsRegionsJobsListCall) IfNoneMatch(entityTag string) *ProjectsRegionsJobsListCall {
11418	c.ifNoneMatch_ = entityTag
11419	return c
11420}
11421
11422// Context sets the context to be used in this call's Do method. Any
11423// pending HTTP request will be aborted if the provided context is
11424// canceled.
11425func (c *ProjectsRegionsJobsListCall) Context(ctx context.Context) *ProjectsRegionsJobsListCall {
11426	c.ctx_ = ctx
11427	return c
11428}
11429
11430// Header returns an http.Header that can be modified by the caller to
11431// add HTTP headers to the request.
11432func (c *ProjectsRegionsJobsListCall) Header() http.Header {
11433	if c.header_ == nil {
11434		c.header_ = make(http.Header)
11435	}
11436	return c.header_
11437}
11438
11439func (c *ProjectsRegionsJobsListCall) doRequest(alt string) (*http.Response, error) {
11440	reqHeaders := make(http.Header)
11441	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
11442	for k, v := range c.header_ {
11443		reqHeaders[k] = v
11444	}
11445	reqHeaders.Set("User-Agent", c.s.userAgent())
11446	if c.ifNoneMatch_ != "" {
11447		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
11448	}
11449	var body io.Reader = nil
11450	c.urlParams_.Set("alt", alt)
11451	c.urlParams_.Set("prettyPrint", "false")
11452	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs")
11453	urls += "?" + c.urlParams_.Encode()
11454	req, err := http.NewRequest("GET", urls, body)
11455	if err != nil {
11456		return nil, err
11457	}
11458	req.Header = reqHeaders
11459	googleapi.Expand(req.URL, map[string]string{
11460		"projectId": c.projectId,
11461		"region":    c.region,
11462	})
11463	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11464}
11465
11466// Do executes the "dataproc.projects.regions.jobs.list" call.
11467// Exactly one of *ListJobsResponse or error will be non-nil. Any
11468// non-2xx status code is an error. Response headers are in either
11469// *ListJobsResponse.ServerResponse.Header or (if a response was
11470// returned at all) in error.(*googleapi.Error).Header. Use
11471// googleapi.IsNotModified to check whether the returned error was
11472// because http.StatusNotModified was returned.
11473func (c *ProjectsRegionsJobsListCall) Do(opts ...googleapi.CallOption) (*ListJobsResponse, error) {
11474	gensupport.SetOptions(c.urlParams_, opts...)
11475	res, err := c.doRequest("json")
11476	if res != nil && res.StatusCode == http.StatusNotModified {
11477		if res.Body != nil {
11478			res.Body.Close()
11479		}
11480		return nil, &googleapi.Error{
11481			Code:   res.StatusCode,
11482			Header: res.Header,
11483		}
11484	}
11485	if err != nil {
11486		return nil, err
11487	}
11488	defer googleapi.CloseBody(res)
11489	if err := googleapi.CheckResponse(res); err != nil {
11490		return nil, err
11491	}
11492	ret := &ListJobsResponse{
11493		ServerResponse: googleapi.ServerResponse{
11494			Header:         res.Header,
11495			HTTPStatusCode: res.StatusCode,
11496		},
11497	}
11498	target := &ret
11499	if err := gensupport.DecodeResponse(target, res); err != nil {
11500		return nil, err
11501	}
11502	return ret, nil
11503	// {
11504	//   "description": "Lists regions/{region}/jobs in a project.",
11505	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs",
11506	//   "httpMethod": "GET",
11507	//   "id": "dataproc.projects.regions.jobs.list",
11508	//   "parameterOrder": [
11509	//     "projectId",
11510	//     "region"
11511	//   ],
11512	//   "parameters": {
11513	//     "clusterName": {
11514	//       "description": "Optional. If set, the returned jobs list includes only jobs that were submitted to the named cluster.",
11515	//       "location": "query",
11516	//       "type": "string"
11517	//     },
11518	//     "filter": {
11519	//       "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 = *",
11520	//       "location": "query",
11521	//       "type": "string"
11522	//     },
11523	//     "jobStateMatcher": {
11524	//       "description": "Optional. Specifies enumerated categories of jobs to list. (default = match ALL jobs).If filter is provided, jobStateMatcher will be ignored.",
11525	//       "enum": [
11526	//         "ALL",
11527	//         "ACTIVE",
11528	//         "NON_ACTIVE"
11529	//       ],
11530	//       "enumDescriptions": [
11531	//         "Match all jobs, regardless of state.",
11532	//         "Only match jobs in non-terminal states: PENDING, RUNNING, or CANCEL_PENDING.",
11533	//         "Only match jobs in terminal states: CANCELLED, DONE, or ERROR."
11534	//       ],
11535	//       "location": "query",
11536	//       "type": "string"
11537	//     },
11538	//     "pageSize": {
11539	//       "description": "Optional. The number of results to return in each response.",
11540	//       "format": "int32",
11541	//       "location": "query",
11542	//       "type": "integer"
11543	//     },
11544	//     "pageToken": {
11545	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
11546	//       "location": "query",
11547	//       "type": "string"
11548	//     },
11549	//     "projectId": {
11550	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
11551	//       "location": "path",
11552	//       "required": true,
11553	//       "type": "string"
11554	//     },
11555	//     "region": {
11556	//       "description": "Required. The Dataproc region in which to handle the request.",
11557	//       "location": "path",
11558	//       "required": true,
11559	//       "type": "string"
11560	//     }
11561	//   },
11562	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs",
11563	//   "response": {
11564	//     "$ref": "ListJobsResponse"
11565	//   },
11566	//   "scopes": [
11567	//     "https://www.googleapis.com/auth/cloud-platform"
11568	//   ]
11569	// }
11570
11571}
11572
11573// Pages invokes f for each page of results.
11574// A non-nil error returned from f will halt the iteration.
11575// The provided context supersedes any context provided to the Context method.
11576func (c *ProjectsRegionsJobsListCall) Pages(ctx context.Context, f func(*ListJobsResponse) error) error {
11577	c.ctx_ = ctx
11578	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
11579	for {
11580		x, err := c.Do()
11581		if err != nil {
11582			return err
11583		}
11584		if err := f(x); err != nil {
11585			return err
11586		}
11587		if x.NextPageToken == "" {
11588			return nil
11589		}
11590		c.PageToken(x.NextPageToken)
11591	}
11592}
11593
11594// method id "dataproc.projects.regions.jobs.patch":
11595
11596type ProjectsRegionsJobsPatchCall struct {
11597	s          *Service
11598	projectId  string
11599	region     string
11600	jobId      string
11601	job        *Job
11602	urlParams_ gensupport.URLParams
11603	ctx_       context.Context
11604	header_    http.Header
11605}
11606
11607// Patch: Updates a job in a project.
11608//
11609// - jobId: The job ID.
11610// - projectId: The ID of the Google Cloud Platform project that the job
11611//   belongs to.
11612// - region: The Dataproc region in which to handle the request.
11613func (r *ProjectsRegionsJobsService) Patch(projectId string, region string, jobId string, job *Job) *ProjectsRegionsJobsPatchCall {
11614	c := &ProjectsRegionsJobsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11615	c.projectId = projectId
11616	c.region = region
11617	c.jobId = jobId
11618	c.job = job
11619	return c
11620}
11621
11622// UpdateMask sets the optional parameter "updateMask": Required.
11623// Specifies the path, relative to Job, of the field to update. For
11624// example, to update the labels of a Job the update_mask parameter
11625// would be specified as labels, and the PATCH request body would
11626// specify the new value. *Note:* Currently, labels is the only field
11627// that can be updated.
11628func (c *ProjectsRegionsJobsPatchCall) UpdateMask(updateMask string) *ProjectsRegionsJobsPatchCall {
11629	c.urlParams_.Set("updateMask", updateMask)
11630	return c
11631}
11632
11633// Fields allows partial responses to be retrieved. See
11634// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11635// for more information.
11636func (c *ProjectsRegionsJobsPatchCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsPatchCall {
11637	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11638	return c
11639}
11640
11641// Context sets the context to be used in this call's Do method. Any
11642// pending HTTP request will be aborted if the provided context is
11643// canceled.
11644func (c *ProjectsRegionsJobsPatchCall) Context(ctx context.Context) *ProjectsRegionsJobsPatchCall {
11645	c.ctx_ = ctx
11646	return c
11647}
11648
11649// Header returns an http.Header that can be modified by the caller to
11650// add HTTP headers to the request.
11651func (c *ProjectsRegionsJobsPatchCall) Header() http.Header {
11652	if c.header_ == nil {
11653		c.header_ = make(http.Header)
11654	}
11655	return c.header_
11656}
11657
11658func (c *ProjectsRegionsJobsPatchCall) doRequest(alt string) (*http.Response, error) {
11659	reqHeaders := make(http.Header)
11660	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
11661	for k, v := range c.header_ {
11662		reqHeaders[k] = v
11663	}
11664	reqHeaders.Set("User-Agent", c.s.userAgent())
11665	var body io.Reader = nil
11666	body, err := googleapi.WithoutDataWrapper.JSONReader(c.job)
11667	if err != nil {
11668		return nil, err
11669	}
11670	reqHeaders.Set("Content-Type", "application/json")
11671	c.urlParams_.Set("alt", alt)
11672	c.urlParams_.Set("prettyPrint", "false")
11673	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}")
11674	urls += "?" + c.urlParams_.Encode()
11675	req, err := http.NewRequest("PATCH", urls, body)
11676	if err != nil {
11677		return nil, err
11678	}
11679	req.Header = reqHeaders
11680	googleapi.Expand(req.URL, map[string]string{
11681		"projectId": c.projectId,
11682		"region":    c.region,
11683		"jobId":     c.jobId,
11684	})
11685	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11686}
11687
11688// Do executes the "dataproc.projects.regions.jobs.patch" call.
11689// Exactly one of *Job or error will be non-nil. Any non-2xx status code
11690// is an error. Response headers are in either
11691// *Job.ServerResponse.Header or (if a response was returned at all) in
11692// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
11693// whether the returned error was because http.StatusNotModified was
11694// returned.
11695func (c *ProjectsRegionsJobsPatchCall) Do(opts ...googleapi.CallOption) (*Job, error) {
11696	gensupport.SetOptions(c.urlParams_, opts...)
11697	res, err := c.doRequest("json")
11698	if res != nil && res.StatusCode == http.StatusNotModified {
11699		if res.Body != nil {
11700			res.Body.Close()
11701		}
11702		return nil, &googleapi.Error{
11703			Code:   res.StatusCode,
11704			Header: res.Header,
11705		}
11706	}
11707	if err != nil {
11708		return nil, err
11709	}
11710	defer googleapi.CloseBody(res)
11711	if err := googleapi.CheckResponse(res); err != nil {
11712		return nil, err
11713	}
11714	ret := &Job{
11715		ServerResponse: googleapi.ServerResponse{
11716			Header:         res.Header,
11717			HTTPStatusCode: res.StatusCode,
11718		},
11719	}
11720	target := &ret
11721	if err := gensupport.DecodeResponse(target, res); err != nil {
11722		return nil, err
11723	}
11724	return ret, nil
11725	// {
11726	//   "description": "Updates a job in a project.",
11727	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
11728	//   "httpMethod": "PATCH",
11729	//   "id": "dataproc.projects.regions.jobs.patch",
11730	//   "parameterOrder": [
11731	//     "projectId",
11732	//     "region",
11733	//     "jobId"
11734	//   ],
11735	//   "parameters": {
11736	//     "jobId": {
11737	//       "description": "Required. The job ID.",
11738	//       "location": "path",
11739	//       "required": true,
11740	//       "type": "string"
11741	//     },
11742	//     "projectId": {
11743	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
11744	//       "location": "path",
11745	//       "required": true,
11746	//       "type": "string"
11747	//     },
11748	//     "region": {
11749	//       "description": "Required. The Dataproc region in which to handle the request.",
11750	//       "location": "path",
11751	//       "required": true,
11752	//       "type": "string"
11753	//     },
11754	//     "updateMask": {
11755	//       "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.",
11756	//       "format": "google-fieldmask",
11757	//       "location": "query",
11758	//       "type": "string"
11759	//     }
11760	//   },
11761	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs/{jobId}",
11762	//   "request": {
11763	//     "$ref": "Job"
11764	//   },
11765	//   "response": {
11766	//     "$ref": "Job"
11767	//   },
11768	//   "scopes": [
11769	//     "https://www.googleapis.com/auth/cloud-platform"
11770	//   ]
11771	// }
11772
11773}
11774
11775// method id "dataproc.projects.regions.jobs.setIamPolicy":
11776
11777type ProjectsRegionsJobsSetIamPolicyCall struct {
11778	s                   *Service
11779	resource            string
11780	setiampolicyrequest *SetIamPolicyRequest
11781	urlParams_          gensupport.URLParams
11782	ctx_                context.Context
11783	header_             http.Header
11784}
11785
11786// SetIamPolicy: Sets the access control policy on the specified
11787// resource. Replaces any existing policy.Can return NOT_FOUND,
11788// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
11789//
11790// - resource: REQUIRED: The resource for which the policy is being
11791//   specified. See the operation documentation for the appropriate
11792//   value for this field.
11793func (r *ProjectsRegionsJobsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsJobsSetIamPolicyCall {
11794	c := &ProjectsRegionsJobsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11795	c.resource = resource
11796	c.setiampolicyrequest = setiampolicyrequest
11797	return c
11798}
11799
11800// Fields allows partial responses to be retrieved. See
11801// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11802// for more information.
11803func (c *ProjectsRegionsJobsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSetIamPolicyCall {
11804	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11805	return c
11806}
11807
11808// Context sets the context to be used in this call's Do method. Any
11809// pending HTTP request will be aborted if the provided context is
11810// canceled.
11811func (c *ProjectsRegionsJobsSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsJobsSetIamPolicyCall {
11812	c.ctx_ = ctx
11813	return c
11814}
11815
11816// Header returns an http.Header that can be modified by the caller to
11817// add HTTP headers to the request.
11818func (c *ProjectsRegionsJobsSetIamPolicyCall) Header() http.Header {
11819	if c.header_ == nil {
11820		c.header_ = make(http.Header)
11821	}
11822	return c.header_
11823}
11824
11825func (c *ProjectsRegionsJobsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
11826	reqHeaders := make(http.Header)
11827	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
11828	for k, v := range c.header_ {
11829		reqHeaders[k] = v
11830	}
11831	reqHeaders.Set("User-Agent", c.s.userAgent())
11832	var body io.Reader = nil
11833	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
11834	if err != nil {
11835		return nil, err
11836	}
11837	reqHeaders.Set("Content-Type", "application/json")
11838	c.urlParams_.Set("alt", alt)
11839	c.urlParams_.Set("prettyPrint", "false")
11840	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
11841	urls += "?" + c.urlParams_.Encode()
11842	req, err := http.NewRequest("POST", urls, body)
11843	if err != nil {
11844		return nil, err
11845	}
11846	req.Header = reqHeaders
11847	googleapi.Expand(req.URL, map[string]string{
11848		"resource": c.resource,
11849	})
11850	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11851}
11852
11853// Do executes the "dataproc.projects.regions.jobs.setIamPolicy" call.
11854// Exactly one of *Policy or error will be non-nil. Any non-2xx status
11855// code is an error. Response headers are in either
11856// *Policy.ServerResponse.Header or (if a response was returned at all)
11857// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
11858// check whether the returned error was because http.StatusNotModified
11859// was returned.
11860func (c *ProjectsRegionsJobsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
11861	gensupport.SetOptions(c.urlParams_, opts...)
11862	res, err := c.doRequest("json")
11863	if res != nil && res.StatusCode == http.StatusNotModified {
11864		if res.Body != nil {
11865			res.Body.Close()
11866		}
11867		return nil, &googleapi.Error{
11868			Code:   res.StatusCode,
11869			Header: res.Header,
11870		}
11871	}
11872	if err != nil {
11873		return nil, err
11874	}
11875	defer googleapi.CloseBody(res)
11876	if err := googleapi.CheckResponse(res); err != nil {
11877		return nil, err
11878	}
11879	ret := &Policy{
11880		ServerResponse: googleapi.ServerResponse{
11881			Header:         res.Header,
11882			HTTPStatusCode: res.StatusCode,
11883		},
11884	}
11885	target := &ret
11886	if err := gensupport.DecodeResponse(target, res); err != nil {
11887		return nil, err
11888	}
11889	return ret, nil
11890	// {
11891	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
11892	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:setIamPolicy",
11893	//   "httpMethod": "POST",
11894	//   "id": "dataproc.projects.regions.jobs.setIamPolicy",
11895	//   "parameterOrder": [
11896	//     "resource"
11897	//   ],
11898	//   "parameters": {
11899	//     "resource": {
11900	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
11901	//       "location": "path",
11902	//       "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$",
11903	//       "required": true,
11904	//       "type": "string"
11905	//     }
11906	//   },
11907	//   "path": "v1beta2/{+resource}:setIamPolicy",
11908	//   "request": {
11909	//     "$ref": "SetIamPolicyRequest"
11910	//   },
11911	//   "response": {
11912	//     "$ref": "Policy"
11913	//   },
11914	//   "scopes": [
11915	//     "https://www.googleapis.com/auth/cloud-platform"
11916	//   ]
11917	// }
11918
11919}
11920
11921// method id "dataproc.projects.regions.jobs.submit":
11922
11923type ProjectsRegionsJobsSubmitCall struct {
11924	s                *Service
11925	projectId        string
11926	region           string
11927	submitjobrequest *SubmitJobRequest
11928	urlParams_       gensupport.URLParams
11929	ctx_             context.Context
11930	header_          http.Header
11931}
11932
11933// Submit: Submits a job to a cluster.
11934//
11935// - projectId: The ID of the Google Cloud Platform project that the job
11936//   belongs to.
11937// - region: The Dataproc region in which to handle the request.
11938func (r *ProjectsRegionsJobsService) Submit(projectId string, region string, submitjobrequest *SubmitJobRequest) *ProjectsRegionsJobsSubmitCall {
11939	c := &ProjectsRegionsJobsSubmitCall{s: r.s, urlParams_: make(gensupport.URLParams)}
11940	c.projectId = projectId
11941	c.region = region
11942	c.submitjobrequest = submitjobrequest
11943	return c
11944}
11945
11946// Fields allows partial responses to be retrieved. See
11947// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
11948// for more information.
11949func (c *ProjectsRegionsJobsSubmitCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSubmitCall {
11950	c.urlParams_.Set("fields", googleapi.CombineFields(s))
11951	return c
11952}
11953
11954// Context sets the context to be used in this call's Do method. Any
11955// pending HTTP request will be aborted if the provided context is
11956// canceled.
11957func (c *ProjectsRegionsJobsSubmitCall) Context(ctx context.Context) *ProjectsRegionsJobsSubmitCall {
11958	c.ctx_ = ctx
11959	return c
11960}
11961
11962// Header returns an http.Header that can be modified by the caller to
11963// add HTTP headers to the request.
11964func (c *ProjectsRegionsJobsSubmitCall) Header() http.Header {
11965	if c.header_ == nil {
11966		c.header_ = make(http.Header)
11967	}
11968	return c.header_
11969}
11970
11971func (c *ProjectsRegionsJobsSubmitCall) doRequest(alt string) (*http.Response, error) {
11972	reqHeaders := make(http.Header)
11973	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
11974	for k, v := range c.header_ {
11975		reqHeaders[k] = v
11976	}
11977	reqHeaders.Set("User-Agent", c.s.userAgent())
11978	var body io.Reader = nil
11979	body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitjobrequest)
11980	if err != nil {
11981		return nil, err
11982	}
11983	reqHeaders.Set("Content-Type", "application/json")
11984	c.urlParams_.Set("alt", alt)
11985	c.urlParams_.Set("prettyPrint", "false")
11986	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs:submit")
11987	urls += "?" + c.urlParams_.Encode()
11988	req, err := http.NewRequest("POST", urls, body)
11989	if err != nil {
11990		return nil, err
11991	}
11992	req.Header = reqHeaders
11993	googleapi.Expand(req.URL, map[string]string{
11994		"projectId": c.projectId,
11995		"region":    c.region,
11996	})
11997	return gensupport.SendRequest(c.ctx_, c.s.client, req)
11998}
11999
12000// Do executes the "dataproc.projects.regions.jobs.submit" call.
12001// Exactly one of *Job or error will be non-nil. Any non-2xx status code
12002// is an error. Response headers are in either
12003// *Job.ServerResponse.Header or (if a response was returned at all) in
12004// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
12005// whether the returned error was because http.StatusNotModified was
12006// returned.
12007func (c *ProjectsRegionsJobsSubmitCall) Do(opts ...googleapi.CallOption) (*Job, error) {
12008	gensupport.SetOptions(c.urlParams_, opts...)
12009	res, err := c.doRequest("json")
12010	if res != nil && res.StatusCode == http.StatusNotModified {
12011		if res.Body != nil {
12012			res.Body.Close()
12013		}
12014		return nil, &googleapi.Error{
12015			Code:   res.StatusCode,
12016			Header: res.Header,
12017		}
12018	}
12019	if err != nil {
12020		return nil, err
12021	}
12022	defer googleapi.CloseBody(res)
12023	if err := googleapi.CheckResponse(res); err != nil {
12024		return nil, err
12025	}
12026	ret := &Job{
12027		ServerResponse: googleapi.ServerResponse{
12028			Header:         res.Header,
12029			HTTPStatusCode: res.StatusCode,
12030		},
12031	}
12032	target := &ret
12033	if err := gensupport.DecodeResponse(target, res); err != nil {
12034		return nil, err
12035	}
12036	return ret, nil
12037	// {
12038	//   "description": "Submits a job to a cluster.",
12039	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit",
12040	//   "httpMethod": "POST",
12041	//   "id": "dataproc.projects.regions.jobs.submit",
12042	//   "parameterOrder": [
12043	//     "projectId",
12044	//     "region"
12045	//   ],
12046	//   "parameters": {
12047	//     "projectId": {
12048	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
12049	//       "location": "path",
12050	//       "required": true,
12051	//       "type": "string"
12052	//     },
12053	//     "region": {
12054	//       "description": "Required. The Dataproc region in which to handle the request.",
12055	//       "location": "path",
12056	//       "required": true,
12057	//       "type": "string"
12058	//     }
12059	//   },
12060	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs:submit",
12061	//   "request": {
12062	//     "$ref": "SubmitJobRequest"
12063	//   },
12064	//   "response": {
12065	//     "$ref": "Job"
12066	//   },
12067	//   "scopes": [
12068	//     "https://www.googleapis.com/auth/cloud-platform"
12069	//   ]
12070	// }
12071
12072}
12073
12074// method id "dataproc.projects.regions.jobs.submitAsOperation":
12075
12076type ProjectsRegionsJobsSubmitAsOperationCall struct {
12077	s                *Service
12078	projectId        string
12079	region           string
12080	submitjobrequest *SubmitJobRequest
12081	urlParams_       gensupport.URLParams
12082	ctx_             context.Context
12083	header_          http.Header
12084}
12085
12086// SubmitAsOperation: Submits job to a cluster.
12087//
12088// - projectId: The ID of the Google Cloud Platform project that the job
12089//   belongs to.
12090// - region: The Dataproc region in which to handle the request.
12091func (r *ProjectsRegionsJobsService) SubmitAsOperation(projectId string, region string, submitjobrequest *SubmitJobRequest) *ProjectsRegionsJobsSubmitAsOperationCall {
12092	c := &ProjectsRegionsJobsSubmitAsOperationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12093	c.projectId = projectId
12094	c.region = region
12095	c.submitjobrequest = submitjobrequest
12096	return c
12097}
12098
12099// Fields allows partial responses to be retrieved. See
12100// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12101// for more information.
12102func (c *ProjectsRegionsJobsSubmitAsOperationCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsSubmitAsOperationCall {
12103	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12104	return c
12105}
12106
12107// Context sets the context to be used in this call's Do method. Any
12108// pending HTTP request will be aborted if the provided context is
12109// canceled.
12110func (c *ProjectsRegionsJobsSubmitAsOperationCall) Context(ctx context.Context) *ProjectsRegionsJobsSubmitAsOperationCall {
12111	c.ctx_ = ctx
12112	return c
12113}
12114
12115// Header returns an http.Header that can be modified by the caller to
12116// add HTTP headers to the request.
12117func (c *ProjectsRegionsJobsSubmitAsOperationCall) Header() http.Header {
12118	if c.header_ == nil {
12119		c.header_ = make(http.Header)
12120	}
12121	return c.header_
12122}
12123
12124func (c *ProjectsRegionsJobsSubmitAsOperationCall) doRequest(alt string) (*http.Response, error) {
12125	reqHeaders := make(http.Header)
12126	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
12127	for k, v := range c.header_ {
12128		reqHeaders[k] = v
12129	}
12130	reqHeaders.Set("User-Agent", c.s.userAgent())
12131	var body io.Reader = nil
12132	body, err := googleapi.WithoutDataWrapper.JSONReader(c.submitjobrequest)
12133	if err != nil {
12134		return nil, err
12135	}
12136	reqHeaders.Set("Content-Type", "application/json")
12137	c.urlParams_.Set("alt", alt)
12138	c.urlParams_.Set("prettyPrint", "false")
12139	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/projects/{projectId}/regions/{region}/jobs:submitAsOperation")
12140	urls += "?" + c.urlParams_.Encode()
12141	req, err := http.NewRequest("POST", urls, body)
12142	if err != nil {
12143		return nil, err
12144	}
12145	req.Header = reqHeaders
12146	googleapi.Expand(req.URL, map[string]string{
12147		"projectId": c.projectId,
12148		"region":    c.region,
12149	})
12150	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12151}
12152
12153// Do executes the "dataproc.projects.regions.jobs.submitAsOperation" call.
12154// Exactly one of *Operation or error will be non-nil. Any non-2xx
12155// status code is an error. Response headers are in either
12156// *Operation.ServerResponse.Header or (if a response was returned at
12157// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12158// to check whether the returned error was because
12159// http.StatusNotModified was returned.
12160func (c *ProjectsRegionsJobsSubmitAsOperationCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12161	gensupport.SetOptions(c.urlParams_, opts...)
12162	res, err := c.doRequest("json")
12163	if res != nil && res.StatusCode == http.StatusNotModified {
12164		if res.Body != nil {
12165			res.Body.Close()
12166		}
12167		return nil, &googleapi.Error{
12168			Code:   res.StatusCode,
12169			Header: res.Header,
12170		}
12171	}
12172	if err != nil {
12173		return nil, err
12174	}
12175	defer googleapi.CloseBody(res)
12176	if err := googleapi.CheckResponse(res); err != nil {
12177		return nil, err
12178	}
12179	ret := &Operation{
12180		ServerResponse: googleapi.ServerResponse{
12181			Header:         res.Header,
12182			HTTPStatusCode: res.StatusCode,
12183		},
12184	}
12185	target := &ret
12186	if err := gensupport.DecodeResponse(target, res); err != nil {
12187		return nil, err
12188	}
12189	return ret, nil
12190	// {
12191	//   "description": "Submits job to a cluster.",
12192	//   "flatPath": "v1beta2/projects/{projectId}/regions/{region}/jobs:submitAsOperation",
12193	//   "httpMethod": "POST",
12194	//   "id": "dataproc.projects.regions.jobs.submitAsOperation",
12195	//   "parameterOrder": [
12196	//     "projectId",
12197	//     "region"
12198	//   ],
12199	//   "parameters": {
12200	//     "projectId": {
12201	//       "description": "Required. The ID of the Google Cloud Platform project that the job belongs to.",
12202	//       "location": "path",
12203	//       "required": true,
12204	//       "type": "string"
12205	//     },
12206	//     "region": {
12207	//       "description": "Required. The Dataproc region in which to handle the request.",
12208	//       "location": "path",
12209	//       "required": true,
12210	//       "type": "string"
12211	//     }
12212	//   },
12213	//   "path": "v1beta2/projects/{projectId}/regions/{region}/jobs:submitAsOperation",
12214	//   "request": {
12215	//     "$ref": "SubmitJobRequest"
12216	//   },
12217	//   "response": {
12218	//     "$ref": "Operation"
12219	//   },
12220	//   "scopes": [
12221	//     "https://www.googleapis.com/auth/cloud-platform"
12222	//   ]
12223	// }
12224
12225}
12226
12227// method id "dataproc.projects.regions.jobs.testIamPermissions":
12228
12229type ProjectsRegionsJobsTestIamPermissionsCall struct {
12230	s                         *Service
12231	resource                  string
12232	testiampermissionsrequest *TestIamPermissionsRequest
12233	urlParams_                gensupport.URLParams
12234	ctx_                      context.Context
12235	header_                   http.Header
12236}
12237
12238// TestIamPermissions: Returns permissions that a caller has on the
12239// specified resource. If the resource does not exist, this will return
12240// an empty set of permissions, not a NOT_FOUND error.Note: This
12241// operation is designed to be used for building permission-aware UIs
12242// and command-line tools, not for authorization checking. This
12243// operation may "fail open" without warning.
12244//
12245// - resource: REQUIRED: The resource for which the policy detail is
12246//   being requested. See the operation documentation for the
12247//   appropriate value for this field.
12248func (r *ProjectsRegionsJobsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsJobsTestIamPermissionsCall {
12249	c := &ProjectsRegionsJobsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12250	c.resource = resource
12251	c.testiampermissionsrequest = testiampermissionsrequest
12252	return c
12253}
12254
12255// Fields allows partial responses to be retrieved. See
12256// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12257// for more information.
12258func (c *ProjectsRegionsJobsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsJobsTestIamPermissionsCall {
12259	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12260	return c
12261}
12262
12263// Context sets the context to be used in this call's Do method. Any
12264// pending HTTP request will be aborted if the provided context is
12265// canceled.
12266func (c *ProjectsRegionsJobsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsJobsTestIamPermissionsCall {
12267	c.ctx_ = ctx
12268	return c
12269}
12270
12271// Header returns an http.Header that can be modified by the caller to
12272// add HTTP headers to the request.
12273func (c *ProjectsRegionsJobsTestIamPermissionsCall) Header() http.Header {
12274	if c.header_ == nil {
12275		c.header_ = make(http.Header)
12276	}
12277	return c.header_
12278}
12279
12280func (c *ProjectsRegionsJobsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
12281	reqHeaders := make(http.Header)
12282	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
12283	for k, v := range c.header_ {
12284		reqHeaders[k] = v
12285	}
12286	reqHeaders.Set("User-Agent", c.s.userAgent())
12287	var body io.Reader = nil
12288	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
12289	if err != nil {
12290		return nil, err
12291	}
12292	reqHeaders.Set("Content-Type", "application/json")
12293	c.urlParams_.Set("alt", alt)
12294	c.urlParams_.Set("prettyPrint", "false")
12295	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
12296	urls += "?" + c.urlParams_.Encode()
12297	req, err := http.NewRequest("POST", urls, body)
12298	if err != nil {
12299		return nil, err
12300	}
12301	req.Header = reqHeaders
12302	googleapi.Expand(req.URL, map[string]string{
12303		"resource": c.resource,
12304	})
12305	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12306}
12307
12308// Do executes the "dataproc.projects.regions.jobs.testIamPermissions" call.
12309// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
12310// Any non-2xx status code is an error. Response headers are in either
12311// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
12312// was returned at all) in error.(*googleapi.Error).Header. Use
12313// googleapi.IsNotModified to check whether the returned error was
12314// because http.StatusNotModified was returned.
12315func (c *ProjectsRegionsJobsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
12316	gensupport.SetOptions(c.urlParams_, opts...)
12317	res, err := c.doRequest("json")
12318	if res != nil && res.StatusCode == http.StatusNotModified {
12319		if res.Body != nil {
12320			res.Body.Close()
12321		}
12322		return nil, &googleapi.Error{
12323			Code:   res.StatusCode,
12324			Header: res.Header,
12325		}
12326	}
12327	if err != nil {
12328		return nil, err
12329	}
12330	defer googleapi.CloseBody(res)
12331	if err := googleapi.CheckResponse(res); err != nil {
12332		return nil, err
12333	}
12334	ret := &TestIamPermissionsResponse{
12335		ServerResponse: googleapi.ServerResponse{
12336			Header:         res.Header,
12337			HTTPStatusCode: res.StatusCode,
12338		},
12339	}
12340	target := &ret
12341	if err := gensupport.DecodeResponse(target, res); err != nil {
12342		return nil, err
12343	}
12344	return ret, nil
12345	// {
12346	//   "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.",
12347	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/jobs/{jobsId}:testIamPermissions",
12348	//   "httpMethod": "POST",
12349	//   "id": "dataproc.projects.regions.jobs.testIamPermissions",
12350	//   "parameterOrder": [
12351	//     "resource"
12352	//   ],
12353	//   "parameters": {
12354	//     "resource": {
12355	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
12356	//       "location": "path",
12357	//       "pattern": "^projects/[^/]+/regions/[^/]+/jobs/[^/]+$",
12358	//       "required": true,
12359	//       "type": "string"
12360	//     }
12361	//   },
12362	//   "path": "v1beta2/{+resource}:testIamPermissions",
12363	//   "request": {
12364	//     "$ref": "TestIamPermissionsRequest"
12365	//   },
12366	//   "response": {
12367	//     "$ref": "TestIamPermissionsResponse"
12368	//   },
12369	//   "scopes": [
12370	//     "https://www.googleapis.com/auth/cloud-platform"
12371	//   ]
12372	// }
12373
12374}
12375
12376// method id "dataproc.projects.regions.operations.cancel":
12377
12378type ProjectsRegionsOperationsCancelCall struct {
12379	s          *Service
12380	name       string
12381	urlParams_ gensupport.URLParams
12382	ctx_       context.Context
12383	header_    http.Header
12384}
12385
12386// Cancel: Starts asynchronous cancellation on a long-running operation.
12387// The server makes a best effort to cancel the operation, but success
12388// is not guaranteed. If the server doesn't support this method, it
12389// returns google.rpc.Code.UNIMPLEMENTED. Clients can use
12390// Operations.GetOperation or other methods to check whether the
12391// cancellation succeeded or whether the operation completed despite
12392// cancellation. On successful cancellation, the operation is not
12393// deleted; instead, it becomes an operation with an Operation.error
12394// value with a google.rpc.Status.code of 1, corresponding to
12395// Code.CANCELLED.
12396//
12397// - name: The name of the operation resource to be cancelled.
12398func (r *ProjectsRegionsOperationsService) Cancel(name string) *ProjectsRegionsOperationsCancelCall {
12399	c := &ProjectsRegionsOperationsCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12400	c.name = name
12401	return c
12402}
12403
12404// Fields allows partial responses to be retrieved. See
12405// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12406// for more information.
12407func (c *ProjectsRegionsOperationsCancelCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsCancelCall {
12408	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12409	return c
12410}
12411
12412// Context sets the context to be used in this call's Do method. Any
12413// pending HTTP request will be aborted if the provided context is
12414// canceled.
12415func (c *ProjectsRegionsOperationsCancelCall) Context(ctx context.Context) *ProjectsRegionsOperationsCancelCall {
12416	c.ctx_ = ctx
12417	return c
12418}
12419
12420// Header returns an http.Header that can be modified by the caller to
12421// add HTTP headers to the request.
12422func (c *ProjectsRegionsOperationsCancelCall) Header() http.Header {
12423	if c.header_ == nil {
12424		c.header_ = make(http.Header)
12425	}
12426	return c.header_
12427}
12428
12429func (c *ProjectsRegionsOperationsCancelCall) doRequest(alt string) (*http.Response, error) {
12430	reqHeaders := make(http.Header)
12431	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
12432	for k, v := range c.header_ {
12433		reqHeaders[k] = v
12434	}
12435	reqHeaders.Set("User-Agent", c.s.userAgent())
12436	var body io.Reader = nil
12437	c.urlParams_.Set("alt", alt)
12438	c.urlParams_.Set("prettyPrint", "false")
12439	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:cancel")
12440	urls += "?" + c.urlParams_.Encode()
12441	req, err := http.NewRequest("POST", urls, body)
12442	if err != nil {
12443		return nil, err
12444	}
12445	req.Header = reqHeaders
12446	googleapi.Expand(req.URL, map[string]string{
12447		"name": c.name,
12448	})
12449	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12450}
12451
12452// Do executes the "dataproc.projects.regions.operations.cancel" call.
12453// Exactly one of *Empty or error will be non-nil. Any non-2xx status
12454// code is an error. Response headers are in either
12455// *Empty.ServerResponse.Header or (if a response was returned at all)
12456// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12457// check whether the returned error was because http.StatusNotModified
12458// was returned.
12459func (c *ProjectsRegionsOperationsCancelCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12460	gensupport.SetOptions(c.urlParams_, opts...)
12461	res, err := c.doRequest("json")
12462	if res != nil && res.StatusCode == http.StatusNotModified {
12463		if res.Body != nil {
12464			res.Body.Close()
12465		}
12466		return nil, &googleapi.Error{
12467			Code:   res.StatusCode,
12468			Header: res.Header,
12469		}
12470	}
12471	if err != nil {
12472		return nil, err
12473	}
12474	defer googleapi.CloseBody(res)
12475	if err := googleapi.CheckResponse(res); err != nil {
12476		return nil, err
12477	}
12478	ret := &Empty{
12479		ServerResponse: googleapi.ServerResponse{
12480			Header:         res.Header,
12481			HTTPStatusCode: res.StatusCode,
12482		},
12483	}
12484	target := &ret
12485	if err := gensupport.DecodeResponse(target, res); err != nil {
12486		return nil, err
12487	}
12488	return ret, nil
12489	// {
12490	//   "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.",
12491	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:cancel",
12492	//   "httpMethod": "POST",
12493	//   "id": "dataproc.projects.regions.operations.cancel",
12494	//   "parameterOrder": [
12495	//     "name"
12496	//   ],
12497	//   "parameters": {
12498	//     "name": {
12499	//       "description": "The name of the operation resource to be cancelled.",
12500	//       "location": "path",
12501	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
12502	//       "required": true,
12503	//       "type": "string"
12504	//     }
12505	//   },
12506	//   "path": "v1beta2/{+name}:cancel",
12507	//   "response": {
12508	//     "$ref": "Empty"
12509	//   },
12510	//   "scopes": [
12511	//     "https://www.googleapis.com/auth/cloud-platform"
12512	//   ]
12513	// }
12514
12515}
12516
12517// method id "dataproc.projects.regions.operations.delete":
12518
12519type ProjectsRegionsOperationsDeleteCall struct {
12520	s          *Service
12521	name       string
12522	urlParams_ gensupport.URLParams
12523	ctx_       context.Context
12524	header_    http.Header
12525}
12526
12527// Delete: Deletes a long-running operation. This method indicates that
12528// the client is no longer interested in the operation result. It does
12529// not cancel the operation. If the server doesn't support this method,
12530// it returns google.rpc.Code.UNIMPLEMENTED.
12531//
12532// - name: The name of the operation resource to be deleted.
12533func (r *ProjectsRegionsOperationsService) Delete(name string) *ProjectsRegionsOperationsDeleteCall {
12534	c := &ProjectsRegionsOperationsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12535	c.name = name
12536	return c
12537}
12538
12539// Fields allows partial responses to be retrieved. See
12540// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12541// for more information.
12542func (c *ProjectsRegionsOperationsDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsDeleteCall {
12543	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12544	return c
12545}
12546
12547// Context sets the context to be used in this call's Do method. Any
12548// pending HTTP request will be aborted if the provided context is
12549// canceled.
12550func (c *ProjectsRegionsOperationsDeleteCall) Context(ctx context.Context) *ProjectsRegionsOperationsDeleteCall {
12551	c.ctx_ = ctx
12552	return c
12553}
12554
12555// Header returns an http.Header that can be modified by the caller to
12556// add HTTP headers to the request.
12557func (c *ProjectsRegionsOperationsDeleteCall) Header() http.Header {
12558	if c.header_ == nil {
12559		c.header_ = make(http.Header)
12560	}
12561	return c.header_
12562}
12563
12564func (c *ProjectsRegionsOperationsDeleteCall) doRequest(alt string) (*http.Response, error) {
12565	reqHeaders := make(http.Header)
12566	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
12567	for k, v := range c.header_ {
12568		reqHeaders[k] = v
12569	}
12570	reqHeaders.Set("User-Agent", c.s.userAgent())
12571	var body io.Reader = nil
12572	c.urlParams_.Set("alt", alt)
12573	c.urlParams_.Set("prettyPrint", "false")
12574	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
12575	urls += "?" + c.urlParams_.Encode()
12576	req, err := http.NewRequest("DELETE", urls, body)
12577	if err != nil {
12578		return nil, err
12579	}
12580	req.Header = reqHeaders
12581	googleapi.Expand(req.URL, map[string]string{
12582		"name": c.name,
12583	})
12584	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12585}
12586
12587// Do executes the "dataproc.projects.regions.operations.delete" call.
12588// Exactly one of *Empty or error will be non-nil. Any non-2xx status
12589// code is an error. Response headers are in either
12590// *Empty.ServerResponse.Header or (if a response was returned at all)
12591// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12592// check whether the returned error was because http.StatusNotModified
12593// was returned.
12594func (c *ProjectsRegionsOperationsDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
12595	gensupport.SetOptions(c.urlParams_, opts...)
12596	res, err := c.doRequest("json")
12597	if res != nil && res.StatusCode == http.StatusNotModified {
12598		if res.Body != nil {
12599			res.Body.Close()
12600		}
12601		return nil, &googleapi.Error{
12602			Code:   res.StatusCode,
12603			Header: res.Header,
12604		}
12605	}
12606	if err != nil {
12607		return nil, err
12608	}
12609	defer googleapi.CloseBody(res)
12610	if err := googleapi.CheckResponse(res); err != nil {
12611		return nil, err
12612	}
12613	ret := &Empty{
12614		ServerResponse: googleapi.ServerResponse{
12615			Header:         res.Header,
12616			HTTPStatusCode: res.StatusCode,
12617		},
12618	}
12619	target := &ret
12620	if err := gensupport.DecodeResponse(target, res); err != nil {
12621		return nil, err
12622	}
12623	return ret, nil
12624	// {
12625	//   "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.",
12626	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}",
12627	//   "httpMethod": "DELETE",
12628	//   "id": "dataproc.projects.regions.operations.delete",
12629	//   "parameterOrder": [
12630	//     "name"
12631	//   ],
12632	//   "parameters": {
12633	//     "name": {
12634	//       "description": "The name of the operation resource to be deleted.",
12635	//       "location": "path",
12636	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
12637	//       "required": true,
12638	//       "type": "string"
12639	//     }
12640	//   },
12641	//   "path": "v1beta2/{+name}",
12642	//   "response": {
12643	//     "$ref": "Empty"
12644	//   },
12645	//   "scopes": [
12646	//     "https://www.googleapis.com/auth/cloud-platform"
12647	//   ]
12648	// }
12649
12650}
12651
12652// method id "dataproc.projects.regions.operations.get":
12653
12654type ProjectsRegionsOperationsGetCall struct {
12655	s            *Service
12656	name         string
12657	urlParams_   gensupport.URLParams
12658	ifNoneMatch_ string
12659	ctx_         context.Context
12660	header_      http.Header
12661}
12662
12663// Get: Gets the latest state of a long-running operation. Clients can
12664// use this method to poll the operation result at intervals as
12665// recommended by the API service.
12666//
12667// - name: The name of the operation resource.
12668func (r *ProjectsRegionsOperationsService) Get(name string) *ProjectsRegionsOperationsGetCall {
12669	c := &ProjectsRegionsOperationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12670	c.name = name
12671	return c
12672}
12673
12674// Fields allows partial responses to be retrieved. See
12675// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12676// for more information.
12677func (c *ProjectsRegionsOperationsGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsGetCall {
12678	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12679	return c
12680}
12681
12682// IfNoneMatch sets the optional parameter which makes the operation
12683// fail if the object's ETag matches the given value. This is useful for
12684// getting updates only after the object has changed since the last
12685// request. Use googleapi.IsNotModified to check whether the response
12686// error from Do is the result of In-None-Match.
12687func (c *ProjectsRegionsOperationsGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsOperationsGetCall {
12688	c.ifNoneMatch_ = entityTag
12689	return c
12690}
12691
12692// Context sets the context to be used in this call's Do method. Any
12693// pending HTTP request will be aborted if the provided context is
12694// canceled.
12695func (c *ProjectsRegionsOperationsGetCall) Context(ctx context.Context) *ProjectsRegionsOperationsGetCall {
12696	c.ctx_ = ctx
12697	return c
12698}
12699
12700// Header returns an http.Header that can be modified by the caller to
12701// add HTTP headers to the request.
12702func (c *ProjectsRegionsOperationsGetCall) Header() http.Header {
12703	if c.header_ == nil {
12704		c.header_ = make(http.Header)
12705	}
12706	return c.header_
12707}
12708
12709func (c *ProjectsRegionsOperationsGetCall) doRequest(alt string) (*http.Response, error) {
12710	reqHeaders := make(http.Header)
12711	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
12712	for k, v := range c.header_ {
12713		reqHeaders[k] = v
12714	}
12715	reqHeaders.Set("User-Agent", c.s.userAgent())
12716	if c.ifNoneMatch_ != "" {
12717		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12718	}
12719	var body io.Reader = nil
12720	c.urlParams_.Set("alt", alt)
12721	c.urlParams_.Set("prettyPrint", "false")
12722	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
12723	urls += "?" + c.urlParams_.Encode()
12724	req, err := http.NewRequest("GET", urls, body)
12725	if err != nil {
12726		return nil, err
12727	}
12728	req.Header = reqHeaders
12729	googleapi.Expand(req.URL, map[string]string{
12730		"name": c.name,
12731	})
12732	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12733}
12734
12735// Do executes the "dataproc.projects.regions.operations.get" call.
12736// Exactly one of *Operation or error will be non-nil. Any non-2xx
12737// status code is an error. Response headers are in either
12738// *Operation.ServerResponse.Header or (if a response was returned at
12739// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
12740// to check whether the returned error was because
12741// http.StatusNotModified was returned.
12742func (c *ProjectsRegionsOperationsGetCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
12743	gensupport.SetOptions(c.urlParams_, opts...)
12744	res, err := c.doRequest("json")
12745	if res != nil && res.StatusCode == http.StatusNotModified {
12746		if res.Body != nil {
12747			res.Body.Close()
12748		}
12749		return nil, &googleapi.Error{
12750			Code:   res.StatusCode,
12751			Header: res.Header,
12752		}
12753	}
12754	if err != nil {
12755		return nil, err
12756	}
12757	defer googleapi.CloseBody(res)
12758	if err := googleapi.CheckResponse(res); err != nil {
12759		return nil, err
12760	}
12761	ret := &Operation{
12762		ServerResponse: googleapi.ServerResponse{
12763			Header:         res.Header,
12764			HTTPStatusCode: res.StatusCode,
12765		},
12766	}
12767	target := &ret
12768	if err := gensupport.DecodeResponse(target, res); err != nil {
12769		return nil, err
12770	}
12771	return ret, nil
12772	// {
12773	//   "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.",
12774	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}",
12775	//   "httpMethod": "GET",
12776	//   "id": "dataproc.projects.regions.operations.get",
12777	//   "parameterOrder": [
12778	//     "name"
12779	//   ],
12780	//   "parameters": {
12781	//     "name": {
12782	//       "description": "The name of the operation resource.",
12783	//       "location": "path",
12784	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
12785	//       "required": true,
12786	//       "type": "string"
12787	//     }
12788	//   },
12789	//   "path": "v1beta2/{+name}",
12790	//   "response": {
12791	//     "$ref": "Operation"
12792	//   },
12793	//   "scopes": [
12794	//     "https://www.googleapis.com/auth/cloud-platform"
12795	//   ]
12796	// }
12797
12798}
12799
12800// method id "dataproc.projects.regions.operations.getIamPolicy":
12801
12802type ProjectsRegionsOperationsGetIamPolicyCall struct {
12803	s            *Service
12804	resource     string
12805	urlParams_   gensupport.URLParams
12806	ifNoneMatch_ string
12807	ctx_         context.Context
12808	header_      http.Header
12809}
12810
12811// GetIamPolicy: Gets the access control policy for a resource. Returns
12812// an empty policy if the resource exists and does not have a policy
12813// set.
12814//
12815// - resource: REQUIRED: The resource for which the policy is being
12816//   requested. See the operation documentation for the appropriate
12817//   value for this field.
12818func (r *ProjectsRegionsOperationsService) GetIamPolicy(resource string) *ProjectsRegionsOperationsGetIamPolicyCall {
12819	c := &ProjectsRegionsOperationsGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12820	c.resource = resource
12821	return c
12822}
12823
12824// OptionsRequestedPolicyVersion sets the optional parameter
12825// "options.requestedPolicyVersion": The policy format version to be
12826// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
12827// value will be rejected.Requests for policies with any conditional
12828// bindings must specify version 3. Policies without any conditional
12829// bindings may specify any valid value or leave the field unset.To
12830// learn which resources support conditions in their IAM policies, see
12831// the IAM documentation
12832// (https://cloud.google.com/iam/help/conditions/resource-policies).
12833func (c *ProjectsRegionsOperationsGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsRegionsOperationsGetIamPolicyCall {
12834	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
12835	return c
12836}
12837
12838// Fields allows partial responses to be retrieved. See
12839// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
12840// for more information.
12841func (c *ProjectsRegionsOperationsGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsGetIamPolicyCall {
12842	c.urlParams_.Set("fields", googleapi.CombineFields(s))
12843	return c
12844}
12845
12846// IfNoneMatch sets the optional parameter which makes the operation
12847// fail if the object's ETag matches the given value. This is useful for
12848// getting updates only after the object has changed since the last
12849// request. Use googleapi.IsNotModified to check whether the response
12850// error from Do is the result of In-None-Match.
12851func (c *ProjectsRegionsOperationsGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsRegionsOperationsGetIamPolicyCall {
12852	c.ifNoneMatch_ = entityTag
12853	return c
12854}
12855
12856// Context sets the context to be used in this call's Do method. Any
12857// pending HTTP request will be aborted if the provided context is
12858// canceled.
12859func (c *ProjectsRegionsOperationsGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsOperationsGetIamPolicyCall {
12860	c.ctx_ = ctx
12861	return c
12862}
12863
12864// Header returns an http.Header that can be modified by the caller to
12865// add HTTP headers to the request.
12866func (c *ProjectsRegionsOperationsGetIamPolicyCall) Header() http.Header {
12867	if c.header_ == nil {
12868		c.header_ = make(http.Header)
12869	}
12870	return c.header_
12871}
12872
12873func (c *ProjectsRegionsOperationsGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
12874	reqHeaders := make(http.Header)
12875	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
12876	for k, v := range c.header_ {
12877		reqHeaders[k] = v
12878	}
12879	reqHeaders.Set("User-Agent", c.s.userAgent())
12880	if c.ifNoneMatch_ != "" {
12881		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
12882	}
12883	var body io.Reader = nil
12884	c.urlParams_.Set("alt", alt)
12885	c.urlParams_.Set("prettyPrint", "false")
12886	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
12887	urls += "?" + c.urlParams_.Encode()
12888	req, err := http.NewRequest("GET", urls, body)
12889	if err != nil {
12890		return nil, err
12891	}
12892	req.Header = reqHeaders
12893	googleapi.Expand(req.URL, map[string]string{
12894		"resource": c.resource,
12895	})
12896	return gensupport.SendRequest(c.ctx_, c.s.client, req)
12897}
12898
12899// Do executes the "dataproc.projects.regions.operations.getIamPolicy" call.
12900// Exactly one of *Policy or error will be non-nil. Any non-2xx status
12901// code is an error. Response headers are in either
12902// *Policy.ServerResponse.Header or (if a response was returned at all)
12903// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
12904// check whether the returned error was because http.StatusNotModified
12905// was returned.
12906func (c *ProjectsRegionsOperationsGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
12907	gensupport.SetOptions(c.urlParams_, opts...)
12908	res, err := c.doRequest("json")
12909	if res != nil && res.StatusCode == http.StatusNotModified {
12910		if res.Body != nil {
12911			res.Body.Close()
12912		}
12913		return nil, &googleapi.Error{
12914			Code:   res.StatusCode,
12915			Header: res.Header,
12916		}
12917	}
12918	if err != nil {
12919		return nil, err
12920	}
12921	defer googleapi.CloseBody(res)
12922	if err := googleapi.CheckResponse(res); err != nil {
12923		return nil, err
12924	}
12925	ret := &Policy{
12926		ServerResponse: googleapi.ServerResponse{
12927			Header:         res.Header,
12928			HTTPStatusCode: res.StatusCode,
12929		},
12930	}
12931	target := &ret
12932	if err := gensupport.DecodeResponse(target, res); err != nil {
12933		return nil, err
12934	}
12935	return ret, nil
12936	// {
12937	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
12938	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:getIamPolicy",
12939	//   "httpMethod": "GET",
12940	//   "id": "dataproc.projects.regions.operations.getIamPolicy",
12941	//   "parameterOrder": [
12942	//     "resource"
12943	//   ],
12944	//   "parameters": {
12945	//     "options.requestedPolicyVersion": {
12946	//       "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).",
12947	//       "format": "int32",
12948	//       "location": "query",
12949	//       "type": "integer"
12950	//     },
12951	//     "resource": {
12952	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
12953	//       "location": "path",
12954	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
12955	//       "required": true,
12956	//       "type": "string"
12957	//     }
12958	//   },
12959	//   "path": "v1beta2/{+resource}:getIamPolicy",
12960	//   "response": {
12961	//     "$ref": "Policy"
12962	//   },
12963	//   "scopes": [
12964	//     "https://www.googleapis.com/auth/cloud-platform"
12965	//   ]
12966	// }
12967
12968}
12969
12970// method id "dataproc.projects.regions.operations.list":
12971
12972type ProjectsRegionsOperationsListCall struct {
12973	s            *Service
12974	name         string
12975	urlParams_   gensupport.URLParams
12976	ifNoneMatch_ string
12977	ctx_         context.Context
12978	header_      http.Header
12979}
12980
12981// List: Lists operations that match the specified filter in the
12982// request. If the server doesn't support this method, it returns
12983// UNIMPLEMENTED.NOTE: the name binding allows API services to override
12984// the binding to use different resource name schemes, such as
12985// users/*/operations. To override the binding, API services can add a
12986// binding such as "/v1/{name=users/*}/operations" to their service
12987// configuration. For backwards compatibility, the default name includes
12988// the operations collection id, however overriding users must ensure
12989// the name binding is the parent resource, without the operations
12990// collection id.
12991//
12992// - name: The name of the operation's parent resource.
12993func (r *ProjectsRegionsOperationsService) List(name string) *ProjectsRegionsOperationsListCall {
12994	c := &ProjectsRegionsOperationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
12995	c.name = name
12996	return c
12997}
12998
12999// Filter sets the optional parameter "filter": The standard list
13000// filter.
13001func (c *ProjectsRegionsOperationsListCall) Filter(filter string) *ProjectsRegionsOperationsListCall {
13002	c.urlParams_.Set("filter", filter)
13003	return c
13004}
13005
13006// PageSize sets the optional parameter "pageSize": The standard list
13007// page size.
13008func (c *ProjectsRegionsOperationsListCall) PageSize(pageSize int64) *ProjectsRegionsOperationsListCall {
13009	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
13010	return c
13011}
13012
13013// PageToken sets the optional parameter "pageToken": The standard list
13014// page token.
13015func (c *ProjectsRegionsOperationsListCall) PageToken(pageToken string) *ProjectsRegionsOperationsListCall {
13016	c.urlParams_.Set("pageToken", pageToken)
13017	return c
13018}
13019
13020// Fields allows partial responses to be retrieved. See
13021// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13022// for more information.
13023func (c *ProjectsRegionsOperationsListCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsListCall {
13024	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13025	return c
13026}
13027
13028// IfNoneMatch sets the optional parameter which makes the operation
13029// fail if the object's ETag matches the given value. This is useful for
13030// getting updates only after the object has changed since the last
13031// request. Use googleapi.IsNotModified to check whether the response
13032// error from Do is the result of In-None-Match.
13033func (c *ProjectsRegionsOperationsListCall) IfNoneMatch(entityTag string) *ProjectsRegionsOperationsListCall {
13034	c.ifNoneMatch_ = entityTag
13035	return c
13036}
13037
13038// Context sets the context to be used in this call's Do method. Any
13039// pending HTTP request will be aborted if the provided context is
13040// canceled.
13041func (c *ProjectsRegionsOperationsListCall) Context(ctx context.Context) *ProjectsRegionsOperationsListCall {
13042	c.ctx_ = ctx
13043	return c
13044}
13045
13046// Header returns an http.Header that can be modified by the caller to
13047// add HTTP headers to the request.
13048func (c *ProjectsRegionsOperationsListCall) Header() http.Header {
13049	if c.header_ == nil {
13050		c.header_ = make(http.Header)
13051	}
13052	return c.header_
13053}
13054
13055func (c *ProjectsRegionsOperationsListCall) doRequest(alt string) (*http.Response, error) {
13056	reqHeaders := make(http.Header)
13057	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
13058	for k, v := range c.header_ {
13059		reqHeaders[k] = v
13060	}
13061	reqHeaders.Set("User-Agent", c.s.userAgent())
13062	if c.ifNoneMatch_ != "" {
13063		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13064	}
13065	var body io.Reader = nil
13066	c.urlParams_.Set("alt", alt)
13067	c.urlParams_.Set("prettyPrint", "false")
13068	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
13069	urls += "?" + c.urlParams_.Encode()
13070	req, err := http.NewRequest("GET", urls, body)
13071	if err != nil {
13072		return nil, err
13073	}
13074	req.Header = reqHeaders
13075	googleapi.Expand(req.URL, map[string]string{
13076		"name": c.name,
13077	})
13078	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13079}
13080
13081// Do executes the "dataproc.projects.regions.operations.list" call.
13082// Exactly one of *ListOperationsResponse or error will be non-nil. Any
13083// non-2xx status code is an error. Response headers are in either
13084// *ListOperationsResponse.ServerResponse.Header or (if a response was
13085// returned at all) in error.(*googleapi.Error).Header. Use
13086// googleapi.IsNotModified to check whether the returned error was
13087// because http.StatusNotModified was returned.
13088func (c *ProjectsRegionsOperationsListCall) Do(opts ...googleapi.CallOption) (*ListOperationsResponse, error) {
13089	gensupport.SetOptions(c.urlParams_, opts...)
13090	res, err := c.doRequest("json")
13091	if res != nil && res.StatusCode == http.StatusNotModified {
13092		if res.Body != nil {
13093			res.Body.Close()
13094		}
13095		return nil, &googleapi.Error{
13096			Code:   res.StatusCode,
13097			Header: res.Header,
13098		}
13099	}
13100	if err != nil {
13101		return nil, err
13102	}
13103	defer googleapi.CloseBody(res)
13104	if err := googleapi.CheckResponse(res); err != nil {
13105		return nil, err
13106	}
13107	ret := &ListOperationsResponse{
13108		ServerResponse: googleapi.ServerResponse{
13109			Header:         res.Header,
13110			HTTPStatusCode: res.StatusCode,
13111		},
13112	}
13113	target := &ret
13114	if err := gensupport.DecodeResponse(target, res); err != nil {
13115		return nil, err
13116	}
13117	return ret, nil
13118	// {
13119	//   "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.",
13120	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations",
13121	//   "httpMethod": "GET",
13122	//   "id": "dataproc.projects.regions.operations.list",
13123	//   "parameterOrder": [
13124	//     "name"
13125	//   ],
13126	//   "parameters": {
13127	//     "filter": {
13128	//       "description": "The standard list filter.",
13129	//       "location": "query",
13130	//       "type": "string"
13131	//     },
13132	//     "name": {
13133	//       "description": "The name of the operation's parent resource.",
13134	//       "location": "path",
13135	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations$",
13136	//       "required": true,
13137	//       "type": "string"
13138	//     },
13139	//     "pageSize": {
13140	//       "description": "The standard list page size.",
13141	//       "format": "int32",
13142	//       "location": "query",
13143	//       "type": "integer"
13144	//     },
13145	//     "pageToken": {
13146	//       "description": "The standard list page token.",
13147	//       "location": "query",
13148	//       "type": "string"
13149	//     }
13150	//   },
13151	//   "path": "v1beta2/{+name}",
13152	//   "response": {
13153	//     "$ref": "ListOperationsResponse"
13154	//   },
13155	//   "scopes": [
13156	//     "https://www.googleapis.com/auth/cloud-platform"
13157	//   ]
13158	// }
13159
13160}
13161
13162// Pages invokes f for each page of results.
13163// A non-nil error returned from f will halt the iteration.
13164// The provided context supersedes any context provided to the Context method.
13165func (c *ProjectsRegionsOperationsListCall) Pages(ctx context.Context, f func(*ListOperationsResponse) error) error {
13166	c.ctx_ = ctx
13167	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
13168	for {
13169		x, err := c.Do()
13170		if err != nil {
13171			return err
13172		}
13173		if err := f(x); err != nil {
13174			return err
13175		}
13176		if x.NextPageToken == "" {
13177			return nil
13178		}
13179		c.PageToken(x.NextPageToken)
13180	}
13181}
13182
13183// method id "dataproc.projects.regions.operations.setIamPolicy":
13184
13185type ProjectsRegionsOperationsSetIamPolicyCall struct {
13186	s                   *Service
13187	resource            string
13188	setiampolicyrequest *SetIamPolicyRequest
13189	urlParams_          gensupport.URLParams
13190	ctx_                context.Context
13191	header_             http.Header
13192}
13193
13194// SetIamPolicy: Sets the access control policy on the specified
13195// resource. Replaces any existing policy.Can return NOT_FOUND,
13196// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
13197//
13198// - resource: REQUIRED: The resource for which the policy is being
13199//   specified. See the operation documentation for the appropriate
13200//   value for this field.
13201func (r *ProjectsRegionsOperationsService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsOperationsSetIamPolicyCall {
13202	c := &ProjectsRegionsOperationsSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13203	c.resource = resource
13204	c.setiampolicyrequest = setiampolicyrequest
13205	return c
13206}
13207
13208// Fields allows partial responses to be retrieved. See
13209// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13210// for more information.
13211func (c *ProjectsRegionsOperationsSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsSetIamPolicyCall {
13212	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13213	return c
13214}
13215
13216// Context sets the context to be used in this call's Do method. Any
13217// pending HTTP request will be aborted if the provided context is
13218// canceled.
13219func (c *ProjectsRegionsOperationsSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsOperationsSetIamPolicyCall {
13220	c.ctx_ = ctx
13221	return c
13222}
13223
13224// Header returns an http.Header that can be modified by the caller to
13225// add HTTP headers to the request.
13226func (c *ProjectsRegionsOperationsSetIamPolicyCall) Header() http.Header {
13227	if c.header_ == nil {
13228		c.header_ = make(http.Header)
13229	}
13230	return c.header_
13231}
13232
13233func (c *ProjectsRegionsOperationsSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
13234	reqHeaders := make(http.Header)
13235	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
13236	for k, v := range c.header_ {
13237		reqHeaders[k] = v
13238	}
13239	reqHeaders.Set("User-Agent", c.s.userAgent())
13240	var body io.Reader = nil
13241	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
13242	if err != nil {
13243		return nil, err
13244	}
13245	reqHeaders.Set("Content-Type", "application/json")
13246	c.urlParams_.Set("alt", alt)
13247	c.urlParams_.Set("prettyPrint", "false")
13248	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
13249	urls += "?" + c.urlParams_.Encode()
13250	req, err := http.NewRequest("POST", urls, body)
13251	if err != nil {
13252		return nil, err
13253	}
13254	req.Header = reqHeaders
13255	googleapi.Expand(req.URL, map[string]string{
13256		"resource": c.resource,
13257	})
13258	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13259}
13260
13261// Do executes the "dataproc.projects.regions.operations.setIamPolicy" call.
13262// Exactly one of *Policy or error will be non-nil. Any non-2xx status
13263// code is an error. Response headers are in either
13264// *Policy.ServerResponse.Header or (if a response was returned at all)
13265// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13266// check whether the returned error was because http.StatusNotModified
13267// was returned.
13268func (c *ProjectsRegionsOperationsSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
13269	gensupport.SetOptions(c.urlParams_, opts...)
13270	res, err := c.doRequest("json")
13271	if res != nil && res.StatusCode == http.StatusNotModified {
13272		if res.Body != nil {
13273			res.Body.Close()
13274		}
13275		return nil, &googleapi.Error{
13276			Code:   res.StatusCode,
13277			Header: res.Header,
13278		}
13279	}
13280	if err != nil {
13281		return nil, err
13282	}
13283	defer googleapi.CloseBody(res)
13284	if err := googleapi.CheckResponse(res); err != nil {
13285		return nil, err
13286	}
13287	ret := &Policy{
13288		ServerResponse: googleapi.ServerResponse{
13289			Header:         res.Header,
13290			HTTPStatusCode: res.StatusCode,
13291		},
13292	}
13293	target := &ret
13294	if err := gensupport.DecodeResponse(target, res); err != nil {
13295		return nil, err
13296	}
13297	return ret, nil
13298	// {
13299	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
13300	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:setIamPolicy",
13301	//   "httpMethod": "POST",
13302	//   "id": "dataproc.projects.regions.operations.setIamPolicy",
13303	//   "parameterOrder": [
13304	//     "resource"
13305	//   ],
13306	//   "parameters": {
13307	//     "resource": {
13308	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
13309	//       "location": "path",
13310	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
13311	//       "required": true,
13312	//       "type": "string"
13313	//     }
13314	//   },
13315	//   "path": "v1beta2/{+resource}:setIamPolicy",
13316	//   "request": {
13317	//     "$ref": "SetIamPolicyRequest"
13318	//   },
13319	//   "response": {
13320	//     "$ref": "Policy"
13321	//   },
13322	//   "scopes": [
13323	//     "https://www.googleapis.com/auth/cloud-platform"
13324	//   ]
13325	// }
13326
13327}
13328
13329// method id "dataproc.projects.regions.operations.testIamPermissions":
13330
13331type ProjectsRegionsOperationsTestIamPermissionsCall struct {
13332	s                         *Service
13333	resource                  string
13334	testiampermissionsrequest *TestIamPermissionsRequest
13335	urlParams_                gensupport.URLParams
13336	ctx_                      context.Context
13337	header_                   http.Header
13338}
13339
13340// TestIamPermissions: Returns permissions that a caller has on the
13341// specified resource. If the resource does not exist, this will return
13342// an empty set of permissions, not a NOT_FOUND error.Note: This
13343// operation is designed to be used for building permission-aware UIs
13344// and command-line tools, not for authorization checking. This
13345// operation may "fail open" without warning.
13346//
13347// - resource: REQUIRED: The resource for which the policy detail is
13348//   being requested. See the operation documentation for the
13349//   appropriate value for this field.
13350func (r *ProjectsRegionsOperationsService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsOperationsTestIamPermissionsCall {
13351	c := &ProjectsRegionsOperationsTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13352	c.resource = resource
13353	c.testiampermissionsrequest = testiampermissionsrequest
13354	return c
13355}
13356
13357// Fields allows partial responses to be retrieved. See
13358// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13359// for more information.
13360func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsOperationsTestIamPermissionsCall {
13361	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13362	return c
13363}
13364
13365// Context sets the context to be used in this call's Do method. Any
13366// pending HTTP request will be aborted if the provided context is
13367// canceled.
13368func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsOperationsTestIamPermissionsCall {
13369	c.ctx_ = ctx
13370	return c
13371}
13372
13373// Header returns an http.Header that can be modified by the caller to
13374// add HTTP headers to the request.
13375func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Header() http.Header {
13376	if c.header_ == nil {
13377		c.header_ = make(http.Header)
13378	}
13379	return c.header_
13380}
13381
13382func (c *ProjectsRegionsOperationsTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
13383	reqHeaders := make(http.Header)
13384	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
13385	for k, v := range c.header_ {
13386		reqHeaders[k] = v
13387	}
13388	reqHeaders.Set("User-Agent", c.s.userAgent())
13389	var body io.Reader = nil
13390	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
13391	if err != nil {
13392		return nil, err
13393	}
13394	reqHeaders.Set("Content-Type", "application/json")
13395	c.urlParams_.Set("alt", alt)
13396	c.urlParams_.Set("prettyPrint", "false")
13397	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
13398	urls += "?" + c.urlParams_.Encode()
13399	req, err := http.NewRequest("POST", urls, body)
13400	if err != nil {
13401		return nil, err
13402	}
13403	req.Header = reqHeaders
13404	googleapi.Expand(req.URL, map[string]string{
13405		"resource": c.resource,
13406	})
13407	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13408}
13409
13410// Do executes the "dataproc.projects.regions.operations.testIamPermissions" call.
13411// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
13412// Any non-2xx status code is an error. Response headers are in either
13413// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
13414// was returned at all) in error.(*googleapi.Error).Header. Use
13415// googleapi.IsNotModified to check whether the returned error was
13416// because http.StatusNotModified was returned.
13417func (c *ProjectsRegionsOperationsTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
13418	gensupport.SetOptions(c.urlParams_, opts...)
13419	res, err := c.doRequest("json")
13420	if res != nil && res.StatusCode == http.StatusNotModified {
13421		if res.Body != nil {
13422			res.Body.Close()
13423		}
13424		return nil, &googleapi.Error{
13425			Code:   res.StatusCode,
13426			Header: res.Header,
13427		}
13428	}
13429	if err != nil {
13430		return nil, err
13431	}
13432	defer googleapi.CloseBody(res)
13433	if err := googleapi.CheckResponse(res); err != nil {
13434		return nil, err
13435	}
13436	ret := &TestIamPermissionsResponse{
13437		ServerResponse: googleapi.ServerResponse{
13438			Header:         res.Header,
13439			HTTPStatusCode: res.StatusCode,
13440		},
13441	}
13442	target := &ret
13443	if err := gensupport.DecodeResponse(target, res); err != nil {
13444		return nil, err
13445	}
13446	return ret, nil
13447	// {
13448	//   "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.",
13449	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/operations/{operationsId}:testIamPermissions",
13450	//   "httpMethod": "POST",
13451	//   "id": "dataproc.projects.regions.operations.testIamPermissions",
13452	//   "parameterOrder": [
13453	//     "resource"
13454	//   ],
13455	//   "parameters": {
13456	//     "resource": {
13457	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
13458	//       "location": "path",
13459	//       "pattern": "^projects/[^/]+/regions/[^/]+/operations/[^/]+$",
13460	//       "required": true,
13461	//       "type": "string"
13462	//     }
13463	//   },
13464	//   "path": "v1beta2/{+resource}:testIamPermissions",
13465	//   "request": {
13466	//     "$ref": "TestIamPermissionsRequest"
13467	//   },
13468	//   "response": {
13469	//     "$ref": "TestIamPermissionsResponse"
13470	//   },
13471	//   "scopes": [
13472	//     "https://www.googleapis.com/auth/cloud-platform"
13473	//   ]
13474	// }
13475
13476}
13477
13478// method id "dataproc.projects.regions.workflowTemplates.create":
13479
13480type ProjectsRegionsWorkflowTemplatesCreateCall struct {
13481	s                *Service
13482	parent           string
13483	workflowtemplate *WorkflowTemplate
13484	urlParams_       gensupport.URLParams
13485	ctx_             context.Context
13486	header_          http.Header
13487}
13488
13489// Create: Creates new workflow template.
13490//
13491// - parent: The resource name of the region or location, as described
13492//   in https://cloud.google.com/apis/design/resource_names. For
13493//   projects.regions.workflowTemplates,create, the resource name of the
13494//   region has the following format:
13495//   projects/{project_id}/regions/{region} For
13496//   projects.locations.workflowTemplates.create, the resource name of
13497//   the location has the following format:
13498//   projects/{project_id}/locations/{location}.
13499func (r *ProjectsRegionsWorkflowTemplatesService) Create(parent string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesCreateCall {
13500	c := &ProjectsRegionsWorkflowTemplatesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13501	c.parent = parent
13502	c.workflowtemplate = workflowtemplate
13503	return c
13504}
13505
13506// Fields allows partial responses to be retrieved. See
13507// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13508// for more information.
13509func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesCreateCall {
13510	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13511	return c
13512}
13513
13514// Context sets the context to be used in this call's Do method. Any
13515// pending HTTP request will be aborted if the provided context is
13516// canceled.
13517func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesCreateCall {
13518	c.ctx_ = ctx
13519	return c
13520}
13521
13522// Header returns an http.Header that can be modified by the caller to
13523// add HTTP headers to the request.
13524func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Header() http.Header {
13525	if c.header_ == nil {
13526		c.header_ = make(http.Header)
13527	}
13528	return c.header_
13529}
13530
13531func (c *ProjectsRegionsWorkflowTemplatesCreateCall) doRequest(alt string) (*http.Response, error) {
13532	reqHeaders := make(http.Header)
13533	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
13534	for k, v := range c.header_ {
13535		reqHeaders[k] = v
13536	}
13537	reqHeaders.Set("User-Agent", c.s.userAgent())
13538	var body io.Reader = nil
13539	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
13540	if err != nil {
13541		return nil, err
13542	}
13543	reqHeaders.Set("Content-Type", "application/json")
13544	c.urlParams_.Set("alt", alt)
13545	c.urlParams_.Set("prettyPrint", "false")
13546	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates")
13547	urls += "?" + c.urlParams_.Encode()
13548	req, err := http.NewRequest("POST", urls, body)
13549	if err != nil {
13550		return nil, err
13551	}
13552	req.Header = reqHeaders
13553	googleapi.Expand(req.URL, map[string]string{
13554		"parent": c.parent,
13555	})
13556	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13557}
13558
13559// Do executes the "dataproc.projects.regions.workflowTemplates.create" call.
13560// Exactly one of *WorkflowTemplate or error will be non-nil. Any
13561// non-2xx status code is an error. Response headers are in either
13562// *WorkflowTemplate.ServerResponse.Header or (if a response was
13563// returned at all) in error.(*googleapi.Error).Header. Use
13564// googleapi.IsNotModified to check whether the returned error was
13565// because http.StatusNotModified was returned.
13566func (c *ProjectsRegionsWorkflowTemplatesCreateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
13567	gensupport.SetOptions(c.urlParams_, opts...)
13568	res, err := c.doRequest("json")
13569	if res != nil && res.StatusCode == http.StatusNotModified {
13570		if res.Body != nil {
13571			res.Body.Close()
13572		}
13573		return nil, &googleapi.Error{
13574			Code:   res.StatusCode,
13575			Header: res.Header,
13576		}
13577	}
13578	if err != nil {
13579		return nil, err
13580	}
13581	defer googleapi.CloseBody(res)
13582	if err := googleapi.CheckResponse(res); err != nil {
13583		return nil, err
13584	}
13585	ret := &WorkflowTemplate{
13586		ServerResponse: googleapi.ServerResponse{
13587			Header:         res.Header,
13588			HTTPStatusCode: res.StatusCode,
13589		},
13590	}
13591	target := &ret
13592	if err := gensupport.DecodeResponse(target, res); err != nil {
13593		return nil, err
13594	}
13595	return ret, nil
13596	// {
13597	//   "description": "Creates new workflow template.",
13598	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates",
13599	//   "httpMethod": "POST",
13600	//   "id": "dataproc.projects.regions.workflowTemplates.create",
13601	//   "parameterOrder": [
13602	//     "parent"
13603	//   ],
13604	//   "parameters": {
13605	//     "parent": {
13606	//       "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}",
13607	//       "location": "path",
13608	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
13609	//       "required": true,
13610	//       "type": "string"
13611	//     }
13612	//   },
13613	//   "path": "v1beta2/{+parent}/workflowTemplates",
13614	//   "request": {
13615	//     "$ref": "WorkflowTemplate"
13616	//   },
13617	//   "response": {
13618	//     "$ref": "WorkflowTemplate"
13619	//   },
13620	//   "scopes": [
13621	//     "https://www.googleapis.com/auth/cloud-platform"
13622	//   ]
13623	// }
13624
13625}
13626
13627// method id "dataproc.projects.regions.workflowTemplates.delete":
13628
13629type ProjectsRegionsWorkflowTemplatesDeleteCall struct {
13630	s          *Service
13631	name       string
13632	urlParams_ gensupport.URLParams
13633	ctx_       context.Context
13634	header_    http.Header
13635}
13636
13637// Delete: Deletes a workflow template. It does not cancel in-progress
13638// workflows.
13639//
13640// - name: The resource name of the workflow template, as described in
13641//   https://cloud.google.com/apis/design/resource_names. For
13642//   projects.regions.workflowTemplates.delete, the resource name of the
13643//   template has the following format:
13644//   projects/{project_id}/regions/{region}/workflowTemplates/{template_i
13645//   d} For projects.locations.workflowTemplates.instantiate, the
13646//   resource name of the template has the following format:
13647//   projects/{project_id}/locations/{location}/workflowTemplates/{templa
13648//   te_id}.
13649func (r *ProjectsRegionsWorkflowTemplatesService) Delete(name string) *ProjectsRegionsWorkflowTemplatesDeleteCall {
13650	c := &ProjectsRegionsWorkflowTemplatesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13651	c.name = name
13652	return c
13653}
13654
13655// Version sets the optional parameter "version": The version of
13656// workflow template to delete. If specified, will only delete the
13657// template if the current server version matches specified version.
13658func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Version(version int64) *ProjectsRegionsWorkflowTemplatesDeleteCall {
13659	c.urlParams_.Set("version", fmt.Sprint(version))
13660	return c
13661}
13662
13663// Fields allows partial responses to be retrieved. See
13664// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13665// for more information.
13666func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesDeleteCall {
13667	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13668	return c
13669}
13670
13671// Context sets the context to be used in this call's Do method. Any
13672// pending HTTP request will be aborted if the provided context is
13673// canceled.
13674func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesDeleteCall {
13675	c.ctx_ = ctx
13676	return c
13677}
13678
13679// Header returns an http.Header that can be modified by the caller to
13680// add HTTP headers to the request.
13681func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Header() http.Header {
13682	if c.header_ == nil {
13683		c.header_ = make(http.Header)
13684	}
13685	return c.header_
13686}
13687
13688func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) doRequest(alt string) (*http.Response, error) {
13689	reqHeaders := make(http.Header)
13690	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
13691	for k, v := range c.header_ {
13692		reqHeaders[k] = v
13693	}
13694	reqHeaders.Set("User-Agent", c.s.userAgent())
13695	var body io.Reader = nil
13696	c.urlParams_.Set("alt", alt)
13697	c.urlParams_.Set("prettyPrint", "false")
13698	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
13699	urls += "?" + c.urlParams_.Encode()
13700	req, err := http.NewRequest("DELETE", urls, body)
13701	if err != nil {
13702		return nil, err
13703	}
13704	req.Header = reqHeaders
13705	googleapi.Expand(req.URL, map[string]string{
13706		"name": c.name,
13707	})
13708	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13709}
13710
13711// Do executes the "dataproc.projects.regions.workflowTemplates.delete" call.
13712// Exactly one of *Empty or error will be non-nil. Any non-2xx status
13713// code is an error. Response headers are in either
13714// *Empty.ServerResponse.Header or (if a response was returned at all)
13715// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
13716// check whether the returned error was because http.StatusNotModified
13717// was returned.
13718func (c *ProjectsRegionsWorkflowTemplatesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
13719	gensupport.SetOptions(c.urlParams_, opts...)
13720	res, err := c.doRequest("json")
13721	if res != nil && res.StatusCode == http.StatusNotModified {
13722		if res.Body != nil {
13723			res.Body.Close()
13724		}
13725		return nil, &googleapi.Error{
13726			Code:   res.StatusCode,
13727			Header: res.Header,
13728		}
13729	}
13730	if err != nil {
13731		return nil, err
13732	}
13733	defer googleapi.CloseBody(res)
13734	if err := googleapi.CheckResponse(res); err != nil {
13735		return nil, err
13736	}
13737	ret := &Empty{
13738		ServerResponse: googleapi.ServerResponse{
13739			Header:         res.Header,
13740			HTTPStatusCode: res.StatusCode,
13741		},
13742	}
13743	target := &ret
13744	if err := gensupport.DecodeResponse(target, res); err != nil {
13745		return nil, err
13746	}
13747	return ret, nil
13748	// {
13749	//   "description": "Deletes a workflow template. It does not cancel in-progress workflows.",
13750	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}",
13751	//   "httpMethod": "DELETE",
13752	//   "id": "dataproc.projects.regions.workflowTemplates.delete",
13753	//   "parameterOrder": [
13754	//     "name"
13755	//   ],
13756	//   "parameters": {
13757	//     "name": {
13758	//       "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}",
13759	//       "location": "path",
13760	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
13761	//       "required": true,
13762	//       "type": "string"
13763	//     },
13764	//     "version": {
13765	//       "description": "Optional. The version of workflow template to delete. If specified, will only delete the template if the current server version matches specified version.",
13766	//       "format": "int32",
13767	//       "location": "query",
13768	//       "type": "integer"
13769	//     }
13770	//   },
13771	//   "path": "v1beta2/{+name}",
13772	//   "response": {
13773	//     "$ref": "Empty"
13774	//   },
13775	//   "scopes": [
13776	//     "https://www.googleapis.com/auth/cloud-platform"
13777	//   ]
13778	// }
13779
13780}
13781
13782// method id "dataproc.projects.regions.workflowTemplates.get":
13783
13784type ProjectsRegionsWorkflowTemplatesGetCall struct {
13785	s            *Service
13786	name         string
13787	urlParams_   gensupport.URLParams
13788	ifNoneMatch_ string
13789	ctx_         context.Context
13790	header_      http.Header
13791}
13792
13793// Get: Retrieves the latest workflow template.Can retrieve previously
13794// instantiated template by specifying optional version parameter.
13795//
13796// - name: The resource name of the workflow template, as described in
13797//   https://cloud.google.com/apis/design/resource_names. For
13798//   projects.regions.workflowTemplates.get, the resource name of the
13799//   template has the following format:
13800//   projects/{project_id}/regions/{region}/workflowTemplates/{template_i
13801//   d} For projects.locations.workflowTemplates.get, the resource name
13802//   of the template has the following format:
13803//   projects/{project_id}/locations/{location}/workflowTemplates/{templa
13804//   te_id}.
13805func (r *ProjectsRegionsWorkflowTemplatesService) Get(name string) *ProjectsRegionsWorkflowTemplatesGetCall {
13806	c := &ProjectsRegionsWorkflowTemplatesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13807	c.name = name
13808	return c
13809}
13810
13811// Version sets the optional parameter "version": The version of
13812// workflow template to retrieve. Only previously instantiated versions
13813// can be retrieved.If unspecified, retrieves the current version.
13814func (c *ProjectsRegionsWorkflowTemplatesGetCall) Version(version int64) *ProjectsRegionsWorkflowTemplatesGetCall {
13815	c.urlParams_.Set("version", fmt.Sprint(version))
13816	return c
13817}
13818
13819// Fields allows partial responses to be retrieved. See
13820// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13821// for more information.
13822func (c *ProjectsRegionsWorkflowTemplatesGetCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesGetCall {
13823	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13824	return c
13825}
13826
13827// IfNoneMatch sets the optional parameter which makes the operation
13828// fail if the object's ETag matches the given value. This is useful for
13829// getting updates only after the object has changed since the last
13830// request. Use googleapi.IsNotModified to check whether the response
13831// error from Do is the result of In-None-Match.
13832func (c *ProjectsRegionsWorkflowTemplatesGetCall) IfNoneMatch(entityTag string) *ProjectsRegionsWorkflowTemplatesGetCall {
13833	c.ifNoneMatch_ = entityTag
13834	return c
13835}
13836
13837// Context sets the context to be used in this call's Do method. Any
13838// pending HTTP request will be aborted if the provided context is
13839// canceled.
13840func (c *ProjectsRegionsWorkflowTemplatesGetCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesGetCall {
13841	c.ctx_ = ctx
13842	return c
13843}
13844
13845// Header returns an http.Header that can be modified by the caller to
13846// add HTTP headers to the request.
13847func (c *ProjectsRegionsWorkflowTemplatesGetCall) Header() http.Header {
13848	if c.header_ == nil {
13849		c.header_ = make(http.Header)
13850	}
13851	return c.header_
13852}
13853
13854func (c *ProjectsRegionsWorkflowTemplatesGetCall) doRequest(alt string) (*http.Response, error) {
13855	reqHeaders := make(http.Header)
13856	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
13857	for k, v := range c.header_ {
13858		reqHeaders[k] = v
13859	}
13860	reqHeaders.Set("User-Agent", c.s.userAgent())
13861	if c.ifNoneMatch_ != "" {
13862		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
13863	}
13864	var body io.Reader = nil
13865	c.urlParams_.Set("alt", alt)
13866	c.urlParams_.Set("prettyPrint", "false")
13867	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
13868	urls += "?" + c.urlParams_.Encode()
13869	req, err := http.NewRequest("GET", urls, body)
13870	if err != nil {
13871		return nil, err
13872	}
13873	req.Header = reqHeaders
13874	googleapi.Expand(req.URL, map[string]string{
13875		"name": c.name,
13876	})
13877	return gensupport.SendRequest(c.ctx_, c.s.client, req)
13878}
13879
13880// Do executes the "dataproc.projects.regions.workflowTemplates.get" call.
13881// Exactly one of *WorkflowTemplate or error will be non-nil. Any
13882// non-2xx status code is an error. Response headers are in either
13883// *WorkflowTemplate.ServerResponse.Header or (if a response was
13884// returned at all) in error.(*googleapi.Error).Header. Use
13885// googleapi.IsNotModified to check whether the returned error was
13886// because http.StatusNotModified was returned.
13887func (c *ProjectsRegionsWorkflowTemplatesGetCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
13888	gensupport.SetOptions(c.urlParams_, opts...)
13889	res, err := c.doRequest("json")
13890	if res != nil && res.StatusCode == http.StatusNotModified {
13891		if res.Body != nil {
13892			res.Body.Close()
13893		}
13894		return nil, &googleapi.Error{
13895			Code:   res.StatusCode,
13896			Header: res.Header,
13897		}
13898	}
13899	if err != nil {
13900		return nil, err
13901	}
13902	defer googleapi.CloseBody(res)
13903	if err := googleapi.CheckResponse(res); err != nil {
13904		return nil, err
13905	}
13906	ret := &WorkflowTemplate{
13907		ServerResponse: googleapi.ServerResponse{
13908			Header:         res.Header,
13909			HTTPStatusCode: res.StatusCode,
13910		},
13911	}
13912	target := &ret
13913	if err := gensupport.DecodeResponse(target, res); err != nil {
13914		return nil, err
13915	}
13916	return ret, nil
13917	// {
13918	//   "description": "Retrieves the latest workflow template.Can retrieve previously instantiated template by specifying optional version parameter.",
13919	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}",
13920	//   "httpMethod": "GET",
13921	//   "id": "dataproc.projects.regions.workflowTemplates.get",
13922	//   "parameterOrder": [
13923	//     "name"
13924	//   ],
13925	//   "parameters": {
13926	//     "name": {
13927	//       "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}",
13928	//       "location": "path",
13929	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
13930	//       "required": true,
13931	//       "type": "string"
13932	//     },
13933	//     "version": {
13934	//       "description": "Optional. The version of workflow template to retrieve. Only previously instantiated versions can be retrieved.If unspecified, retrieves the current version.",
13935	//       "format": "int32",
13936	//       "location": "query",
13937	//       "type": "integer"
13938	//     }
13939	//   },
13940	//   "path": "v1beta2/{+name}",
13941	//   "response": {
13942	//     "$ref": "WorkflowTemplate"
13943	//   },
13944	//   "scopes": [
13945	//     "https://www.googleapis.com/auth/cloud-platform"
13946	//   ]
13947	// }
13948
13949}
13950
13951// method id "dataproc.projects.regions.workflowTemplates.getIamPolicy":
13952
13953type ProjectsRegionsWorkflowTemplatesGetIamPolicyCall struct {
13954	s            *Service
13955	resource     string
13956	urlParams_   gensupport.URLParams
13957	ifNoneMatch_ string
13958	ctx_         context.Context
13959	header_      http.Header
13960}
13961
13962// GetIamPolicy: Gets the access control policy for a resource. Returns
13963// an empty policy if the resource exists and does not have a policy
13964// set.
13965//
13966// - resource: REQUIRED: The resource for which the policy is being
13967//   requested. See the operation documentation for the appropriate
13968//   value for this field.
13969func (r *ProjectsRegionsWorkflowTemplatesService) GetIamPolicy(resource string) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
13970	c := &ProjectsRegionsWorkflowTemplatesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
13971	c.resource = resource
13972	return c
13973}
13974
13975// OptionsRequestedPolicyVersion sets the optional parameter
13976// "options.requestedPolicyVersion": The policy format version to be
13977// returned.Valid values are 0, 1, and 3. Requests specifying an invalid
13978// value will be rejected.Requests for policies with any conditional
13979// bindings must specify version 3. Policies without any conditional
13980// bindings may specify any valid value or leave the field unset.To
13981// learn which resources support conditions in their IAM policies, see
13982// the IAM documentation
13983// (https://cloud.google.com/iam/help/conditions/resource-policies).
13984func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) OptionsRequestedPolicyVersion(optionsRequestedPolicyVersion int64) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
13985	c.urlParams_.Set("options.requestedPolicyVersion", fmt.Sprint(optionsRequestedPolicyVersion))
13986	return c
13987}
13988
13989// Fields allows partial responses to be retrieved. See
13990// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
13991// for more information.
13992func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
13993	c.urlParams_.Set("fields", googleapi.CombineFields(s))
13994	return c
13995}
13996
13997// IfNoneMatch sets the optional parameter which makes the operation
13998// fail if the object's ETag matches the given value. This is useful for
13999// getting updates only after the object has changed since the last
14000// request. Use googleapi.IsNotModified to check whether the response
14001// error from Do is the result of In-None-Match.
14002func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) IfNoneMatch(entityTag string) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
14003	c.ifNoneMatch_ = entityTag
14004	return c
14005}
14006
14007// Context sets the context to be used in this call's Do method. Any
14008// pending HTTP request will be aborted if the provided context is
14009// canceled.
14010func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall {
14011	c.ctx_ = ctx
14012	return c
14013}
14014
14015// Header returns an http.Header that can be modified by the caller to
14016// add HTTP headers to the request.
14017func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Header() http.Header {
14018	if c.header_ == nil {
14019		c.header_ = make(http.Header)
14020	}
14021	return c.header_
14022}
14023
14024func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14025	reqHeaders := make(http.Header)
14026	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
14027	for k, v := range c.header_ {
14028		reqHeaders[k] = v
14029	}
14030	reqHeaders.Set("User-Agent", c.s.userAgent())
14031	if c.ifNoneMatch_ != "" {
14032		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14033	}
14034	var body io.Reader = nil
14035	c.urlParams_.Set("alt", alt)
14036	c.urlParams_.Set("prettyPrint", "false")
14037	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:getIamPolicy")
14038	urls += "?" + c.urlParams_.Encode()
14039	req, err := http.NewRequest("GET", urls, body)
14040	if err != nil {
14041		return nil, err
14042	}
14043	req.Header = reqHeaders
14044	googleapi.Expand(req.URL, map[string]string{
14045		"resource": c.resource,
14046	})
14047	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14048}
14049
14050// Do executes the "dataproc.projects.regions.workflowTemplates.getIamPolicy" call.
14051// Exactly one of *Policy or error will be non-nil. Any non-2xx status
14052// code is an error. Response headers are in either
14053// *Policy.ServerResponse.Header or (if a response was returned at all)
14054// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14055// check whether the returned error was because http.StatusNotModified
14056// was returned.
14057func (c *ProjectsRegionsWorkflowTemplatesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14058	gensupport.SetOptions(c.urlParams_, opts...)
14059	res, err := c.doRequest("json")
14060	if res != nil && res.StatusCode == http.StatusNotModified {
14061		if res.Body != nil {
14062			res.Body.Close()
14063		}
14064		return nil, &googleapi.Error{
14065			Code:   res.StatusCode,
14066			Header: res.Header,
14067		}
14068	}
14069	if err != nil {
14070		return nil, err
14071	}
14072	defer googleapi.CloseBody(res)
14073	if err := googleapi.CheckResponse(res); err != nil {
14074		return nil, err
14075	}
14076	ret := &Policy{
14077		ServerResponse: googleapi.ServerResponse{
14078			Header:         res.Header,
14079			HTTPStatusCode: res.StatusCode,
14080		},
14081	}
14082	target := &ret
14083	if err := gensupport.DecodeResponse(target, res); err != nil {
14084		return nil, err
14085	}
14086	return ret, nil
14087	// {
14088	//   "description": "Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.",
14089	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:getIamPolicy",
14090	//   "httpMethod": "GET",
14091	//   "id": "dataproc.projects.regions.workflowTemplates.getIamPolicy",
14092	//   "parameterOrder": [
14093	//     "resource"
14094	//   ],
14095	//   "parameters": {
14096	//     "options.requestedPolicyVersion": {
14097	//       "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).",
14098	//       "format": "int32",
14099	//       "location": "query",
14100	//       "type": "integer"
14101	//     },
14102	//     "resource": {
14103	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
14104	//       "location": "path",
14105	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
14106	//       "required": true,
14107	//       "type": "string"
14108	//     }
14109	//   },
14110	//   "path": "v1beta2/{+resource}:getIamPolicy",
14111	//   "response": {
14112	//     "$ref": "Policy"
14113	//   },
14114	//   "scopes": [
14115	//     "https://www.googleapis.com/auth/cloud-platform"
14116	//   ]
14117	// }
14118
14119}
14120
14121// method id "dataproc.projects.regions.workflowTemplates.instantiate":
14122
14123type ProjectsRegionsWorkflowTemplatesInstantiateCall struct {
14124	s                                  *Service
14125	name                               string
14126	instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest
14127	urlParams_                         gensupport.URLParams
14128	ctx_                               context.Context
14129	header_                            http.Header
14130}
14131
14132// Instantiate: Instantiates a template and begins execution.The
14133// returned Operation can be used to track execution of workflow by
14134// polling operations.get. The Operation will complete when entire
14135// workflow is finished.The running workflow can be aborted via
14136// operations.cancel. This will cause any inflight jobs to be cancelled
14137// and workflow-owned clusters to be deleted.The Operation.metadata will
14138// be WorkflowMetadata
14139// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1beta2#workflowmetadata).
14140// Also see Using WorkflowMetadata
14141// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On
14142// successful completion, Operation.response will be Empty.
14143//
14144// - name: The resource name of the workflow template, as described in
14145//   https://cloud.google.com/apis/design/resource_names. For
14146//   projects.regions.workflowTemplates.instantiate, the resource name
14147//   of the template has the following format:
14148//   projects/{project_id}/regions/{region}/workflowTemplates/{template_i
14149//   d} For projects.locations.workflowTemplates.instantiate, the
14150//   resource name of the template has the following format:
14151//   projects/{project_id}/locations/{location}/workflowTemplates/{templa
14152//   te_id}.
14153func (r *ProjectsRegionsWorkflowTemplatesService) Instantiate(name string, instantiateworkflowtemplaterequest *InstantiateWorkflowTemplateRequest) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
14154	c := &ProjectsRegionsWorkflowTemplatesInstantiateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14155	c.name = name
14156	c.instantiateworkflowtemplaterequest = instantiateworkflowtemplaterequest
14157	return c
14158}
14159
14160// Fields allows partial responses to be retrieved. See
14161// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14162// for more information.
14163func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
14164	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14165	return c
14166}
14167
14168// Context sets the context to be used in this call's Do method. Any
14169// pending HTTP request will be aborted if the provided context is
14170// canceled.
14171func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesInstantiateCall {
14172	c.ctx_ = ctx
14173	return c
14174}
14175
14176// Header returns an http.Header that can be modified by the caller to
14177// add HTTP headers to the request.
14178func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Header() http.Header {
14179	if c.header_ == nil {
14180		c.header_ = make(http.Header)
14181	}
14182	return c.header_
14183}
14184
14185func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) doRequest(alt string) (*http.Response, error) {
14186	reqHeaders := make(http.Header)
14187	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
14188	for k, v := range c.header_ {
14189		reqHeaders[k] = v
14190	}
14191	reqHeaders.Set("User-Agent", c.s.userAgent())
14192	var body io.Reader = nil
14193	body, err := googleapi.WithoutDataWrapper.JSONReader(c.instantiateworkflowtemplaterequest)
14194	if err != nil {
14195		return nil, err
14196	}
14197	reqHeaders.Set("Content-Type", "application/json")
14198	c.urlParams_.Set("alt", alt)
14199	c.urlParams_.Set("prettyPrint", "false")
14200	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}:instantiate")
14201	urls += "?" + c.urlParams_.Encode()
14202	req, err := http.NewRequest("POST", urls, body)
14203	if err != nil {
14204		return nil, err
14205	}
14206	req.Header = reqHeaders
14207	googleapi.Expand(req.URL, map[string]string{
14208		"name": c.name,
14209	})
14210	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14211}
14212
14213// Do executes the "dataproc.projects.regions.workflowTemplates.instantiate" call.
14214// Exactly one of *Operation or error will be non-nil. Any non-2xx
14215// status code is an error. Response headers are in either
14216// *Operation.ServerResponse.Header or (if a response was returned at
14217// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14218// to check whether the returned error was because
14219// http.StatusNotModified was returned.
14220func (c *ProjectsRegionsWorkflowTemplatesInstantiateCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14221	gensupport.SetOptions(c.urlParams_, opts...)
14222	res, err := c.doRequest("json")
14223	if res != nil && res.StatusCode == http.StatusNotModified {
14224		if res.Body != nil {
14225			res.Body.Close()
14226		}
14227		return nil, &googleapi.Error{
14228			Code:   res.StatusCode,
14229			Header: res.Header,
14230		}
14231	}
14232	if err != nil {
14233		return nil, err
14234	}
14235	defer googleapi.CloseBody(res)
14236	if err := googleapi.CheckResponse(res); err != nil {
14237		return nil, err
14238	}
14239	ret := &Operation{
14240		ServerResponse: googleapi.ServerResponse{
14241			Header:         res.Header,
14242			HTTPStatusCode: res.StatusCode,
14243		},
14244	}
14245	target := &ret
14246	if err := gensupport.DecodeResponse(target, res); err != nil {
14247		return nil, err
14248	}
14249	return ret, nil
14250	// {
14251	//   "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.",
14252	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:instantiate",
14253	//   "httpMethod": "POST",
14254	//   "id": "dataproc.projects.regions.workflowTemplates.instantiate",
14255	//   "parameterOrder": [
14256	//     "name"
14257	//   ],
14258	//   "parameters": {
14259	//     "name": {
14260	//       "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}",
14261	//       "location": "path",
14262	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
14263	//       "required": true,
14264	//       "type": "string"
14265	//     }
14266	//   },
14267	//   "path": "v1beta2/{+name}:instantiate",
14268	//   "request": {
14269	//     "$ref": "InstantiateWorkflowTemplateRequest"
14270	//   },
14271	//   "response": {
14272	//     "$ref": "Operation"
14273	//   },
14274	//   "scopes": [
14275	//     "https://www.googleapis.com/auth/cloud-platform"
14276	//   ]
14277	// }
14278
14279}
14280
14281// method id "dataproc.projects.regions.workflowTemplates.instantiateInline":
14282
14283type ProjectsRegionsWorkflowTemplatesInstantiateInlineCall struct {
14284	s                *Service
14285	parent           string
14286	workflowtemplate *WorkflowTemplate
14287	urlParams_       gensupport.URLParams
14288	ctx_             context.Context
14289	header_          http.Header
14290}
14291
14292// InstantiateInline: Instantiates a template and begins execution.This
14293// method is equivalent to executing the sequence
14294// CreateWorkflowTemplate, InstantiateWorkflowTemplate,
14295// DeleteWorkflowTemplate.The returned Operation can be used to track
14296// execution of workflow by polling operations.get. The Operation will
14297// complete when entire workflow is finished.The running workflow can be
14298// aborted via operations.cancel. This will cause any inflight jobs to
14299// be cancelled and workflow-owned clusters to be deleted.The
14300// Operation.metadata will be WorkflowMetadata
14301// (https://cloud.google.com/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#workflowmetadata).
14302// Also see Using WorkflowMetadata
14303// (https://cloud.google.com/dataproc/docs/concepts/workflows/debugging#using_workflowmetadata).On
14304// successful completion, Operation.response will be Empty.
14305//
14306// - parent: The resource name of the region or location, as described
14307//   in https://cloud.google.com/apis/design/resource_names. For
14308//   projects.regions.workflowTemplates,instantiateinline, the resource
14309//   name of the region has the following format:
14310//   projects/{project_id}/regions/{region} For
14311//   projects.locations.workflowTemplates.instantiateinline, the
14312//   resource name of the location has the following format:
14313//   projects/{project_id}/locations/{location}.
14314func (r *ProjectsRegionsWorkflowTemplatesService) InstantiateInline(parent string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
14315	c := &ProjectsRegionsWorkflowTemplatesInstantiateInlineCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14316	c.parent = parent
14317	c.workflowtemplate = workflowtemplate
14318	return c
14319}
14320
14321// InstanceId sets the optional parameter "instanceId": Deprecated.
14322// Please use request_id field instead.
14323func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) InstanceId(instanceId string) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
14324	c.urlParams_.Set("instanceId", instanceId)
14325	return c
14326}
14327
14328// RequestId sets the optional parameter "requestId": A tag that
14329// prevents multiple concurrent workflow instances with the same tag
14330// from running. This mitigates risk of concurrent instances started due
14331// to retries.It is recommended to always set this value to a UUID
14332// (https://en.wikipedia.org/wiki/Universally_unique_identifier).The tag
14333// must contain only letters (a-z, A-Z), numbers (0-9), underscores (_),
14334// and hyphens (-). The maximum length is 40 characters.
14335func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) RequestId(requestId string) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
14336	c.urlParams_.Set("requestId", requestId)
14337	return c
14338}
14339
14340// Fields allows partial responses to be retrieved. See
14341// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14342// for more information.
14343func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
14344	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14345	return c
14346}
14347
14348// Context sets the context to be used in this call's Do method. Any
14349// pending HTTP request will be aborted if the provided context is
14350// canceled.
14351func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall {
14352	c.ctx_ = ctx
14353	return c
14354}
14355
14356// Header returns an http.Header that can be modified by the caller to
14357// add HTTP headers to the request.
14358func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Header() http.Header {
14359	if c.header_ == nil {
14360		c.header_ = make(http.Header)
14361	}
14362	return c.header_
14363}
14364
14365func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) doRequest(alt string) (*http.Response, error) {
14366	reqHeaders := make(http.Header)
14367	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
14368	for k, v := range c.header_ {
14369		reqHeaders[k] = v
14370	}
14371	reqHeaders.Set("User-Agent", c.s.userAgent())
14372	var body io.Reader = nil
14373	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
14374	if err != nil {
14375		return nil, err
14376	}
14377	reqHeaders.Set("Content-Type", "application/json")
14378	c.urlParams_.Set("alt", alt)
14379	c.urlParams_.Set("prettyPrint", "false")
14380	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates:instantiateInline")
14381	urls += "?" + c.urlParams_.Encode()
14382	req, err := http.NewRequest("POST", urls, body)
14383	if err != nil {
14384		return nil, err
14385	}
14386	req.Header = reqHeaders
14387	googleapi.Expand(req.URL, map[string]string{
14388		"parent": c.parent,
14389	})
14390	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14391}
14392
14393// Do executes the "dataproc.projects.regions.workflowTemplates.instantiateInline" call.
14394// Exactly one of *Operation or error will be non-nil. Any non-2xx
14395// status code is an error. Response headers are in either
14396// *Operation.ServerResponse.Header or (if a response was returned at
14397// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
14398// to check whether the returned error was because
14399// http.StatusNotModified was returned.
14400func (c *ProjectsRegionsWorkflowTemplatesInstantiateInlineCall) Do(opts ...googleapi.CallOption) (*Operation, error) {
14401	gensupport.SetOptions(c.urlParams_, opts...)
14402	res, err := c.doRequest("json")
14403	if res != nil && res.StatusCode == http.StatusNotModified {
14404		if res.Body != nil {
14405			res.Body.Close()
14406		}
14407		return nil, &googleapi.Error{
14408			Code:   res.StatusCode,
14409			Header: res.Header,
14410		}
14411	}
14412	if err != nil {
14413		return nil, err
14414	}
14415	defer googleapi.CloseBody(res)
14416	if err := googleapi.CheckResponse(res); err != nil {
14417		return nil, err
14418	}
14419	ret := &Operation{
14420		ServerResponse: googleapi.ServerResponse{
14421			Header:         res.Header,
14422			HTTPStatusCode: res.StatusCode,
14423		},
14424	}
14425	target := &ret
14426	if err := gensupport.DecodeResponse(target, res); err != nil {
14427		return nil, err
14428	}
14429	return ret, nil
14430	// {
14431	//   "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.",
14432	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates:instantiateInline",
14433	//   "httpMethod": "POST",
14434	//   "id": "dataproc.projects.regions.workflowTemplates.instantiateInline",
14435	//   "parameterOrder": [
14436	//     "parent"
14437	//   ],
14438	//   "parameters": {
14439	//     "instanceId": {
14440	//       "description": "Deprecated. Please use request_id field instead.",
14441	//       "location": "query",
14442	//       "type": "string"
14443	//     },
14444	//     "parent": {
14445	//       "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}",
14446	//       "location": "path",
14447	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
14448	//       "required": true,
14449	//       "type": "string"
14450	//     },
14451	//     "requestId": {
14452	//       "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.",
14453	//       "location": "query",
14454	//       "type": "string"
14455	//     }
14456	//   },
14457	//   "path": "v1beta2/{+parent}/workflowTemplates:instantiateInline",
14458	//   "request": {
14459	//     "$ref": "WorkflowTemplate"
14460	//   },
14461	//   "response": {
14462	//     "$ref": "Operation"
14463	//   },
14464	//   "scopes": [
14465	//     "https://www.googleapis.com/auth/cloud-platform"
14466	//   ]
14467	// }
14468
14469}
14470
14471// method id "dataproc.projects.regions.workflowTemplates.list":
14472
14473type ProjectsRegionsWorkflowTemplatesListCall struct {
14474	s            *Service
14475	parent       string
14476	urlParams_   gensupport.URLParams
14477	ifNoneMatch_ string
14478	ctx_         context.Context
14479	header_      http.Header
14480}
14481
14482// List: Lists workflows that match the specified filter in the request.
14483//
14484// - parent: The resource name of the region or location, as described
14485//   in https://cloud.google.com/apis/design/resource_names. For
14486//   projects.regions.workflowTemplates,list, the resource name of the
14487//   region has the following format:
14488//   projects/{project_id}/regions/{region} For
14489//   projects.locations.workflowTemplates.list, the resource name of the
14490//   location has the following format:
14491//   projects/{project_id}/locations/{location}.
14492func (r *ProjectsRegionsWorkflowTemplatesService) List(parent string) *ProjectsRegionsWorkflowTemplatesListCall {
14493	c := &ProjectsRegionsWorkflowTemplatesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14494	c.parent = parent
14495	return c
14496}
14497
14498// PageSize sets the optional parameter "pageSize": The maximum number
14499// of results to return in each response.
14500func (c *ProjectsRegionsWorkflowTemplatesListCall) PageSize(pageSize int64) *ProjectsRegionsWorkflowTemplatesListCall {
14501	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
14502	return c
14503}
14504
14505// PageToken sets the optional parameter "pageToken": The page token,
14506// returned by a previous call, to request the next page of results.
14507func (c *ProjectsRegionsWorkflowTemplatesListCall) PageToken(pageToken string) *ProjectsRegionsWorkflowTemplatesListCall {
14508	c.urlParams_.Set("pageToken", pageToken)
14509	return c
14510}
14511
14512// Fields allows partial responses to be retrieved. See
14513// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14514// for more information.
14515func (c *ProjectsRegionsWorkflowTemplatesListCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesListCall {
14516	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14517	return c
14518}
14519
14520// IfNoneMatch sets the optional parameter which makes the operation
14521// fail if the object's ETag matches the given value. This is useful for
14522// getting updates only after the object has changed since the last
14523// request. Use googleapi.IsNotModified to check whether the response
14524// error from Do is the result of In-None-Match.
14525func (c *ProjectsRegionsWorkflowTemplatesListCall) IfNoneMatch(entityTag string) *ProjectsRegionsWorkflowTemplatesListCall {
14526	c.ifNoneMatch_ = entityTag
14527	return c
14528}
14529
14530// Context sets the context to be used in this call's Do method. Any
14531// pending HTTP request will be aborted if the provided context is
14532// canceled.
14533func (c *ProjectsRegionsWorkflowTemplatesListCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesListCall {
14534	c.ctx_ = ctx
14535	return c
14536}
14537
14538// Header returns an http.Header that can be modified by the caller to
14539// add HTTP headers to the request.
14540func (c *ProjectsRegionsWorkflowTemplatesListCall) Header() http.Header {
14541	if c.header_ == nil {
14542		c.header_ = make(http.Header)
14543	}
14544	return c.header_
14545}
14546
14547func (c *ProjectsRegionsWorkflowTemplatesListCall) doRequest(alt string) (*http.Response, error) {
14548	reqHeaders := make(http.Header)
14549	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
14550	for k, v := range c.header_ {
14551		reqHeaders[k] = v
14552	}
14553	reqHeaders.Set("User-Agent", c.s.userAgent())
14554	if c.ifNoneMatch_ != "" {
14555		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
14556	}
14557	var body io.Reader = nil
14558	c.urlParams_.Set("alt", alt)
14559	c.urlParams_.Set("prettyPrint", "false")
14560	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+parent}/workflowTemplates")
14561	urls += "?" + c.urlParams_.Encode()
14562	req, err := http.NewRequest("GET", urls, body)
14563	if err != nil {
14564		return nil, err
14565	}
14566	req.Header = reqHeaders
14567	googleapi.Expand(req.URL, map[string]string{
14568		"parent": c.parent,
14569	})
14570	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14571}
14572
14573// Do executes the "dataproc.projects.regions.workflowTemplates.list" call.
14574// Exactly one of *ListWorkflowTemplatesResponse or error will be
14575// non-nil. Any non-2xx status code is an error. Response headers are in
14576// either *ListWorkflowTemplatesResponse.ServerResponse.Header or (if a
14577// response was returned at all) in error.(*googleapi.Error).Header. Use
14578// googleapi.IsNotModified to check whether the returned error was
14579// because http.StatusNotModified was returned.
14580func (c *ProjectsRegionsWorkflowTemplatesListCall) Do(opts ...googleapi.CallOption) (*ListWorkflowTemplatesResponse, error) {
14581	gensupport.SetOptions(c.urlParams_, opts...)
14582	res, err := c.doRequest("json")
14583	if res != nil && res.StatusCode == http.StatusNotModified {
14584		if res.Body != nil {
14585			res.Body.Close()
14586		}
14587		return nil, &googleapi.Error{
14588			Code:   res.StatusCode,
14589			Header: res.Header,
14590		}
14591	}
14592	if err != nil {
14593		return nil, err
14594	}
14595	defer googleapi.CloseBody(res)
14596	if err := googleapi.CheckResponse(res); err != nil {
14597		return nil, err
14598	}
14599	ret := &ListWorkflowTemplatesResponse{
14600		ServerResponse: googleapi.ServerResponse{
14601			Header:         res.Header,
14602			HTTPStatusCode: res.StatusCode,
14603		},
14604	}
14605	target := &ret
14606	if err := gensupport.DecodeResponse(target, res); err != nil {
14607		return nil, err
14608	}
14609	return ret, nil
14610	// {
14611	//   "description": "Lists workflows that match the specified filter in the request.",
14612	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates",
14613	//   "httpMethod": "GET",
14614	//   "id": "dataproc.projects.regions.workflowTemplates.list",
14615	//   "parameterOrder": [
14616	//     "parent"
14617	//   ],
14618	//   "parameters": {
14619	//     "pageSize": {
14620	//       "description": "Optional. The maximum number of results to return in each response.",
14621	//       "format": "int32",
14622	//       "location": "query",
14623	//       "type": "integer"
14624	//     },
14625	//     "pageToken": {
14626	//       "description": "Optional. The page token, returned by a previous call, to request the next page of results.",
14627	//       "location": "query",
14628	//       "type": "string"
14629	//     },
14630	//     "parent": {
14631	//       "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}",
14632	//       "location": "path",
14633	//       "pattern": "^projects/[^/]+/regions/[^/]+$",
14634	//       "required": true,
14635	//       "type": "string"
14636	//     }
14637	//   },
14638	//   "path": "v1beta2/{+parent}/workflowTemplates",
14639	//   "response": {
14640	//     "$ref": "ListWorkflowTemplatesResponse"
14641	//   },
14642	//   "scopes": [
14643	//     "https://www.googleapis.com/auth/cloud-platform"
14644	//   ]
14645	// }
14646
14647}
14648
14649// Pages invokes f for each page of results.
14650// A non-nil error returned from f will halt the iteration.
14651// The provided context supersedes any context provided to the Context method.
14652func (c *ProjectsRegionsWorkflowTemplatesListCall) Pages(ctx context.Context, f func(*ListWorkflowTemplatesResponse) error) error {
14653	c.ctx_ = ctx
14654	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
14655	for {
14656		x, err := c.Do()
14657		if err != nil {
14658			return err
14659		}
14660		if err := f(x); err != nil {
14661			return err
14662		}
14663		if x.NextPageToken == "" {
14664			return nil
14665		}
14666		c.PageToken(x.NextPageToken)
14667	}
14668}
14669
14670// method id "dataproc.projects.regions.workflowTemplates.setIamPolicy":
14671
14672type ProjectsRegionsWorkflowTemplatesSetIamPolicyCall struct {
14673	s                   *Service
14674	resource            string
14675	setiampolicyrequest *SetIamPolicyRequest
14676	urlParams_          gensupport.URLParams
14677	ctx_                context.Context
14678	header_             http.Header
14679}
14680
14681// SetIamPolicy: Sets the access control policy on the specified
14682// resource. Replaces any existing policy.Can return NOT_FOUND,
14683// INVALID_ARGUMENT, and PERMISSION_DENIED errors.
14684//
14685// - resource: REQUIRED: The resource for which the policy is being
14686//   specified. See the operation documentation for the appropriate
14687//   value for this field.
14688func (r *ProjectsRegionsWorkflowTemplatesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
14689	c := &ProjectsRegionsWorkflowTemplatesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14690	c.resource = resource
14691	c.setiampolicyrequest = setiampolicyrequest
14692	return c
14693}
14694
14695// Fields allows partial responses to be retrieved. See
14696// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14697// for more information.
14698func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
14699	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14700	return c
14701}
14702
14703// Context sets the context to be used in this call's Do method. Any
14704// pending HTTP request will be aborted if the provided context is
14705// canceled.
14706func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall {
14707	c.ctx_ = ctx
14708	return c
14709}
14710
14711// Header returns an http.Header that can be modified by the caller to
14712// add HTTP headers to the request.
14713func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Header() http.Header {
14714	if c.header_ == nil {
14715		c.header_ = make(http.Header)
14716	}
14717	return c.header_
14718}
14719
14720func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
14721	reqHeaders := make(http.Header)
14722	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
14723	for k, v := range c.header_ {
14724		reqHeaders[k] = v
14725	}
14726	reqHeaders.Set("User-Agent", c.s.userAgent())
14727	var body io.Reader = nil
14728	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
14729	if err != nil {
14730		return nil, err
14731	}
14732	reqHeaders.Set("Content-Type", "application/json")
14733	c.urlParams_.Set("alt", alt)
14734	c.urlParams_.Set("prettyPrint", "false")
14735	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:setIamPolicy")
14736	urls += "?" + c.urlParams_.Encode()
14737	req, err := http.NewRequest("POST", urls, body)
14738	if err != nil {
14739		return nil, err
14740	}
14741	req.Header = reqHeaders
14742	googleapi.Expand(req.URL, map[string]string{
14743		"resource": c.resource,
14744	})
14745	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14746}
14747
14748// Do executes the "dataproc.projects.regions.workflowTemplates.setIamPolicy" call.
14749// Exactly one of *Policy or error will be non-nil. Any non-2xx status
14750// code is an error. Response headers are in either
14751// *Policy.ServerResponse.Header or (if a response was returned at all)
14752// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
14753// check whether the returned error was because http.StatusNotModified
14754// was returned.
14755func (c *ProjectsRegionsWorkflowTemplatesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
14756	gensupport.SetOptions(c.urlParams_, opts...)
14757	res, err := c.doRequest("json")
14758	if res != nil && res.StatusCode == http.StatusNotModified {
14759		if res.Body != nil {
14760			res.Body.Close()
14761		}
14762		return nil, &googleapi.Error{
14763			Code:   res.StatusCode,
14764			Header: res.Header,
14765		}
14766	}
14767	if err != nil {
14768		return nil, err
14769	}
14770	defer googleapi.CloseBody(res)
14771	if err := googleapi.CheckResponse(res); err != nil {
14772		return nil, err
14773	}
14774	ret := &Policy{
14775		ServerResponse: googleapi.ServerResponse{
14776			Header:         res.Header,
14777			HTTPStatusCode: res.StatusCode,
14778		},
14779	}
14780	target := &ret
14781	if err := gensupport.DecodeResponse(target, res); err != nil {
14782		return nil, err
14783	}
14784	return ret, nil
14785	// {
14786	//   "description": "Sets the access control policy on the specified resource. Replaces any existing policy.Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.",
14787	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:setIamPolicy",
14788	//   "httpMethod": "POST",
14789	//   "id": "dataproc.projects.regions.workflowTemplates.setIamPolicy",
14790	//   "parameterOrder": [
14791	//     "resource"
14792	//   ],
14793	//   "parameters": {
14794	//     "resource": {
14795	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
14796	//       "location": "path",
14797	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
14798	//       "required": true,
14799	//       "type": "string"
14800	//     }
14801	//   },
14802	//   "path": "v1beta2/{+resource}:setIamPolicy",
14803	//   "request": {
14804	//     "$ref": "SetIamPolicyRequest"
14805	//   },
14806	//   "response": {
14807	//     "$ref": "Policy"
14808	//   },
14809	//   "scopes": [
14810	//     "https://www.googleapis.com/auth/cloud-platform"
14811	//   ]
14812	// }
14813
14814}
14815
14816// method id "dataproc.projects.regions.workflowTemplates.testIamPermissions":
14817
14818type ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall struct {
14819	s                         *Service
14820	resource                  string
14821	testiampermissionsrequest *TestIamPermissionsRequest
14822	urlParams_                gensupport.URLParams
14823	ctx_                      context.Context
14824	header_                   http.Header
14825}
14826
14827// TestIamPermissions: Returns permissions that a caller has on the
14828// specified resource. If the resource does not exist, this will return
14829// an empty set of permissions, not a NOT_FOUND error.Note: This
14830// operation is designed to be used for building permission-aware UIs
14831// and command-line tools, not for authorization checking. This
14832// operation may "fail open" without warning.
14833//
14834// - resource: REQUIRED: The resource for which the policy detail is
14835//   being requested. See the operation documentation for the
14836//   appropriate value for this field.
14837func (r *ProjectsRegionsWorkflowTemplatesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
14838	c := &ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14839	c.resource = resource
14840	c.testiampermissionsrequest = testiampermissionsrequest
14841	return c
14842}
14843
14844// Fields allows partial responses to be retrieved. See
14845// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14846// for more information.
14847func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
14848	c.urlParams_.Set("fields", googleapi.CombineFields(s))
14849	return c
14850}
14851
14852// Context sets the context to be used in this call's Do method. Any
14853// pending HTTP request will be aborted if the provided context is
14854// canceled.
14855func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall {
14856	c.ctx_ = ctx
14857	return c
14858}
14859
14860// Header returns an http.Header that can be modified by the caller to
14861// add HTTP headers to the request.
14862func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Header() http.Header {
14863	if c.header_ == nil {
14864		c.header_ = make(http.Header)
14865	}
14866	return c.header_
14867}
14868
14869func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
14870	reqHeaders := make(http.Header)
14871	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
14872	for k, v := range c.header_ {
14873		reqHeaders[k] = v
14874	}
14875	reqHeaders.Set("User-Agent", c.s.userAgent())
14876	var body io.Reader = nil
14877	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
14878	if err != nil {
14879		return nil, err
14880	}
14881	reqHeaders.Set("Content-Type", "application/json")
14882	c.urlParams_.Set("alt", alt)
14883	c.urlParams_.Set("prettyPrint", "false")
14884	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+resource}:testIamPermissions")
14885	urls += "?" + c.urlParams_.Encode()
14886	req, err := http.NewRequest("POST", urls, body)
14887	if err != nil {
14888		return nil, err
14889	}
14890	req.Header = reqHeaders
14891	googleapi.Expand(req.URL, map[string]string{
14892		"resource": c.resource,
14893	})
14894	return gensupport.SendRequest(c.ctx_, c.s.client, req)
14895}
14896
14897// Do executes the "dataproc.projects.regions.workflowTemplates.testIamPermissions" call.
14898// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
14899// Any non-2xx status code is an error. Response headers are in either
14900// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
14901// was returned at all) in error.(*googleapi.Error).Header. Use
14902// googleapi.IsNotModified to check whether the returned error was
14903// because http.StatusNotModified was returned.
14904func (c *ProjectsRegionsWorkflowTemplatesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
14905	gensupport.SetOptions(c.urlParams_, opts...)
14906	res, err := c.doRequest("json")
14907	if res != nil && res.StatusCode == http.StatusNotModified {
14908		if res.Body != nil {
14909			res.Body.Close()
14910		}
14911		return nil, &googleapi.Error{
14912			Code:   res.StatusCode,
14913			Header: res.Header,
14914		}
14915	}
14916	if err != nil {
14917		return nil, err
14918	}
14919	defer googleapi.CloseBody(res)
14920	if err := googleapi.CheckResponse(res); err != nil {
14921		return nil, err
14922	}
14923	ret := &TestIamPermissionsResponse{
14924		ServerResponse: googleapi.ServerResponse{
14925			Header:         res.Header,
14926			HTTPStatusCode: res.StatusCode,
14927		},
14928	}
14929	target := &ret
14930	if err := gensupport.DecodeResponse(target, res); err != nil {
14931		return nil, err
14932	}
14933	return ret, nil
14934	// {
14935	//   "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.",
14936	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}:testIamPermissions",
14937	//   "httpMethod": "POST",
14938	//   "id": "dataproc.projects.regions.workflowTemplates.testIamPermissions",
14939	//   "parameterOrder": [
14940	//     "resource"
14941	//   ],
14942	//   "parameters": {
14943	//     "resource": {
14944	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
14945	//       "location": "path",
14946	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
14947	//       "required": true,
14948	//       "type": "string"
14949	//     }
14950	//   },
14951	//   "path": "v1beta2/{+resource}:testIamPermissions",
14952	//   "request": {
14953	//     "$ref": "TestIamPermissionsRequest"
14954	//   },
14955	//   "response": {
14956	//     "$ref": "TestIamPermissionsResponse"
14957	//   },
14958	//   "scopes": [
14959	//     "https://www.googleapis.com/auth/cloud-platform"
14960	//   ]
14961	// }
14962
14963}
14964
14965// method id "dataproc.projects.regions.workflowTemplates.update":
14966
14967type ProjectsRegionsWorkflowTemplatesUpdateCall struct {
14968	s                *Service
14969	name             string
14970	workflowtemplate *WorkflowTemplate
14971	urlParams_       gensupport.URLParams
14972	ctx_             context.Context
14973	header_          http.Header
14974}
14975
14976// Update: Updates (replaces) workflow template. The updated template
14977// must contain version that matches the current server version.
14978//
14979// - name: Output only. The resource name of the workflow template, as
14980//   described in https://cloud.google.com/apis/design/resource_names.
14981//   For projects.regions.workflowTemplates, the resource name of the
14982//   template has the following format:
14983//   projects/{project_id}/regions/{region}/workflowTemplates/{template_i
14984//   d} For projects.locations.workflowTemplates, the resource name of
14985//   the template has the following format:
14986//   projects/{project_id}/locations/{location}/workflowTemplates/{templa
14987//   te_id}.
14988func (r *ProjectsRegionsWorkflowTemplatesService) Update(name string, workflowtemplate *WorkflowTemplate) *ProjectsRegionsWorkflowTemplatesUpdateCall {
14989	c := &ProjectsRegionsWorkflowTemplatesUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
14990	c.name = name
14991	c.workflowtemplate = workflowtemplate
14992	return c
14993}
14994
14995// Fields allows partial responses to be retrieved. See
14996// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
14997// for more information.
14998func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Fields(s ...googleapi.Field) *ProjectsRegionsWorkflowTemplatesUpdateCall {
14999	c.urlParams_.Set("fields", googleapi.CombineFields(s))
15000	return c
15001}
15002
15003// Context sets the context to be used in this call's Do method. Any
15004// pending HTTP request will be aborted if the provided context is
15005// canceled.
15006func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Context(ctx context.Context) *ProjectsRegionsWorkflowTemplatesUpdateCall {
15007	c.ctx_ = ctx
15008	return c
15009}
15010
15011// Header returns an http.Header that can be modified by the caller to
15012// add HTTP headers to the request.
15013func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Header() http.Header {
15014	if c.header_ == nil {
15015		c.header_ = make(http.Header)
15016	}
15017	return c.header_
15018}
15019
15020func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) doRequest(alt string) (*http.Response, error) {
15021	reqHeaders := make(http.Header)
15022	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210804")
15023	for k, v := range c.header_ {
15024		reqHeaders[k] = v
15025	}
15026	reqHeaders.Set("User-Agent", c.s.userAgent())
15027	var body io.Reader = nil
15028	body, err := googleapi.WithoutDataWrapper.JSONReader(c.workflowtemplate)
15029	if err != nil {
15030		return nil, err
15031	}
15032	reqHeaders.Set("Content-Type", "application/json")
15033	c.urlParams_.Set("alt", alt)
15034	c.urlParams_.Set("prettyPrint", "false")
15035	urls := googleapi.ResolveRelative(c.s.BasePath, "v1beta2/{+name}")
15036	urls += "?" + c.urlParams_.Encode()
15037	req, err := http.NewRequest("PUT", urls, body)
15038	if err != nil {
15039		return nil, err
15040	}
15041	req.Header = reqHeaders
15042	googleapi.Expand(req.URL, map[string]string{
15043		"name": c.name,
15044	})
15045	return gensupport.SendRequest(c.ctx_, c.s.client, req)
15046}
15047
15048// Do executes the "dataproc.projects.regions.workflowTemplates.update" call.
15049// Exactly one of *WorkflowTemplate or error will be non-nil. Any
15050// non-2xx status code is an error. Response headers are in either
15051// *WorkflowTemplate.ServerResponse.Header or (if a response was
15052// returned at all) in error.(*googleapi.Error).Header. Use
15053// googleapi.IsNotModified to check whether the returned error was
15054// because http.StatusNotModified was returned.
15055func (c *ProjectsRegionsWorkflowTemplatesUpdateCall) Do(opts ...googleapi.CallOption) (*WorkflowTemplate, error) {
15056	gensupport.SetOptions(c.urlParams_, opts...)
15057	res, err := c.doRequest("json")
15058	if res != nil && res.StatusCode == http.StatusNotModified {
15059		if res.Body != nil {
15060			res.Body.Close()
15061		}
15062		return nil, &googleapi.Error{
15063			Code:   res.StatusCode,
15064			Header: res.Header,
15065		}
15066	}
15067	if err != nil {
15068		return nil, err
15069	}
15070	defer googleapi.CloseBody(res)
15071	if err := googleapi.CheckResponse(res); err != nil {
15072		return nil, err
15073	}
15074	ret := &WorkflowTemplate{
15075		ServerResponse: googleapi.ServerResponse{
15076			Header:         res.Header,
15077			HTTPStatusCode: res.StatusCode,
15078		},
15079	}
15080	target := &ret
15081	if err := gensupport.DecodeResponse(target, res); err != nil {
15082		return nil, err
15083	}
15084	return ret, nil
15085	// {
15086	//   "description": "Updates (replaces) workflow template. The updated template must contain version that matches the current server version.",
15087	//   "flatPath": "v1beta2/projects/{projectsId}/regions/{regionsId}/workflowTemplates/{workflowTemplatesId}",
15088	//   "httpMethod": "PUT",
15089	//   "id": "dataproc.projects.regions.workflowTemplates.update",
15090	//   "parameterOrder": [
15091	//     "name"
15092	//   ],
15093	//   "parameters": {
15094	//     "name": {
15095	//       "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}",
15096	//       "location": "path",
15097	//       "pattern": "^projects/[^/]+/regions/[^/]+/workflowTemplates/[^/]+$",
15098	//       "required": true,
15099	//       "type": "string"
15100	//     }
15101	//   },
15102	//   "path": "v1beta2/{+name}",
15103	//   "request": {
15104	//     "$ref": "WorkflowTemplate"
15105	//   },
15106	//   "response": {
15107	//     "$ref": "WorkflowTemplate"
15108	//   },
15109	//   "scopes": [
15110	//     "https://www.googleapis.com/auth/cloud-platform"
15111	//   ]
15112	// }
15113
15114}
15115