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 cloudtasks provides access to the Cloud Tasks API.
8//
9// This package is DEPRECATED. Use package cloud.google.com/go/cloudtasks/apiv2beta2 instead.
10//
11// For product documentation, see: https://cloud.google.com/tasks/
12//
13// Creating a client
14//
15// Usage example:
16//
17//   import "google.golang.org/api/cloudtasks/v2beta3"
18//   ...
19//   ctx := context.Background()
20//   cloudtasksService, err := cloudtasks.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//   cloudtasksService, err := cloudtasks.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//   cloudtasksService, err := cloudtasks.NewService(ctx, option.WithTokenSource(config.TokenSource(ctx, token)))
38//
39// See https://godoc.org/google.golang.org/api/option/ for details on options.
40package cloudtasks // import "google.golang.org/api/cloudtasks/v2beta3"
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 = "cloudtasks:v2beta3"
77const apiName = "cloudtasks"
78const apiVersion = "v2beta3"
79const basePath = "https://cloudtasks.googleapis.com/"
80const mtlsBasePath = "https://cloudtasks.mtls.googleapis.com/"
81
82// OAuth2 scopes used by this API.
83const (
84	// View and manage your data across Google Cloud Platform services
85	CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform"
86)
87
88// NewService creates a new Service.
89func NewService(ctx context.Context, opts ...option.ClientOption) (*Service, error) {
90	scopesOption := option.WithScopes(
91		"https://www.googleapis.com/auth/cloud-platform",
92	)
93	// NOTE: prepend, so we don't override user-specified scopes.
94	opts = append([]option.ClientOption{scopesOption}, opts...)
95	opts = append(opts, internaloption.WithDefaultEndpoint(basePath))
96	opts = append(opts, internaloption.WithDefaultMTLSEndpoint(mtlsBasePath))
97	client, endpoint, err := htransport.NewClient(ctx, opts...)
98	if err != nil {
99		return nil, err
100	}
101	s, err := New(client)
102	if err != nil {
103		return nil, err
104	}
105	if endpoint != "" {
106		s.BasePath = endpoint
107	}
108	return s, nil
109}
110
111// New creates a new Service. It uses the provided http.Client for requests.
112//
113// Deprecated: please use NewService instead.
114// To provide a custom HTTP client, use option.WithHTTPClient.
115// If you are using google.golang.org/api/googleapis/transport.APIKey, use option.WithAPIKey with NewService instead.
116func New(client *http.Client) (*Service, error) {
117	if client == nil {
118		return nil, errors.New("client is nil")
119	}
120	s := &Service{client: client, BasePath: basePath}
121	s.Projects = NewProjectsService(s)
122	return s, nil
123}
124
125type Service struct {
126	client    *http.Client
127	BasePath  string // API endpoint base URL
128	UserAgent string // optional additional User-Agent fragment
129
130	Projects *ProjectsService
131}
132
133func (s *Service) userAgent() string {
134	if s.UserAgent == "" {
135		return googleapi.UserAgent
136	}
137	return googleapi.UserAgent + " " + s.UserAgent
138}
139
140func NewProjectsService(s *Service) *ProjectsService {
141	rs := &ProjectsService{s: s}
142	rs.Locations = NewProjectsLocationsService(s)
143	return rs
144}
145
146type ProjectsService struct {
147	s *Service
148
149	Locations *ProjectsLocationsService
150}
151
152func NewProjectsLocationsService(s *Service) *ProjectsLocationsService {
153	rs := &ProjectsLocationsService{s: s}
154	rs.Queues = NewProjectsLocationsQueuesService(s)
155	return rs
156}
157
158type ProjectsLocationsService struct {
159	s *Service
160
161	Queues *ProjectsLocationsQueuesService
162}
163
164func NewProjectsLocationsQueuesService(s *Service) *ProjectsLocationsQueuesService {
165	rs := &ProjectsLocationsQueuesService{s: s}
166	rs.Tasks = NewProjectsLocationsQueuesTasksService(s)
167	return rs
168}
169
170type ProjectsLocationsQueuesService struct {
171	s *Service
172
173	Tasks *ProjectsLocationsQueuesTasksService
174}
175
176func NewProjectsLocationsQueuesTasksService(s *Service) *ProjectsLocationsQueuesTasksService {
177	rs := &ProjectsLocationsQueuesTasksService{s: s}
178	return rs
179}
180
181type ProjectsLocationsQueuesTasksService struct {
182	s *Service
183}
184
185// AppEngineHttpQueue: App Engine HTTP queue. The task will be delivered
186// to the App Engine application hostname specified by its
187// AppEngineHttpQueue and AppEngineHttpRequest. The documentation for
188// AppEngineHttpRequest explains how the task's host URL is constructed.
189// Using AppEngineHttpQueue requires `appengine.applications.get`
190// (https://cloud.google.com/appengine/docs/admin-api/access-control)
191// Google IAM permission for the project and the following scope:
192// `https://www.googleapis.com/auth/cloud-platform`
193type AppEngineHttpQueue struct {
194	// AppEngineRoutingOverride: Overrides for the task-level
195	// app_engine_routing. If set, `app_engine_routing_override` is used for
196	// all tasks in the queue, no matter what the setting is for the
197	// task-level app_engine_routing.
198	AppEngineRoutingOverride *AppEngineRouting `json:"appEngineRoutingOverride,omitempty"`
199
200	// ForceSendFields is a list of field names (e.g.
201	// "AppEngineRoutingOverride") to unconditionally include in API
202	// requests. By default, fields with empty values are omitted from API
203	// requests. However, any non-pointer, non-interface field appearing in
204	// ForceSendFields will be sent to the server regardless of whether the
205	// field is empty or not. This may be used to include empty fields in
206	// Patch requests.
207	ForceSendFields []string `json:"-"`
208
209	// NullFields is a list of field names (e.g. "AppEngineRoutingOverride")
210	// to include in API requests with the JSON null value. By default,
211	// fields with empty values are omitted from API requests. However, any
212	// field with an empty value appearing in NullFields will be sent to the
213	// server as null. It is an error if a field in this list has a
214	// non-empty value. This may be used to include null fields in Patch
215	// requests.
216	NullFields []string `json:"-"`
217}
218
219func (s *AppEngineHttpQueue) MarshalJSON() ([]byte, error) {
220	type NoMethod AppEngineHttpQueue
221	raw := NoMethod(*s)
222	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
223}
224
225// AppEngineHttpRequest: App Engine HTTP request. The message defines
226// the HTTP request that is sent to an App Engine app when the task is
227// dispatched. Using AppEngineHttpRequest requires
228// `appengine.applications.get`
229// (https://cloud.google.com/appengine/docs/admin-api/access-control)
230// Google IAM permission for the project and the following scope:
231// `https://www.googleapis.com/auth/cloud-platform` The task will be
232// delivered to the App Engine app which belongs to the same project as
233// the queue. For more information, see How Requests are Routed
234// (https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
235// and how routing is affected by dispatch files
236// (https://cloud.google.com/appengine/docs/python/config/dispatchref).
237// Traffic is encrypted during transport and never leaves Google
238// datacenters. Because this traffic is carried over a communication
239// mechanism internal to Google, you cannot explicitly set the protocol
240// (for example, HTTP or HTTPS). The request to the handler, however,
241// will appear to have used the HTTP protocol. The AppEngineRouting used
242// to construct the URL that the task is delivered to can be set at the
243// queue-level or task-level: * If set, app_engine_routing_override is
244// used for all tasks in the queue, no matter what the setting is for
245// the task-level app_engine_routing. The `url` that the task will be
246// sent to is: * `url =` host `+` relative_uri Tasks can be dispatched
247// to secure app handlers, unsecure app handlers, and URIs restricted
248// with `login: admin`
249// (https://cloud.google.com/appengine/docs/standard/python/config/appref).
250// Because tasks are not run as any user, they cannot be dispatched to
251// URIs restricted with `login: required`
252// (https://cloud.google.com/appengine/docs/standard/python/config/appref)
253// Task dispatches also do not follow redirects. The task attempt has
254// succeeded if the app's request handler returns an HTTP response code
255// in the range [`200` - `299`]. The task attempt has failed if the
256// app's handler returns a non-2xx response code or Cloud Tasks does not
257// receive response before the deadline. Failed tasks will be retried
258// according to the retry configuration. `503` (Service Unavailable) is
259// considered an App Engine system error instead of an application error
260// and will cause Cloud Tasks' traffic congestion control to temporarily
261// throttle the queue's dispatches. Unlike other types of task targets,
262// a `429` (Too Many Requests) response from an app handler does not
263// cause traffic congestion control to throttle the queue.
264type AppEngineHttpRequest struct {
265	// AppEngineRouting: Task-level setting for App Engine routing. If set,
266	// app_engine_routing_override is used for all tasks in the queue, no
267	// matter what the setting is for the task-level app_engine_routing.
268	AppEngineRouting *AppEngineRouting `json:"appEngineRouting,omitempty"`
269
270	// Body: HTTP request body. A request body is allowed only if the HTTP
271	// method is POST or PUT. It is an error to set a body on a task with an
272	// incompatible HttpMethod.
273	Body string `json:"body,omitempty"`
274
275	// Headers: HTTP request headers. This map contains the header field
276	// names and values. Headers can be set when the task is created.
277	// Repeated headers are not supported but a header value can contain
278	// commas. Cloud Tasks sets some headers to default values: *
279	// `User-Agent`: By default, this header is "AppEngine-Google;
280	// (+http://code.google.com/appengine)". This header can be modified,
281	// but Cloud Tasks will append "AppEngine-Google;
282	// (+http://code.google.com/appengine)" to the modified `User-Agent`.
283	// If the task has a body, Cloud Tasks sets the following headers: *
284	// `Content-Type`: By default, the `Content-Type` header is set to
285	// "application/octet-stream". The default can be overridden by
286	// explicitly setting `Content-Type` to a particular media type when the
287	// task is created. For example, `Content-Type` can be set to
288	// "application/json". * `Content-Length`: This is computed by Cloud
289	// Tasks. This value is output only. It cannot be changed. The headers
290	// below cannot be set or overridden: * `Host` * `X-Google-*` *
291	// `X-AppEngine-*` In addition, Cloud Tasks sets some headers when the
292	// task is dispatched, such as headers containing information about the
293	// task; see request headers
294	// (https://cloud.google.com/tasks/docs/creating-appengine-handlers#reading_request_headers).
295	// These headers are set only when the task is dispatched, so they are
296	// not visible when the task is returned in a Cloud Tasks response.
297	// Although there is no specific limit for the maximum number of headers
298	// or the size, there is a limit on the maximum size of the Task. For
299	// more information, see the CreateTask documentation.
300	Headers map[string]string `json:"headers,omitempty"`
301
302	// HttpMethod: The HTTP method to use for the request. The default is
303	// POST. The app's request handler for the task's target URL must be
304	// able to handle HTTP requests with this http_method, otherwise the
305	// task attempt fails with error code 405 (Method Not Allowed). See
306	// Writing a push task request handler
307	// (https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
308	// and the App Engine documentation for your runtime on How Requests are
309	// Handled
310	// (https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-handled).
311	//
312	// Possible values:
313	//   "HTTP_METHOD_UNSPECIFIED" - HTTP method unspecified
314	//   "POST" - HTTP POST
315	//   "GET" - HTTP GET
316	//   "HEAD" - HTTP HEAD
317	//   "PUT" - HTTP PUT
318	//   "DELETE" - HTTP DELETE
319	//   "PATCH" - HTTP PATCH
320	//   "OPTIONS" - HTTP OPTIONS
321	HttpMethod string `json:"httpMethod,omitempty"`
322
323	// RelativeUri: The relative URI. The relative URI must begin with "/"
324	// and must be a valid HTTP relative URI. It can contain a path and
325	// query string arguments. If the relative URI is empty, then the root
326	// path "/" will be used. No spaces are allowed, and the maximum length
327	// allowed is 2083 characters.
328	RelativeUri string `json:"relativeUri,omitempty"`
329
330	// ForceSendFields is a list of field names (e.g. "AppEngineRouting") to
331	// unconditionally include in API requests. By default, fields with
332	// empty values are omitted from API requests. However, any non-pointer,
333	// non-interface field appearing in ForceSendFields will be sent to the
334	// server regardless of whether the field is empty or not. This may be
335	// used to include empty fields in Patch requests.
336	ForceSendFields []string `json:"-"`
337
338	// NullFields is a list of field names (e.g. "AppEngineRouting") to
339	// include in API requests with the JSON null value. By default, fields
340	// with empty values are omitted from API requests. However, any field
341	// with an empty value appearing in NullFields will be sent to the
342	// server as null. It is an error if a field in this list has a
343	// non-empty value. This may be used to include null fields in Patch
344	// requests.
345	NullFields []string `json:"-"`
346}
347
348func (s *AppEngineHttpRequest) MarshalJSON() ([]byte, error) {
349	type NoMethod AppEngineHttpRequest
350	raw := NoMethod(*s)
351	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
352}
353
354// AppEngineRouting: App Engine Routing. Defines routing characteristics
355// specific to App Engine - service, version, and instance. For more
356// information about services, versions, and instances see An Overview
357// of App Engine
358// (https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
359// Microservices Architecture on Google App Engine
360// (https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
361// App Engine Standard request routing
362// (https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
363// and App Engine Flex request routing
364// (https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
365type AppEngineRouting struct {
366	// Host: Output only. The host that the task is sent to. The host is
367	// constructed from the domain name of the app associated with the
368	// queue's project ID (for example .appspot.com), and the service,
369	// version, and instance. Tasks which were created using the App Engine
370	// SDK might have a custom domain name. For more information, see How
371	// Requests are Routed
372	// (https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
373	Host string `json:"host,omitempty"`
374
375	// Instance: App instance. By default, the task is sent to an instance
376	// which is available when the task is attempted. Requests can only be
377	// sent to a specific instance if manual scaling is used in App Engine
378	// Standard
379	// (https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
380	// App Engine Flex does not support instances. For more information, see
381	// App Engine Standard request routing
382	// (https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
383	// and App Engine Flex request routing
384	// (https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
385	Instance string `json:"instance,omitempty"`
386
387	// Service: App service. By default, the task is sent to the service
388	// which is the default service when the task is attempted. For some
389	// queues or tasks which were created using the App Engine Task Queue
390	// API, host is not parsable into service, version, and instance. For
391	// example, some tasks which were created using the App Engine SDK use a
392	// custom domain name; custom domains are not parsed by Cloud Tasks. If
393	// host is not parsable, then service, version, and instance are the
394	// empty string.
395	Service string `json:"service,omitempty"`
396
397	// Version: App version. By default, the task is sent to the version
398	// which is the default version when the task is attempted. For some
399	// queues or tasks which were created using the App Engine Task Queue
400	// API, host is not parsable into service, version, and instance. For
401	// example, some tasks which were created using the App Engine SDK use a
402	// custom domain name; custom domains are not parsed by Cloud Tasks. If
403	// host is not parsable, then service, version, and instance are the
404	// empty string.
405	Version string `json:"version,omitempty"`
406
407	// ForceSendFields is a list of field names (e.g. "Host") to
408	// unconditionally include in API requests. By default, fields with
409	// empty values are omitted from API requests. However, any non-pointer,
410	// non-interface field appearing in ForceSendFields will be sent to the
411	// server regardless of whether the field is empty or not. This may be
412	// used to include empty fields in Patch requests.
413	ForceSendFields []string `json:"-"`
414
415	// NullFields is a list of field names (e.g. "Host") to include in API
416	// requests with the JSON null value. By default, fields with empty
417	// values are omitted from API requests. However, any field with an
418	// empty value appearing in NullFields will be sent to the server as
419	// null. It is an error if a field in this list has a non-empty value.
420	// This may be used to include null fields in Patch requests.
421	NullFields []string `json:"-"`
422}
423
424func (s *AppEngineRouting) MarshalJSON() ([]byte, error) {
425	type NoMethod AppEngineRouting
426	raw := NoMethod(*s)
427	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
428}
429
430// Attempt: The status of a task attempt.
431type Attempt struct {
432	// DispatchTime: Output only. The time that this attempt was dispatched.
433	// `dispatch_time` will be truncated to the nearest microsecond.
434	DispatchTime string `json:"dispatchTime,omitempty"`
435
436	// ResponseStatus: Output only. The response from the worker for this
437	// attempt. If `response_time` is unset, then the task has not been
438	// attempted or is currently running and the `response_status` field is
439	// meaningless.
440	ResponseStatus *Status `json:"responseStatus,omitempty"`
441
442	// ResponseTime: Output only. The time that this attempt response was
443	// received. `response_time` will be truncated to the nearest
444	// microsecond.
445	ResponseTime string `json:"responseTime,omitempty"`
446
447	// ScheduleTime: Output only. The time that this attempt was scheduled.
448	// `schedule_time` will be truncated to the nearest microsecond.
449	ScheduleTime string `json:"scheduleTime,omitempty"`
450
451	// ForceSendFields is a list of field names (e.g. "DispatchTime") to
452	// unconditionally include in API requests. By default, fields with
453	// empty values are omitted from API requests. However, any non-pointer,
454	// non-interface field appearing in ForceSendFields will be sent to the
455	// server regardless of whether the field is empty or not. This may be
456	// used to include empty fields in Patch requests.
457	ForceSendFields []string `json:"-"`
458
459	// NullFields is a list of field names (e.g. "DispatchTime") to include
460	// in API requests with the JSON null value. By default, fields with
461	// empty values are omitted from API requests. However, any field with
462	// an empty value appearing in NullFields will be sent to the server as
463	// null. It is an error if a field in this list has a non-empty value.
464	// This may be used to include null fields in Patch requests.
465	NullFields []string `json:"-"`
466}
467
468func (s *Attempt) MarshalJSON() ([]byte, error) {
469	type NoMethod Attempt
470	raw := NoMethod(*s)
471	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
472}
473
474// Binding: Associates `members` with a `role`.
475type Binding struct {
476	// Condition: The condition that is associated with this binding. If the
477	// condition evaluates to `true`, then this binding applies to the
478	// current request. If the condition evaluates to `false`, then this
479	// binding does not apply to the current request. However, a different
480	// role binding might grant the same role to one or more of the members
481	// in this binding. To learn which resources support conditions in their
482	// IAM policies, see the IAM documentation
483	// (https://cloud.google.com/iam/help/conditions/resource-policies).
484	Condition *Expr `json:"condition,omitempty"`
485
486	// Members: Specifies the identities requesting access for a Cloud
487	// Platform resource. `members` can have the following values: *
488	// `allUsers`: A special identifier that represents anyone who is on the
489	// internet; with or without a Google account. *
490	// `allAuthenticatedUsers`: A special identifier that represents anyone
491	// who is authenticated with a Google account or a service account. *
492	// `user:{emailid}`: An email address that represents a specific Google
493	// account. For example, `alice@example.com` . *
494	// `serviceAccount:{emailid}`: An email address that represents a
495	// service account. For example,
496	// `my-other-app@appspot.gserviceaccount.com`. * `group:{emailid}`: An
497	// email address that represents a Google group. For example,
498	// `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An
499	// email address (plus unique identifier) representing a user that has
500	// been recently deleted. For example,
501	// `alice@example.com?uid=123456789012345678901`. If the user is
502	// recovered, this value reverts to `user:{emailid}` and the recovered
503	// user retains the role in the binding. *
504	// `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address
505	// (plus unique identifier) representing a service account that has been
506	// recently deleted. For example,
507	// `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
508	// If the service account is undeleted, this value reverts to
509	// `serviceAccount:{emailid}` and the undeleted service account retains
510	// the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`:
511	// An email address (plus unique identifier) representing a Google group
512	// that has been recently deleted. For example,
513	// `admins@example.com?uid=123456789012345678901`. If the group is
514	// recovered, this value reverts to `group:{emailid}` and the recovered
515	// group retains the role in the binding. * `domain:{domain}`: The G
516	// Suite domain (primary) that represents all the users of that domain.
517	// For example, `google.com` or `example.com`.
518	Members []string `json:"members,omitempty"`
519
520	// Role: Role that is assigned to `members`. For example,
521	// `roles/viewer`, `roles/editor`, or `roles/owner`.
522	Role string `json:"role,omitempty"`
523
524	// ForceSendFields is a list of field names (e.g. "Condition") to
525	// unconditionally include in API requests. By default, fields with
526	// empty values are omitted from API requests. However, any non-pointer,
527	// non-interface field appearing in ForceSendFields will be sent to the
528	// server regardless of whether the field is empty or not. This may be
529	// used to include empty fields in Patch requests.
530	ForceSendFields []string `json:"-"`
531
532	// NullFields is a list of field names (e.g. "Condition") to include in
533	// API requests with the JSON null value. By default, fields with empty
534	// values are omitted from API requests. However, any field with an
535	// empty value appearing in NullFields will be sent to the server as
536	// null. It is an error if a field in this list has a non-empty value.
537	// This may be used to include null fields in Patch requests.
538	NullFields []string `json:"-"`
539}
540
541func (s *Binding) MarshalJSON() ([]byte, error) {
542	type NoMethod Binding
543	raw := NoMethod(*s)
544	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
545}
546
547// CreateTaskRequest: Request message for CreateTask.
548type CreateTaskRequest struct {
549	// ResponseView: The response_view specifies which subset of the Task
550	// will be returned. By default response_view is BASIC; not all
551	// information is retrieved by default because some data, such as
552	// payloads, might be desirable to return only when needed because of
553	// its large size or because of the sensitivity of data that it
554	// contains. Authorization for FULL requires `cloudtasks.tasks.fullView`
555	// Google IAM (https://cloud.google.com/iam/) permission on the Task
556	// resource.
557	//
558	// Possible values:
559	//   "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC.
560	//   "BASIC" - The basic view omits fields which can be large or can
561	// contain sensitive data. This view does not include the body in
562	// AppEngineHttpRequest. Bodies are desirable to return only when
563	// needed, because they can be large and because of the sensitivity of
564	// the data that you choose to store in it.
565	//   "FULL" - All information is returned. Authorization for FULL
566	// requires `cloudtasks.tasks.fullView` [Google
567	// IAM](https://cloud.google.com/iam/) permission on the Queue resource.
568	ResponseView string `json:"responseView,omitempty"`
569
570	// Task: Required. The task to add. Task names have the following
571	// format:
572	// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_
573	// ID`. The user can optionally specify a task name. If a name is not
574	// specified then the system will generate a random unique task id,
575	// which will be set in the task returned in the response. If
576	// schedule_time is not set or is in the past then Cloud Tasks will set
577	// it to the current time. Task De-duplication: Explicitly specifying a
578	// task ID enables task de-duplication. If a task's ID is identical to
579	// that of an existing task or a task that was deleted or executed
580	// recently then the call will fail with ALREADY_EXISTS. If the task's
581	// queue was created using Cloud Tasks, then another task with the same
582	// name can't be created for ~1hour after the original task was deleted
583	// or executed. If the task's queue was created using queue.yaml or
584	// queue.xml, then another task with the same name can't be created for
585	// ~9days after the original task was deleted or executed. Because there
586	// is an extra lookup cost to identify duplicate task names, these
587	// CreateTask calls have significantly increased latency. Using hashed
588	// strings for the task id or for the prefix of the task id is
589	// recommended. Choosing task ids that are sequential or have sequential
590	// prefixes, for example using a timestamp, causes an increase in
591	// latency and error rates in all task commands. The infrastructure
592	// relies on an approximately uniform distribution of task ids to store
593	// and serve tasks efficiently.
594	Task *Task `json:"task,omitempty"`
595
596	// ForceSendFields is a list of field names (e.g. "ResponseView") to
597	// unconditionally include in API requests. By default, fields with
598	// empty values are omitted from API requests. However, any non-pointer,
599	// non-interface field appearing in ForceSendFields will be sent to the
600	// server regardless of whether the field is empty or not. This may be
601	// used to include empty fields in Patch requests.
602	ForceSendFields []string `json:"-"`
603
604	// NullFields is a list of field names (e.g. "ResponseView") to include
605	// in API requests with the JSON null value. By default, fields with
606	// empty values are omitted from API requests. However, any field with
607	// an empty value appearing in NullFields will be sent to the server as
608	// null. It is an error if a field in this list has a non-empty value.
609	// This may be used to include null fields in Patch requests.
610	NullFields []string `json:"-"`
611}
612
613func (s *CreateTaskRequest) MarshalJSON() ([]byte, error) {
614	type NoMethod CreateTaskRequest
615	raw := NoMethod(*s)
616	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
617}
618
619// Empty: A generic empty message that you can re-use to avoid defining
620// duplicated empty messages in your APIs. A typical example is to use
621// it as the request or the response type of an API method. For
622// instance: service Foo { rpc Bar(google.protobuf.Empty) returns
623// (google.protobuf.Empty); } The JSON representation for `Empty` is
624// empty JSON object `{}`.
625type Empty struct {
626	// ServerResponse contains the HTTP response code and headers from the
627	// server.
628	googleapi.ServerResponse `json:"-"`
629}
630
631// Expr: Represents a textual expression in the Common Expression
632// Language (CEL) syntax. CEL is a C-like expression language. The
633// syntax and semantics of CEL are documented at
634// https://github.com/google/cel-spec. Example (Comparison): title:
635// "Summary size limit" description: "Determines if a summary is less
636// than 100 chars" expression: "document.summary.size() < 100" Example
637// (Equality): title: "Requestor is owner" description: "Determines if
638// requestor is the document owner" expression: "document.owner ==
639// request.auth.claims.email" Example (Logic): title: "Public documents"
640// description: "Determine whether the document should be publicly
641// visible" expression: "document.type != 'private' && document.type !=
642// 'internal'" Example (Data Manipulation): title: "Notification string"
643// description: "Create a notification string with a timestamp."
644// expression: "'New message received at ' +
645// string(document.create_time)" The exact variables and functions that
646// may be referenced within an expression are determined by the service
647// that evaluates it. See the service documentation for additional
648// information.
649type Expr struct {
650	// Description: Optional. Description of the expression. This is a
651	// longer text which describes the expression, e.g. when hovered over it
652	// in a UI.
653	Description string `json:"description,omitempty"`
654
655	// Expression: Textual representation of an expression in Common
656	// Expression Language syntax.
657	Expression string `json:"expression,omitempty"`
658
659	// Location: Optional. String indicating the location of the expression
660	// for error reporting, e.g. a file name and a position in the file.
661	Location string `json:"location,omitempty"`
662
663	// Title: Optional. Title for the expression, i.e. a short string
664	// describing its purpose. This can be used e.g. in UIs which allow to
665	// enter the expression.
666	Title string `json:"title,omitempty"`
667
668	// ForceSendFields is a list of field names (e.g. "Description") to
669	// unconditionally include in API requests. By default, fields with
670	// empty values are omitted from API requests. However, any non-pointer,
671	// non-interface field appearing in ForceSendFields will be sent to the
672	// server regardless of whether the field is empty or not. This may be
673	// used to include empty fields in Patch requests.
674	ForceSendFields []string `json:"-"`
675
676	// NullFields is a list of field names (e.g. "Description") to include
677	// in API requests with the JSON null value. By default, fields with
678	// empty values are omitted from API requests. However, any field with
679	// an empty value appearing in NullFields will be sent to the server as
680	// null. It is an error if a field in this list has a non-empty value.
681	// This may be used to include null fields in Patch requests.
682	NullFields []string `json:"-"`
683}
684
685func (s *Expr) MarshalJSON() ([]byte, error) {
686	type NoMethod Expr
687	raw := NoMethod(*s)
688	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
689}
690
691// GetIamPolicyRequest: Request message for `GetIamPolicy` method.
692type GetIamPolicyRequest struct {
693	// Options: OPTIONAL: A `GetPolicyOptions` object for specifying options
694	// to `GetIamPolicy`.
695	Options *GetPolicyOptions `json:"options,omitempty"`
696
697	// ForceSendFields is a list of field names (e.g. "Options") to
698	// unconditionally include in API requests. By default, fields with
699	// empty values are omitted from API requests. However, any non-pointer,
700	// non-interface field appearing in ForceSendFields will be sent to the
701	// server regardless of whether the field is empty or not. This may be
702	// used to include empty fields in Patch requests.
703	ForceSendFields []string `json:"-"`
704
705	// NullFields is a list of field names (e.g. "Options") to include in
706	// API requests with the JSON null value. By default, fields with empty
707	// values are omitted from API requests. However, any field with an
708	// empty value appearing in NullFields will be sent to the server as
709	// null. It is an error if a field in this list has a non-empty value.
710	// This may be used to include null fields in Patch requests.
711	NullFields []string `json:"-"`
712}
713
714func (s *GetIamPolicyRequest) MarshalJSON() ([]byte, error) {
715	type NoMethod GetIamPolicyRequest
716	raw := NoMethod(*s)
717	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
718}
719
720// GetPolicyOptions: Encapsulates settings provided to GetIamPolicy.
721type GetPolicyOptions struct {
722	// RequestedPolicyVersion: Optional. The policy format version to be
723	// returned. Valid values are 0, 1, and 3. Requests specifying an
724	// invalid value will be rejected. Requests for policies with any
725	// conditional bindings must specify version 3. Policies without any
726	// conditional bindings may specify any valid value or leave the field
727	// unset. To learn which resources support conditions in their IAM
728	// policies, see the IAM documentation
729	// (https://cloud.google.com/iam/help/conditions/resource-policies).
730	RequestedPolicyVersion int64 `json:"requestedPolicyVersion,omitempty"`
731
732	// ForceSendFields is a list of field names (e.g.
733	// "RequestedPolicyVersion") to unconditionally include in API requests.
734	// By default, fields with empty values are omitted from API requests.
735	// However, any non-pointer, non-interface field appearing in
736	// ForceSendFields will be sent to the server regardless of whether the
737	// field is empty or not. This may be used to include empty fields in
738	// Patch requests.
739	ForceSendFields []string `json:"-"`
740
741	// NullFields is a list of field names (e.g. "RequestedPolicyVersion")
742	// to include in API requests with the JSON null value. By default,
743	// fields with empty values are omitted from API requests. However, any
744	// field with an empty value appearing in NullFields will be sent to the
745	// server as null. It is an error if a field in this list has a
746	// non-empty value. This may be used to include null fields in Patch
747	// requests.
748	NullFields []string `json:"-"`
749}
750
751func (s *GetPolicyOptions) MarshalJSON() ([]byte, error) {
752	type NoMethod GetPolicyOptions
753	raw := NoMethod(*s)
754	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
755}
756
757// HttpRequest: HTTP request. The task will be pushed to the worker as
758// an HTTP request. If the worker or the redirected worker acknowledges
759// the task by returning a successful HTTP response code ([`200` -
760// `299`]), the task will be removed from the queue. If any other HTTP
761// response code is returned or no response is received, the task will
762// be retried according to the following: * User-specified throttling:
763// retry configuration, rate limits, and the queue's state. * System
764// throttling: To prevent the worker from overloading, Cloud Tasks may
765// temporarily reduce the queue's effective rate. User-specified
766// settings will not be changed. System throttling happens because: *
767// Cloud Tasks backs off on all errors. Normally the backoff specified
768// in rate limits will be used. But if the worker returns `429` (Too
769// Many Requests), `503` (Service Unavailable), or the rate of errors is
770// high, Cloud Tasks will use a higher backoff rate. The retry specified
771// in the `Retry-After` HTTP response header is considered. * To prevent
772// traffic spikes and to smooth sudden increases in traffic, dispatches
773// ramp up slowly when the queue is newly created or idle and if large
774// numbers of tasks suddenly become available to dispatch (due to spikes
775// in create task rates, the queue being unpaused, or many tasks that
776// are scheduled at the same time).
777type HttpRequest struct {
778	// Body: HTTP request body. A request body is allowed only if the HTTP
779	// method is POST, PUT, or PATCH. It is an error to set body on a task
780	// with an incompatible HttpMethod.
781	Body string `json:"body,omitempty"`
782
783	// Headers: HTTP request headers. This map contains the header field
784	// names and values. Headers can be set when the task is created. These
785	// headers represent a subset of the headers that will accompany the
786	// task's HTTP request. Some HTTP request headers will be ignored or
787	// replaced. A partial list of headers that will be ignored or replaced
788	// is: * Host: This will be computed by Cloud Tasks and derived from
789	// HttpRequest.url. * Content-Length: This will be computed by Cloud
790	// Tasks. * User-Agent: This will be set to "Google-Cloud-Tasks". *
791	// X-Google-*: Google use only. * X-AppEngine-*: Google use only.
792	// `Content-Type` won't be set by Cloud Tasks. You can explicitly set
793	// `Content-Type` to a media type when the task is created. For example,
794	// `Content-Type` can be set to "application/octet-stream" or
795	// "application/json". Headers which can have multiple values
796	// (according to RFC2616) can be specified using comma-separated values.
797	// The size of the headers must be less than 80KB.
798	Headers map[string]string `json:"headers,omitempty"`
799
800	// HttpMethod: The HTTP method to use for the request. The default is
801	// POST.
802	//
803	// Possible values:
804	//   "HTTP_METHOD_UNSPECIFIED" - HTTP method unspecified
805	//   "POST" - HTTP POST
806	//   "GET" - HTTP GET
807	//   "HEAD" - HTTP HEAD
808	//   "PUT" - HTTP PUT
809	//   "DELETE" - HTTP DELETE
810	//   "PATCH" - HTTP PATCH
811	//   "OPTIONS" - HTTP OPTIONS
812	HttpMethod string `json:"httpMethod,omitempty"`
813
814	// OauthToken: If specified, an OAuth token
815	// (https://developers.google.com/identity/protocols/OAuth2) will be
816	// generated and attached as an `Authorization` header in the HTTP
817	// request. This type of authorization should generally only be used
818	// when calling Google APIs hosted on *.googleapis.com.
819	OauthToken *OAuthToken `json:"oauthToken,omitempty"`
820
821	// OidcToken: If specified, an OIDC
822	// (https://developers.google.com/identity/protocols/OpenIDConnect)
823	// token will be generated and attached as an `Authorization` header in
824	// the HTTP request. This type of authorization can be used for many
825	// scenarios, including calling Cloud Run, or endpoints where you intend
826	// to validate the token yourself.
827	OidcToken *OidcToken `json:"oidcToken,omitempty"`
828
829	// Url: Required. The full url path that the request will be sent to.
830	// This string must begin with either "http://" or "https://". Some
831	// examples are: `http://acme.com` and `https://acme.com/sales:8080`.
832	// Cloud Tasks will encode some characters for safety and compatibility.
833	// The maximum allowed URL length is 2083 characters after encoding. The
834	// `Location` header response from a redirect response [`300` - `399`]
835	// may be followed. The redirect is not counted as a separate attempt.
836	Url string `json:"url,omitempty"`
837
838	// ForceSendFields is a list of field names (e.g. "Body") to
839	// unconditionally include in API requests. By default, fields with
840	// empty values are omitted from API requests. However, any non-pointer,
841	// non-interface field appearing in ForceSendFields will be sent to the
842	// server regardless of whether the field is empty or not. This may be
843	// used to include empty fields in Patch requests.
844	ForceSendFields []string `json:"-"`
845
846	// NullFields is a list of field names (e.g. "Body") to include in API
847	// requests with the JSON null value. By default, fields with empty
848	// values are omitted from API requests. However, any field with an
849	// empty value appearing in NullFields will be sent to the server as
850	// null. It is an error if a field in this list has a non-empty value.
851	// This may be used to include null fields in Patch requests.
852	NullFields []string `json:"-"`
853}
854
855func (s *HttpRequest) MarshalJSON() ([]byte, error) {
856	type NoMethod HttpRequest
857	raw := NoMethod(*s)
858	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
859}
860
861// ListLocationsResponse: The response message for
862// Locations.ListLocations.
863type ListLocationsResponse struct {
864	// Locations: A list of locations that matches the specified filter in
865	// the request.
866	Locations []*Location `json:"locations,omitempty"`
867
868	// NextPageToken: The standard List next-page token.
869	NextPageToken string `json:"nextPageToken,omitempty"`
870
871	// ServerResponse contains the HTTP response code and headers from the
872	// server.
873	googleapi.ServerResponse `json:"-"`
874
875	// ForceSendFields is a list of field names (e.g. "Locations") to
876	// unconditionally include in API requests. By default, fields with
877	// empty values are omitted from API requests. However, any non-pointer,
878	// non-interface field appearing in ForceSendFields will be sent to the
879	// server regardless of whether the field is empty or not. This may be
880	// used to include empty fields in Patch requests.
881	ForceSendFields []string `json:"-"`
882
883	// NullFields is a list of field names (e.g. "Locations") to include in
884	// API requests with the JSON null value. By default, fields with empty
885	// values are omitted from API requests. However, any field with an
886	// empty value appearing in NullFields will be sent to the server as
887	// null. It is an error if a field in this list has a non-empty value.
888	// This may be used to include null fields in Patch requests.
889	NullFields []string `json:"-"`
890}
891
892func (s *ListLocationsResponse) MarshalJSON() ([]byte, error) {
893	type NoMethod ListLocationsResponse
894	raw := NoMethod(*s)
895	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
896}
897
898// ListQueuesResponse: Response message for ListQueues.
899type ListQueuesResponse struct {
900	// NextPageToken: A token to retrieve next page of results. To return
901	// the next page of results, call ListQueues with this value as the
902	// page_token. If the next_page_token is empty, there are no more
903	// results. The page token is valid for only 2 hours.
904	NextPageToken string `json:"nextPageToken,omitempty"`
905
906	// Queues: The list of queues.
907	Queues []*Queue `json:"queues,omitempty"`
908
909	// ServerResponse contains the HTTP response code and headers from the
910	// server.
911	googleapi.ServerResponse `json:"-"`
912
913	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
914	// unconditionally include in API requests. By default, fields with
915	// empty values are omitted from API requests. However, any non-pointer,
916	// non-interface field appearing in ForceSendFields will be sent to the
917	// server regardless of whether the field is empty or not. This may be
918	// used to include empty fields in Patch requests.
919	ForceSendFields []string `json:"-"`
920
921	// NullFields is a list of field names (e.g. "NextPageToken") to include
922	// in API requests with the JSON null value. By default, fields with
923	// empty values are omitted from API requests. However, any field with
924	// an empty value appearing in NullFields will be sent to the server as
925	// null. It is an error if a field in this list has a non-empty value.
926	// This may be used to include null fields in Patch requests.
927	NullFields []string `json:"-"`
928}
929
930func (s *ListQueuesResponse) MarshalJSON() ([]byte, error) {
931	type NoMethod ListQueuesResponse
932	raw := NoMethod(*s)
933	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
934}
935
936// ListTasksResponse: Response message for listing tasks using
937// ListTasks.
938type ListTasksResponse struct {
939	// NextPageToken: A token to retrieve next page of results. To return
940	// the next page of results, call ListTasks with this value as the
941	// page_token. If the next_page_token is empty, there are no more
942	// results.
943	NextPageToken string `json:"nextPageToken,omitempty"`
944
945	// Tasks: The list of tasks.
946	Tasks []*Task `json:"tasks,omitempty"`
947
948	// ServerResponse contains the HTTP response code and headers from the
949	// server.
950	googleapi.ServerResponse `json:"-"`
951
952	// ForceSendFields is a list of field names (e.g. "NextPageToken") to
953	// unconditionally include in API requests. By default, fields with
954	// empty values are omitted from API requests. However, any non-pointer,
955	// non-interface field appearing in ForceSendFields will be sent to the
956	// server regardless of whether the field is empty or not. This may be
957	// used to include empty fields in Patch requests.
958	ForceSendFields []string `json:"-"`
959
960	// NullFields is a list of field names (e.g. "NextPageToken") to include
961	// in API requests with the JSON null value. By default, fields with
962	// empty values are omitted from API requests. However, any field with
963	// an empty value appearing in NullFields will be sent to the server as
964	// null. It is an error if a field in this list has a non-empty value.
965	// This may be used to include null fields in Patch requests.
966	NullFields []string `json:"-"`
967}
968
969func (s *ListTasksResponse) MarshalJSON() ([]byte, error) {
970	type NoMethod ListTasksResponse
971	raw := NoMethod(*s)
972	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
973}
974
975// Location: A resource that represents Google Cloud Platform location.
976type Location struct {
977	// DisplayName: The friendly name for this location, typically a nearby
978	// city name. For example, "Tokyo".
979	DisplayName string `json:"displayName,omitempty"`
980
981	// Labels: Cross-service attributes for the location. For example
982	// {"cloud.googleapis.com/region": "us-east1"}
983	Labels map[string]string `json:"labels,omitempty"`
984
985	// LocationId: The canonical id for this location. For example:
986	// "us-east1".
987	LocationId string `json:"locationId,omitempty"`
988
989	// Metadata: Service-specific metadata. For example the available
990	// capacity at the given location.
991	Metadata googleapi.RawMessage `json:"metadata,omitempty"`
992
993	// Name: Resource name for the location, which may vary between
994	// implementations. For example:
995	// "projects/example-project/locations/us-east1"
996	Name string `json:"name,omitempty"`
997
998	// ServerResponse contains the HTTP response code and headers from the
999	// server.
1000	googleapi.ServerResponse `json:"-"`
1001
1002	// ForceSendFields is a list of field names (e.g. "DisplayName") to
1003	// unconditionally include in API requests. By default, fields with
1004	// empty values are omitted from API requests. However, any non-pointer,
1005	// non-interface field appearing in ForceSendFields will be sent to the
1006	// server regardless of whether the field is empty or not. This may be
1007	// used to include empty fields in Patch requests.
1008	ForceSendFields []string `json:"-"`
1009
1010	// NullFields is a list of field names (e.g. "DisplayName") to include
1011	// in API requests with the JSON null value. By default, fields with
1012	// empty values are omitted from API requests. However, any field with
1013	// an empty value appearing in NullFields will be sent to the server as
1014	// null. It is an error if a field in this list has a non-empty value.
1015	// This may be used to include null fields in Patch requests.
1016	NullFields []string `json:"-"`
1017}
1018
1019func (s *Location) MarshalJSON() ([]byte, error) {
1020	type NoMethod Location
1021	raw := NoMethod(*s)
1022	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1023}
1024
1025// OAuthToken: Contains information needed for generating an OAuth token
1026// (https://developers.google.com/identity/protocols/OAuth2). This type
1027// of authorization should generally only be used when calling Google
1028// APIs hosted on *.googleapis.com.
1029type OAuthToken struct {
1030	// Scope: OAuth scope to be used for generating OAuth access token. If
1031	// not specified, "https://www.googleapis.com/auth/cloud-platform" will
1032	// be used.
1033	Scope string `json:"scope,omitempty"`
1034
1035	// ServiceAccountEmail: Service account email
1036	// (https://cloud.google.com/iam/docs/service-accounts) to be used for
1037	// generating OAuth token. The service account must be within the same
1038	// project as the queue. The caller must have iam.serviceAccounts.actAs
1039	// permission for the service account.
1040	ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
1041
1042	// ForceSendFields is a list of field names (e.g. "Scope") to
1043	// unconditionally include in API requests. By default, fields with
1044	// empty values are omitted from API requests. However, any non-pointer,
1045	// non-interface field appearing in ForceSendFields will be sent to the
1046	// server regardless of whether the field is empty or not. This may be
1047	// used to include empty fields in Patch requests.
1048	ForceSendFields []string `json:"-"`
1049
1050	// NullFields is a list of field names (e.g. "Scope") to include in API
1051	// requests with the JSON null value. By default, fields with empty
1052	// values are omitted from API requests. However, any field with an
1053	// empty value appearing in NullFields will be sent to the server as
1054	// null. It is an error if a field in this list has a non-empty value.
1055	// This may be used to include null fields in Patch requests.
1056	NullFields []string `json:"-"`
1057}
1058
1059func (s *OAuthToken) MarshalJSON() ([]byte, error) {
1060	type NoMethod OAuthToken
1061	raw := NoMethod(*s)
1062	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1063}
1064
1065// OidcToken: Contains information needed for generating an OpenID
1066// Connect token
1067// (https://developers.google.com/identity/protocols/OpenIDConnect).
1068// This type of authorization can be used for many scenarios, including
1069// calling Cloud Run, or endpoints where you intend to validate the
1070// token yourself.
1071type OidcToken struct {
1072	// Audience: Audience to be used when generating OIDC token. If not
1073	// specified, the URI specified in target will be used.
1074	Audience string `json:"audience,omitempty"`
1075
1076	// ServiceAccountEmail: Service account email
1077	// (https://cloud.google.com/iam/docs/service-accounts) to be used for
1078	// generating OIDC token. The service account must be within the same
1079	// project as the queue. The caller must have iam.serviceAccounts.actAs
1080	// permission for the service account.
1081	ServiceAccountEmail string `json:"serviceAccountEmail,omitempty"`
1082
1083	// ForceSendFields is a list of field names (e.g. "Audience") to
1084	// unconditionally include in API requests. By default, fields with
1085	// empty values are omitted from API requests. However, any non-pointer,
1086	// non-interface field appearing in ForceSendFields will be sent to the
1087	// server regardless of whether the field is empty or not. This may be
1088	// used to include empty fields in Patch requests.
1089	ForceSendFields []string `json:"-"`
1090
1091	// NullFields is a list of field names (e.g. "Audience") to include in
1092	// API requests with the JSON null value. By default, fields with empty
1093	// values are omitted from API requests. However, any field with an
1094	// empty value appearing in NullFields will be sent to the server as
1095	// null. It is an error if a field in this list has a non-empty value.
1096	// This may be used to include null fields in Patch requests.
1097	NullFields []string `json:"-"`
1098}
1099
1100func (s *OidcToken) MarshalJSON() ([]byte, error) {
1101	type NoMethod OidcToken
1102	raw := NoMethod(*s)
1103	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1104}
1105
1106// PauseQueueRequest: Request message for PauseQueue.
1107type PauseQueueRequest struct {
1108}
1109
1110// Policy: An Identity and Access Management (IAM) policy, which
1111// specifies access controls for Google Cloud resources. A `Policy` is a
1112// collection of `bindings`. A `binding` binds one or more `members` to
1113// a single `role`. Members can be user accounts, service accounts,
1114// Google groups, and domains (such as G Suite). A `role` is a named
1115// list of permissions; each `role` can be an IAM predefined role or a
1116// user-created custom role. For some types of Google Cloud resources, a
1117// `binding` can also specify a `condition`, which is a logical
1118// expression that allows access to a resource only if the expression
1119// evaluates to `true`. A condition can add constraints based on
1120// attributes of the request, the resource, or both. To learn which
1121// resources support conditions in their IAM policies, see the IAM
1122// documentation
1123// (https://cloud.google.com/iam/help/conditions/resource-policies).
1124// **JSON example:** { "bindings": [ { "role":
1125// "roles/resourcemanager.organizationAdmin", "members": [
1126// "user:mike@example.com", "group:admins@example.com",
1127// "domain:google.com",
1128// "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, {
1129// "role": "roles/resourcemanager.organizationViewer", "members": [
1130// "user:eve@example.com" ], "condition": { "title": "expirable access",
1131// "description": "Does not grant access after Sep 2020", "expression":
1132// "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ],
1133// "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: -
1134// members: - user:mike@example.com - group:admins@example.com -
1135// domain:google.com -
1136// serviceAccount:my-project-id@appspot.gserviceaccount.com role:
1137// roles/resourcemanager.organizationAdmin - members: -
1138// user:eve@example.com role: roles/resourcemanager.organizationViewer
1139// condition: title: expirable access description: Does not grant access
1140// after Sep 2020 expression: request.time <
1141// timestamp('2020-10-01T00:00:00.000Z') - etag: BwWWja0YfJA= - version:
1142// 3 For a description of IAM and its features, see the IAM
1143// documentation (https://cloud.google.com/iam/docs/).
1144type Policy struct {
1145	// Bindings: Associates a list of `members` to a `role`. Optionally, may
1146	// specify a `condition` that determines how and when the `bindings` are
1147	// applied. Each of the `bindings` must contain at least one member.
1148	Bindings []*Binding `json:"bindings,omitempty"`
1149
1150	// Etag: `etag` is used for optimistic concurrency control as a way to
1151	// help prevent simultaneous updates of a policy from overwriting each
1152	// other. It is strongly suggested that systems make use of the `etag`
1153	// in the read-modify-write cycle to perform policy updates in order to
1154	// avoid race conditions: An `etag` is returned in the response to
1155	// `getIamPolicy`, and systems are expected to put that etag in the
1156	// request to `setIamPolicy` to ensure that their change will be applied
1157	// to the same version of the policy. **Important:** If you use IAM
1158	// Conditions, you must include the `etag` field whenever you call
1159	// `setIamPolicy`. If you omit this field, then IAM allows you to
1160	// overwrite a version `3` policy with a version `1` policy, and all of
1161	// the conditions in the version `3` policy are lost.
1162	Etag string `json:"etag,omitempty"`
1163
1164	// Version: Specifies the format of the policy. Valid values are `0`,
1165	// `1`, and `3`. Requests that specify an invalid value are rejected.
1166	// Any operation that affects conditional role bindings must specify
1167	// version `3`. This requirement applies to the following operations: *
1168	// Getting a policy that includes a conditional role binding * Adding a
1169	// conditional role binding to a policy * Changing a conditional role
1170	// binding in a policy * Removing any role binding, with or without a
1171	// condition, from a policy that includes conditions **Important:** If
1172	// you use IAM Conditions, you must include the `etag` field whenever
1173	// you call `setIamPolicy`. If you omit this field, then IAM allows you
1174	// to overwrite a version `3` policy with a version `1` policy, and all
1175	// of the conditions in the version `3` policy are lost. If a policy
1176	// does not include any conditions, operations on that policy may
1177	// specify any valid version or leave the field unset. To learn which
1178	// resources support conditions in their IAM policies, see the IAM
1179	// documentation
1180	// (https://cloud.google.com/iam/help/conditions/resource-policies).
1181	Version int64 `json:"version,omitempty"`
1182
1183	// ServerResponse contains the HTTP response code and headers from the
1184	// server.
1185	googleapi.ServerResponse `json:"-"`
1186
1187	// ForceSendFields is a list of field names (e.g. "Bindings") to
1188	// unconditionally include in API requests. By default, fields with
1189	// empty values are omitted from API requests. However, any non-pointer,
1190	// non-interface field appearing in ForceSendFields will be sent to the
1191	// server regardless of whether the field is empty or not. This may be
1192	// used to include empty fields in Patch requests.
1193	ForceSendFields []string `json:"-"`
1194
1195	// NullFields is a list of field names (e.g. "Bindings") to include in
1196	// API requests with the JSON null value. By default, fields with empty
1197	// values are omitted from API requests. However, any field with an
1198	// empty value appearing in NullFields will be sent to the server as
1199	// null. It is an error if a field in this list has a non-empty value.
1200	// This may be used to include null fields in Patch requests.
1201	NullFields []string `json:"-"`
1202}
1203
1204func (s *Policy) MarshalJSON() ([]byte, error) {
1205	type NoMethod Policy
1206	raw := NoMethod(*s)
1207	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1208}
1209
1210// PullMessage: Pull Message. This proto can only be used for tasks in a
1211// queue which has PULL type. It currently exists for backwards
1212// compatibility with the App Engine Task Queue SDK. This message type
1213// maybe returned with methods list and get, when the response view is
1214// FULL.
1215type PullMessage struct {
1216	// Payload: A data payload consumed by the worker to execute the task.
1217	Payload string `json:"payload,omitempty"`
1218
1219	// Tag: The tasks's tag. The tag is less than 500 characters. SDK
1220	// compatibility: Although the SDK allows tags to be either string or
1221	// bytes
1222	// (https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
1223	// only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't
1224	// UTF-8 encoded, the tag will be empty when the task is returned by
1225	// Cloud Tasks.
1226	Tag string `json:"tag,omitempty"`
1227
1228	// ForceSendFields is a list of field names (e.g. "Payload") to
1229	// unconditionally include in API requests. By default, fields with
1230	// empty values are omitted from API requests. However, any non-pointer,
1231	// non-interface field appearing in ForceSendFields will be sent to the
1232	// server regardless of whether the field is empty or not. This may be
1233	// used to include empty fields in Patch requests.
1234	ForceSendFields []string `json:"-"`
1235
1236	// NullFields is a list of field names (e.g. "Payload") to include in
1237	// API requests with the JSON null value. By default, fields with empty
1238	// values are omitted from API requests. However, any field with an
1239	// empty value appearing in NullFields will be sent to the server as
1240	// null. It is an error if a field in this list has a non-empty value.
1241	// This may be used to include null fields in Patch requests.
1242	NullFields []string `json:"-"`
1243}
1244
1245func (s *PullMessage) MarshalJSON() ([]byte, error) {
1246	type NoMethod PullMessage
1247	raw := NoMethod(*s)
1248	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1249}
1250
1251// PurgeQueueRequest: Request message for PurgeQueue.
1252type PurgeQueueRequest struct {
1253}
1254
1255// Queue: A queue is a container of related tasks. Queues are configured
1256// to manage how those tasks are dispatched. Configurable properties
1257// include rate limits, retry options, queue types, and others.
1258type Queue struct {
1259	// AppEngineHttpQueue: AppEngineHttpQueue settings apply only to App
1260	// Engine tasks in this queue. Http tasks are not affected by this
1261	// proto.
1262	AppEngineHttpQueue *AppEngineHttpQueue `json:"appEngineHttpQueue,omitempty"`
1263
1264	// Name: Caller-specified and required in CreateQueue, after which it
1265	// becomes output only. The queue name. The queue name must have the
1266	// following format:
1267	// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` *
1268	// `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens
1269	// (-), colons (:), or periods (.). For more information, see
1270	// Identifying projects
1271	// (https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1272	// * `LOCATION_ID` is the canonical ID for the queue's location. The
1273	// list of available locations can be obtained by calling ListLocations.
1274	// For more information, see https://cloud.google.com/about/locations/.
1275	// * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1276	// hyphens (-). The maximum length is 100 characters.
1277	Name string `json:"name,omitempty"`
1278
1279	// PurgeTime: Output only. The last time this queue was purged. All
1280	// tasks that were created before this time were purged. A queue can be
1281	// purged using PurgeQueue, the App Engine Task Queue SDK, or the Cloud
1282	// Console
1283	// (https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
1284	// Purge time will be truncated to the nearest microsecond. Purge time
1285	// will be unset if the queue has never been purged.
1286	PurgeTime string `json:"purgeTime,omitempty"`
1287
1288	// RateLimits: Rate limits for task dispatches. rate_limits and
1289	// retry_config are related because they both control task attempts.
1290	// However they control task attempts in different ways: * rate_limits
1291	// controls the total rate of dispatches from a queue (i.e. all traffic
1292	// dispatched from the queue, regardless of whether the dispatch is from
1293	// a first attempt or a retry). * retry_config controls what happens to
1294	// particular a task after its first attempt fails. That is,
1295	// retry_config controls task retries (the second attempt, third
1296	// attempt, etc). The queue's actual dispatch rate is the result of: *
1297	// Number of tasks in the queue * User-specified throttling:
1298	// rate_limits, retry_config, and the queue's state. * System throttling
1299	// due to `429` (Too Many Requests) or `503` (Service Unavailable)
1300	// responses from the worker, high error rates, or to smooth sudden
1301	// large traffic spikes.
1302	RateLimits *RateLimits `json:"rateLimits,omitempty"`
1303
1304	// RetryConfig: Settings that determine the retry behavior. * For tasks
1305	// created using Cloud Tasks: the queue-level retry settings apply to
1306	// all tasks in the queue that were created using Cloud Tasks. Retry
1307	// settings cannot be set on individual tasks. * For tasks created using
1308	// the App Engine SDK: the queue-level retry settings apply to all tasks
1309	// in the queue which do not have retry settings explicitly set on the
1310	// task and were created by the App Engine SDK. See App Engine
1311	// documentation
1312	// (https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
1313	RetryConfig *RetryConfig `json:"retryConfig,omitempty"`
1314
1315	// StackdriverLoggingConfig: Configuration options for writing logs to
1316	// Stackdriver Logging (https://cloud.google.com/logging/docs/). If this
1317	// field is unset, then no logs are written.
1318	StackdriverLoggingConfig *StackdriverLoggingConfig `json:"stackdriverLoggingConfig,omitempty"`
1319
1320	// State: Output only. The state of the queue. `state` can only be
1321	// changed by called PauseQueue, ResumeQueue, or uploading
1322	// queue.yaml/xml
1323	// (https://cloud.google.com/appengine/docs/python/config/queueref).
1324	// UpdateQueue cannot be used to change `state`.
1325	//
1326	// Possible values:
1327	//   "STATE_UNSPECIFIED" - Unspecified state.
1328	//   "RUNNING" - The queue is running. Tasks can be dispatched. If the
1329	// queue was created using Cloud Tasks and the queue has had no activity
1330	// (method calls or task dispatches) for 30 days, the queue may take a
1331	// few minutes to re-activate. Some method calls may return NOT_FOUND
1332	// and tasks may not be dispatched for a few minutes until the queue has
1333	// been re-activated.
1334	//   "PAUSED" - Tasks are paused by the user. If the queue is paused
1335	// then Cloud Tasks will stop delivering tasks from it, but more tasks
1336	// can still be added to it by the user.
1337	//   "DISABLED" - The queue is disabled. A queue becomes `DISABLED` when
1338	// [queue.yaml](https://cloud.google.com/appengine/docs/python/config/que
1339	// ueref) or
1340	// [queue.xml](https://cloud.google.com/appengine/docs/standard/java/conf
1341	// ig/queueref) is uploaded which does not contain the queue. You cannot
1342	// directly disable a queue. When a queue is disabled, tasks can still
1343	// be added to a queue but the tasks are not dispatched. To permanently
1344	// delete this queue and all of its tasks, call DeleteQueue.
1345	State string `json:"state,omitempty"`
1346
1347	// Stats: Output only. The realtime, informational statistics for a
1348	// queue. In order to receive the statistics the caller should include
1349	// this field in the FieldMask.
1350	Stats *QueueStats `json:"stats,omitempty"`
1351
1352	// TaskTtl: The maximum amount of time that a task will be retained in
1353	// this queue. Queues created by Cloud Tasks have a default `task_ttl`
1354	// of 31 days. After a task has lived for `task_ttl`, the task will be
1355	// deleted regardless of whether it was dispatched or not. The
1356	// `task_ttl` for queues created via queue.yaml/xml is equal to the
1357	// maximum duration because there is a storage quota
1358	// (https://cloud.google.com/appengine/quotas#Task_Queue) for these
1359	// queues. To view the maximum valid duration, see the documentation for
1360	// Duration.
1361	TaskTtl string `json:"taskTtl,omitempty"`
1362
1363	// TombstoneTtl: The task tombstone time to live (TTL). After a task is
1364	// deleted or executed, the task's tombstone is retained for the length
1365	// of time specified by `tombstone_ttl`. The tombstone is used by task
1366	// de-duplication; another task with the same name can't be created
1367	// until the tombstone has expired. For more information about task
1368	// de-duplication, see the documentation for CreateTaskRequest. Queues
1369	// created by Cloud Tasks have a default `tombstone_ttl` of 1 hour.
1370	TombstoneTtl string `json:"tombstoneTtl,omitempty"`
1371
1372	// Type: Immutable. The type of a queue (push or pull). `Queue.type` is
1373	// an immutable property of the queue that is set at the queue creation
1374	// time. When left unspecified, the default value of `PUSH` is selected.
1375	//
1376	// Possible values:
1377	//   "TYPE_UNSPECIFIED" - Default value.
1378	//   "PULL" - A pull queue.
1379	//   "PUSH" - A push queue.
1380	Type string `json:"type,omitempty"`
1381
1382	// ServerResponse contains the HTTP response code and headers from the
1383	// server.
1384	googleapi.ServerResponse `json:"-"`
1385
1386	// ForceSendFields is a list of field names (e.g. "AppEngineHttpQueue")
1387	// to unconditionally include in API requests. By default, fields with
1388	// empty values are omitted from API requests. However, any non-pointer,
1389	// non-interface field appearing in ForceSendFields will be sent to the
1390	// server regardless of whether the field is empty or not. This may be
1391	// used to include empty fields in Patch requests.
1392	ForceSendFields []string `json:"-"`
1393
1394	// NullFields is a list of field names (e.g. "AppEngineHttpQueue") to
1395	// include in API requests with the JSON null value. By default, fields
1396	// with empty values are omitted from API requests. However, any field
1397	// with an empty value appearing in NullFields will be sent to the
1398	// server as null. It is an error if a field in this list has a
1399	// non-empty value. This may be used to include null fields in Patch
1400	// requests.
1401	NullFields []string `json:"-"`
1402}
1403
1404func (s *Queue) MarshalJSON() ([]byte, error) {
1405	type NoMethod Queue
1406	raw := NoMethod(*s)
1407	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1408}
1409
1410// QueueStats: Statistics for a queue.
1411type QueueStats struct {
1412	// ConcurrentDispatchesCount: Output only. The number of requests that
1413	// the queue has dispatched but has not received a reply for yet.
1414	ConcurrentDispatchesCount int64 `json:"concurrentDispatchesCount,omitempty,string"`
1415
1416	// EffectiveExecutionRate: Output only. The current maximum number of
1417	// tasks per second executed by the queue. The maximum value of this
1418	// variable is controlled by the RateLimits of the Queue. However, this
1419	// value could be less to avoid overloading the endpoints tasks in the
1420	// queue are targeting.
1421	EffectiveExecutionRate float64 `json:"effectiveExecutionRate,omitempty"`
1422
1423	// ExecutedLastMinuteCount: Output only. The number of tasks that the
1424	// queue has dispatched and received a reply for during the last minute.
1425	// This variable counts both successful and non-successful executions.
1426	ExecutedLastMinuteCount int64 `json:"executedLastMinuteCount,omitempty,string"`
1427
1428	// OldestEstimatedArrivalTime: Output only. An estimation of the nearest
1429	// time in the future where a task in the queue is scheduled to be
1430	// executed.
1431	OldestEstimatedArrivalTime string `json:"oldestEstimatedArrivalTime,omitempty"`
1432
1433	// TasksCount: Output only. An estimation of the number of tasks in the
1434	// queue, that is, the tasks in the queue that haven't been executed,
1435	// the tasks in the queue which the queue has dispatched but has not yet
1436	// received a reply for, and the failed tasks that the queue is
1437	// retrying.
1438	TasksCount int64 `json:"tasksCount,omitempty,string"`
1439
1440	// ForceSendFields is a list of field names (e.g.
1441	// "ConcurrentDispatchesCount") to unconditionally include in API
1442	// requests. By default, fields with empty values are omitted from API
1443	// requests. However, any non-pointer, non-interface field appearing in
1444	// ForceSendFields will be sent to the server regardless of whether the
1445	// field is empty or not. This may be used to include empty fields in
1446	// Patch requests.
1447	ForceSendFields []string `json:"-"`
1448
1449	// NullFields is a list of field names (e.g.
1450	// "ConcurrentDispatchesCount") to include in API requests with the JSON
1451	// null value. By default, fields with empty values are omitted from API
1452	// requests. However, any field with an empty value appearing in
1453	// NullFields will be sent to the server as null. It is an error if a
1454	// field in this list has a non-empty value. This may be used to include
1455	// null fields in Patch requests.
1456	NullFields []string `json:"-"`
1457}
1458
1459func (s *QueueStats) MarshalJSON() ([]byte, error) {
1460	type NoMethod QueueStats
1461	raw := NoMethod(*s)
1462	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1463}
1464
1465func (s *QueueStats) UnmarshalJSON(data []byte) error {
1466	type NoMethod QueueStats
1467	var s1 struct {
1468		EffectiveExecutionRate gensupport.JSONFloat64 `json:"effectiveExecutionRate"`
1469		*NoMethod
1470	}
1471	s1.NoMethod = (*NoMethod)(s)
1472	if err := json.Unmarshal(data, &s1); err != nil {
1473		return err
1474	}
1475	s.EffectiveExecutionRate = float64(s1.EffectiveExecutionRate)
1476	return nil
1477}
1478
1479// RateLimits: Rate limits. This message determines the maximum rate
1480// that tasks can be dispatched by a queue, regardless of whether the
1481// dispatch is a first task attempt or a retry. Note: The debugging
1482// command, RunTask, will run a task even if the queue has reached its
1483// RateLimits.
1484type RateLimits struct {
1485	// MaxBurstSize: The max burst size. Max burst size limits how fast
1486	// tasks in queue are processed when many tasks are in the queue and the
1487	// rate is high. This field allows the queue to have a high rate so
1488	// processing starts shortly after a task is enqueued, but still limits
1489	// resource usage when many tasks are enqueued in a short period of
1490	// time. The token bucket (https://wikipedia.org/wiki/Token_Bucket)
1491	// algorithm is used to control the rate of task dispatches. Each queue
1492	// has a token bucket that holds tokens, up to the maximum specified by
1493	// `max_burst_size`. Each time a task is dispatched, a token is removed
1494	// from the bucket. Tasks will be dispatched until the queue's bucket
1495	// runs out of tokens. The bucket will be continuously refilled with new
1496	// tokens based on max_dispatches_per_second. The default value of
1497	// `max_burst_size` is picked by Cloud Tasks based on the value of
1498	// max_dispatches_per_second. The maximum value of `max_burst_size` is
1499	// 500. For App Engine queues that were created or updated using
1500	// `queue.yaml/xml`, `max_burst_size` is equal to bucket_size
1501	// (https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
1502	// If UpdateQueue is called on a queue without explicitly setting a
1503	// value for `max_burst_size`, `max_burst_size` value will get updated
1504	// if UpdateQueue is updating max_dispatches_per_second.
1505	MaxBurstSize int64 `json:"maxBurstSize,omitempty"`
1506
1507	// MaxConcurrentDispatches: The maximum number of concurrent tasks that
1508	// Cloud Tasks allows to be dispatched for this queue. After this
1509	// threshold has been reached, Cloud Tasks stops dispatching tasks until
1510	// the number of concurrent requests decreases. If unspecified when the
1511	// queue is created, Cloud Tasks will pick the default. The maximum
1512	// allowed value is 5,000. This field has the same meaning as
1513	// max_concurrent_requests in queue.yaml/xml
1514	// (https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
1515	MaxConcurrentDispatches int64 `json:"maxConcurrentDispatches,omitempty"`
1516
1517	// MaxDispatchesPerSecond: The maximum rate at which tasks are
1518	// dispatched from this queue. If unspecified when the queue is created,
1519	// Cloud Tasks will pick the default. * For App Engine queues, the
1520	// maximum allowed value is 500. This field has the same meaning as rate
1521	// in queue.yaml/xml
1522	// (https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
1523	MaxDispatchesPerSecond float64 `json:"maxDispatchesPerSecond,omitempty"`
1524
1525	// ForceSendFields is a list of field names (e.g. "MaxBurstSize") to
1526	// unconditionally include in API requests. By default, fields with
1527	// empty values are omitted from API requests. However, any non-pointer,
1528	// non-interface field appearing in ForceSendFields will be sent to the
1529	// server regardless of whether the field is empty or not. This may be
1530	// used to include empty fields in Patch requests.
1531	ForceSendFields []string `json:"-"`
1532
1533	// NullFields is a list of field names (e.g. "MaxBurstSize") to include
1534	// in API requests with the JSON null value. By default, fields with
1535	// empty values are omitted from API requests. However, any field with
1536	// an empty value appearing in NullFields will be sent to the server as
1537	// null. It is an error if a field in this list has a non-empty value.
1538	// This may be used to include null fields in Patch requests.
1539	NullFields []string `json:"-"`
1540}
1541
1542func (s *RateLimits) MarshalJSON() ([]byte, error) {
1543	type NoMethod RateLimits
1544	raw := NoMethod(*s)
1545	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1546}
1547
1548func (s *RateLimits) UnmarshalJSON(data []byte) error {
1549	type NoMethod RateLimits
1550	var s1 struct {
1551		MaxDispatchesPerSecond gensupport.JSONFloat64 `json:"maxDispatchesPerSecond"`
1552		*NoMethod
1553	}
1554	s1.NoMethod = (*NoMethod)(s)
1555	if err := json.Unmarshal(data, &s1); err != nil {
1556		return err
1557	}
1558	s.MaxDispatchesPerSecond = float64(s1.MaxDispatchesPerSecond)
1559	return nil
1560}
1561
1562// ResumeQueueRequest: Request message for ResumeQueue.
1563type ResumeQueueRequest struct {
1564}
1565
1566// RetryConfig: Retry config. These settings determine when a failed
1567// task attempt is retried.
1568type RetryConfig struct {
1569	// MaxAttempts: Number of attempts per task. Cloud Tasks will attempt
1570	// the task `max_attempts` times (that is, if the first attempt fails,
1571	// then there will be `max_attempts - 1` retries). Must be >= -1. If
1572	// unspecified when the queue is created, Cloud Tasks will pick the
1573	// default. -1 indicates unlimited attempts. This field has the same
1574	// meaning as task_retry_limit in queue.yaml/xml
1575	// (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1576	MaxAttempts int64 `json:"maxAttempts,omitempty"`
1577
1578	// MaxBackoff: A task will be scheduled for retry between min_backoff
1579	// and max_backoff duration after it fails, if the queue's RetryConfig
1580	// specifies that the task should be retried. If unspecified when the
1581	// queue is created, Cloud Tasks will pick the default. `max_backoff`
1582	// will be truncated to the nearest second. This field has the same
1583	// meaning as max_backoff_seconds in queue.yaml/xml
1584	// (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1585	MaxBackoff string `json:"maxBackoff,omitempty"`
1586
1587	// MaxDoublings: The time between retries will double `max_doublings`
1588	// times. A task's retry interval starts at min_backoff, then doubles
1589	// `max_doublings` times, then increases linearly, and finally retries
1590	// at intervals of max_backoff up to max_attempts times. For example, if
1591	// min_backoff is 10s, max_backoff is 300s, and `max_doublings` is 3,
1592	// then the a task will first be retried in 10s. The retry interval will
1593	// double three times, and then increase linearly by 2^3 * 10s. Finally,
1594	// the task will retry at intervals of max_backoff until the task has
1595	// been attempted max_attempts times. Thus, the requests will retry at
1596	// 10s, 20s, 40s, 80s, 160s, 240s, 300s, 300s, .... If unspecified when
1597	// the queue is created, Cloud Tasks will pick the default. This field
1598	// has the same meaning as max_doublings in queue.yaml/xml
1599	// (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1600	MaxDoublings int64 `json:"maxDoublings,omitempty"`
1601
1602	// MaxRetryDuration: If positive, `max_retry_duration` specifies the
1603	// time limit for retrying a failed task, measured from when the task
1604	// was first attempted. Once `max_retry_duration` time has passed *and*
1605	// the task has been attempted max_attempts times, no further attempts
1606	// will be made and the task will be deleted. If zero, then the task age
1607	// is unlimited. If unspecified when the queue is created, Cloud Tasks
1608	// will pick the default. `max_retry_duration` will be truncated to the
1609	// nearest second. This field has the same meaning as task_age_limit in
1610	// queue.yaml/xml
1611	// (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1612	MaxRetryDuration string `json:"maxRetryDuration,omitempty"`
1613
1614	// MinBackoff: A task will be scheduled for retry between min_backoff
1615	// and max_backoff duration after it fails, if the queue's RetryConfig
1616	// specifies that the task should be retried. If unspecified when the
1617	// queue is created, Cloud Tasks will pick the default. `min_backoff`
1618	// will be truncated to the nearest second. This field has the same
1619	// meaning as min_backoff_seconds in queue.yaml/xml
1620	// (https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
1621	MinBackoff string `json:"minBackoff,omitempty"`
1622
1623	// ForceSendFields is a list of field names (e.g. "MaxAttempts") to
1624	// unconditionally include in API requests. By default, fields with
1625	// empty values are omitted from API requests. However, any non-pointer,
1626	// non-interface field appearing in ForceSendFields will be sent to the
1627	// server regardless of whether the field is empty or not. This may be
1628	// used to include empty fields in Patch requests.
1629	ForceSendFields []string `json:"-"`
1630
1631	// NullFields is a list of field names (e.g. "MaxAttempts") to include
1632	// in API requests with the JSON null value. By default, fields with
1633	// empty values are omitted from API requests. However, any field with
1634	// an empty value appearing in NullFields will be sent to the server as
1635	// null. It is an error if a field in this list has a non-empty value.
1636	// This may be used to include null fields in Patch requests.
1637	NullFields []string `json:"-"`
1638}
1639
1640func (s *RetryConfig) MarshalJSON() ([]byte, error) {
1641	type NoMethod RetryConfig
1642	raw := NoMethod(*s)
1643	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1644}
1645
1646// RunTaskRequest: Request message for forcing a task to run now using
1647// RunTask.
1648type RunTaskRequest struct {
1649	// ResponseView: The response_view specifies which subset of the Task
1650	// will be returned. By default response_view is BASIC; not all
1651	// information is retrieved by default because some data, such as
1652	// payloads, might be desirable to return only when needed because of
1653	// its large size or because of the sensitivity of data that it
1654	// contains. Authorization for FULL requires `cloudtasks.tasks.fullView`
1655	// Google IAM (https://cloud.google.com/iam/) permission on the Task
1656	// resource.
1657	//
1658	// Possible values:
1659	//   "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC.
1660	//   "BASIC" - The basic view omits fields which can be large or can
1661	// contain sensitive data. This view does not include the body in
1662	// AppEngineHttpRequest. Bodies are desirable to return only when
1663	// needed, because they can be large and because of the sensitivity of
1664	// the data that you choose to store in it.
1665	//   "FULL" - All information is returned. Authorization for FULL
1666	// requires `cloudtasks.tasks.fullView` [Google
1667	// IAM](https://cloud.google.com/iam/) permission on the Queue resource.
1668	ResponseView string `json:"responseView,omitempty"`
1669
1670	// ForceSendFields is a list of field names (e.g. "ResponseView") to
1671	// unconditionally include in API requests. By default, fields with
1672	// empty values are omitted from API requests. However, any non-pointer,
1673	// non-interface field appearing in ForceSendFields will be sent to the
1674	// server regardless of whether the field is empty or not. This may be
1675	// used to include empty fields in Patch requests.
1676	ForceSendFields []string `json:"-"`
1677
1678	// NullFields is a list of field names (e.g. "ResponseView") to include
1679	// in API requests with the JSON null value. By default, fields with
1680	// empty values are omitted from API requests. However, any field with
1681	// an empty value appearing in NullFields will be sent to the server as
1682	// null. It is an error if a field in this list has a non-empty value.
1683	// This may be used to include null fields in Patch requests.
1684	NullFields []string `json:"-"`
1685}
1686
1687func (s *RunTaskRequest) MarshalJSON() ([]byte, error) {
1688	type NoMethod RunTaskRequest
1689	raw := NoMethod(*s)
1690	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1691}
1692
1693// SetIamPolicyRequest: Request message for `SetIamPolicy` method.
1694type SetIamPolicyRequest struct {
1695	// Policy: REQUIRED: The complete policy to be applied to the
1696	// `resource`. The size of the policy is limited to a few 10s of KB. An
1697	// empty policy is a valid policy but certain Cloud Platform services
1698	// (such as Projects) might reject them.
1699	Policy *Policy `json:"policy,omitempty"`
1700
1701	// ForceSendFields is a list of field names (e.g. "Policy") to
1702	// unconditionally include in API requests. By default, fields with
1703	// empty values are omitted from API requests. However, any non-pointer,
1704	// non-interface field appearing in ForceSendFields will be sent to the
1705	// server regardless of whether the field is empty or not. This may be
1706	// used to include empty fields in Patch requests.
1707	ForceSendFields []string `json:"-"`
1708
1709	// NullFields is a list of field names (e.g. "Policy") to include in API
1710	// requests with the JSON null value. By default, fields with empty
1711	// values are omitted from API requests. However, any field with an
1712	// empty value appearing in NullFields will be sent to the server as
1713	// null. It is an error if a field in this list has a non-empty value.
1714	// This may be used to include null fields in Patch requests.
1715	NullFields []string `json:"-"`
1716}
1717
1718func (s *SetIamPolicyRequest) MarshalJSON() ([]byte, error) {
1719	type NoMethod SetIamPolicyRequest
1720	raw := NoMethod(*s)
1721	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1722}
1723
1724// StackdriverLoggingConfig: Configuration options for writing logs to
1725// Stackdriver Logging (https://cloud.google.com/logging/docs/).
1726type StackdriverLoggingConfig struct {
1727	// SamplingRatio: Specifies the fraction of operations to write to
1728	// Stackdriver Logging (https://cloud.google.com/logging/docs/). This
1729	// field may contain any value between 0.0 and 1.0, inclusive. 0.0 is
1730	// the default and means that no operations are logged.
1731	SamplingRatio float64 `json:"samplingRatio,omitempty"`
1732
1733	// ForceSendFields is a list of field names (e.g. "SamplingRatio") to
1734	// unconditionally include in API requests. By default, fields with
1735	// empty values are omitted from API requests. However, any non-pointer,
1736	// non-interface field appearing in ForceSendFields will be sent to the
1737	// server regardless of whether the field is empty or not. This may be
1738	// used to include empty fields in Patch requests.
1739	ForceSendFields []string `json:"-"`
1740
1741	// NullFields is a list of field names (e.g. "SamplingRatio") to include
1742	// in API requests with the JSON null value. By default, fields with
1743	// empty values are omitted from API requests. However, any field with
1744	// an empty value appearing in NullFields will be sent to the server as
1745	// null. It is an error if a field in this list has a non-empty value.
1746	// This may be used to include null fields in Patch requests.
1747	NullFields []string `json:"-"`
1748}
1749
1750func (s *StackdriverLoggingConfig) MarshalJSON() ([]byte, error) {
1751	type NoMethod StackdriverLoggingConfig
1752	raw := NoMethod(*s)
1753	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1754}
1755
1756func (s *StackdriverLoggingConfig) UnmarshalJSON(data []byte) error {
1757	type NoMethod StackdriverLoggingConfig
1758	var s1 struct {
1759		SamplingRatio gensupport.JSONFloat64 `json:"samplingRatio"`
1760		*NoMethod
1761	}
1762	s1.NoMethod = (*NoMethod)(s)
1763	if err := json.Unmarshal(data, &s1); err != nil {
1764		return err
1765	}
1766	s.SamplingRatio = float64(s1.SamplingRatio)
1767	return nil
1768}
1769
1770// Status: The `Status` type defines a logical error model that is
1771// suitable for different programming environments, including REST APIs
1772// and RPC APIs. It is used by gRPC (https://github.com/grpc). Each
1773// `Status` message contains three pieces of data: error code, error
1774// message, and error details. You can find out more about this error
1775// model and how to work with it in the API Design Guide
1776// (https://cloud.google.com/apis/design/errors).
1777type Status struct {
1778	// Code: The status code, which should be an enum value of
1779	// google.rpc.Code.
1780	Code int64 `json:"code,omitempty"`
1781
1782	// Details: A list of messages that carry the error details. There is a
1783	// common set of message types for APIs to use.
1784	Details []googleapi.RawMessage `json:"details,omitempty"`
1785
1786	// Message: A developer-facing error message, which should be in
1787	// English. Any user-facing error message should be localized and sent
1788	// in the google.rpc.Status.details field, or localized by the client.
1789	Message string `json:"message,omitempty"`
1790
1791	// ForceSendFields is a list of field names (e.g. "Code") to
1792	// unconditionally include in API requests. By default, fields with
1793	// empty values are omitted from API requests. However, any non-pointer,
1794	// non-interface field appearing in ForceSendFields will be sent to the
1795	// server regardless of whether the field is empty or not. This may be
1796	// used to include empty fields in Patch requests.
1797	ForceSendFields []string `json:"-"`
1798
1799	// NullFields is a list of field names (e.g. "Code") to include in API
1800	// requests with the JSON null value. By default, fields with empty
1801	// values are omitted from API requests. However, any field with an
1802	// empty value appearing in NullFields will be sent to the server as
1803	// null. It is an error if a field in this list has a non-empty value.
1804	// This may be used to include null fields in Patch requests.
1805	NullFields []string `json:"-"`
1806}
1807
1808func (s *Status) MarshalJSON() ([]byte, error) {
1809	type NoMethod Status
1810	raw := NoMethod(*s)
1811	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1812}
1813
1814// Task: A unit of scheduled work.
1815type Task struct {
1816	// AppEngineHttpRequest: HTTP request that is sent to the App Engine app
1817	// handler. An App Engine task is a task that has AppEngineHttpRequest
1818	// set.
1819	AppEngineHttpRequest *AppEngineHttpRequest `json:"appEngineHttpRequest,omitempty"`
1820
1821	// CreateTime: Output only. The time that the task was created.
1822	// `create_time` will be truncated to the nearest second.
1823	CreateTime string `json:"createTime,omitempty"`
1824
1825	// DispatchCount: Output only. The number of attempts dispatched. This
1826	// count includes attempts which have been dispatched but haven't
1827	// received a response.
1828	DispatchCount int64 `json:"dispatchCount,omitempty"`
1829
1830	// DispatchDeadline: The deadline for requests sent to the worker. If
1831	// the worker does not respond by this deadline then the request is
1832	// cancelled and the attempt is marked as a `DEADLINE_EXCEEDED` failure.
1833	// Cloud Tasks will retry the task according to the RetryConfig. Note
1834	// that when the request is cancelled, Cloud Tasks will stop listening
1835	// for the response, but whether the worker stops processing depends on
1836	// the worker. For example, if the worker is stuck, it may not react to
1837	// cancelled requests. The default and maximum values depend on the type
1838	// of request: * For HTTP tasks, the default is 10 minutes. The deadline
1839	// must be in the interval [15 seconds, 30 minutes]. * For App Engine
1840	// tasks, 0 indicates that the request has the default deadline. The
1841	// default deadline depends on the scaling type
1842	// (https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
1843	// of the service: 10 minutes for standard apps with automatic scaling,
1844	// 24 hours for standard apps with manual and basic scaling, and 60
1845	// minutes for flex apps. If the request deadline is set, it must be in
1846	// the interval [15 seconds, 24 hours 15 seconds]. Regardless of the
1847	// task's `dispatch_deadline`, the app handler will not run for longer
1848	// than than the service's timeout. We recommend setting the
1849	// `dispatch_deadline` to at most a few seconds more than the app
1850	// handler's timeout. For more information see Timeouts
1851	// (https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
1852	// `dispatch_deadline` will be truncated to the nearest millisecond. The
1853	// deadline is an approximate deadline.
1854	DispatchDeadline string `json:"dispatchDeadline,omitempty"`
1855
1856	// FirstAttempt: Output only. The status of the task's first attempt.
1857	// Only dispatch_time will be set. The other Attempt information is not
1858	// retained by Cloud Tasks.
1859	FirstAttempt *Attempt `json:"firstAttempt,omitempty"`
1860
1861	// HttpRequest: HTTP request that is sent to the task's target. An HTTP
1862	// task is a task that has HttpRequest set.
1863	HttpRequest *HttpRequest `json:"httpRequest,omitempty"`
1864
1865	// LastAttempt: Output only. The status of the task's last attempt.
1866	LastAttempt *Attempt `json:"lastAttempt,omitempty"`
1867
1868	// Name: Optionally caller-specified in CreateTask. The task name. The
1869	// task name must have the following format:
1870	// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_
1871	// ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
1872	// hyphens (-), colons (:), or periods (.). For more information, see
1873	// Identifying projects
1874	// (https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
1875	// * `LOCATION_ID` is the canonical ID for the task's location. The list
1876	// of available locations can be obtained by calling ListLocations. For
1877	// more information, see https://cloud.google.com/about/locations/. *
1878	// `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
1879	// hyphens (-). The maximum length is 100 characters. * `TASK_ID` can
1880	// contain only letters ([A-Za-z]), numbers ([0-9]), hyphens (-), or
1881	// underscores (_). The maximum length is 500 characters.
1882	Name string `json:"name,omitempty"`
1883
1884	// PullMessage: Pull Message contained in a task in a PULL queue type.
1885	// This payload type cannot be explicitly set through Cloud Tasks API.
1886	// Its purpose, currently is to provide backward compatibility with App
1887	// Engine Task Queue pull
1888	// (https://cloud.google.com/appengine/docs/standard/java/taskqueue/pull/)
1889	// queues to provide a way to inspect contents of pull tasks through the
1890	// CloudTasks.GetTask.
1891	PullMessage *PullMessage `json:"pullMessage,omitempty"`
1892
1893	// ResponseCount: Output only. The number of attempts which have
1894	// received a response.
1895	ResponseCount int64 `json:"responseCount,omitempty"`
1896
1897	// ScheduleTime: The time when the task is scheduled to be attempted.
1898	// For App Engine queues, this is when the task will be attempted or
1899	// retried. `schedule_time` will be truncated to the nearest
1900	// microsecond.
1901	ScheduleTime string `json:"scheduleTime,omitempty"`
1902
1903	// View: Output only. The view specifies which subset of the Task has
1904	// been returned.
1905	//
1906	// Possible values:
1907	//   "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC.
1908	//   "BASIC" - The basic view omits fields which can be large or can
1909	// contain sensitive data. This view does not include the body in
1910	// AppEngineHttpRequest. Bodies are desirable to return only when
1911	// needed, because they can be large and because of the sensitivity of
1912	// the data that you choose to store in it.
1913	//   "FULL" - All information is returned. Authorization for FULL
1914	// requires `cloudtasks.tasks.fullView` [Google
1915	// IAM](https://cloud.google.com/iam/) permission on the Queue resource.
1916	View string `json:"view,omitempty"`
1917
1918	// ServerResponse contains the HTTP response code and headers from the
1919	// server.
1920	googleapi.ServerResponse `json:"-"`
1921
1922	// ForceSendFields is a list of field names (e.g.
1923	// "AppEngineHttpRequest") to unconditionally include in API requests.
1924	// By default, fields with empty values are omitted from API requests.
1925	// However, any non-pointer, non-interface field appearing in
1926	// ForceSendFields will be sent to the server regardless of whether the
1927	// field is empty or not. This may be used to include empty fields in
1928	// Patch requests.
1929	ForceSendFields []string `json:"-"`
1930
1931	// NullFields is a list of field names (e.g. "AppEngineHttpRequest") to
1932	// include in API requests with the JSON null value. By default, fields
1933	// with empty values are omitted from API requests. However, any field
1934	// with an empty value appearing in NullFields will be sent to the
1935	// server as null. It is an error if a field in this list has a
1936	// non-empty value. This may be used to include null fields in Patch
1937	// requests.
1938	NullFields []string `json:"-"`
1939}
1940
1941func (s *Task) MarshalJSON() ([]byte, error) {
1942	type NoMethod Task
1943	raw := NoMethod(*s)
1944	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1945}
1946
1947// TestIamPermissionsRequest: Request message for `TestIamPermissions`
1948// method.
1949type TestIamPermissionsRequest struct {
1950	// Permissions: The set of permissions to check for the `resource`.
1951	// Permissions with wildcards (such as '*' or 'storage.*') are not
1952	// allowed. For more information see IAM Overview
1953	// (https://cloud.google.com/iam/docs/overview#permissions).
1954	Permissions []string `json:"permissions,omitempty"`
1955
1956	// ForceSendFields is a list of field names (e.g. "Permissions") to
1957	// unconditionally include in API requests. By default, fields with
1958	// empty values are omitted from API requests. However, any non-pointer,
1959	// non-interface field appearing in ForceSendFields will be sent to the
1960	// server regardless of whether the field is empty or not. This may be
1961	// used to include empty fields in Patch requests.
1962	ForceSendFields []string `json:"-"`
1963
1964	// NullFields is a list of field names (e.g. "Permissions") to include
1965	// in API requests with the JSON null value. By default, fields with
1966	// empty values are omitted from API requests. However, any field with
1967	// an empty value appearing in NullFields will be sent to the server as
1968	// null. It is an error if a field in this list has a non-empty value.
1969	// This may be used to include null fields in Patch requests.
1970	NullFields []string `json:"-"`
1971}
1972
1973func (s *TestIamPermissionsRequest) MarshalJSON() ([]byte, error) {
1974	type NoMethod TestIamPermissionsRequest
1975	raw := NoMethod(*s)
1976	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
1977}
1978
1979// TestIamPermissionsResponse: Response message for `TestIamPermissions`
1980// method.
1981type TestIamPermissionsResponse struct {
1982	// Permissions: A subset of `TestPermissionsRequest.permissions` that
1983	// the caller is allowed.
1984	Permissions []string `json:"permissions,omitempty"`
1985
1986	// ServerResponse contains the HTTP response code and headers from the
1987	// server.
1988	googleapi.ServerResponse `json:"-"`
1989
1990	// ForceSendFields is a list of field names (e.g. "Permissions") to
1991	// unconditionally include in API requests. By default, fields with
1992	// empty values are omitted from API requests. However, any non-pointer,
1993	// non-interface field appearing in ForceSendFields will be sent to the
1994	// server regardless of whether the field is empty or not. This may be
1995	// used to include empty fields in Patch requests.
1996	ForceSendFields []string `json:"-"`
1997
1998	// NullFields is a list of field names (e.g. "Permissions") to include
1999	// in API requests with the JSON null value. By default, fields with
2000	// empty values are omitted from API requests. However, any field with
2001	// an empty value appearing in NullFields will be sent to the server as
2002	// null. It is an error if a field in this list has a non-empty value.
2003	// This may be used to include null fields in Patch requests.
2004	NullFields []string `json:"-"`
2005}
2006
2007func (s *TestIamPermissionsResponse) MarshalJSON() ([]byte, error) {
2008	type NoMethod TestIamPermissionsResponse
2009	raw := NoMethod(*s)
2010	return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
2011}
2012
2013// method id "cloudtasks.projects.locations.get":
2014
2015type ProjectsLocationsGetCall struct {
2016	s            *Service
2017	name         string
2018	urlParams_   gensupport.URLParams
2019	ifNoneMatch_ string
2020	ctx_         context.Context
2021	header_      http.Header
2022}
2023
2024// Get: Gets information about a location.
2025func (r *ProjectsLocationsService) Get(name string) *ProjectsLocationsGetCall {
2026	c := &ProjectsLocationsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2027	c.name = name
2028	return c
2029}
2030
2031// Fields allows partial responses to be retrieved. See
2032// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2033// for more information.
2034func (c *ProjectsLocationsGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsGetCall {
2035	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2036	return c
2037}
2038
2039// IfNoneMatch sets the optional parameter which makes the operation
2040// fail if the object's ETag matches the given value. This is useful for
2041// getting updates only after the object has changed since the last
2042// request. Use googleapi.IsNotModified to check whether the response
2043// error from Do is the result of In-None-Match.
2044func (c *ProjectsLocationsGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsGetCall {
2045	c.ifNoneMatch_ = entityTag
2046	return c
2047}
2048
2049// Context sets the context to be used in this call's Do method. Any
2050// pending HTTP request will be aborted if the provided context is
2051// canceled.
2052func (c *ProjectsLocationsGetCall) Context(ctx context.Context) *ProjectsLocationsGetCall {
2053	c.ctx_ = ctx
2054	return c
2055}
2056
2057// Header returns an http.Header that can be modified by the caller to
2058// add HTTP headers to the request.
2059func (c *ProjectsLocationsGetCall) Header() http.Header {
2060	if c.header_ == nil {
2061		c.header_ = make(http.Header)
2062	}
2063	return c.header_
2064}
2065
2066func (c *ProjectsLocationsGetCall) doRequest(alt string) (*http.Response, error) {
2067	reqHeaders := make(http.Header)
2068	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2069	for k, v := range c.header_ {
2070		reqHeaders[k] = v
2071	}
2072	reqHeaders.Set("User-Agent", c.s.userAgent())
2073	if c.ifNoneMatch_ != "" {
2074		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2075	}
2076	var body io.Reader = nil
2077	c.urlParams_.Set("alt", alt)
2078	c.urlParams_.Set("prettyPrint", "false")
2079	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}")
2080	urls += "?" + c.urlParams_.Encode()
2081	req, err := http.NewRequest("GET", urls, body)
2082	if err != nil {
2083		return nil, err
2084	}
2085	req.Header = reqHeaders
2086	googleapi.Expand(req.URL, map[string]string{
2087		"name": c.name,
2088	})
2089	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2090}
2091
2092// Do executes the "cloudtasks.projects.locations.get" call.
2093// Exactly one of *Location or error will be non-nil. Any non-2xx status
2094// code is an error. Response headers are in either
2095// *Location.ServerResponse.Header or (if a response was returned at
2096// all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
2097// to check whether the returned error was because
2098// http.StatusNotModified was returned.
2099func (c *ProjectsLocationsGetCall) Do(opts ...googleapi.CallOption) (*Location, error) {
2100	gensupport.SetOptions(c.urlParams_, opts...)
2101	res, err := c.doRequest("json")
2102	if res != nil && res.StatusCode == http.StatusNotModified {
2103		if res.Body != nil {
2104			res.Body.Close()
2105		}
2106		return nil, &googleapi.Error{
2107			Code:   res.StatusCode,
2108			Header: res.Header,
2109		}
2110	}
2111	if err != nil {
2112		return nil, err
2113	}
2114	defer googleapi.CloseBody(res)
2115	if err := googleapi.CheckResponse(res); err != nil {
2116		return nil, err
2117	}
2118	ret := &Location{
2119		ServerResponse: googleapi.ServerResponse{
2120			Header:         res.Header,
2121			HTTPStatusCode: res.StatusCode,
2122		},
2123	}
2124	target := &ret
2125	if err := gensupport.DecodeResponse(target, res); err != nil {
2126		return nil, err
2127	}
2128	return ret, nil
2129	// {
2130	//   "description": "Gets information about a location.",
2131	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}",
2132	//   "httpMethod": "GET",
2133	//   "id": "cloudtasks.projects.locations.get",
2134	//   "parameterOrder": [
2135	//     "name"
2136	//   ],
2137	//   "parameters": {
2138	//     "name": {
2139	//       "description": "Resource name for the location.",
2140	//       "location": "path",
2141	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2142	//       "required": true,
2143	//       "type": "string"
2144	//     }
2145	//   },
2146	//   "path": "v2beta3/{+name}",
2147	//   "response": {
2148	//     "$ref": "Location"
2149	//   },
2150	//   "scopes": [
2151	//     "https://www.googleapis.com/auth/cloud-platform"
2152	//   ]
2153	// }
2154
2155}
2156
2157// method id "cloudtasks.projects.locations.list":
2158
2159type ProjectsLocationsListCall struct {
2160	s            *Service
2161	name         string
2162	urlParams_   gensupport.URLParams
2163	ifNoneMatch_ string
2164	ctx_         context.Context
2165	header_      http.Header
2166}
2167
2168// List: Lists information about the supported locations for this
2169// service.
2170func (r *ProjectsLocationsService) List(name string) *ProjectsLocationsListCall {
2171	c := &ProjectsLocationsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2172	c.name = name
2173	return c
2174}
2175
2176// Filter sets the optional parameter "filter": A filter to narrow down
2177// results to a preferred subset. The filtering language accepts strings
2178// like "displayName=tokyo", and is documented in more detail in AIP-160
2179// (https://google.aip.dev/160).
2180func (c *ProjectsLocationsListCall) Filter(filter string) *ProjectsLocationsListCall {
2181	c.urlParams_.Set("filter", filter)
2182	return c
2183}
2184
2185// PageSize sets the optional parameter "pageSize": The maximum number
2186// of results to return. If not set, the service will select a default.
2187func (c *ProjectsLocationsListCall) PageSize(pageSize int64) *ProjectsLocationsListCall {
2188	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2189	return c
2190}
2191
2192// PageToken sets the optional parameter "pageToken": A page token
2193// received from the `next_page_token` field in the response. Send that
2194// page token to receive the subsequent page.
2195func (c *ProjectsLocationsListCall) PageToken(pageToken string) *ProjectsLocationsListCall {
2196	c.urlParams_.Set("pageToken", pageToken)
2197	return c
2198}
2199
2200// Fields allows partial responses to be retrieved. See
2201// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2202// for more information.
2203func (c *ProjectsLocationsListCall) Fields(s ...googleapi.Field) *ProjectsLocationsListCall {
2204	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2205	return c
2206}
2207
2208// IfNoneMatch sets the optional parameter which makes the operation
2209// fail if the object's ETag matches the given value. This is useful for
2210// getting updates only after the object has changed since the last
2211// request. Use googleapi.IsNotModified to check whether the response
2212// error from Do is the result of In-None-Match.
2213func (c *ProjectsLocationsListCall) IfNoneMatch(entityTag string) *ProjectsLocationsListCall {
2214	c.ifNoneMatch_ = entityTag
2215	return c
2216}
2217
2218// Context sets the context to be used in this call's Do method. Any
2219// pending HTTP request will be aborted if the provided context is
2220// canceled.
2221func (c *ProjectsLocationsListCall) Context(ctx context.Context) *ProjectsLocationsListCall {
2222	c.ctx_ = ctx
2223	return c
2224}
2225
2226// Header returns an http.Header that can be modified by the caller to
2227// add HTTP headers to the request.
2228func (c *ProjectsLocationsListCall) Header() http.Header {
2229	if c.header_ == nil {
2230		c.header_ = make(http.Header)
2231	}
2232	return c.header_
2233}
2234
2235func (c *ProjectsLocationsListCall) doRequest(alt string) (*http.Response, error) {
2236	reqHeaders := make(http.Header)
2237	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2238	for k, v := range c.header_ {
2239		reqHeaders[k] = v
2240	}
2241	reqHeaders.Set("User-Agent", c.s.userAgent())
2242	if c.ifNoneMatch_ != "" {
2243		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2244	}
2245	var body io.Reader = nil
2246	c.urlParams_.Set("alt", alt)
2247	c.urlParams_.Set("prettyPrint", "false")
2248	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}/locations")
2249	urls += "?" + c.urlParams_.Encode()
2250	req, err := http.NewRequest("GET", urls, body)
2251	if err != nil {
2252		return nil, err
2253	}
2254	req.Header = reqHeaders
2255	googleapi.Expand(req.URL, map[string]string{
2256		"name": c.name,
2257	})
2258	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2259}
2260
2261// Do executes the "cloudtasks.projects.locations.list" call.
2262// Exactly one of *ListLocationsResponse or error will be non-nil. Any
2263// non-2xx status code is an error. Response headers are in either
2264// *ListLocationsResponse.ServerResponse.Header or (if a response was
2265// returned at all) in error.(*googleapi.Error).Header. Use
2266// googleapi.IsNotModified to check whether the returned error was
2267// because http.StatusNotModified was returned.
2268func (c *ProjectsLocationsListCall) Do(opts ...googleapi.CallOption) (*ListLocationsResponse, error) {
2269	gensupport.SetOptions(c.urlParams_, opts...)
2270	res, err := c.doRequest("json")
2271	if res != nil && res.StatusCode == http.StatusNotModified {
2272		if res.Body != nil {
2273			res.Body.Close()
2274		}
2275		return nil, &googleapi.Error{
2276			Code:   res.StatusCode,
2277			Header: res.Header,
2278		}
2279	}
2280	if err != nil {
2281		return nil, err
2282	}
2283	defer googleapi.CloseBody(res)
2284	if err := googleapi.CheckResponse(res); err != nil {
2285		return nil, err
2286	}
2287	ret := &ListLocationsResponse{
2288		ServerResponse: googleapi.ServerResponse{
2289			Header:         res.Header,
2290			HTTPStatusCode: res.StatusCode,
2291		},
2292	}
2293	target := &ret
2294	if err := gensupport.DecodeResponse(target, res); err != nil {
2295		return nil, err
2296	}
2297	return ret, nil
2298	// {
2299	//   "description": "Lists information about the supported locations for this service.",
2300	//   "flatPath": "v2beta3/projects/{projectsId}/locations",
2301	//   "httpMethod": "GET",
2302	//   "id": "cloudtasks.projects.locations.list",
2303	//   "parameterOrder": [
2304	//     "name"
2305	//   ],
2306	//   "parameters": {
2307	//     "filter": {
2308	//       "description": "A filter to narrow down results to a preferred subset. The filtering language accepts strings like \"displayName=tokyo\", and is documented in more detail in [AIP-160](https://google.aip.dev/160).",
2309	//       "location": "query",
2310	//       "type": "string"
2311	//     },
2312	//     "name": {
2313	//       "description": "The resource that owns the locations collection, if applicable.",
2314	//       "location": "path",
2315	//       "pattern": "^projects/[^/]+$",
2316	//       "required": true,
2317	//       "type": "string"
2318	//     },
2319	//     "pageSize": {
2320	//       "description": "The maximum number of results to return. If not set, the service will select a default.",
2321	//       "format": "int32",
2322	//       "location": "query",
2323	//       "type": "integer"
2324	//     },
2325	//     "pageToken": {
2326	//       "description": "A page token received from the `next_page_token` field in the response. Send that page token to receive the subsequent page.",
2327	//       "location": "query",
2328	//       "type": "string"
2329	//     }
2330	//   },
2331	//   "path": "v2beta3/{+name}/locations",
2332	//   "response": {
2333	//     "$ref": "ListLocationsResponse"
2334	//   },
2335	//   "scopes": [
2336	//     "https://www.googleapis.com/auth/cloud-platform"
2337	//   ]
2338	// }
2339
2340}
2341
2342// Pages invokes f for each page of results.
2343// A non-nil error returned from f will halt the iteration.
2344// The provided context supersedes any context provided to the Context method.
2345func (c *ProjectsLocationsListCall) Pages(ctx context.Context, f func(*ListLocationsResponse) error) error {
2346	c.ctx_ = ctx
2347	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
2348	for {
2349		x, err := c.Do()
2350		if err != nil {
2351			return err
2352		}
2353		if err := f(x); err != nil {
2354			return err
2355		}
2356		if x.NextPageToken == "" {
2357			return nil
2358		}
2359		c.PageToken(x.NextPageToken)
2360	}
2361}
2362
2363// method id "cloudtasks.projects.locations.queues.create":
2364
2365type ProjectsLocationsQueuesCreateCall struct {
2366	s          *Service
2367	parent     string
2368	queue      *Queue
2369	urlParams_ gensupport.URLParams
2370	ctx_       context.Context
2371	header_    http.Header
2372}
2373
2374// Create: Creates a queue. Queues created with this method allow tasks
2375// to live for a maximum of 31 days. After a task is 31 days old, the
2376// task will be deleted regardless of whether it was dispatched or not.
2377// WARNING: Using this method may have unintended side effects if you
2378// are using an App Engine `queue.yaml` or `queue.xml` file to manage
2379// your queues. Read Overview of Queue Management and queue.yaml
2380// (https://cloud.google.com/tasks/docs/queue-yaml) before using this
2381// method.
2382func (r *ProjectsLocationsQueuesService) Create(parent string, queue *Queue) *ProjectsLocationsQueuesCreateCall {
2383	c := &ProjectsLocationsQueuesCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2384	c.parent = parent
2385	c.queue = queue
2386	return c
2387}
2388
2389// Fields allows partial responses to be retrieved. See
2390// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2391// for more information.
2392func (c *ProjectsLocationsQueuesCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesCreateCall {
2393	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2394	return c
2395}
2396
2397// Context sets the context to be used in this call's Do method. Any
2398// pending HTTP request will be aborted if the provided context is
2399// canceled.
2400func (c *ProjectsLocationsQueuesCreateCall) Context(ctx context.Context) *ProjectsLocationsQueuesCreateCall {
2401	c.ctx_ = ctx
2402	return c
2403}
2404
2405// Header returns an http.Header that can be modified by the caller to
2406// add HTTP headers to the request.
2407func (c *ProjectsLocationsQueuesCreateCall) Header() http.Header {
2408	if c.header_ == nil {
2409		c.header_ = make(http.Header)
2410	}
2411	return c.header_
2412}
2413
2414func (c *ProjectsLocationsQueuesCreateCall) doRequest(alt string) (*http.Response, error) {
2415	reqHeaders := make(http.Header)
2416	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2417	for k, v := range c.header_ {
2418		reqHeaders[k] = v
2419	}
2420	reqHeaders.Set("User-Agent", c.s.userAgent())
2421	var body io.Reader = nil
2422	body, err := googleapi.WithoutDataWrapper.JSONReader(c.queue)
2423	if err != nil {
2424		return nil, err
2425	}
2426	reqHeaders.Set("Content-Type", "application/json")
2427	c.urlParams_.Set("alt", alt)
2428	c.urlParams_.Set("prettyPrint", "false")
2429	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+parent}/queues")
2430	urls += "?" + c.urlParams_.Encode()
2431	req, err := http.NewRequest("POST", urls, body)
2432	if err != nil {
2433		return nil, err
2434	}
2435	req.Header = reqHeaders
2436	googleapi.Expand(req.URL, map[string]string{
2437		"parent": c.parent,
2438	})
2439	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2440}
2441
2442// Do executes the "cloudtasks.projects.locations.queues.create" call.
2443// Exactly one of *Queue or error will be non-nil. Any non-2xx status
2444// code is an error. Response headers are in either
2445// *Queue.ServerResponse.Header or (if a response was returned at all)
2446// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2447// check whether the returned error was because http.StatusNotModified
2448// was returned.
2449func (c *ProjectsLocationsQueuesCreateCall) Do(opts ...googleapi.CallOption) (*Queue, error) {
2450	gensupport.SetOptions(c.urlParams_, opts...)
2451	res, err := c.doRequest("json")
2452	if res != nil && res.StatusCode == http.StatusNotModified {
2453		if res.Body != nil {
2454			res.Body.Close()
2455		}
2456		return nil, &googleapi.Error{
2457			Code:   res.StatusCode,
2458			Header: res.Header,
2459		}
2460	}
2461	if err != nil {
2462		return nil, err
2463	}
2464	defer googleapi.CloseBody(res)
2465	if err := googleapi.CheckResponse(res); err != nil {
2466		return nil, err
2467	}
2468	ret := &Queue{
2469		ServerResponse: googleapi.ServerResponse{
2470			Header:         res.Header,
2471			HTTPStatusCode: res.StatusCode,
2472		},
2473	}
2474	target := &ret
2475	if err := gensupport.DecodeResponse(target, res); err != nil {
2476		return nil, err
2477	}
2478	return ret, nil
2479	// {
2480	//   "description": "Creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.",
2481	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues",
2482	//   "httpMethod": "POST",
2483	//   "id": "cloudtasks.projects.locations.queues.create",
2484	//   "parameterOrder": [
2485	//     "parent"
2486	//   ],
2487	//   "parameters": {
2488	//     "parent": {
2489	//       "description": "Required. The location name in which the queue will be created. For example: `projects/PROJECT_ID/locations/LOCATION_ID` The list of allowed locations can be obtained by calling Cloud Tasks' implementation of ListLocations.",
2490	//       "location": "path",
2491	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
2492	//       "required": true,
2493	//       "type": "string"
2494	//     }
2495	//   },
2496	//   "path": "v2beta3/{+parent}/queues",
2497	//   "request": {
2498	//     "$ref": "Queue"
2499	//   },
2500	//   "response": {
2501	//     "$ref": "Queue"
2502	//   },
2503	//   "scopes": [
2504	//     "https://www.googleapis.com/auth/cloud-platform"
2505	//   ]
2506	// }
2507
2508}
2509
2510// method id "cloudtasks.projects.locations.queues.delete":
2511
2512type ProjectsLocationsQueuesDeleteCall struct {
2513	s          *Service
2514	name       string
2515	urlParams_ gensupport.URLParams
2516	ctx_       context.Context
2517	header_    http.Header
2518}
2519
2520// Delete: Deletes a queue. This command will delete the queue even if
2521// it has tasks in it. Note: If you delete a queue, a queue with the
2522// same name can't be created for 7 days. WARNING: Using this method may
2523// have unintended side effects if you are using an App Engine
2524// `queue.yaml` or `queue.xml` file to manage your queues. Read Overview
2525// of Queue Management and queue.yaml
2526// (https://cloud.google.com/tasks/docs/queue-yaml) before using this
2527// method.
2528func (r *ProjectsLocationsQueuesService) Delete(name string) *ProjectsLocationsQueuesDeleteCall {
2529	c := &ProjectsLocationsQueuesDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2530	c.name = name
2531	return c
2532}
2533
2534// Fields allows partial responses to be retrieved. See
2535// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2536// for more information.
2537func (c *ProjectsLocationsQueuesDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesDeleteCall {
2538	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2539	return c
2540}
2541
2542// Context sets the context to be used in this call's Do method. Any
2543// pending HTTP request will be aborted if the provided context is
2544// canceled.
2545func (c *ProjectsLocationsQueuesDeleteCall) Context(ctx context.Context) *ProjectsLocationsQueuesDeleteCall {
2546	c.ctx_ = ctx
2547	return c
2548}
2549
2550// Header returns an http.Header that can be modified by the caller to
2551// add HTTP headers to the request.
2552func (c *ProjectsLocationsQueuesDeleteCall) Header() http.Header {
2553	if c.header_ == nil {
2554		c.header_ = make(http.Header)
2555	}
2556	return c.header_
2557}
2558
2559func (c *ProjectsLocationsQueuesDeleteCall) doRequest(alt string) (*http.Response, error) {
2560	reqHeaders := make(http.Header)
2561	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2562	for k, v := range c.header_ {
2563		reqHeaders[k] = v
2564	}
2565	reqHeaders.Set("User-Agent", c.s.userAgent())
2566	var body io.Reader = nil
2567	c.urlParams_.Set("alt", alt)
2568	c.urlParams_.Set("prettyPrint", "false")
2569	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}")
2570	urls += "?" + c.urlParams_.Encode()
2571	req, err := http.NewRequest("DELETE", urls, body)
2572	if err != nil {
2573		return nil, err
2574	}
2575	req.Header = reqHeaders
2576	googleapi.Expand(req.URL, map[string]string{
2577		"name": c.name,
2578	})
2579	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2580}
2581
2582// Do executes the "cloudtasks.projects.locations.queues.delete" call.
2583// Exactly one of *Empty or error will be non-nil. Any non-2xx status
2584// code is an error. Response headers are in either
2585// *Empty.ServerResponse.Header or (if a response was returned at all)
2586// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2587// check whether the returned error was because http.StatusNotModified
2588// was returned.
2589func (c *ProjectsLocationsQueuesDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
2590	gensupport.SetOptions(c.urlParams_, opts...)
2591	res, err := c.doRequest("json")
2592	if res != nil && res.StatusCode == http.StatusNotModified {
2593		if res.Body != nil {
2594			res.Body.Close()
2595		}
2596		return nil, &googleapi.Error{
2597			Code:   res.StatusCode,
2598			Header: res.Header,
2599		}
2600	}
2601	if err != nil {
2602		return nil, err
2603	}
2604	defer googleapi.CloseBody(res)
2605	if err := googleapi.CheckResponse(res); err != nil {
2606		return nil, err
2607	}
2608	ret := &Empty{
2609		ServerResponse: googleapi.ServerResponse{
2610			Header:         res.Header,
2611			HTTPStatusCode: res.StatusCode,
2612		},
2613	}
2614	target := &ret
2615	if err := gensupport.DecodeResponse(target, res); err != nil {
2616		return nil, err
2617	}
2618	return ret, nil
2619	// {
2620	//   "description": "Deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, a queue with the same name can't be created for 7 days. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.",
2621	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}",
2622	//   "httpMethod": "DELETE",
2623	//   "id": "cloudtasks.projects.locations.queues.delete",
2624	//   "parameterOrder": [
2625	//     "name"
2626	//   ],
2627	//   "parameters": {
2628	//     "name": {
2629	//       "description": "Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`",
2630	//       "location": "path",
2631	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
2632	//       "required": true,
2633	//       "type": "string"
2634	//     }
2635	//   },
2636	//   "path": "v2beta3/{+name}",
2637	//   "response": {
2638	//     "$ref": "Empty"
2639	//   },
2640	//   "scopes": [
2641	//     "https://www.googleapis.com/auth/cloud-platform"
2642	//   ]
2643	// }
2644
2645}
2646
2647// method id "cloudtasks.projects.locations.queues.get":
2648
2649type ProjectsLocationsQueuesGetCall struct {
2650	s            *Service
2651	name         string
2652	urlParams_   gensupport.URLParams
2653	ifNoneMatch_ string
2654	ctx_         context.Context
2655	header_      http.Header
2656}
2657
2658// Get: Gets a queue.
2659func (r *ProjectsLocationsQueuesService) Get(name string) *ProjectsLocationsQueuesGetCall {
2660	c := &ProjectsLocationsQueuesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2661	c.name = name
2662	return c
2663}
2664
2665// ReadMask sets the optional parameter "readMask": Read mask is used
2666// for a more granular control over what the API returns. If the mask is
2667// not present all fields will be returned except [Queue.stats].
2668// [Queue.stats] will be returned only if it was explicitly specified in
2669// the mask.
2670func (c *ProjectsLocationsQueuesGetCall) ReadMask(readMask string) *ProjectsLocationsQueuesGetCall {
2671	c.urlParams_.Set("readMask", readMask)
2672	return c
2673}
2674
2675// Fields allows partial responses to be retrieved. See
2676// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2677// for more information.
2678func (c *ProjectsLocationsQueuesGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesGetCall {
2679	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2680	return c
2681}
2682
2683// IfNoneMatch sets the optional parameter which makes the operation
2684// fail if the object's ETag matches the given value. This is useful for
2685// getting updates only after the object has changed since the last
2686// request. Use googleapi.IsNotModified to check whether the response
2687// error from Do is the result of In-None-Match.
2688func (c *ProjectsLocationsQueuesGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueuesGetCall {
2689	c.ifNoneMatch_ = entityTag
2690	return c
2691}
2692
2693// Context sets the context to be used in this call's Do method. Any
2694// pending HTTP request will be aborted if the provided context is
2695// canceled.
2696func (c *ProjectsLocationsQueuesGetCall) Context(ctx context.Context) *ProjectsLocationsQueuesGetCall {
2697	c.ctx_ = ctx
2698	return c
2699}
2700
2701// Header returns an http.Header that can be modified by the caller to
2702// add HTTP headers to the request.
2703func (c *ProjectsLocationsQueuesGetCall) Header() http.Header {
2704	if c.header_ == nil {
2705		c.header_ = make(http.Header)
2706	}
2707	return c.header_
2708}
2709
2710func (c *ProjectsLocationsQueuesGetCall) doRequest(alt string) (*http.Response, error) {
2711	reqHeaders := make(http.Header)
2712	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2713	for k, v := range c.header_ {
2714		reqHeaders[k] = v
2715	}
2716	reqHeaders.Set("User-Agent", c.s.userAgent())
2717	if c.ifNoneMatch_ != "" {
2718		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
2719	}
2720	var body io.Reader = nil
2721	c.urlParams_.Set("alt", alt)
2722	c.urlParams_.Set("prettyPrint", "false")
2723	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}")
2724	urls += "?" + c.urlParams_.Encode()
2725	req, err := http.NewRequest("GET", urls, body)
2726	if err != nil {
2727		return nil, err
2728	}
2729	req.Header = reqHeaders
2730	googleapi.Expand(req.URL, map[string]string{
2731		"name": c.name,
2732	})
2733	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2734}
2735
2736// Do executes the "cloudtasks.projects.locations.queues.get" call.
2737// Exactly one of *Queue or error will be non-nil. Any non-2xx status
2738// code is an error. Response headers are in either
2739// *Queue.ServerResponse.Header or (if a response was returned at all)
2740// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2741// check whether the returned error was because http.StatusNotModified
2742// was returned.
2743func (c *ProjectsLocationsQueuesGetCall) Do(opts ...googleapi.CallOption) (*Queue, error) {
2744	gensupport.SetOptions(c.urlParams_, opts...)
2745	res, err := c.doRequest("json")
2746	if res != nil && res.StatusCode == http.StatusNotModified {
2747		if res.Body != nil {
2748			res.Body.Close()
2749		}
2750		return nil, &googleapi.Error{
2751			Code:   res.StatusCode,
2752			Header: res.Header,
2753		}
2754	}
2755	if err != nil {
2756		return nil, err
2757	}
2758	defer googleapi.CloseBody(res)
2759	if err := googleapi.CheckResponse(res); err != nil {
2760		return nil, err
2761	}
2762	ret := &Queue{
2763		ServerResponse: googleapi.ServerResponse{
2764			Header:         res.Header,
2765			HTTPStatusCode: res.StatusCode,
2766		},
2767	}
2768	target := &ret
2769	if err := gensupport.DecodeResponse(target, res); err != nil {
2770		return nil, err
2771	}
2772	return ret, nil
2773	// {
2774	//   "description": "Gets a queue.",
2775	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}",
2776	//   "httpMethod": "GET",
2777	//   "id": "cloudtasks.projects.locations.queues.get",
2778	//   "parameterOrder": [
2779	//     "name"
2780	//   ],
2781	//   "parameters": {
2782	//     "name": {
2783	//       "description": "Required. The resource name of the queue. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`",
2784	//       "location": "path",
2785	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
2786	//       "required": true,
2787	//       "type": "string"
2788	//     },
2789	//     "readMask": {
2790	//       "description": "Optional. Read mask is used for a more granular control over what the API returns. If the mask is not present all fields will be returned except [Queue.stats]. [Queue.stats] will be returned only if it was explicitly specified in the mask.",
2791	//       "format": "google-fieldmask",
2792	//       "location": "query",
2793	//       "type": "string"
2794	//     }
2795	//   },
2796	//   "path": "v2beta3/{+name}",
2797	//   "response": {
2798	//     "$ref": "Queue"
2799	//   },
2800	//   "scopes": [
2801	//     "https://www.googleapis.com/auth/cloud-platform"
2802	//   ]
2803	// }
2804
2805}
2806
2807// method id "cloudtasks.projects.locations.queues.getIamPolicy":
2808
2809type ProjectsLocationsQueuesGetIamPolicyCall struct {
2810	s                   *Service
2811	resource            string
2812	getiampolicyrequest *GetIamPolicyRequest
2813	urlParams_          gensupport.URLParams
2814	ctx_                context.Context
2815	header_             http.Header
2816}
2817
2818// GetIamPolicy: Gets the access control policy for a Queue. Returns an
2819// empty policy if the resource exists and does not have a policy set.
2820// Authorization requires the following Google IAM
2821// (https://cloud.google.com/iam) permission on the specified resource
2822// parent: * `cloudtasks.queues.getIamPolicy`
2823func (r *ProjectsLocationsQueuesService) GetIamPolicy(resource string, getiampolicyrequest *GetIamPolicyRequest) *ProjectsLocationsQueuesGetIamPolicyCall {
2824	c := &ProjectsLocationsQueuesGetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2825	c.resource = resource
2826	c.getiampolicyrequest = getiampolicyrequest
2827	return c
2828}
2829
2830// Fields allows partial responses to be retrieved. See
2831// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
2832// for more information.
2833func (c *ProjectsLocationsQueuesGetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesGetIamPolicyCall {
2834	c.urlParams_.Set("fields", googleapi.CombineFields(s))
2835	return c
2836}
2837
2838// Context sets the context to be used in this call's Do method. Any
2839// pending HTTP request will be aborted if the provided context is
2840// canceled.
2841func (c *ProjectsLocationsQueuesGetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsQueuesGetIamPolicyCall {
2842	c.ctx_ = ctx
2843	return c
2844}
2845
2846// Header returns an http.Header that can be modified by the caller to
2847// add HTTP headers to the request.
2848func (c *ProjectsLocationsQueuesGetIamPolicyCall) Header() http.Header {
2849	if c.header_ == nil {
2850		c.header_ = make(http.Header)
2851	}
2852	return c.header_
2853}
2854
2855func (c *ProjectsLocationsQueuesGetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
2856	reqHeaders := make(http.Header)
2857	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
2858	for k, v := range c.header_ {
2859		reqHeaders[k] = v
2860	}
2861	reqHeaders.Set("User-Agent", c.s.userAgent())
2862	var body io.Reader = nil
2863	body, err := googleapi.WithoutDataWrapper.JSONReader(c.getiampolicyrequest)
2864	if err != nil {
2865		return nil, err
2866	}
2867	reqHeaders.Set("Content-Type", "application/json")
2868	c.urlParams_.Set("alt", alt)
2869	c.urlParams_.Set("prettyPrint", "false")
2870	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+resource}:getIamPolicy")
2871	urls += "?" + c.urlParams_.Encode()
2872	req, err := http.NewRequest("POST", urls, body)
2873	if err != nil {
2874		return nil, err
2875	}
2876	req.Header = reqHeaders
2877	googleapi.Expand(req.URL, map[string]string{
2878		"resource": c.resource,
2879	})
2880	return gensupport.SendRequest(c.ctx_, c.s.client, req)
2881}
2882
2883// Do executes the "cloudtasks.projects.locations.queues.getIamPolicy" call.
2884// Exactly one of *Policy or error will be non-nil. Any non-2xx status
2885// code is an error. Response headers are in either
2886// *Policy.ServerResponse.Header or (if a response was returned at all)
2887// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
2888// check whether the returned error was because http.StatusNotModified
2889// was returned.
2890func (c *ProjectsLocationsQueuesGetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
2891	gensupport.SetOptions(c.urlParams_, opts...)
2892	res, err := c.doRequest("json")
2893	if res != nil && res.StatusCode == http.StatusNotModified {
2894		if res.Body != nil {
2895			res.Body.Close()
2896		}
2897		return nil, &googleapi.Error{
2898			Code:   res.StatusCode,
2899			Header: res.Header,
2900		}
2901	}
2902	if err != nil {
2903		return nil, err
2904	}
2905	defer googleapi.CloseBody(res)
2906	if err := googleapi.CheckResponse(res); err != nil {
2907		return nil, err
2908	}
2909	ret := &Policy{
2910		ServerResponse: googleapi.ServerResponse{
2911			Header:         res.Header,
2912			HTTPStatusCode: res.StatusCode,
2913		},
2914	}
2915	target := &ret
2916	if err := gensupport.DecodeResponse(target, res); err != nil {
2917		return nil, err
2918	}
2919	return ret, nil
2920	// {
2921	//   "description": "Gets the access control policy for a Queue. Returns an empty policy if the resource exists and does not have a policy set. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource parent: * `cloudtasks.queues.getIamPolicy`",
2922	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:getIamPolicy",
2923	//   "httpMethod": "POST",
2924	//   "id": "cloudtasks.projects.locations.queues.getIamPolicy",
2925	//   "parameterOrder": [
2926	//     "resource"
2927	//   ],
2928	//   "parameters": {
2929	//     "resource": {
2930	//       "description": "REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.",
2931	//       "location": "path",
2932	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
2933	//       "required": true,
2934	//       "type": "string"
2935	//     }
2936	//   },
2937	//   "path": "v2beta3/{+resource}:getIamPolicy",
2938	//   "request": {
2939	//     "$ref": "GetIamPolicyRequest"
2940	//   },
2941	//   "response": {
2942	//     "$ref": "Policy"
2943	//   },
2944	//   "scopes": [
2945	//     "https://www.googleapis.com/auth/cloud-platform"
2946	//   ]
2947	// }
2948
2949}
2950
2951// method id "cloudtasks.projects.locations.queues.list":
2952
2953type ProjectsLocationsQueuesListCall struct {
2954	s            *Service
2955	parent       string
2956	urlParams_   gensupport.URLParams
2957	ifNoneMatch_ string
2958	ctx_         context.Context
2959	header_      http.Header
2960}
2961
2962// List: Lists queues. Queues are returned in lexicographical order.
2963func (r *ProjectsLocationsQueuesService) List(parent string) *ProjectsLocationsQueuesListCall {
2964	c := &ProjectsLocationsQueuesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
2965	c.parent = parent
2966	return c
2967}
2968
2969// Filter sets the optional parameter "filter": `filter` can be used to
2970// specify a subset of queues. Any Queue field can be used as a filter
2971// and several operators as supported. For example: `<=, <, >=, >, !=,
2972// =, :`. The filter syntax is the same as described in Stackdriver's
2973// Advanced Logs Filters
2974// (https://cloud.google.com/logging/docs/view/advanced_filters). Sample
2975// filter "state: PAUSED". Note that using filters might cause fewer
2976// queues than the requested page_size to be returned.
2977func (c *ProjectsLocationsQueuesListCall) Filter(filter string) *ProjectsLocationsQueuesListCall {
2978	c.urlParams_.Set("filter", filter)
2979	return c
2980}
2981
2982// PageSize sets the optional parameter "pageSize": Requested page size.
2983// The maximum page size is 9800. If unspecified, the page size will be
2984// the maximum. Fewer queues than requested might be returned, even if
2985// more queues exist; use the next_page_token in the response to
2986// determine if more queues exist.
2987func (c *ProjectsLocationsQueuesListCall) PageSize(pageSize int64) *ProjectsLocationsQueuesListCall {
2988	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
2989	return c
2990}
2991
2992// PageToken sets the optional parameter "pageToken": A token
2993// identifying the page of results to return. To request the first page
2994// results, page_token must be empty. To request the next page of
2995// results, page_token must be the value of next_page_token returned
2996// from the previous call to ListQueues method. It is an error to switch
2997// the value of the filter while iterating through pages.
2998func (c *ProjectsLocationsQueuesListCall) PageToken(pageToken string) *ProjectsLocationsQueuesListCall {
2999	c.urlParams_.Set("pageToken", pageToken)
3000	return c
3001}
3002
3003// ReadMask sets the optional parameter "readMask": Read mask is used
3004// for a more granular control over what the API returns. If the mask is
3005// not present all fields will be returned except [Queue.stats].
3006// [Queue.stats] will be returned only if it was explicitly specified in
3007// the mask.
3008func (c *ProjectsLocationsQueuesListCall) ReadMask(readMask string) *ProjectsLocationsQueuesListCall {
3009	c.urlParams_.Set("readMask", readMask)
3010	return c
3011}
3012
3013// Fields allows partial responses to be retrieved. See
3014// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3015// for more information.
3016func (c *ProjectsLocationsQueuesListCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesListCall {
3017	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3018	return c
3019}
3020
3021// IfNoneMatch sets the optional parameter which makes the operation
3022// fail if the object's ETag matches the given value. This is useful for
3023// getting updates only after the object has changed since the last
3024// request. Use googleapi.IsNotModified to check whether the response
3025// error from Do is the result of In-None-Match.
3026func (c *ProjectsLocationsQueuesListCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueuesListCall {
3027	c.ifNoneMatch_ = entityTag
3028	return c
3029}
3030
3031// Context sets the context to be used in this call's Do method. Any
3032// pending HTTP request will be aborted if the provided context is
3033// canceled.
3034func (c *ProjectsLocationsQueuesListCall) Context(ctx context.Context) *ProjectsLocationsQueuesListCall {
3035	c.ctx_ = ctx
3036	return c
3037}
3038
3039// Header returns an http.Header that can be modified by the caller to
3040// add HTTP headers to the request.
3041func (c *ProjectsLocationsQueuesListCall) Header() http.Header {
3042	if c.header_ == nil {
3043		c.header_ = make(http.Header)
3044	}
3045	return c.header_
3046}
3047
3048func (c *ProjectsLocationsQueuesListCall) doRequest(alt string) (*http.Response, error) {
3049	reqHeaders := make(http.Header)
3050	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3051	for k, v := range c.header_ {
3052		reqHeaders[k] = v
3053	}
3054	reqHeaders.Set("User-Agent", c.s.userAgent())
3055	if c.ifNoneMatch_ != "" {
3056		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
3057	}
3058	var body io.Reader = nil
3059	c.urlParams_.Set("alt", alt)
3060	c.urlParams_.Set("prettyPrint", "false")
3061	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+parent}/queues")
3062	urls += "?" + c.urlParams_.Encode()
3063	req, err := http.NewRequest("GET", urls, body)
3064	if err != nil {
3065		return nil, err
3066	}
3067	req.Header = reqHeaders
3068	googleapi.Expand(req.URL, map[string]string{
3069		"parent": c.parent,
3070	})
3071	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3072}
3073
3074// Do executes the "cloudtasks.projects.locations.queues.list" call.
3075// Exactly one of *ListQueuesResponse or error will be non-nil. Any
3076// non-2xx status code is an error. Response headers are in either
3077// *ListQueuesResponse.ServerResponse.Header or (if a response was
3078// returned at all) in error.(*googleapi.Error).Header. Use
3079// googleapi.IsNotModified to check whether the returned error was
3080// because http.StatusNotModified was returned.
3081func (c *ProjectsLocationsQueuesListCall) Do(opts ...googleapi.CallOption) (*ListQueuesResponse, error) {
3082	gensupport.SetOptions(c.urlParams_, opts...)
3083	res, err := c.doRequest("json")
3084	if res != nil && res.StatusCode == http.StatusNotModified {
3085		if res.Body != nil {
3086			res.Body.Close()
3087		}
3088		return nil, &googleapi.Error{
3089			Code:   res.StatusCode,
3090			Header: res.Header,
3091		}
3092	}
3093	if err != nil {
3094		return nil, err
3095	}
3096	defer googleapi.CloseBody(res)
3097	if err := googleapi.CheckResponse(res); err != nil {
3098		return nil, err
3099	}
3100	ret := &ListQueuesResponse{
3101		ServerResponse: googleapi.ServerResponse{
3102			Header:         res.Header,
3103			HTTPStatusCode: res.StatusCode,
3104		},
3105	}
3106	target := &ret
3107	if err := gensupport.DecodeResponse(target, res); err != nil {
3108		return nil, err
3109	}
3110	return ret, nil
3111	// {
3112	//   "description": "Lists queues. Queues are returned in lexicographical order.",
3113	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues",
3114	//   "httpMethod": "GET",
3115	//   "id": "cloudtasks.projects.locations.queues.list",
3116	//   "parameterOrder": [
3117	//     "parent"
3118	//   ],
3119	//   "parameters": {
3120	//     "filter": {
3121	//       "description": "`filter` can be used to specify a subset of queues. Any Queue field can be used as a filter and several operators as supported. For example: `\u003c=, \u003c, \u003e=, \u003e, !=, =, :`. The filter syntax is the same as described in [Stackdriver's Advanced Logs Filters](https://cloud.google.com/logging/docs/view/advanced_filters). Sample filter \"state: PAUSED\". Note that using filters might cause fewer queues than the requested page_size to be returned.",
3122	//       "location": "query",
3123	//       "type": "string"
3124	//     },
3125	//     "pageSize": {
3126	//       "description": "Requested page size. The maximum page size is 9800. If unspecified, the page size will be the maximum. Fewer queues than requested might be returned, even if more queues exist; use the next_page_token in the response to determine if more queues exist.",
3127	//       "format": "int32",
3128	//       "location": "query",
3129	//       "type": "integer"
3130	//     },
3131	//     "pageToken": {
3132	//       "description": "A token identifying the page of results to return. To request the first page results, page_token must be empty. To request the next page of results, page_token must be the value of next_page_token returned from the previous call to ListQueues method. It is an error to switch the value of the filter while iterating through pages.",
3133	//       "location": "query",
3134	//       "type": "string"
3135	//     },
3136	//     "parent": {
3137	//       "description": "Required. The location name. For example: `projects/PROJECT_ID/locations/LOCATION_ID`",
3138	//       "location": "path",
3139	//       "pattern": "^projects/[^/]+/locations/[^/]+$",
3140	//       "required": true,
3141	//       "type": "string"
3142	//     },
3143	//     "readMask": {
3144	//       "description": "Optional. Read mask is used for a more granular control over what the API returns. If the mask is not present all fields will be returned except [Queue.stats]. [Queue.stats] will be returned only if it was explicitly specified in the mask.",
3145	//       "format": "google-fieldmask",
3146	//       "location": "query",
3147	//       "type": "string"
3148	//     }
3149	//   },
3150	//   "path": "v2beta3/{+parent}/queues",
3151	//   "response": {
3152	//     "$ref": "ListQueuesResponse"
3153	//   },
3154	//   "scopes": [
3155	//     "https://www.googleapis.com/auth/cloud-platform"
3156	//   ]
3157	// }
3158
3159}
3160
3161// Pages invokes f for each page of results.
3162// A non-nil error returned from f will halt the iteration.
3163// The provided context supersedes any context provided to the Context method.
3164func (c *ProjectsLocationsQueuesListCall) Pages(ctx context.Context, f func(*ListQueuesResponse) error) error {
3165	c.ctx_ = ctx
3166	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
3167	for {
3168		x, err := c.Do()
3169		if err != nil {
3170			return err
3171		}
3172		if err := f(x); err != nil {
3173			return err
3174		}
3175		if x.NextPageToken == "" {
3176			return nil
3177		}
3178		c.PageToken(x.NextPageToken)
3179	}
3180}
3181
3182// method id "cloudtasks.projects.locations.queues.patch":
3183
3184type ProjectsLocationsQueuesPatchCall struct {
3185	s          *Service
3186	name       string
3187	queue      *Queue
3188	urlParams_ gensupport.URLParams
3189	ctx_       context.Context
3190	header_    http.Header
3191}
3192
3193// Patch: Updates a queue. This method creates the queue if it does not
3194// exist and updates the queue if it does exist. Queues created with
3195// this method allow tasks to live for a maximum of 31 days. After a
3196// task is 31 days old, the task will be deleted regardless of whether
3197// it was dispatched or not. WARNING: Using this method may have
3198// unintended side effects if you are using an App Engine `queue.yaml`
3199// or `queue.xml` file to manage your queues. Read Overview of Queue
3200// Management and queue.yaml
3201// (https://cloud.google.com/tasks/docs/queue-yaml) before using this
3202// method.
3203func (r *ProjectsLocationsQueuesService) Patch(name string, queue *Queue) *ProjectsLocationsQueuesPatchCall {
3204	c := &ProjectsLocationsQueuesPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3205	c.name = name
3206	c.queue = queue
3207	return c
3208}
3209
3210// UpdateMask sets the optional parameter "updateMask": A mask used to
3211// specify which fields of the queue are being updated. If empty, then
3212// all fields will be updated.
3213func (c *ProjectsLocationsQueuesPatchCall) UpdateMask(updateMask string) *ProjectsLocationsQueuesPatchCall {
3214	c.urlParams_.Set("updateMask", updateMask)
3215	return c
3216}
3217
3218// Fields allows partial responses to be retrieved. See
3219// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3220// for more information.
3221func (c *ProjectsLocationsQueuesPatchCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesPatchCall {
3222	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3223	return c
3224}
3225
3226// Context sets the context to be used in this call's Do method. Any
3227// pending HTTP request will be aborted if the provided context is
3228// canceled.
3229func (c *ProjectsLocationsQueuesPatchCall) Context(ctx context.Context) *ProjectsLocationsQueuesPatchCall {
3230	c.ctx_ = ctx
3231	return c
3232}
3233
3234// Header returns an http.Header that can be modified by the caller to
3235// add HTTP headers to the request.
3236func (c *ProjectsLocationsQueuesPatchCall) Header() http.Header {
3237	if c.header_ == nil {
3238		c.header_ = make(http.Header)
3239	}
3240	return c.header_
3241}
3242
3243func (c *ProjectsLocationsQueuesPatchCall) doRequest(alt string) (*http.Response, error) {
3244	reqHeaders := make(http.Header)
3245	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3246	for k, v := range c.header_ {
3247		reqHeaders[k] = v
3248	}
3249	reqHeaders.Set("User-Agent", c.s.userAgent())
3250	var body io.Reader = nil
3251	body, err := googleapi.WithoutDataWrapper.JSONReader(c.queue)
3252	if err != nil {
3253		return nil, err
3254	}
3255	reqHeaders.Set("Content-Type", "application/json")
3256	c.urlParams_.Set("alt", alt)
3257	c.urlParams_.Set("prettyPrint", "false")
3258	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}")
3259	urls += "?" + c.urlParams_.Encode()
3260	req, err := http.NewRequest("PATCH", urls, body)
3261	if err != nil {
3262		return nil, err
3263	}
3264	req.Header = reqHeaders
3265	googleapi.Expand(req.URL, map[string]string{
3266		"name": c.name,
3267	})
3268	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3269}
3270
3271// Do executes the "cloudtasks.projects.locations.queues.patch" call.
3272// Exactly one of *Queue or error will be non-nil. Any non-2xx status
3273// code is an error. Response headers are in either
3274// *Queue.ServerResponse.Header or (if a response was returned at all)
3275// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3276// check whether the returned error was because http.StatusNotModified
3277// was returned.
3278func (c *ProjectsLocationsQueuesPatchCall) Do(opts ...googleapi.CallOption) (*Queue, error) {
3279	gensupport.SetOptions(c.urlParams_, opts...)
3280	res, err := c.doRequest("json")
3281	if res != nil && res.StatusCode == http.StatusNotModified {
3282		if res.Body != nil {
3283			res.Body.Close()
3284		}
3285		return nil, &googleapi.Error{
3286			Code:   res.StatusCode,
3287			Header: res.Header,
3288		}
3289	}
3290	if err != nil {
3291		return nil, err
3292	}
3293	defer googleapi.CloseBody(res)
3294	if err := googleapi.CheckResponse(res); err != nil {
3295		return nil, err
3296	}
3297	ret := &Queue{
3298		ServerResponse: googleapi.ServerResponse{
3299			Header:         res.Header,
3300			HTTPStatusCode: res.StatusCode,
3301		},
3302	}
3303	target := &ret
3304	if err := gensupport.DecodeResponse(target, res); err != nil {
3305		return nil, err
3306	}
3307	return ret, nil
3308	// {
3309	//   "description": "Updates a queue. This method creates the queue if it does not exist and updates the queue if it does exist. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine `queue.yaml` or `queue.xml` file to manage your queues. Read [Overview of Queue Management and queue.yaml](https://cloud.google.com/tasks/docs/queue-yaml) before using this method.",
3310	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}",
3311	//   "httpMethod": "PATCH",
3312	//   "id": "cloudtasks.projects.locations.queues.patch",
3313	//   "parameterOrder": [
3314	//     "name"
3315	//   ],
3316	//   "parameters": {
3317	//     "name": {
3318	//       "description": "Caller-specified and required in CreateQueue, after which it becomes output only. The queue name. The queue name must have the following format: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), hyphens (-), colons (:), or periods (.). For more information, see [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects) * `LOCATION_ID` is the canonical ID for the queue's location. The list of available locations can be obtained by calling ListLocations. For more information, see https://cloud.google.com/about/locations/. * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or hyphens (-). The maximum length is 100 characters.",
3319	//       "location": "path",
3320	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
3321	//       "required": true,
3322	//       "type": "string"
3323	//     },
3324	//     "updateMask": {
3325	//       "description": "A mask used to specify which fields of the queue are being updated. If empty, then all fields will be updated.",
3326	//       "format": "google-fieldmask",
3327	//       "location": "query",
3328	//       "type": "string"
3329	//     }
3330	//   },
3331	//   "path": "v2beta3/{+name}",
3332	//   "request": {
3333	//     "$ref": "Queue"
3334	//   },
3335	//   "response": {
3336	//     "$ref": "Queue"
3337	//   },
3338	//   "scopes": [
3339	//     "https://www.googleapis.com/auth/cloud-platform"
3340	//   ]
3341	// }
3342
3343}
3344
3345// method id "cloudtasks.projects.locations.queues.pause":
3346
3347type ProjectsLocationsQueuesPauseCall struct {
3348	s                 *Service
3349	name              string
3350	pausequeuerequest *PauseQueueRequest
3351	urlParams_        gensupport.URLParams
3352	ctx_              context.Context
3353	header_           http.Header
3354}
3355
3356// Pause: Pauses the queue. If a queue is paused then the system will
3357// stop dispatching tasks until the queue is resumed via ResumeQueue.
3358// Tasks can still be added when the queue is paused. A queue is paused
3359// if its state is PAUSED.
3360func (r *ProjectsLocationsQueuesService) Pause(name string, pausequeuerequest *PauseQueueRequest) *ProjectsLocationsQueuesPauseCall {
3361	c := &ProjectsLocationsQueuesPauseCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3362	c.name = name
3363	c.pausequeuerequest = pausequeuerequest
3364	return c
3365}
3366
3367// Fields allows partial responses to be retrieved. See
3368// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3369// for more information.
3370func (c *ProjectsLocationsQueuesPauseCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesPauseCall {
3371	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3372	return c
3373}
3374
3375// Context sets the context to be used in this call's Do method. Any
3376// pending HTTP request will be aborted if the provided context is
3377// canceled.
3378func (c *ProjectsLocationsQueuesPauseCall) Context(ctx context.Context) *ProjectsLocationsQueuesPauseCall {
3379	c.ctx_ = ctx
3380	return c
3381}
3382
3383// Header returns an http.Header that can be modified by the caller to
3384// add HTTP headers to the request.
3385func (c *ProjectsLocationsQueuesPauseCall) Header() http.Header {
3386	if c.header_ == nil {
3387		c.header_ = make(http.Header)
3388	}
3389	return c.header_
3390}
3391
3392func (c *ProjectsLocationsQueuesPauseCall) doRequest(alt string) (*http.Response, error) {
3393	reqHeaders := make(http.Header)
3394	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3395	for k, v := range c.header_ {
3396		reqHeaders[k] = v
3397	}
3398	reqHeaders.Set("User-Agent", c.s.userAgent())
3399	var body io.Reader = nil
3400	body, err := googleapi.WithoutDataWrapper.JSONReader(c.pausequeuerequest)
3401	if err != nil {
3402		return nil, err
3403	}
3404	reqHeaders.Set("Content-Type", "application/json")
3405	c.urlParams_.Set("alt", alt)
3406	c.urlParams_.Set("prettyPrint", "false")
3407	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}:pause")
3408	urls += "?" + c.urlParams_.Encode()
3409	req, err := http.NewRequest("POST", urls, body)
3410	if err != nil {
3411		return nil, err
3412	}
3413	req.Header = reqHeaders
3414	googleapi.Expand(req.URL, map[string]string{
3415		"name": c.name,
3416	})
3417	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3418}
3419
3420// Do executes the "cloudtasks.projects.locations.queues.pause" call.
3421// Exactly one of *Queue or error will be non-nil. Any non-2xx status
3422// code is an error. Response headers are in either
3423// *Queue.ServerResponse.Header or (if a response was returned at all)
3424// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3425// check whether the returned error was because http.StatusNotModified
3426// was returned.
3427func (c *ProjectsLocationsQueuesPauseCall) Do(opts ...googleapi.CallOption) (*Queue, error) {
3428	gensupport.SetOptions(c.urlParams_, opts...)
3429	res, err := c.doRequest("json")
3430	if res != nil && res.StatusCode == http.StatusNotModified {
3431		if res.Body != nil {
3432			res.Body.Close()
3433		}
3434		return nil, &googleapi.Error{
3435			Code:   res.StatusCode,
3436			Header: res.Header,
3437		}
3438	}
3439	if err != nil {
3440		return nil, err
3441	}
3442	defer googleapi.CloseBody(res)
3443	if err := googleapi.CheckResponse(res); err != nil {
3444		return nil, err
3445	}
3446	ret := &Queue{
3447		ServerResponse: googleapi.ServerResponse{
3448			Header:         res.Header,
3449			HTTPStatusCode: res.StatusCode,
3450		},
3451	}
3452	target := &ret
3453	if err := gensupport.DecodeResponse(target, res); err != nil {
3454		return nil, err
3455	}
3456	return ret, nil
3457	// {
3458	//   "description": "Pauses the queue. If a queue is paused then the system will stop dispatching tasks until the queue is resumed via ResumeQueue. Tasks can still be added when the queue is paused. A queue is paused if its state is PAUSED.",
3459	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:pause",
3460	//   "httpMethod": "POST",
3461	//   "id": "cloudtasks.projects.locations.queues.pause",
3462	//   "parameterOrder": [
3463	//     "name"
3464	//   ],
3465	//   "parameters": {
3466	//     "name": {
3467	//       "description": "Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`",
3468	//       "location": "path",
3469	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
3470	//       "required": true,
3471	//       "type": "string"
3472	//     }
3473	//   },
3474	//   "path": "v2beta3/{+name}:pause",
3475	//   "request": {
3476	//     "$ref": "PauseQueueRequest"
3477	//   },
3478	//   "response": {
3479	//     "$ref": "Queue"
3480	//   },
3481	//   "scopes": [
3482	//     "https://www.googleapis.com/auth/cloud-platform"
3483	//   ]
3484	// }
3485
3486}
3487
3488// method id "cloudtasks.projects.locations.queues.purge":
3489
3490type ProjectsLocationsQueuesPurgeCall struct {
3491	s                 *Service
3492	name              string
3493	purgequeuerequest *PurgeQueueRequest
3494	urlParams_        gensupport.URLParams
3495	ctx_              context.Context
3496	header_           http.Header
3497}
3498
3499// Purge: Purges a queue by deleting all of its tasks. All tasks created
3500// before this method is called are permanently deleted. Purge
3501// operations can take up to one minute to take effect. Tasks might be
3502// dispatched before the purge takes effect. A purge is irreversible.
3503func (r *ProjectsLocationsQueuesService) Purge(name string, purgequeuerequest *PurgeQueueRequest) *ProjectsLocationsQueuesPurgeCall {
3504	c := &ProjectsLocationsQueuesPurgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3505	c.name = name
3506	c.purgequeuerequest = purgequeuerequest
3507	return c
3508}
3509
3510// Fields allows partial responses to be retrieved. See
3511// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3512// for more information.
3513func (c *ProjectsLocationsQueuesPurgeCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesPurgeCall {
3514	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3515	return c
3516}
3517
3518// Context sets the context to be used in this call's Do method. Any
3519// pending HTTP request will be aborted if the provided context is
3520// canceled.
3521func (c *ProjectsLocationsQueuesPurgeCall) Context(ctx context.Context) *ProjectsLocationsQueuesPurgeCall {
3522	c.ctx_ = ctx
3523	return c
3524}
3525
3526// Header returns an http.Header that can be modified by the caller to
3527// add HTTP headers to the request.
3528func (c *ProjectsLocationsQueuesPurgeCall) Header() http.Header {
3529	if c.header_ == nil {
3530		c.header_ = make(http.Header)
3531	}
3532	return c.header_
3533}
3534
3535func (c *ProjectsLocationsQueuesPurgeCall) doRequest(alt string) (*http.Response, error) {
3536	reqHeaders := make(http.Header)
3537	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3538	for k, v := range c.header_ {
3539		reqHeaders[k] = v
3540	}
3541	reqHeaders.Set("User-Agent", c.s.userAgent())
3542	var body io.Reader = nil
3543	body, err := googleapi.WithoutDataWrapper.JSONReader(c.purgequeuerequest)
3544	if err != nil {
3545		return nil, err
3546	}
3547	reqHeaders.Set("Content-Type", "application/json")
3548	c.urlParams_.Set("alt", alt)
3549	c.urlParams_.Set("prettyPrint", "false")
3550	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}:purge")
3551	urls += "?" + c.urlParams_.Encode()
3552	req, err := http.NewRequest("POST", urls, body)
3553	if err != nil {
3554		return nil, err
3555	}
3556	req.Header = reqHeaders
3557	googleapi.Expand(req.URL, map[string]string{
3558		"name": c.name,
3559	})
3560	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3561}
3562
3563// Do executes the "cloudtasks.projects.locations.queues.purge" call.
3564// Exactly one of *Queue or error will be non-nil. Any non-2xx status
3565// code is an error. Response headers are in either
3566// *Queue.ServerResponse.Header or (if a response was returned at all)
3567// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3568// check whether the returned error was because http.StatusNotModified
3569// was returned.
3570func (c *ProjectsLocationsQueuesPurgeCall) Do(opts ...googleapi.CallOption) (*Queue, error) {
3571	gensupport.SetOptions(c.urlParams_, opts...)
3572	res, err := c.doRequest("json")
3573	if res != nil && res.StatusCode == http.StatusNotModified {
3574		if res.Body != nil {
3575			res.Body.Close()
3576		}
3577		return nil, &googleapi.Error{
3578			Code:   res.StatusCode,
3579			Header: res.Header,
3580		}
3581	}
3582	if err != nil {
3583		return nil, err
3584	}
3585	defer googleapi.CloseBody(res)
3586	if err := googleapi.CheckResponse(res); err != nil {
3587		return nil, err
3588	}
3589	ret := &Queue{
3590		ServerResponse: googleapi.ServerResponse{
3591			Header:         res.Header,
3592			HTTPStatusCode: res.StatusCode,
3593		},
3594	}
3595	target := &ret
3596	if err := gensupport.DecodeResponse(target, res); err != nil {
3597		return nil, err
3598	}
3599	return ret, nil
3600	// {
3601	//   "description": "Purges a queue by deleting all of its tasks. All tasks created before this method is called are permanently deleted. Purge operations can take up to one minute to take effect. Tasks might be dispatched before the purge takes effect. A purge is irreversible.",
3602	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:purge",
3603	//   "httpMethod": "POST",
3604	//   "id": "cloudtasks.projects.locations.queues.purge",
3605	//   "parameterOrder": [
3606	//     "name"
3607	//   ],
3608	//   "parameters": {
3609	//     "name": {
3610	//       "description": "Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`",
3611	//       "location": "path",
3612	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
3613	//       "required": true,
3614	//       "type": "string"
3615	//     }
3616	//   },
3617	//   "path": "v2beta3/{+name}:purge",
3618	//   "request": {
3619	//     "$ref": "PurgeQueueRequest"
3620	//   },
3621	//   "response": {
3622	//     "$ref": "Queue"
3623	//   },
3624	//   "scopes": [
3625	//     "https://www.googleapis.com/auth/cloud-platform"
3626	//   ]
3627	// }
3628
3629}
3630
3631// method id "cloudtasks.projects.locations.queues.resume":
3632
3633type ProjectsLocationsQueuesResumeCall struct {
3634	s                  *Service
3635	name               string
3636	resumequeuerequest *ResumeQueueRequest
3637	urlParams_         gensupport.URLParams
3638	ctx_               context.Context
3639	header_            http.Header
3640}
3641
3642// Resume: Resume a queue. This method resumes a queue after it has been
3643// PAUSED or DISABLED. The state of a queue is stored in the queue's
3644// state; after calling this method it will be set to RUNNING. WARNING:
3645// Resuming many high-QPS queues at the same time can lead to target
3646// overloading. If you are resuming high-QPS queues, follow the 500/50/5
3647// pattern described in Managing Cloud Tasks Scaling Risks
3648// (https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
3649func (r *ProjectsLocationsQueuesService) Resume(name string, resumequeuerequest *ResumeQueueRequest) *ProjectsLocationsQueuesResumeCall {
3650	c := &ProjectsLocationsQueuesResumeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3651	c.name = name
3652	c.resumequeuerequest = resumequeuerequest
3653	return c
3654}
3655
3656// Fields allows partial responses to be retrieved. See
3657// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3658// for more information.
3659func (c *ProjectsLocationsQueuesResumeCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesResumeCall {
3660	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3661	return c
3662}
3663
3664// Context sets the context to be used in this call's Do method. Any
3665// pending HTTP request will be aborted if the provided context is
3666// canceled.
3667func (c *ProjectsLocationsQueuesResumeCall) Context(ctx context.Context) *ProjectsLocationsQueuesResumeCall {
3668	c.ctx_ = ctx
3669	return c
3670}
3671
3672// Header returns an http.Header that can be modified by the caller to
3673// add HTTP headers to the request.
3674func (c *ProjectsLocationsQueuesResumeCall) Header() http.Header {
3675	if c.header_ == nil {
3676		c.header_ = make(http.Header)
3677	}
3678	return c.header_
3679}
3680
3681func (c *ProjectsLocationsQueuesResumeCall) doRequest(alt string) (*http.Response, error) {
3682	reqHeaders := make(http.Header)
3683	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3684	for k, v := range c.header_ {
3685		reqHeaders[k] = v
3686	}
3687	reqHeaders.Set("User-Agent", c.s.userAgent())
3688	var body io.Reader = nil
3689	body, err := googleapi.WithoutDataWrapper.JSONReader(c.resumequeuerequest)
3690	if err != nil {
3691		return nil, err
3692	}
3693	reqHeaders.Set("Content-Type", "application/json")
3694	c.urlParams_.Set("alt", alt)
3695	c.urlParams_.Set("prettyPrint", "false")
3696	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}:resume")
3697	urls += "?" + c.urlParams_.Encode()
3698	req, err := http.NewRequest("POST", urls, body)
3699	if err != nil {
3700		return nil, err
3701	}
3702	req.Header = reqHeaders
3703	googleapi.Expand(req.URL, map[string]string{
3704		"name": c.name,
3705	})
3706	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3707}
3708
3709// Do executes the "cloudtasks.projects.locations.queues.resume" call.
3710// Exactly one of *Queue or error will be non-nil. Any non-2xx status
3711// code is an error. Response headers are in either
3712// *Queue.ServerResponse.Header or (if a response was returned at all)
3713// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3714// check whether the returned error was because http.StatusNotModified
3715// was returned.
3716func (c *ProjectsLocationsQueuesResumeCall) Do(opts ...googleapi.CallOption) (*Queue, error) {
3717	gensupport.SetOptions(c.urlParams_, opts...)
3718	res, err := c.doRequest("json")
3719	if res != nil && res.StatusCode == http.StatusNotModified {
3720		if res.Body != nil {
3721			res.Body.Close()
3722		}
3723		return nil, &googleapi.Error{
3724			Code:   res.StatusCode,
3725			Header: res.Header,
3726		}
3727	}
3728	if err != nil {
3729		return nil, err
3730	}
3731	defer googleapi.CloseBody(res)
3732	if err := googleapi.CheckResponse(res); err != nil {
3733		return nil, err
3734	}
3735	ret := &Queue{
3736		ServerResponse: googleapi.ServerResponse{
3737			Header:         res.Header,
3738			HTTPStatusCode: res.StatusCode,
3739		},
3740	}
3741	target := &ret
3742	if err := gensupport.DecodeResponse(target, res); err != nil {
3743		return nil, err
3744	}
3745	return ret, nil
3746	// {
3747	//   "description": "Resume a queue. This method resumes a queue after it has been PAUSED or DISABLED. The state of a queue is stored in the queue's state; after calling this method it will be set to RUNNING. WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If you are resuming high-QPS queues, follow the 500/50/5 pattern described in [Managing Cloud Tasks Scaling Risks](https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).",
3748	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:resume",
3749	//   "httpMethod": "POST",
3750	//   "id": "cloudtasks.projects.locations.queues.resume",
3751	//   "parameterOrder": [
3752	//     "name"
3753	//   ],
3754	//   "parameters": {
3755	//     "name": {
3756	//       "description": "Required. The queue name. For example: `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID`",
3757	//       "location": "path",
3758	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
3759	//       "required": true,
3760	//       "type": "string"
3761	//     }
3762	//   },
3763	//   "path": "v2beta3/{+name}:resume",
3764	//   "request": {
3765	//     "$ref": "ResumeQueueRequest"
3766	//   },
3767	//   "response": {
3768	//     "$ref": "Queue"
3769	//   },
3770	//   "scopes": [
3771	//     "https://www.googleapis.com/auth/cloud-platform"
3772	//   ]
3773	// }
3774
3775}
3776
3777// method id "cloudtasks.projects.locations.queues.setIamPolicy":
3778
3779type ProjectsLocationsQueuesSetIamPolicyCall struct {
3780	s                   *Service
3781	resource            string
3782	setiampolicyrequest *SetIamPolicyRequest
3783	urlParams_          gensupport.URLParams
3784	ctx_                context.Context
3785	header_             http.Header
3786}
3787
3788// SetIamPolicy: Sets the access control policy for a Queue. Replaces
3789// any existing policy. Note: The Cloud Console does not check
3790// queue-level IAM permissions yet. Project-level permissions are
3791// required to use the Cloud Console. Authorization requires the
3792// following Google IAM (https://cloud.google.com/iam) permission on the
3793// specified resource parent: * `cloudtasks.queues.setIamPolicy`
3794func (r *ProjectsLocationsQueuesService) SetIamPolicy(resource string, setiampolicyrequest *SetIamPolicyRequest) *ProjectsLocationsQueuesSetIamPolicyCall {
3795	c := &ProjectsLocationsQueuesSetIamPolicyCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3796	c.resource = resource
3797	c.setiampolicyrequest = setiampolicyrequest
3798	return c
3799}
3800
3801// Fields allows partial responses to be retrieved. See
3802// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3803// for more information.
3804func (c *ProjectsLocationsQueuesSetIamPolicyCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesSetIamPolicyCall {
3805	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3806	return c
3807}
3808
3809// Context sets the context to be used in this call's Do method. Any
3810// pending HTTP request will be aborted if the provided context is
3811// canceled.
3812func (c *ProjectsLocationsQueuesSetIamPolicyCall) Context(ctx context.Context) *ProjectsLocationsQueuesSetIamPolicyCall {
3813	c.ctx_ = ctx
3814	return c
3815}
3816
3817// Header returns an http.Header that can be modified by the caller to
3818// add HTTP headers to the request.
3819func (c *ProjectsLocationsQueuesSetIamPolicyCall) Header() http.Header {
3820	if c.header_ == nil {
3821		c.header_ = make(http.Header)
3822	}
3823	return c.header_
3824}
3825
3826func (c *ProjectsLocationsQueuesSetIamPolicyCall) doRequest(alt string) (*http.Response, error) {
3827	reqHeaders := make(http.Header)
3828	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3829	for k, v := range c.header_ {
3830		reqHeaders[k] = v
3831	}
3832	reqHeaders.Set("User-Agent", c.s.userAgent())
3833	var body io.Reader = nil
3834	body, err := googleapi.WithoutDataWrapper.JSONReader(c.setiampolicyrequest)
3835	if err != nil {
3836		return nil, err
3837	}
3838	reqHeaders.Set("Content-Type", "application/json")
3839	c.urlParams_.Set("alt", alt)
3840	c.urlParams_.Set("prettyPrint", "false")
3841	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+resource}:setIamPolicy")
3842	urls += "?" + c.urlParams_.Encode()
3843	req, err := http.NewRequest("POST", urls, body)
3844	if err != nil {
3845		return nil, err
3846	}
3847	req.Header = reqHeaders
3848	googleapi.Expand(req.URL, map[string]string{
3849		"resource": c.resource,
3850	})
3851	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3852}
3853
3854// Do executes the "cloudtasks.projects.locations.queues.setIamPolicy" call.
3855// Exactly one of *Policy or error will be non-nil. Any non-2xx status
3856// code is an error. Response headers are in either
3857// *Policy.ServerResponse.Header or (if a response was returned at all)
3858// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
3859// check whether the returned error was because http.StatusNotModified
3860// was returned.
3861func (c *ProjectsLocationsQueuesSetIamPolicyCall) Do(opts ...googleapi.CallOption) (*Policy, error) {
3862	gensupport.SetOptions(c.urlParams_, opts...)
3863	res, err := c.doRequest("json")
3864	if res != nil && res.StatusCode == http.StatusNotModified {
3865		if res.Body != nil {
3866			res.Body.Close()
3867		}
3868		return nil, &googleapi.Error{
3869			Code:   res.StatusCode,
3870			Header: res.Header,
3871		}
3872	}
3873	if err != nil {
3874		return nil, err
3875	}
3876	defer googleapi.CloseBody(res)
3877	if err := googleapi.CheckResponse(res); err != nil {
3878		return nil, err
3879	}
3880	ret := &Policy{
3881		ServerResponse: googleapi.ServerResponse{
3882			Header:         res.Header,
3883			HTTPStatusCode: res.StatusCode,
3884		},
3885	}
3886	target := &ret
3887	if err := gensupport.DecodeResponse(target, res); err != nil {
3888		return nil, err
3889	}
3890	return ret, nil
3891	// {
3892	//   "description": "Sets the access control policy for a Queue. Replaces any existing policy. Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level permissions are required to use the Cloud Console. Authorization requires the following [Google IAM](https://cloud.google.com/iam) permission on the specified resource parent: * `cloudtasks.queues.setIamPolicy`",
3893	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:setIamPolicy",
3894	//   "httpMethod": "POST",
3895	//   "id": "cloudtasks.projects.locations.queues.setIamPolicy",
3896	//   "parameterOrder": [
3897	//     "resource"
3898	//   ],
3899	//   "parameters": {
3900	//     "resource": {
3901	//       "description": "REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.",
3902	//       "location": "path",
3903	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
3904	//       "required": true,
3905	//       "type": "string"
3906	//     }
3907	//   },
3908	//   "path": "v2beta3/{+resource}:setIamPolicy",
3909	//   "request": {
3910	//     "$ref": "SetIamPolicyRequest"
3911	//   },
3912	//   "response": {
3913	//     "$ref": "Policy"
3914	//   },
3915	//   "scopes": [
3916	//     "https://www.googleapis.com/auth/cloud-platform"
3917	//   ]
3918	// }
3919
3920}
3921
3922// method id "cloudtasks.projects.locations.queues.testIamPermissions":
3923
3924type ProjectsLocationsQueuesTestIamPermissionsCall struct {
3925	s                         *Service
3926	resource                  string
3927	testiampermissionsrequest *TestIamPermissionsRequest
3928	urlParams_                gensupport.URLParams
3929	ctx_                      context.Context
3930	header_                   http.Header
3931}
3932
3933// TestIamPermissions: Returns permissions that a caller has on a Queue.
3934// If the resource does not exist, this will return an empty set of
3935// permissions, not a NOT_FOUND error. Note: This operation is designed
3936// to be used for building permission-aware UIs and command-line tools,
3937// not for authorization checking. This operation may "fail open"
3938// without warning.
3939func (r *ProjectsLocationsQueuesService) TestIamPermissions(resource string, testiampermissionsrequest *TestIamPermissionsRequest) *ProjectsLocationsQueuesTestIamPermissionsCall {
3940	c := &ProjectsLocationsQueuesTestIamPermissionsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
3941	c.resource = resource
3942	c.testiampermissionsrequest = testiampermissionsrequest
3943	return c
3944}
3945
3946// Fields allows partial responses to be retrieved. See
3947// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
3948// for more information.
3949func (c *ProjectsLocationsQueuesTestIamPermissionsCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTestIamPermissionsCall {
3950	c.urlParams_.Set("fields", googleapi.CombineFields(s))
3951	return c
3952}
3953
3954// Context sets the context to be used in this call's Do method. Any
3955// pending HTTP request will be aborted if the provided context is
3956// canceled.
3957func (c *ProjectsLocationsQueuesTestIamPermissionsCall) Context(ctx context.Context) *ProjectsLocationsQueuesTestIamPermissionsCall {
3958	c.ctx_ = ctx
3959	return c
3960}
3961
3962// Header returns an http.Header that can be modified by the caller to
3963// add HTTP headers to the request.
3964func (c *ProjectsLocationsQueuesTestIamPermissionsCall) Header() http.Header {
3965	if c.header_ == nil {
3966		c.header_ = make(http.Header)
3967	}
3968	return c.header_
3969}
3970
3971func (c *ProjectsLocationsQueuesTestIamPermissionsCall) doRequest(alt string) (*http.Response, error) {
3972	reqHeaders := make(http.Header)
3973	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
3974	for k, v := range c.header_ {
3975		reqHeaders[k] = v
3976	}
3977	reqHeaders.Set("User-Agent", c.s.userAgent())
3978	var body io.Reader = nil
3979	body, err := googleapi.WithoutDataWrapper.JSONReader(c.testiampermissionsrequest)
3980	if err != nil {
3981		return nil, err
3982	}
3983	reqHeaders.Set("Content-Type", "application/json")
3984	c.urlParams_.Set("alt", alt)
3985	c.urlParams_.Set("prettyPrint", "false")
3986	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+resource}:testIamPermissions")
3987	urls += "?" + c.urlParams_.Encode()
3988	req, err := http.NewRequest("POST", urls, body)
3989	if err != nil {
3990		return nil, err
3991	}
3992	req.Header = reqHeaders
3993	googleapi.Expand(req.URL, map[string]string{
3994		"resource": c.resource,
3995	})
3996	return gensupport.SendRequest(c.ctx_, c.s.client, req)
3997}
3998
3999// Do executes the "cloudtasks.projects.locations.queues.testIamPermissions" call.
4000// Exactly one of *TestIamPermissionsResponse or error will be non-nil.
4001// Any non-2xx status code is an error. Response headers are in either
4002// *TestIamPermissionsResponse.ServerResponse.Header or (if a response
4003// was returned at all) in error.(*googleapi.Error).Header. Use
4004// googleapi.IsNotModified to check whether the returned error was
4005// because http.StatusNotModified was returned.
4006func (c *ProjectsLocationsQueuesTestIamPermissionsCall) Do(opts ...googleapi.CallOption) (*TestIamPermissionsResponse, error) {
4007	gensupport.SetOptions(c.urlParams_, opts...)
4008	res, err := c.doRequest("json")
4009	if res != nil && res.StatusCode == http.StatusNotModified {
4010		if res.Body != nil {
4011			res.Body.Close()
4012		}
4013		return nil, &googleapi.Error{
4014			Code:   res.StatusCode,
4015			Header: res.Header,
4016		}
4017	}
4018	if err != nil {
4019		return nil, err
4020	}
4021	defer googleapi.CloseBody(res)
4022	if err := googleapi.CheckResponse(res); err != nil {
4023		return nil, err
4024	}
4025	ret := &TestIamPermissionsResponse{
4026		ServerResponse: googleapi.ServerResponse{
4027			Header:         res.Header,
4028			HTTPStatusCode: res.StatusCode,
4029		},
4030	}
4031	target := &ret
4032	if err := gensupport.DecodeResponse(target, res); err != nil {
4033		return nil, err
4034	}
4035	return ret, nil
4036	// {
4037	//   "description": "Returns permissions that a caller has on a Queue. 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.",
4038	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}:testIamPermissions",
4039	//   "httpMethod": "POST",
4040	//   "id": "cloudtasks.projects.locations.queues.testIamPermissions",
4041	//   "parameterOrder": [
4042	//     "resource"
4043	//   ],
4044	//   "parameters": {
4045	//     "resource": {
4046	//       "description": "REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.",
4047	//       "location": "path",
4048	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
4049	//       "required": true,
4050	//       "type": "string"
4051	//     }
4052	//   },
4053	//   "path": "v2beta3/{+resource}:testIamPermissions",
4054	//   "request": {
4055	//     "$ref": "TestIamPermissionsRequest"
4056	//   },
4057	//   "response": {
4058	//     "$ref": "TestIamPermissionsResponse"
4059	//   },
4060	//   "scopes": [
4061	//     "https://www.googleapis.com/auth/cloud-platform"
4062	//   ]
4063	// }
4064
4065}
4066
4067// method id "cloudtasks.projects.locations.queues.tasks.create":
4068
4069type ProjectsLocationsQueuesTasksCreateCall struct {
4070	s                 *Service
4071	parent            string
4072	createtaskrequest *CreateTaskRequest
4073	urlParams_        gensupport.URLParams
4074	ctx_              context.Context
4075	header_           http.Header
4076}
4077
4078// Create: Creates a task and adds it to a queue. Tasks cannot be
4079// updated after creation; there is no UpdateTask command. * The maximum
4080// task size is 100KB.
4081func (r *ProjectsLocationsQueuesTasksService) Create(parent string, createtaskrequest *CreateTaskRequest) *ProjectsLocationsQueuesTasksCreateCall {
4082	c := &ProjectsLocationsQueuesTasksCreateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4083	c.parent = parent
4084	c.createtaskrequest = createtaskrequest
4085	return c
4086}
4087
4088// Fields allows partial responses to be retrieved. See
4089// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4090// for more information.
4091func (c *ProjectsLocationsQueuesTasksCreateCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksCreateCall {
4092	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4093	return c
4094}
4095
4096// Context sets the context to be used in this call's Do method. Any
4097// pending HTTP request will be aborted if the provided context is
4098// canceled.
4099func (c *ProjectsLocationsQueuesTasksCreateCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksCreateCall {
4100	c.ctx_ = ctx
4101	return c
4102}
4103
4104// Header returns an http.Header that can be modified by the caller to
4105// add HTTP headers to the request.
4106func (c *ProjectsLocationsQueuesTasksCreateCall) Header() http.Header {
4107	if c.header_ == nil {
4108		c.header_ = make(http.Header)
4109	}
4110	return c.header_
4111}
4112
4113func (c *ProjectsLocationsQueuesTasksCreateCall) doRequest(alt string) (*http.Response, error) {
4114	reqHeaders := make(http.Header)
4115	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4116	for k, v := range c.header_ {
4117		reqHeaders[k] = v
4118	}
4119	reqHeaders.Set("User-Agent", c.s.userAgent())
4120	var body io.Reader = nil
4121	body, err := googleapi.WithoutDataWrapper.JSONReader(c.createtaskrequest)
4122	if err != nil {
4123		return nil, err
4124	}
4125	reqHeaders.Set("Content-Type", "application/json")
4126	c.urlParams_.Set("alt", alt)
4127	c.urlParams_.Set("prettyPrint", "false")
4128	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+parent}/tasks")
4129	urls += "?" + c.urlParams_.Encode()
4130	req, err := http.NewRequest("POST", urls, body)
4131	if err != nil {
4132		return nil, err
4133	}
4134	req.Header = reqHeaders
4135	googleapi.Expand(req.URL, map[string]string{
4136		"parent": c.parent,
4137	})
4138	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4139}
4140
4141// Do executes the "cloudtasks.projects.locations.queues.tasks.create" call.
4142// Exactly one of *Task or error will be non-nil. Any non-2xx status
4143// code is an error. Response headers are in either
4144// *Task.ServerResponse.Header or (if a response was returned at all) in
4145// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4146// whether the returned error was because http.StatusNotModified was
4147// returned.
4148func (c *ProjectsLocationsQueuesTasksCreateCall) Do(opts ...googleapi.CallOption) (*Task, error) {
4149	gensupport.SetOptions(c.urlParams_, opts...)
4150	res, err := c.doRequest("json")
4151	if res != nil && res.StatusCode == http.StatusNotModified {
4152		if res.Body != nil {
4153			res.Body.Close()
4154		}
4155		return nil, &googleapi.Error{
4156			Code:   res.StatusCode,
4157			Header: res.Header,
4158		}
4159	}
4160	if err != nil {
4161		return nil, err
4162	}
4163	defer googleapi.CloseBody(res)
4164	if err := googleapi.CheckResponse(res); err != nil {
4165		return nil, err
4166	}
4167	ret := &Task{
4168		ServerResponse: googleapi.ServerResponse{
4169			Header:         res.Header,
4170			HTTPStatusCode: res.StatusCode,
4171		},
4172	}
4173	target := &ret
4174	if err := gensupport.DecodeResponse(target, res); err != nil {
4175		return nil, err
4176	}
4177	return ret, nil
4178	// {
4179	//   "description": "Creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. * The maximum task size is 100KB.",
4180	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks",
4181	//   "httpMethod": "POST",
4182	//   "id": "cloudtasks.projects.locations.queues.tasks.create",
4183	//   "parameterOrder": [
4184	//     "parent"
4185	//   ],
4186	//   "parameters": {
4187	//     "parent": {
4188	//       "description": "Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` The queue must already exist.",
4189	//       "location": "path",
4190	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
4191	//       "required": true,
4192	//       "type": "string"
4193	//     }
4194	//   },
4195	//   "path": "v2beta3/{+parent}/tasks",
4196	//   "request": {
4197	//     "$ref": "CreateTaskRequest"
4198	//   },
4199	//   "response": {
4200	//     "$ref": "Task"
4201	//   },
4202	//   "scopes": [
4203	//     "https://www.googleapis.com/auth/cloud-platform"
4204	//   ]
4205	// }
4206
4207}
4208
4209// method id "cloudtasks.projects.locations.queues.tasks.delete":
4210
4211type ProjectsLocationsQueuesTasksDeleteCall struct {
4212	s          *Service
4213	name       string
4214	urlParams_ gensupport.URLParams
4215	ctx_       context.Context
4216	header_    http.Header
4217}
4218
4219// Delete: Deletes a task. A task can be deleted if it is scheduled or
4220// dispatched. A task cannot be deleted if it has executed successfully
4221// or permanently failed.
4222func (r *ProjectsLocationsQueuesTasksService) Delete(name string) *ProjectsLocationsQueuesTasksDeleteCall {
4223	c := &ProjectsLocationsQueuesTasksDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4224	c.name = name
4225	return c
4226}
4227
4228// Fields allows partial responses to be retrieved. See
4229// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4230// for more information.
4231func (c *ProjectsLocationsQueuesTasksDeleteCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksDeleteCall {
4232	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4233	return c
4234}
4235
4236// Context sets the context to be used in this call's Do method. Any
4237// pending HTTP request will be aborted if the provided context is
4238// canceled.
4239func (c *ProjectsLocationsQueuesTasksDeleteCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksDeleteCall {
4240	c.ctx_ = ctx
4241	return c
4242}
4243
4244// Header returns an http.Header that can be modified by the caller to
4245// add HTTP headers to the request.
4246func (c *ProjectsLocationsQueuesTasksDeleteCall) Header() http.Header {
4247	if c.header_ == nil {
4248		c.header_ = make(http.Header)
4249	}
4250	return c.header_
4251}
4252
4253func (c *ProjectsLocationsQueuesTasksDeleteCall) doRequest(alt string) (*http.Response, error) {
4254	reqHeaders := make(http.Header)
4255	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4256	for k, v := range c.header_ {
4257		reqHeaders[k] = v
4258	}
4259	reqHeaders.Set("User-Agent", c.s.userAgent())
4260	var body io.Reader = nil
4261	c.urlParams_.Set("alt", alt)
4262	c.urlParams_.Set("prettyPrint", "false")
4263	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}")
4264	urls += "?" + c.urlParams_.Encode()
4265	req, err := http.NewRequest("DELETE", urls, body)
4266	if err != nil {
4267		return nil, err
4268	}
4269	req.Header = reqHeaders
4270	googleapi.Expand(req.URL, map[string]string{
4271		"name": c.name,
4272	})
4273	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4274}
4275
4276// Do executes the "cloudtasks.projects.locations.queues.tasks.delete" call.
4277// Exactly one of *Empty or error will be non-nil. Any non-2xx status
4278// code is an error. Response headers are in either
4279// *Empty.ServerResponse.Header or (if a response was returned at all)
4280// in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
4281// check whether the returned error was because http.StatusNotModified
4282// was returned.
4283func (c *ProjectsLocationsQueuesTasksDeleteCall) Do(opts ...googleapi.CallOption) (*Empty, error) {
4284	gensupport.SetOptions(c.urlParams_, opts...)
4285	res, err := c.doRequest("json")
4286	if res != nil && res.StatusCode == http.StatusNotModified {
4287		if res.Body != nil {
4288			res.Body.Close()
4289		}
4290		return nil, &googleapi.Error{
4291			Code:   res.StatusCode,
4292			Header: res.Header,
4293		}
4294	}
4295	if err != nil {
4296		return nil, err
4297	}
4298	defer googleapi.CloseBody(res)
4299	if err := googleapi.CheckResponse(res); err != nil {
4300		return nil, err
4301	}
4302	ret := &Empty{
4303		ServerResponse: googleapi.ServerResponse{
4304			Header:         res.Header,
4305			HTTPStatusCode: res.StatusCode,
4306		},
4307	}
4308	target := &ret
4309	if err := gensupport.DecodeResponse(target, res); err != nil {
4310		return nil, err
4311	}
4312	return ret, nil
4313	// {
4314	//   "description": "Deletes a task. A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has executed successfully or permanently failed.",
4315	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}",
4316	//   "httpMethod": "DELETE",
4317	//   "id": "cloudtasks.projects.locations.queues.tasks.delete",
4318	//   "parameterOrder": [
4319	//     "name"
4320	//   ],
4321	//   "parameters": {
4322	//     "name": {
4323	//       "description": "Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`",
4324	//       "location": "path",
4325	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$",
4326	//       "required": true,
4327	//       "type": "string"
4328	//     }
4329	//   },
4330	//   "path": "v2beta3/{+name}",
4331	//   "response": {
4332	//     "$ref": "Empty"
4333	//   },
4334	//   "scopes": [
4335	//     "https://www.googleapis.com/auth/cloud-platform"
4336	//   ]
4337	// }
4338
4339}
4340
4341// method id "cloudtasks.projects.locations.queues.tasks.get":
4342
4343type ProjectsLocationsQueuesTasksGetCall struct {
4344	s            *Service
4345	name         string
4346	urlParams_   gensupport.URLParams
4347	ifNoneMatch_ string
4348	ctx_         context.Context
4349	header_      http.Header
4350}
4351
4352// Get: Gets a task.
4353func (r *ProjectsLocationsQueuesTasksService) Get(name string) *ProjectsLocationsQueuesTasksGetCall {
4354	c := &ProjectsLocationsQueuesTasksGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4355	c.name = name
4356	return c
4357}
4358
4359// ResponseView sets the optional parameter "responseView": The
4360// response_view specifies which subset of the Task will be returned. By
4361// default response_view is BASIC; not all information is retrieved by
4362// default because some data, such as payloads, might be desirable to
4363// return only when needed because of its large size or because of the
4364// sensitivity of data that it contains. Authorization for FULL requires
4365// `cloudtasks.tasks.fullView` Google IAM
4366// (https://cloud.google.com/iam/) permission on the Task resource.
4367//
4368// Possible values:
4369//   "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC.
4370//   "BASIC" - The basic view omits fields which can be large or can
4371// contain sensitive data. This view does not include the body in
4372// AppEngineHttpRequest. Bodies are desirable to return only when
4373// needed, because they can be large and because of the sensitivity of
4374// the data that you choose to store in it.
4375//   "FULL" - All information is returned. Authorization for FULL
4376// requires `cloudtasks.tasks.fullView` [Google
4377// IAM](https://cloud.google.com/iam/) permission on the Queue resource.
4378func (c *ProjectsLocationsQueuesTasksGetCall) ResponseView(responseView string) *ProjectsLocationsQueuesTasksGetCall {
4379	c.urlParams_.Set("responseView", responseView)
4380	return c
4381}
4382
4383// Fields allows partial responses to be retrieved. See
4384// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4385// for more information.
4386func (c *ProjectsLocationsQueuesTasksGetCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksGetCall {
4387	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4388	return c
4389}
4390
4391// IfNoneMatch sets the optional parameter which makes the operation
4392// fail if the object's ETag matches the given value. This is useful for
4393// getting updates only after the object has changed since the last
4394// request. Use googleapi.IsNotModified to check whether the response
4395// error from Do is the result of In-None-Match.
4396func (c *ProjectsLocationsQueuesTasksGetCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueuesTasksGetCall {
4397	c.ifNoneMatch_ = entityTag
4398	return c
4399}
4400
4401// Context sets the context to be used in this call's Do method. Any
4402// pending HTTP request will be aborted if the provided context is
4403// canceled.
4404func (c *ProjectsLocationsQueuesTasksGetCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksGetCall {
4405	c.ctx_ = ctx
4406	return c
4407}
4408
4409// Header returns an http.Header that can be modified by the caller to
4410// add HTTP headers to the request.
4411func (c *ProjectsLocationsQueuesTasksGetCall) Header() http.Header {
4412	if c.header_ == nil {
4413		c.header_ = make(http.Header)
4414	}
4415	return c.header_
4416}
4417
4418func (c *ProjectsLocationsQueuesTasksGetCall) doRequest(alt string) (*http.Response, error) {
4419	reqHeaders := make(http.Header)
4420	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4421	for k, v := range c.header_ {
4422		reqHeaders[k] = v
4423	}
4424	reqHeaders.Set("User-Agent", c.s.userAgent())
4425	if c.ifNoneMatch_ != "" {
4426		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4427	}
4428	var body io.Reader = nil
4429	c.urlParams_.Set("alt", alt)
4430	c.urlParams_.Set("prettyPrint", "false")
4431	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}")
4432	urls += "?" + c.urlParams_.Encode()
4433	req, err := http.NewRequest("GET", urls, body)
4434	if err != nil {
4435		return nil, err
4436	}
4437	req.Header = reqHeaders
4438	googleapi.Expand(req.URL, map[string]string{
4439		"name": c.name,
4440	})
4441	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4442}
4443
4444// Do executes the "cloudtasks.projects.locations.queues.tasks.get" call.
4445// Exactly one of *Task or error will be non-nil. Any non-2xx status
4446// code is an error. Response headers are in either
4447// *Task.ServerResponse.Header or (if a response was returned at all) in
4448// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4449// whether the returned error was because http.StatusNotModified was
4450// returned.
4451func (c *ProjectsLocationsQueuesTasksGetCall) Do(opts ...googleapi.CallOption) (*Task, error) {
4452	gensupport.SetOptions(c.urlParams_, opts...)
4453	res, err := c.doRequest("json")
4454	if res != nil && res.StatusCode == http.StatusNotModified {
4455		if res.Body != nil {
4456			res.Body.Close()
4457		}
4458		return nil, &googleapi.Error{
4459			Code:   res.StatusCode,
4460			Header: res.Header,
4461		}
4462	}
4463	if err != nil {
4464		return nil, err
4465	}
4466	defer googleapi.CloseBody(res)
4467	if err := googleapi.CheckResponse(res); err != nil {
4468		return nil, err
4469	}
4470	ret := &Task{
4471		ServerResponse: googleapi.ServerResponse{
4472			Header:         res.Header,
4473			HTTPStatusCode: res.StatusCode,
4474		},
4475	}
4476	target := &ret
4477	if err := gensupport.DecodeResponse(target, res); err != nil {
4478		return nil, err
4479	}
4480	return ret, nil
4481	// {
4482	//   "description": "Gets a task.",
4483	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}",
4484	//   "httpMethod": "GET",
4485	//   "id": "cloudtasks.projects.locations.queues.tasks.get",
4486	//   "parameterOrder": [
4487	//     "name"
4488	//   ],
4489	//   "parameters": {
4490	//     "name": {
4491	//       "description": "Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`",
4492	//       "location": "path",
4493	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$",
4494	//       "required": true,
4495	//       "type": "string"
4496	//     },
4497	//     "responseView": {
4498	//       "description": "The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource.",
4499	//       "enum": [
4500	//         "VIEW_UNSPECIFIED",
4501	//         "BASIC",
4502	//         "FULL"
4503	//       ],
4504	//       "enumDescriptions": [
4505	//         "Unspecified. Defaults to BASIC.",
4506	//         "The basic view omits fields which can be large or can contain sensitive data. This view does not include the body in AppEngineHttpRequest. Bodies are desirable to return only when needed, because they can be large and because of the sensitivity of the data that you choose to store in it.",
4507	//         "All information is returned. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Queue resource."
4508	//       ],
4509	//       "location": "query",
4510	//       "type": "string"
4511	//     }
4512	//   },
4513	//   "path": "v2beta3/{+name}",
4514	//   "response": {
4515	//     "$ref": "Task"
4516	//   },
4517	//   "scopes": [
4518	//     "https://www.googleapis.com/auth/cloud-platform"
4519	//   ]
4520	// }
4521
4522}
4523
4524// method id "cloudtasks.projects.locations.queues.tasks.list":
4525
4526type ProjectsLocationsQueuesTasksListCall struct {
4527	s            *Service
4528	parent       string
4529	urlParams_   gensupport.URLParams
4530	ifNoneMatch_ string
4531	ctx_         context.Context
4532	header_      http.Header
4533}
4534
4535// List: Lists the tasks in a queue. By default, only the BASIC view is
4536// retrieved due to performance considerations; response_view controls
4537// the subset of information which is returned. The tasks may be
4538// returned in any order. The ordering may change at any time.
4539func (r *ProjectsLocationsQueuesTasksService) List(parent string) *ProjectsLocationsQueuesTasksListCall {
4540	c := &ProjectsLocationsQueuesTasksListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4541	c.parent = parent
4542	return c
4543}
4544
4545// PageSize sets the optional parameter "pageSize": Maximum page size.
4546// Fewer tasks than requested might be returned, even if more tasks
4547// exist; use next_page_token in the response to determine if more tasks
4548// exist. The maximum page size is 1000. If unspecified, the page size
4549// will be the maximum.
4550func (c *ProjectsLocationsQueuesTasksListCall) PageSize(pageSize int64) *ProjectsLocationsQueuesTasksListCall {
4551	c.urlParams_.Set("pageSize", fmt.Sprint(pageSize))
4552	return c
4553}
4554
4555// PageToken sets the optional parameter "pageToken": A token
4556// identifying the page of results to return. To request the first page
4557// results, page_token must be empty. To request the next page of
4558// results, page_token must be the value of next_page_token returned
4559// from the previous call to ListTasks method. The page token is valid
4560// for only 2 hours.
4561func (c *ProjectsLocationsQueuesTasksListCall) PageToken(pageToken string) *ProjectsLocationsQueuesTasksListCall {
4562	c.urlParams_.Set("pageToken", pageToken)
4563	return c
4564}
4565
4566// ResponseView sets the optional parameter "responseView": The
4567// response_view specifies which subset of the Task will be returned. By
4568// default response_view is BASIC; not all information is retrieved by
4569// default because some data, such as payloads, might be desirable to
4570// return only when needed because of its large size or because of the
4571// sensitivity of data that it contains. Authorization for FULL requires
4572// `cloudtasks.tasks.fullView` Google IAM
4573// (https://cloud.google.com/iam/) permission on the Task resource.
4574//
4575// Possible values:
4576//   "VIEW_UNSPECIFIED" - Unspecified. Defaults to BASIC.
4577//   "BASIC" - The basic view omits fields which can be large or can
4578// contain sensitive data. This view does not include the body in
4579// AppEngineHttpRequest. Bodies are desirable to return only when
4580// needed, because they can be large and because of the sensitivity of
4581// the data that you choose to store in it.
4582//   "FULL" - All information is returned. Authorization for FULL
4583// requires `cloudtasks.tasks.fullView` [Google
4584// IAM](https://cloud.google.com/iam/) permission on the Queue resource.
4585func (c *ProjectsLocationsQueuesTasksListCall) ResponseView(responseView string) *ProjectsLocationsQueuesTasksListCall {
4586	c.urlParams_.Set("responseView", responseView)
4587	return c
4588}
4589
4590// Fields allows partial responses to be retrieved. See
4591// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4592// for more information.
4593func (c *ProjectsLocationsQueuesTasksListCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksListCall {
4594	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4595	return c
4596}
4597
4598// IfNoneMatch sets the optional parameter which makes the operation
4599// fail if the object's ETag matches the given value. This is useful for
4600// getting updates only after the object has changed since the last
4601// request. Use googleapi.IsNotModified to check whether the response
4602// error from Do is the result of In-None-Match.
4603func (c *ProjectsLocationsQueuesTasksListCall) IfNoneMatch(entityTag string) *ProjectsLocationsQueuesTasksListCall {
4604	c.ifNoneMatch_ = entityTag
4605	return c
4606}
4607
4608// Context sets the context to be used in this call's Do method. Any
4609// pending HTTP request will be aborted if the provided context is
4610// canceled.
4611func (c *ProjectsLocationsQueuesTasksListCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksListCall {
4612	c.ctx_ = ctx
4613	return c
4614}
4615
4616// Header returns an http.Header that can be modified by the caller to
4617// add HTTP headers to the request.
4618func (c *ProjectsLocationsQueuesTasksListCall) Header() http.Header {
4619	if c.header_ == nil {
4620		c.header_ = make(http.Header)
4621	}
4622	return c.header_
4623}
4624
4625func (c *ProjectsLocationsQueuesTasksListCall) doRequest(alt string) (*http.Response, error) {
4626	reqHeaders := make(http.Header)
4627	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4628	for k, v := range c.header_ {
4629		reqHeaders[k] = v
4630	}
4631	reqHeaders.Set("User-Agent", c.s.userAgent())
4632	if c.ifNoneMatch_ != "" {
4633		reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
4634	}
4635	var body io.Reader = nil
4636	c.urlParams_.Set("alt", alt)
4637	c.urlParams_.Set("prettyPrint", "false")
4638	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+parent}/tasks")
4639	urls += "?" + c.urlParams_.Encode()
4640	req, err := http.NewRequest("GET", urls, body)
4641	if err != nil {
4642		return nil, err
4643	}
4644	req.Header = reqHeaders
4645	googleapi.Expand(req.URL, map[string]string{
4646		"parent": c.parent,
4647	})
4648	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4649}
4650
4651// Do executes the "cloudtasks.projects.locations.queues.tasks.list" call.
4652// Exactly one of *ListTasksResponse or error will be non-nil. Any
4653// non-2xx status code is an error. Response headers are in either
4654// *ListTasksResponse.ServerResponse.Header or (if a response was
4655// returned at all) in error.(*googleapi.Error).Header. Use
4656// googleapi.IsNotModified to check whether the returned error was
4657// because http.StatusNotModified was returned.
4658func (c *ProjectsLocationsQueuesTasksListCall) Do(opts ...googleapi.CallOption) (*ListTasksResponse, error) {
4659	gensupport.SetOptions(c.urlParams_, opts...)
4660	res, err := c.doRequest("json")
4661	if res != nil && res.StatusCode == http.StatusNotModified {
4662		if res.Body != nil {
4663			res.Body.Close()
4664		}
4665		return nil, &googleapi.Error{
4666			Code:   res.StatusCode,
4667			Header: res.Header,
4668		}
4669	}
4670	if err != nil {
4671		return nil, err
4672	}
4673	defer googleapi.CloseBody(res)
4674	if err := googleapi.CheckResponse(res); err != nil {
4675		return nil, err
4676	}
4677	ret := &ListTasksResponse{
4678		ServerResponse: googleapi.ServerResponse{
4679			Header:         res.Header,
4680			HTTPStatusCode: res.StatusCode,
4681		},
4682	}
4683	target := &ret
4684	if err := gensupport.DecodeResponse(target, res); err != nil {
4685		return nil, err
4686	}
4687	return ret, nil
4688	// {
4689	//   "description": "Lists the tasks in a queue. By default, only the BASIC view is retrieved due to performance considerations; response_view controls the subset of information which is returned. The tasks may be returned in any order. The ordering may change at any time.",
4690	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks",
4691	//   "httpMethod": "GET",
4692	//   "id": "cloudtasks.projects.locations.queues.tasks.list",
4693	//   "parameterOrder": [
4694	//     "parent"
4695	//   ],
4696	//   "parameters": {
4697	//     "pageSize": {
4698	//       "description": "Maximum page size. Fewer tasks than requested might be returned, even if more tasks exist; use next_page_token in the response to determine if more tasks exist. The maximum page size is 1000. If unspecified, the page size will be the maximum.",
4699	//       "format": "int32",
4700	//       "location": "query",
4701	//       "type": "integer"
4702	//     },
4703	//     "pageToken": {
4704	//       "description": "A token identifying the page of results to return. To request the first page results, page_token must be empty. To request the next page of results, page_token must be the value of next_page_token returned from the previous call to ListTasks method. The page token is valid for only 2 hours.",
4705	//       "location": "query",
4706	//       "type": "string"
4707	//     },
4708	//     "parent": {
4709	//       "description": "Required. The queue name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`",
4710	//       "location": "path",
4711	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+$",
4712	//       "required": true,
4713	//       "type": "string"
4714	//     },
4715	//     "responseView": {
4716	//       "description": "The response_view specifies which subset of the Task will be returned. By default response_view is BASIC; not all information is retrieved by default because some data, such as payloads, might be desirable to return only when needed because of its large size or because of the sensitivity of data that it contains. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Task resource.",
4717	//       "enum": [
4718	//         "VIEW_UNSPECIFIED",
4719	//         "BASIC",
4720	//         "FULL"
4721	//       ],
4722	//       "enumDescriptions": [
4723	//         "Unspecified. Defaults to BASIC.",
4724	//         "The basic view omits fields which can be large or can contain sensitive data. This view does not include the body in AppEngineHttpRequest. Bodies are desirable to return only when needed, because they can be large and because of the sensitivity of the data that you choose to store in it.",
4725	//         "All information is returned. Authorization for FULL requires `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) permission on the Queue resource."
4726	//       ],
4727	//       "location": "query",
4728	//       "type": "string"
4729	//     }
4730	//   },
4731	//   "path": "v2beta3/{+parent}/tasks",
4732	//   "response": {
4733	//     "$ref": "ListTasksResponse"
4734	//   },
4735	//   "scopes": [
4736	//     "https://www.googleapis.com/auth/cloud-platform"
4737	//   ]
4738	// }
4739
4740}
4741
4742// Pages invokes f for each page of results.
4743// A non-nil error returned from f will halt the iteration.
4744// The provided context supersedes any context provided to the Context method.
4745func (c *ProjectsLocationsQueuesTasksListCall) Pages(ctx context.Context, f func(*ListTasksResponse) error) error {
4746	c.ctx_ = ctx
4747	defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
4748	for {
4749		x, err := c.Do()
4750		if err != nil {
4751			return err
4752		}
4753		if err := f(x); err != nil {
4754			return err
4755		}
4756		if x.NextPageToken == "" {
4757			return nil
4758		}
4759		c.PageToken(x.NextPageToken)
4760	}
4761}
4762
4763// method id "cloudtasks.projects.locations.queues.tasks.run":
4764
4765type ProjectsLocationsQueuesTasksRunCall struct {
4766	s              *Service
4767	name           string
4768	runtaskrequest *RunTaskRequest
4769	urlParams_     gensupport.URLParams
4770	ctx_           context.Context
4771	header_        http.Header
4772}
4773
4774// Run: Forces a task to run now. When this method is called, Cloud
4775// Tasks will dispatch the task, even if the task is already running,
4776// the queue has reached its RateLimits or is PAUSED. This command is
4777// meant to be used for manual debugging. For example, RunTask can be
4778// used to retry a failed task after a fix has been made or to manually
4779// force a task to be dispatched now. The dispatched task is returned.
4780// That is, the task that is returned contains the status after the task
4781// is dispatched but before the task is received by its target. If Cloud
4782// Tasks receives a successful response from the task's target, then the
4783// task will be deleted; otherwise the task's schedule_time will be
4784// reset to the time that RunTask was called plus the retry delay
4785// specified in the queue's RetryConfig. RunTask returns NOT_FOUND when
4786// it is called on a task that has already succeeded or permanently
4787// failed.
4788func (r *ProjectsLocationsQueuesTasksService) Run(name string, runtaskrequest *RunTaskRequest) *ProjectsLocationsQueuesTasksRunCall {
4789	c := &ProjectsLocationsQueuesTasksRunCall{s: r.s, urlParams_: make(gensupport.URLParams)}
4790	c.name = name
4791	c.runtaskrequest = runtaskrequest
4792	return c
4793}
4794
4795// Fields allows partial responses to be retrieved. See
4796// https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
4797// for more information.
4798func (c *ProjectsLocationsQueuesTasksRunCall) Fields(s ...googleapi.Field) *ProjectsLocationsQueuesTasksRunCall {
4799	c.urlParams_.Set("fields", googleapi.CombineFields(s))
4800	return c
4801}
4802
4803// Context sets the context to be used in this call's Do method. Any
4804// pending HTTP request will be aborted if the provided context is
4805// canceled.
4806func (c *ProjectsLocationsQueuesTasksRunCall) Context(ctx context.Context) *ProjectsLocationsQueuesTasksRunCall {
4807	c.ctx_ = ctx
4808	return c
4809}
4810
4811// Header returns an http.Header that can be modified by the caller to
4812// add HTTP headers to the request.
4813func (c *ProjectsLocationsQueuesTasksRunCall) Header() http.Header {
4814	if c.header_ == nil {
4815		c.header_ = make(http.Header)
4816	}
4817	return c.header_
4818}
4819
4820func (c *ProjectsLocationsQueuesTasksRunCall) doRequest(alt string) (*http.Response, error) {
4821	reqHeaders := make(http.Header)
4822	reqHeaders.Set("x-goog-api-client", "gl-go/"+gensupport.GoVersion()+" gdcl/20210322")
4823	for k, v := range c.header_ {
4824		reqHeaders[k] = v
4825	}
4826	reqHeaders.Set("User-Agent", c.s.userAgent())
4827	var body io.Reader = nil
4828	body, err := googleapi.WithoutDataWrapper.JSONReader(c.runtaskrequest)
4829	if err != nil {
4830		return nil, err
4831	}
4832	reqHeaders.Set("Content-Type", "application/json")
4833	c.urlParams_.Set("alt", alt)
4834	c.urlParams_.Set("prettyPrint", "false")
4835	urls := googleapi.ResolveRelative(c.s.BasePath, "v2beta3/{+name}:run")
4836	urls += "?" + c.urlParams_.Encode()
4837	req, err := http.NewRequest("POST", urls, body)
4838	if err != nil {
4839		return nil, err
4840	}
4841	req.Header = reqHeaders
4842	googleapi.Expand(req.URL, map[string]string{
4843		"name": c.name,
4844	})
4845	return gensupport.SendRequest(c.ctx_, c.s.client, req)
4846}
4847
4848// Do executes the "cloudtasks.projects.locations.queues.tasks.run" call.
4849// Exactly one of *Task or error will be non-nil. Any non-2xx status
4850// code is an error. Response headers are in either
4851// *Task.ServerResponse.Header or (if a response was returned at all) in
4852// error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
4853// whether the returned error was because http.StatusNotModified was
4854// returned.
4855func (c *ProjectsLocationsQueuesTasksRunCall) Do(opts ...googleapi.CallOption) (*Task, error) {
4856	gensupport.SetOptions(c.urlParams_, opts...)
4857	res, err := c.doRequest("json")
4858	if res != nil && res.StatusCode == http.StatusNotModified {
4859		if res.Body != nil {
4860			res.Body.Close()
4861		}
4862		return nil, &googleapi.Error{
4863			Code:   res.StatusCode,
4864			Header: res.Header,
4865		}
4866	}
4867	if err != nil {
4868		return nil, err
4869	}
4870	defer googleapi.CloseBody(res)
4871	if err := googleapi.CheckResponse(res); err != nil {
4872		return nil, err
4873	}
4874	ret := &Task{
4875		ServerResponse: googleapi.ServerResponse{
4876			Header:         res.Header,
4877			HTTPStatusCode: res.StatusCode,
4878		},
4879	}
4880	target := &ret
4881	if err := gensupport.DecodeResponse(target, res); err != nil {
4882		return nil, err
4883	}
4884	return ret, nil
4885	// {
4886	//   "description": "Forces a task to run now. When this method is called, Cloud Tasks will dispatch the task, even if the task is already running, the queue has reached its RateLimits or is PAUSED. This command is meant to be used for manual debugging. For example, RunTask can be used to retry a failed task after a fix has been made or to manually force a task to be dispatched now. The dispatched task is returned. That is, the task that is returned contains the status after the task is dispatched but before the task is received by its target. If Cloud Tasks receives a successful response from the task's target, then the task will be deleted; otherwise the task's schedule_time will be reset to the time that RunTask was called plus the retry delay specified in the queue's RetryConfig. RunTask returns NOT_FOUND when it is called on a task that has already succeeded or permanently failed.",
4887	//   "flatPath": "v2beta3/projects/{projectsId}/locations/{locationsId}/queues/{queuesId}/tasks/{tasksId}:run",
4888	//   "httpMethod": "POST",
4889	//   "id": "cloudtasks.projects.locations.queues.tasks.run",
4890	//   "parameterOrder": [
4891	//     "name"
4892	//   ],
4893	//   "parameters": {
4894	//     "name": {
4895	//       "description": "Required. The task name. For example: `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`",
4896	//       "location": "path",
4897	//       "pattern": "^projects/[^/]+/locations/[^/]+/queues/[^/]+/tasks/[^/]+$",
4898	//       "required": true,
4899	//       "type": "string"
4900	//     }
4901	//   },
4902	//   "path": "v2beta3/{+name}:run",
4903	//   "request": {
4904	//     "$ref": "RunTaskRequest"
4905	//   },
4906	//   "response": {
4907	//     "$ref": "Task"
4908	//   },
4909	//   "scopes": [
4910	//     "https://www.googleapis.com/auth/cloud-platform"
4911	//   ]
4912	// }
4913
4914}
4915