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