Copyright 2020 Google LLC Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Code generated by protoc-gen-go_gapic. DO NOT EDIT.

package cloudtasks

import (
	
	
	
	
	

	
	gax 
	
	
	gtransport 
	taskspb 
	iampb 
	
	
	
)

var newClientHook clientHook
CallOptions contains the retry settings for each method of Client.
type CallOptions struct {
	ListQueues         []gax.CallOption
	GetQueue           []gax.CallOption
	CreateQueue        []gax.CallOption
	UpdateQueue        []gax.CallOption
	DeleteQueue        []gax.CallOption
	PurgeQueue         []gax.CallOption
	PauseQueue         []gax.CallOption
	ResumeQueue        []gax.CallOption
	GetIamPolicy       []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
	ListTasks          []gax.CallOption
	GetTask            []gax.CallOption
	CreateTask         []gax.CallOption
	DeleteTask         []gax.CallOption
	RunTask            []gax.CallOption
}

func () []option.ClientOption {
	return []option.ClientOption{
		option.WithEndpoint("cloudtasks.googleapis.com:443"),
		option.WithGRPCDialOption(grpc.WithDisableServiceConfig()),
		option.WithScopes(DefaultAuthScopes()...),
		option.WithGRPCDialOption(grpc.WithDefaultCallOptions(
			grpc.MaxCallRecvMsgSize(math.MaxInt32))),
	}
}

func () *CallOptions {
	return &CallOptions{
		ListQueues: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.DeadlineExceeded,
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        10000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		GetQueue: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.DeadlineExceeded,
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        10000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		CreateQueue: []gax.CallOption{},
		UpdateQueue: []gax.CallOption{},
		DeleteQueue: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.DeadlineExceeded,
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        10000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		PurgeQueue:  []gax.CallOption{},
		PauseQueue:  []gax.CallOption{},
		ResumeQueue: []gax.CallOption{},
		GetIamPolicy: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.DeadlineExceeded,
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        10000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		SetIamPolicy: []gax.CallOption{},
		TestIamPermissions: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.DeadlineExceeded,
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        10000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		ListTasks: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.DeadlineExceeded,
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        10000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		GetTask: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.DeadlineExceeded,
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        10000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		CreateTask: []gax.CallOption{},
		DeleteTask: []gax.CallOption{
			gax.WithRetry(func() gax.Retryer {
				return gax.OnCodes([]codes.Code{
					codes.DeadlineExceeded,
					codes.Unavailable,
				}, gax.Backoff{
					Initial:    100 * time.Millisecond,
					Max:        10000 * time.Millisecond,
					Multiplier: 1.30,
				})
			}),
		},
		RunTask: []gax.CallOption{},
	}
}
Client is a client for interacting with Cloud Tasks API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Connection pool of gRPC connections to the service.
flag to opt out of default deadlines via GOOGLE_API_GO_EXPERIMENTAL_DISABLE_DEFAULT_DEADLINE
The gRPC API client.
The call options for this service.
The x-goog-* metadata to be sent with each request.
NewClient creates a new cloud tasks client. Cloud Tasks allows developers to manage the execution of background work in their applications.
func ( context.Context,  ...option.ClientOption) (*Client, error) {
	 := defaultClientOptions()

	if newClientHook != nil {
		,  := newClientHook(, clientHookParams{})
		if  != nil {
			return nil, 
		}
		 = append(, ...)
	}

	,  := checkDisableDeadlines()
	if  != nil {
		return nil, 
	}

	,  := gtransport.DialPool(, append(, ...)...)
	if  != nil {
		return nil, 
	}
	 := &Client{
		connPool:         ,
		disableDeadlines: ,
		CallOptions:      defaultCallOptions(),

		client: taskspb.NewCloudTasksClient(),
	}
	.setGoogleClientInfo()

	return , nil
}
Connection returns a connection to the API service. Deprecated.
func ( *Client) () *grpc.ClientConn {
	return .connPool.Conn()
}
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func ( *Client) () error {
	return .connPool.Close()
}
setGoogleClientInfo sets the name and version of the application in the `x-goog-api-client` header passed on each request. Intended for use by Google-written clients.
func ( *Client) ( ...string) {
	 := append([]string{"gl-go", versionGo()}, ...)
	 = append(, "gapic", versionClient, "gax", gax.Version, "grpc", grpc.Version)
	.xGoogMetadata = metadata.Pairs("x-goog-api-client", gax.XGoogHeader(...))
}
ListQueues lists queues. Queues are returned in lexicographical order.
func ( *Client) ( context.Context,  *taskspb.ListQueuesRequest,  ...gax.CallOption) *QueueIterator {
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(.GetParent())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.ListQueues[0:len(.CallOptions.ListQueues):len(.CallOptions.ListQueues)], ...)
	 := &QueueIterator{}
	 = proto.Clone().(*taskspb.ListQueuesRequest)
	.InternalFetch = func( int,  string) ([]*taskspb.Queue, string, error) {
		var  *taskspb.ListQueuesResponse
		.PageToken = 
		if  > math.MaxInt32 {
			.PageSize = math.MaxInt32
		} else {
			.PageSize = int32()
		}
		 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
			var  error
			,  = .client.ListQueues(, , .GRPC...)
			return 
		}, ...)
		if  != nil {
			return nil, "", 
		}

		.Response = 
		return .GetQueues(), .GetNextPageToken(), nil
	}
	 := func( int,  string) (string, error) {
		, ,  := .InternalFetch(, )
		if  != nil {
			return "", 
		}
		.items = append(.items, ...)
		return , nil
	}
	.pageInfo, .nextFunc = iterator.NewPageInfo(, .bufLen, .takeBuf)
	.pageInfo.MaxSize = int(.GetPageSize())
	.pageInfo.Token = .GetPageToken()
	return 
}
GetQueue gets a queue.
func ( *Client) ( context.Context,  *taskspb.GetQueueRequest,  ...gax.CallOption) (*taskspb.Queue, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(.GetName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.GetQueue[0:len(.CallOptions.GetQueue):len(.CallOptions.GetQueue)], ...)
	var  *taskspb.Queue
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.GetQueue(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
CreateQueue creates a queue. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine queue.yaml or queue.xml file to manage your queues. Read Overview of Queue Management and queue.yaml (at https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
func ( *Client) ( context.Context,  *taskspb.CreateQueueRequest,  ...gax.CallOption) (*taskspb.Queue, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(.GetParent())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.CreateQueue[0:len(.CallOptions.CreateQueue):len(.CallOptions.CreateQueue)], ...)
	var  *taskspb.Queue
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.CreateQueue(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
UpdateQueue updates a queue. This method creates the queue if it does not exist and updates the queue if it does exist. Queues created with this method allow tasks to live for a maximum of 31 days. After a task is 31 days old, the task will be deleted regardless of whether it was dispatched or not. WARNING: Using this method may have unintended side effects if you are using an App Engine queue.yaml or queue.xml file to manage your queues. Read Overview of Queue Management and queue.yaml (at https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
func ( *Client) ( context.Context,  *taskspb.UpdateQueueRequest,  ...gax.CallOption) (*taskspb.Queue, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "queue.name", url.QueryEscape(.GetQueue().GetName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.UpdateQueue[0:len(.CallOptions.UpdateQueue):len(.CallOptions.UpdateQueue)], ...)
	var  *taskspb.Queue
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.UpdateQueue(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
DeleteQueue deletes a queue. This command will delete the queue even if it has tasks in it. Note: If you delete a queue, a queue with the same name can’t be created for 7 days. WARNING: Using this method may have unintended side effects if you are using an App Engine queue.yaml or queue.xml file to manage your queues. Read Overview of Queue Management and queue.yaml (at https://cloud.google.com/tasks/docs/queue-yaml) before using this method.
func ( *Client) ( context.Context,  *taskspb.DeleteQueueRequest,  ...gax.CallOption) error {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(.GetName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.DeleteQueue[0:len(.CallOptions.DeleteQueue):len(.CallOptions.DeleteQueue)], ...)
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		_,  = .client.DeleteQueue(, , .GRPC...)
		return 
	}, ...)
	return 
}
PurgeQueue purges a queue by deleting all of its tasks. All tasks created before this method is called are permanently deleted. Purge operations can take up to one minute to take effect. Tasks might be dispatched before the purge takes effect. A purge is irreversible.
func ( *Client) ( context.Context,  *taskspb.PurgeQueueRequest,  ...gax.CallOption) (*taskspb.Queue, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(.GetName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.PurgeQueue[0:len(.CallOptions.PurgeQueue):len(.CallOptions.PurgeQueue)], ...)
	var  *taskspb.Queue
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.PurgeQueue(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
PauseQueue pauses the queue. If a queue is paused then the system will stop dispatching tasks until the queue is resumed via ResumeQueue. Tasks can still be added when the queue is paused. A queue is paused if its state is PAUSED.
func ( *Client) ( context.Context,  *taskspb.PauseQueueRequest,  ...gax.CallOption) (*taskspb.Queue, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(.GetName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.PauseQueue[0:len(.CallOptions.PauseQueue):len(.CallOptions.PauseQueue)], ...)
	var  *taskspb.Queue
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.PauseQueue(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
ResumeQueue resume a queue. This method resumes a queue after it has been PAUSED or DISABLED. The state of a queue is stored in the queue’s state; after calling this method it will be set to RUNNING. WARNING: Resuming many high-QPS queues at the same time can lead to target overloading. If you are resuming high-QPS queues, follow the 500/50/5 pattern described in Managing Cloud Tasks Scaling Risks (at https://cloud.google.com/tasks/docs/manage-cloud-task-scaling).
func ( *Client) ( context.Context,  *taskspb.ResumeQueueRequest,  ...gax.CallOption) (*taskspb.Queue, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(.GetName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.ResumeQueue[0:len(.CallOptions.ResumeQueue):len(.CallOptions.ResumeQueue)], ...)
	var  *taskspb.Queue
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.ResumeQueue(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
GetIamPolicy gets the access control policy for a Queue. Returns an empty policy if the resource exists and does not have a policy set. Authorization requires the following Google IAM (at https://cloud.google.com/iam) permission on the specified resource parent: cloudtasks.queues.getIamPolicy
func ( *Client) ( context.Context,  *iampb.GetIamPolicyRequest,  ...gax.CallOption) (*iampb.Policy, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(.GetResource())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.GetIamPolicy[0:len(.CallOptions.GetIamPolicy):len(.CallOptions.GetIamPolicy)], ...)
	var  *iampb.Policy
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.GetIamPolicy(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
SetIamPolicy sets the access control policy for a Queue. Replaces any existing policy. Note: The Cloud Console does not check queue-level IAM permissions yet. Project-level permissions are required to use the Cloud Console. Authorization requires the following Google IAM (at https://cloud.google.com/iam) permission on the specified resource parent: cloudtasks.queues.setIamPolicy
func ( *Client) ( context.Context,  *iampb.SetIamPolicyRequest,  ...gax.CallOption) (*iampb.Policy, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(.GetResource())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.SetIamPolicy[0:len(.CallOptions.SetIamPolicy):len(.CallOptions.SetIamPolicy)], ...)
	var  *iampb.Policy
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.SetIamPolicy(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
TestIamPermissions returns permissions that a caller has on a Queue. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
func ( *Client) ( context.Context,  *iampb.TestIamPermissionsRequest,  ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "resource", url.QueryEscape(.GetResource())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.TestIamPermissions[0:len(.CallOptions.TestIamPermissions):len(.CallOptions.TestIamPermissions)], ...)
	var  *iampb.TestIamPermissionsResponse
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.TestIamPermissions(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
ListTasks lists the tasks in a queue. By default, only the BASIC view is retrieved due to performance considerations; response_view controls the subset of information which is returned. The tasks may be returned in any order. The ordering may change at any time.
func ( *Client) ( context.Context,  *taskspb.ListTasksRequest,  ...gax.CallOption) *TaskIterator {
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(.GetParent())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.ListTasks[0:len(.CallOptions.ListTasks):len(.CallOptions.ListTasks)], ...)
	 := &TaskIterator{}
	 = proto.Clone().(*taskspb.ListTasksRequest)
	.InternalFetch = func( int,  string) ([]*taskspb.Task, string, error) {
		var  *taskspb.ListTasksResponse
		.PageToken = 
		if  > math.MaxInt32 {
			.PageSize = math.MaxInt32
		} else {
			.PageSize = int32()
		}
		 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
			var  error
			,  = .client.ListTasks(, , .GRPC...)
			return 
		}, ...)
		if  != nil {
			return nil, "", 
		}

		.Response = 
		return .GetTasks(), .GetNextPageToken(), nil
	}
	 := func( int,  string) (string, error) {
		, ,  := .InternalFetch(, )
		if  != nil {
			return "", 
		}
		.items = append(.items, ...)
		return , nil
	}
	.pageInfo, .nextFunc = iterator.NewPageInfo(, .bufLen, .takeBuf)
	.pageInfo.MaxSize = int(.GetPageSize())
	.pageInfo.Token = .GetPageToken()
	return 
}
GetTask gets a task.
func ( *Client) ( context.Context,  *taskspb.GetTaskRequest,  ...gax.CallOption) (*taskspb.Task, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(.GetName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.GetTask[0:len(.CallOptions.GetTask):len(.CallOptions.GetTask)], ...)
	var  *taskspb.Task
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.GetTask(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
CreateTask creates a task and adds it to a queue. Tasks cannot be updated after creation; there is no UpdateTask command. The maximum task size is 100KB.
func ( *Client) ( context.Context,  *taskspb.CreateTaskRequest,  ...gax.CallOption) (*taskspb.Task, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "parent", url.QueryEscape(.GetParent())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.CreateTask[0:len(.CallOptions.CreateTask):len(.CallOptions.CreateTask)], ...)
	var  *taskspb.Task
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.CreateTask(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
DeleteTask deletes a task. A task can be deleted if it is scheduled or dispatched. A task cannot be deleted if it has executed successfully or permanently failed.
func ( *Client) ( context.Context,  *taskspb.DeleteTaskRequest,  ...gax.CallOption) error {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(.GetName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.DeleteTask[0:len(.CallOptions.DeleteTask):len(.CallOptions.DeleteTask)], ...)
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		_,  = .client.DeleteTask(, , .GRPC...)
		return 
	}, ...)
	return 
}
RunTask forces a task to run now. When this method is called, Cloud Tasks will dispatch the task, even if the task is already running, the queue has reached its RateLimits or is PAUSED. This command is meant to be used for manual debugging. For example, RunTask can be used to retry a failed task after a fix has been made or to manually force a task to be dispatched now. The dispatched task is returned. That is, the task that is returned contains the status after the task is dispatched but before the task is received by its target. If Cloud Tasks receives a successful response from the task’s target, then the task will be deleted; otherwise the task’s schedule_time will be reset to the time that RunTask was called plus the retry delay specified in the queue’s RetryConfig. RunTask returns NOT_FOUND when it is called on a task that has already succeeded or permanently failed.
func ( *Client) ( context.Context,  *taskspb.RunTaskRequest,  ...gax.CallOption) (*taskspb.Task, error) {
	if ,  := .Deadline(); ! && !.disableDeadlines {
		,  := context.WithTimeout(, 10000*time.Millisecond)
		defer ()
		 = 
	}
	 := metadata.Pairs("x-goog-request-params", fmt.Sprintf("%s=%v", "name", url.QueryEscape(.GetName())))
	 = insertMetadata(, .xGoogMetadata, )
	 = append(.CallOptions.RunTask[0:len(.CallOptions.RunTask):len(.CallOptions.RunTask)], ...)
	var  *taskspb.Task
	 := gax.Invoke(, func( context.Context,  gax.CallSettings) error {
		var  error
		,  = .client.RunTask(, , .GRPC...)
		return 
	}, ...)
	if  != nil {
		return nil, 
	}
	return , nil
}
QueueIterator manages a stream of *taskspb.Queue.
Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value.
	Response interface{}
InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*taskspb.Queue, nextPageToken string, err error)
}
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
func ( *QueueIterator) () *iterator.PageInfo {
	return .pageInfo
}
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func ( *QueueIterator) () (*taskspb.Queue, error) {
	var  *taskspb.Queue
	if  := .nextFunc();  != nil {
		return , 
	}
	 = .items[0]
	.items = .items[1:]
	return , nil
}

func ( *QueueIterator) () int {
	return len(.items)
}

func ( *QueueIterator) () interface{} {
	 := .items
	.items = nil
	return 
}
TaskIterator manages a stream of *taskspb.Task.
Response is the raw response for the current page. It must be cast to the RPC response type. Calling Next() or InternalFetch() updates this value.
	Response interface{}
InternalFetch is for use by the Google Cloud Libraries only. It is not part of the stable interface of this package. InternalFetch returns results from a single call to the underlying RPC. The number of results is no greater than pageSize. If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*taskspb.Task, nextPageToken string, err error)
}
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
func ( *TaskIterator) () *iterator.PageInfo {
	return .pageInfo
}
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func ( *TaskIterator) () (*taskspb.Task, error) {
	var  *taskspb.Task
	if  := .nextFunc();  != nil {
		return , 
	}
	 = .items[0]
	.items = .items[1:]
	return , nil
}

func ( *TaskIterator) () int {
	return len(.items)
}

func ( *TaskIterator) () interface{} {
	 := .items
	.items = nil
	return