From 11a468237815f3a3ddf9f7c6e8b6b3b382a24d15 Mon Sep 17 00:00:00 2001 From: Jean de Klerk <deklerk@google.com> Date: Fri, 18 May 2018 10:53:38 -0700 Subject: [PATCH] add cloud tasks protos (#67) --- .../cloud/tasks/v2beta2/cloudtasks.pb.go | 2560 +++++++++++++++++ googleapis/cloud/tasks/v2beta2/queue.pb.go | 783 +++++ googleapis/cloud/tasks/v2beta2/target.pb.go | 632 ++++ googleapis/cloud/tasks/v2beta2/task.pb.go | 505 ++++ 4 files changed, 4480 insertions(+) create mode 100644 googleapis/cloud/tasks/v2beta2/cloudtasks.pb.go create mode 100644 googleapis/cloud/tasks/v2beta2/queue.pb.go create mode 100644 googleapis/cloud/tasks/v2beta2/target.pb.go create mode 100644 googleapis/cloud/tasks/v2beta2/task.pb.go diff --git a/googleapis/cloud/tasks/v2beta2/cloudtasks.pb.go b/googleapis/cloud/tasks/v2beta2/cloudtasks.pb.go new file mode 100644 index 00000000..91076ea6 --- /dev/null +++ b/googleapis/cloud/tasks/v2beta2/cloudtasks.pb.go @@ -0,0 +1,2560 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/cloud/tasks/v2beta2/cloudtasks.proto + +package tasks // import "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import duration "github.com/golang/protobuf/ptypes/duration" +import empty "github.com/golang/protobuf/ptypes/empty" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" +import _ "google.golang.org/genproto/googleapis/api/annotations" +import v1 "google.golang.org/genproto/googleapis/iam/v1" +import field_mask "google.golang.org/genproto/protobuf/field_mask" + +import ( + context "golang.org/x/net/context" + grpc "google.golang.org/grpc" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +// Request message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +type ListQueuesRequest struct { + // Required. + // + // The location name. + // For example: `projects/PROJECT_ID/locations/LOCATION_ID` + Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"` + // `filter` can be used to specify a subset of queues. Any [Queue][google.cloud.tasks.v2beta2.Queue] + // field can be used as a filter and several operators as supported. + // For example: `<=, <, >=, >, !=, =, :`. The filter syntax is the same as + // described in + // [Stackdriver's Advanced Logs Filters](/logging/docs/view/advanced_filters). + // + // Sample filter "app_engine_http_target: *". + // + // Note that using filters might cause fewer queues than the + // requested_page size to be returned. + Filter string `protobuf:"bytes,2,opt,name=filter" json:"filter,omitempty"` + // Requested page size. + // + // The maximum page size is 9800. If unspecified, the page size will + // be the maximum. Fewer queues than requested might be returned, + // even if more queues exist; use the + // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] in the + // response to determine if more queues exist. + PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize" json:"page_size,omitempty"` + // A token identifying the page of results to return. + // + // To request the first page results, page_token must be empty. To + // request the next page of results, page_token must be the value of + // [next_page_token][google.cloud.tasks.v2beta2.ListQueuesResponse.next_page_token] returned + // from the previous call to [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] + // method. It is an error to switch the value of the + // [filter][google.cloud.tasks.v2beta2.ListQueuesRequest.filter] while iterating through pages. + PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken" json:"page_token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListQueuesRequest) Reset() { *m = ListQueuesRequest{} } +func (m *ListQueuesRequest) String() string { return proto.CompactTextString(m) } +func (*ListQueuesRequest) ProtoMessage() {} +func (*ListQueuesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{0} +} +func (m *ListQueuesRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListQueuesRequest.Unmarshal(m, b) +} +func (m *ListQueuesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListQueuesRequest.Marshal(b, m, deterministic) +} +func (dst *ListQueuesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListQueuesRequest.Merge(dst, src) +} +func (m *ListQueuesRequest) XXX_Size() int { + return xxx_messageInfo_ListQueuesRequest.Size(m) +} +func (m *ListQueuesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListQueuesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListQueuesRequest proto.InternalMessageInfo + +func (m *ListQueuesRequest) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *ListQueuesRequest) GetFilter() string { + if m != nil { + return m.Filter + } + return "" +} + +func (m *ListQueuesRequest) GetPageSize() int32 { + if m != nil { + return m.PageSize + } + return 0 +} + +func (m *ListQueuesRequest) GetPageToken() string { + if m != nil { + return m.PageToken + } + return "" +} + +// Response message for [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues]. +type ListQueuesResponse struct { + // The list of queues. + Queues []*Queue `protobuf:"bytes,1,rep,name=queues" json:"queues,omitempty"` + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListQueues][google.cloud.tasks.v2beta2.CloudTasks.ListQueues] with this value as the + // [page_token][google.cloud.tasks.v2beta2.ListQueuesRequest.page_token]. + // + // If the next_page_token is empty, there are no more results. + // + // The page token is valid for only 2 hours. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListQueuesResponse) Reset() { *m = ListQueuesResponse{} } +func (m *ListQueuesResponse) String() string { return proto.CompactTextString(m) } +func (*ListQueuesResponse) ProtoMessage() {} +func (*ListQueuesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{1} +} +func (m *ListQueuesResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListQueuesResponse.Unmarshal(m, b) +} +func (m *ListQueuesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListQueuesResponse.Marshal(b, m, deterministic) +} +func (dst *ListQueuesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListQueuesResponse.Merge(dst, src) +} +func (m *ListQueuesResponse) XXX_Size() int { + return xxx_messageInfo_ListQueuesResponse.Size(m) +} +func (m *ListQueuesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListQueuesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListQueuesResponse proto.InternalMessageInfo + +func (m *ListQueuesResponse) GetQueues() []*Queue { + if m != nil { + return m.Queues + } + return nil +} + +func (m *ListQueuesResponse) GetNextPageToken() string { + if m != nil { + return m.NextPageToken + } + return "" +} + +// Request message for [GetQueue][google.cloud.tasks.v2beta2.CloudTasks.GetQueue]. +type GetQueueRequest struct { + // Required. + // + // The resource name of the queue. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetQueueRequest) Reset() { *m = GetQueueRequest{} } +func (m *GetQueueRequest) String() string { return proto.CompactTextString(m) } +func (*GetQueueRequest) ProtoMessage() {} +func (*GetQueueRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{2} +} +func (m *GetQueueRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetQueueRequest.Unmarshal(m, b) +} +func (m *GetQueueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetQueueRequest.Marshal(b, m, deterministic) +} +func (dst *GetQueueRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetQueueRequest.Merge(dst, src) +} +func (m *GetQueueRequest) XXX_Size() int { + return xxx_messageInfo_GetQueueRequest.Size(m) +} +func (m *GetQueueRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetQueueRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetQueueRequest proto.InternalMessageInfo + +func (m *GetQueueRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Request message for [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue]. +type CreateQueueRequest struct { + // Required. + // + // The location name in which the queue will be created. + // For example: `projects/PROJECT_ID/locations/LOCATION_ID` + // + // The list of allowed locations can be obtained by calling Cloud + // Tasks' implementation of + // [ListLocations][google.cloud.location.Locations.ListLocations]. + Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"` + // Required. + // + // The queue to create. + // + // [Queue's name][google.cloud.tasks.v2beta2.Queue.name] cannot be the same as an existing queue. + Queue *Queue `protobuf:"bytes,2,opt,name=queue" json:"queue,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateQueueRequest) Reset() { *m = CreateQueueRequest{} } +func (m *CreateQueueRequest) String() string { return proto.CompactTextString(m) } +func (*CreateQueueRequest) ProtoMessage() {} +func (*CreateQueueRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{3} +} +func (m *CreateQueueRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateQueueRequest.Unmarshal(m, b) +} +func (m *CreateQueueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateQueueRequest.Marshal(b, m, deterministic) +} +func (dst *CreateQueueRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateQueueRequest.Merge(dst, src) +} +func (m *CreateQueueRequest) XXX_Size() int { + return xxx_messageInfo_CreateQueueRequest.Size(m) +} +func (m *CreateQueueRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateQueueRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateQueueRequest proto.InternalMessageInfo + +func (m *CreateQueueRequest) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *CreateQueueRequest) GetQueue() *Queue { + if m != nil { + return m.Queue + } + return nil +} + +// Request message for [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue]. +type UpdateQueueRequest struct { + // Required. + // + // The queue to create or update. + // + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] must be specified. + // + // Output only fields cannot be modified using UpdateQueue. + // Any value specified for an output only field will be ignored. + // The queue's [name][google.cloud.tasks.v2beta2.Queue.name] cannot be changed. + Queue *Queue `protobuf:"bytes,1,opt,name=queue" json:"queue,omitempty"` + // A mask used to specify which fields of the queue are being updated. + // + // If empty, then all fields will be updated. + UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *UpdateQueueRequest) Reset() { *m = UpdateQueueRequest{} } +func (m *UpdateQueueRequest) String() string { return proto.CompactTextString(m) } +func (*UpdateQueueRequest) ProtoMessage() {} +func (*UpdateQueueRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{4} +} +func (m *UpdateQueueRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_UpdateQueueRequest.Unmarshal(m, b) +} +func (m *UpdateQueueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_UpdateQueueRequest.Marshal(b, m, deterministic) +} +func (dst *UpdateQueueRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_UpdateQueueRequest.Merge(dst, src) +} +func (m *UpdateQueueRequest) XXX_Size() int { + return xxx_messageInfo_UpdateQueueRequest.Size(m) +} +func (m *UpdateQueueRequest) XXX_DiscardUnknown() { + xxx_messageInfo_UpdateQueueRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_UpdateQueueRequest proto.InternalMessageInfo + +func (m *UpdateQueueRequest) GetQueue() *Queue { + if m != nil { + return m.Queue + } + return nil +} + +func (m *UpdateQueueRequest) GetUpdateMask() *field_mask.FieldMask { + if m != nil { + return m.UpdateMask + } + return nil +} + +// Request message for [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. +type DeleteQueueRequest struct { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteQueueRequest) Reset() { *m = DeleteQueueRequest{} } +func (m *DeleteQueueRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteQueueRequest) ProtoMessage() {} +func (*DeleteQueueRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{5} +} +func (m *DeleteQueueRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteQueueRequest.Unmarshal(m, b) +} +func (m *DeleteQueueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteQueueRequest.Marshal(b, m, deterministic) +} +func (dst *DeleteQueueRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteQueueRequest.Merge(dst, src) +} +func (m *DeleteQueueRequest) XXX_Size() int { + return xxx_messageInfo_DeleteQueueRequest.Size(m) +} +func (m *DeleteQueueRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteQueueRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteQueueRequest proto.InternalMessageInfo + +func (m *DeleteQueueRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Request message for [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue]. +type PurgeQueueRequest struct { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PurgeQueueRequest) Reset() { *m = PurgeQueueRequest{} } +func (m *PurgeQueueRequest) String() string { return proto.CompactTextString(m) } +func (*PurgeQueueRequest) ProtoMessage() {} +func (*PurgeQueueRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{6} +} +func (m *PurgeQueueRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PurgeQueueRequest.Unmarshal(m, b) +} +func (m *PurgeQueueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PurgeQueueRequest.Marshal(b, m, deterministic) +} +func (dst *PurgeQueueRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PurgeQueueRequest.Merge(dst, src) +} +func (m *PurgeQueueRequest) XXX_Size() int { + return xxx_messageInfo_PurgeQueueRequest.Size(m) +} +func (m *PurgeQueueRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PurgeQueueRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PurgeQueueRequest proto.InternalMessageInfo + +func (m *PurgeQueueRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Request message for [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue]. +type PauseQueueRequest struct { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PauseQueueRequest) Reset() { *m = PauseQueueRequest{} } +func (m *PauseQueueRequest) String() string { return proto.CompactTextString(m) } +func (*PauseQueueRequest) ProtoMessage() {} +func (*PauseQueueRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{7} +} +func (m *PauseQueueRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PauseQueueRequest.Unmarshal(m, b) +} +func (m *PauseQueueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PauseQueueRequest.Marshal(b, m, deterministic) +} +func (dst *PauseQueueRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_PauseQueueRequest.Merge(dst, src) +} +func (m *PauseQueueRequest) XXX_Size() int { + return xxx_messageInfo_PauseQueueRequest.Size(m) +} +func (m *PauseQueueRequest) XXX_DiscardUnknown() { + xxx_messageInfo_PauseQueueRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_PauseQueueRequest proto.InternalMessageInfo + +func (m *PauseQueueRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Request message for [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. +type ResumeQueueRequest struct { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/location/LOCATION_ID/queues/QUEUE_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ResumeQueueRequest) Reset() { *m = ResumeQueueRequest{} } +func (m *ResumeQueueRequest) String() string { return proto.CompactTextString(m) } +func (*ResumeQueueRequest) ProtoMessage() {} +func (*ResumeQueueRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{8} +} +func (m *ResumeQueueRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ResumeQueueRequest.Unmarshal(m, b) +} +func (m *ResumeQueueRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ResumeQueueRequest.Marshal(b, m, deterministic) +} +func (dst *ResumeQueueRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ResumeQueueRequest.Merge(dst, src) +} +func (m *ResumeQueueRequest) XXX_Size() int { + return xxx_messageInfo_ResumeQueueRequest.Size(m) +} +func (m *ResumeQueueRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ResumeQueueRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ResumeQueueRequest proto.InternalMessageInfo + +func (m *ResumeQueueRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Request message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. +type ListTasksRequest struct { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,2,opt,name=response_view,json=responseView,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` + // Sort order used for the query. The only fields supported for sorting + // are `schedule_time` and `pull_message.tag`. All results will be + // returned in approximately ascending order. The default ordering is by + // `schedule_time`. + OrderBy string `protobuf:"bytes,3,opt,name=order_by,json=orderBy" json:"order_by,omitempty"` + // Requested page size. Fewer tasks than requested might be returned. + // + // The maximum page size is 1000. If unspecified, the page size will + // be the maximum. Fewer tasks than requested might be returned, + // even if more tasks exist; use + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] in the + // response to determine if more tasks exist. + PageSize int32 `protobuf:"varint,4,opt,name=page_size,json=pageSize" json:"page_size,omitempty"` + // A token identifying the page of results to return. + // + // To request the first page results, page_token must be empty. To + // request the next page of results, page_token must be the value of + // [next_page_token][google.cloud.tasks.v2beta2.ListTasksResponse.next_page_token] returned + // from the previous call to [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] + // method. + // + // The page token is valid for only 2 hours. + PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken" json:"page_token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListTasksRequest) Reset() { *m = ListTasksRequest{} } +func (m *ListTasksRequest) String() string { return proto.CompactTextString(m) } +func (*ListTasksRequest) ProtoMessage() {} +func (*ListTasksRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{9} +} +func (m *ListTasksRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListTasksRequest.Unmarshal(m, b) +} +func (m *ListTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListTasksRequest.Marshal(b, m, deterministic) +} +func (dst *ListTasksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListTasksRequest.Merge(dst, src) +} +func (m *ListTasksRequest) XXX_Size() int { + return xxx_messageInfo_ListTasksRequest.Size(m) +} +func (m *ListTasksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListTasksRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListTasksRequest proto.InternalMessageInfo + +func (m *ListTasksRequest) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *ListTasksRequest) GetResponseView() Task_View { + if m != nil { + return m.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +func (m *ListTasksRequest) GetOrderBy() string { + if m != nil { + return m.OrderBy + } + return "" +} + +func (m *ListTasksRequest) GetPageSize() int32 { + if m != nil { + return m.PageSize + } + return 0 +} + +func (m *ListTasksRequest) GetPageToken() string { + if m != nil { + return m.PageToken + } + return "" +} + +// Response message for listing tasks using [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. +type ListTasksResponse struct { + // The list of tasks. + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"` + // A token to retrieve next page of results. + // + // To return the next page of results, call + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks] with this value as the + // [page_token][google.cloud.tasks.v2beta2.ListTasksRequest.page_token]. + // + // If the next_page_token is empty, there are no more results. + NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *ListTasksResponse) Reset() { *m = ListTasksResponse{} } +func (m *ListTasksResponse) String() string { return proto.CompactTextString(m) } +func (*ListTasksResponse) ProtoMessage() {} +func (*ListTasksResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{10} +} +func (m *ListTasksResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListTasksResponse.Unmarshal(m, b) +} +func (m *ListTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListTasksResponse.Marshal(b, m, deterministic) +} +func (dst *ListTasksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListTasksResponse.Merge(dst, src) +} +func (m *ListTasksResponse) XXX_Size() int { + return xxx_messageInfo_ListTasksResponse.Size(m) +} +func (m *ListTasksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListTasksResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListTasksResponse proto.InternalMessageInfo + +func (m *ListTasksResponse) GetTasks() []*Task { + if m != nil { + return m.Tasks + } + return nil +} + +func (m *ListTasksResponse) GetNextPageToken() string { + if m != nil { + return m.NextPageToken + } + return "" +} + +// Request message for getting a task using [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask]. +type GetTaskRequest struct { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,2,opt,name=response_view,json=responseView,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetTaskRequest) Reset() { *m = GetTaskRequest{} } +func (m *GetTaskRequest) String() string { return proto.CompactTextString(m) } +func (*GetTaskRequest) ProtoMessage() {} +func (*GetTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{11} +} +func (m *GetTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetTaskRequest.Unmarshal(m, b) +} +func (m *GetTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetTaskRequest.Marshal(b, m, deterministic) +} +func (dst *GetTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetTaskRequest.Merge(dst, src) +} +func (m *GetTaskRequest) XXX_Size() int { + return xxx_messageInfo_GetTaskRequest.Size(m) +} +func (m *GetTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetTaskRequest proto.InternalMessageInfo + +func (m *GetTaskRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *GetTaskRequest) GetResponseView() Task_View { + if m != nil { + return m.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +// Request message for [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. +type CreateTaskRequest struct { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // The queue must already exist. + Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"` + // Required. + // + // The task to add. + // + // Task names have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`. + // The user can optionally specify a task [name][google.cloud.tasks.v2beta2.Task.name]. If a + // name is not specified then the system will generate a random + // unique task id, which will be set in the task returned in the + // [response][google.cloud.tasks.v2beta2.Task.name]. + // + // If [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] is not set or is in the + // past then Cloud Tasks will set it to the current time. + // + // Task De-duplication: + // + // Explicitly specifying a task ID enables task de-duplication. If + // a task's ID is identical to that of an existing task or a task + // that was deleted or completed recently then the call will fail + // with [ALREADY_EXISTS][google.rpc.Code.ALREADY_EXISTS]. + // If the task's queue was created using Cloud Tasks, then another task with + // the same name can't be created for ~1hour after the original task was + // deleted or completed. If the task's queue was created using queue.yaml or + // queue.xml, then another task with the same name can't be created + // for ~9days after the original task was deleted or completed. + // + // Because there is an extra lookup cost to identify duplicate task + // names, these [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] calls have significantly + // increased latency. Using hashed strings for the task id or for + // the prefix of the task id is recommended. Choosing task ids that + // are sequential or have sequential prefixes, for example using a + // timestamp, causes an increase in latency and error rates in all + // task commands. The infrastructure relies on an approximately + // uniform distribution of task ids to store and serve tasks + // efficiently. + Task *Task `protobuf:"bytes,2,opt,name=task" json:"task,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,3,opt,name=response_view,json=responseView,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CreateTaskRequest) Reset() { *m = CreateTaskRequest{} } +func (m *CreateTaskRequest) String() string { return proto.CompactTextString(m) } +func (*CreateTaskRequest) ProtoMessage() {} +func (*CreateTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{12} +} +func (m *CreateTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateTaskRequest.Unmarshal(m, b) +} +func (m *CreateTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateTaskRequest.Marshal(b, m, deterministic) +} +func (dst *CreateTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateTaskRequest.Merge(dst, src) +} +func (m *CreateTaskRequest) XXX_Size() int { + return xxx_messageInfo_CreateTaskRequest.Size(m) +} +func (m *CreateTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateTaskRequest proto.InternalMessageInfo + +func (m *CreateTaskRequest) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *CreateTaskRequest) GetTask() *Task { + if m != nil { + return m.Task + } + return nil +} + +func (m *CreateTaskRequest) GetResponseView() Task_View { + if m != nil { + return m.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +// Request message for deleting a task using +// [DeleteTask][google.cloud.tasks.v2beta2.CloudTasks.DeleteTask]. +type DeleteTaskRequest struct { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *DeleteTaskRequest) Reset() { *m = DeleteTaskRequest{} } +func (m *DeleteTaskRequest) String() string { return proto.CompactTextString(m) } +func (*DeleteTaskRequest) ProtoMessage() {} +func (*DeleteTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{13} +} +func (m *DeleteTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_DeleteTaskRequest.Unmarshal(m, b) +} +func (m *DeleteTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_DeleteTaskRequest.Marshal(b, m, deterministic) +} +func (dst *DeleteTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_DeleteTaskRequest.Merge(dst, src) +} +func (m *DeleteTaskRequest) XXX_Size() int { + return xxx_messageInfo_DeleteTaskRequest.Size(m) +} +func (m *DeleteTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_DeleteTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_DeleteTaskRequest proto.InternalMessageInfo + +func (m *DeleteTaskRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Request message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. +type LeaseTasksRequest struct { + // Required. + // + // The queue name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"` + // The maximum number of tasks to lease. The maximum that can be + // requested is 1000. + MaxTasks int32 `protobuf:"varint,2,opt,name=max_tasks,json=maxTasks" json:"max_tasks,omitempty"` + // + // After the worker has successfully finished the work associated + // with the task, the worker must call via + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] before the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. Otherwise the task will be + // returned to a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] call so + // that another worker can retry it. + // + // The maximum lease duration is 1 week. + // `lease_duration` will be truncated to the nearest second. + LeaseDuration *duration.Duration `protobuf:"bytes,3,opt,name=lease_duration,json=leaseDuration" json:"lease_duration,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,4,opt,name=response_view,json=responseView,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` + // `filter` can be used to specify a subset of tasks to lease. + // + // When `filter` is set to `tag=<my-tag>` then the + // [response][google.cloud.tasks.v2beta2.LeaseTasksResponse] will contain only tasks whose + // [tag][google.cloud.tasks.v2beta2.PullMessage.tag] is equal to `<my-tag>`. `<my-tag>` must be + // less than 500 characters. + // + // When `filter` is set to `tag_function=oldest_tag()`, only tasks which have + // the same tag as the task with the oldest + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] will be returned. + // + // Grammar Syntax: + // + // * `filter = "tag=" tag | "tag_function=" function` + // + // * `tag = string` + // + // * `function = "oldest_tag()"` + // + // The `oldest_tag()` function returns tasks which have the same tag as the + // oldest task (ordered by schedule time). + // + // SDK compatibility: Although the SDK allows tags to be either + // string or + // [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + // only UTF-8 encoded tags can be used in Cloud Tasks. Tag which + // aren't UTF-8 encoded can't be used in the + // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter] and the task's + // [tag][google.cloud.tasks.v2beta2.PullMessage.tag] will be displayed as empty in Cloud Tasks. + Filter string `protobuf:"bytes,5,opt,name=filter" json:"filter,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LeaseTasksRequest) Reset() { *m = LeaseTasksRequest{} } +func (m *LeaseTasksRequest) String() string { return proto.CompactTextString(m) } +func (*LeaseTasksRequest) ProtoMessage() {} +func (*LeaseTasksRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{14} +} +func (m *LeaseTasksRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LeaseTasksRequest.Unmarshal(m, b) +} +func (m *LeaseTasksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LeaseTasksRequest.Marshal(b, m, deterministic) +} +func (dst *LeaseTasksRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_LeaseTasksRequest.Merge(dst, src) +} +func (m *LeaseTasksRequest) XXX_Size() int { + return xxx_messageInfo_LeaseTasksRequest.Size(m) +} +func (m *LeaseTasksRequest) XXX_DiscardUnknown() { + xxx_messageInfo_LeaseTasksRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_LeaseTasksRequest proto.InternalMessageInfo + +func (m *LeaseTasksRequest) GetParent() string { + if m != nil { + return m.Parent + } + return "" +} + +func (m *LeaseTasksRequest) GetMaxTasks() int32 { + if m != nil { + return m.MaxTasks + } + return 0 +} + +func (m *LeaseTasksRequest) GetLeaseDuration() *duration.Duration { + if m != nil { + return m.LeaseDuration + } + return nil +} + +func (m *LeaseTasksRequest) GetResponseView() Task_View { + if m != nil { + return m.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +func (m *LeaseTasksRequest) GetFilter() string { + if m != nil { + return m.Filter + } + return "" +} + +// Response message for leasing tasks using [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. +type LeaseTasksResponse struct { + // The leased tasks. + Tasks []*Task `protobuf:"bytes,1,rep,name=tasks" json:"tasks,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *LeaseTasksResponse) Reset() { *m = LeaseTasksResponse{} } +func (m *LeaseTasksResponse) String() string { return proto.CompactTextString(m) } +func (*LeaseTasksResponse) ProtoMessage() {} +func (*LeaseTasksResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{15} +} +func (m *LeaseTasksResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_LeaseTasksResponse.Unmarshal(m, b) +} +func (m *LeaseTasksResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_LeaseTasksResponse.Marshal(b, m, deterministic) +} +func (dst *LeaseTasksResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LeaseTasksResponse.Merge(dst, src) +} +func (m *LeaseTasksResponse) XXX_Size() int { + return xxx_messageInfo_LeaseTasksResponse.Size(m) +} +func (m *LeaseTasksResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LeaseTasksResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_LeaseTasksResponse proto.InternalMessageInfo + +func (m *LeaseTasksResponse) GetTasks() []*Task { + if m != nil { + return m.Tasks + } + return nil +} + +// Request message for acknowledging a task using +// [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask]. +type AcknowledgeTaskRequest struct { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Required. + // + // The task's current schedule time, available in the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + ScheduleTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=schedule_time,json=scheduleTime" json:"schedule_time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AcknowledgeTaskRequest) Reset() { *m = AcknowledgeTaskRequest{} } +func (m *AcknowledgeTaskRequest) String() string { return proto.CompactTextString(m) } +func (*AcknowledgeTaskRequest) ProtoMessage() {} +func (*AcknowledgeTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{16} +} +func (m *AcknowledgeTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AcknowledgeTaskRequest.Unmarshal(m, b) +} +func (m *AcknowledgeTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AcknowledgeTaskRequest.Marshal(b, m, deterministic) +} +func (dst *AcknowledgeTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AcknowledgeTaskRequest.Merge(dst, src) +} +func (m *AcknowledgeTaskRequest) XXX_Size() int { + return xxx_messageInfo_AcknowledgeTaskRequest.Size(m) +} +func (m *AcknowledgeTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AcknowledgeTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AcknowledgeTaskRequest proto.InternalMessageInfo + +func (m *AcknowledgeTaskRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *AcknowledgeTaskRequest) GetScheduleTime() *timestamp.Timestamp { + if m != nil { + return m.ScheduleTime + } + return nil +} + +// Request message for renewing a lease using +// [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease]. +type RenewLeaseRequest struct { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Required. + // + // The task's current schedule time, available in the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + ScheduleTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=schedule_time,json=scheduleTime" json:"schedule_time,omitempty"` + // Required. + // + // The desired new lease duration, starting from now. + // + // + // The maximum lease duration is 1 week. + // `lease_duration` will be truncated to the nearest second. + LeaseDuration *duration.Duration `protobuf:"bytes,3,opt,name=lease_duration,json=leaseDuration" json:"lease_duration,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,4,opt,name=response_view,json=responseView,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RenewLeaseRequest) Reset() { *m = RenewLeaseRequest{} } +func (m *RenewLeaseRequest) String() string { return proto.CompactTextString(m) } +func (*RenewLeaseRequest) ProtoMessage() {} +func (*RenewLeaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{17} +} +func (m *RenewLeaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RenewLeaseRequest.Unmarshal(m, b) +} +func (m *RenewLeaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RenewLeaseRequest.Marshal(b, m, deterministic) +} +func (dst *RenewLeaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RenewLeaseRequest.Merge(dst, src) +} +func (m *RenewLeaseRequest) XXX_Size() int { + return xxx_messageInfo_RenewLeaseRequest.Size(m) +} +func (m *RenewLeaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RenewLeaseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RenewLeaseRequest proto.InternalMessageInfo + +func (m *RenewLeaseRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *RenewLeaseRequest) GetScheduleTime() *timestamp.Timestamp { + if m != nil { + return m.ScheduleTime + } + return nil +} + +func (m *RenewLeaseRequest) GetLeaseDuration() *duration.Duration { + if m != nil { + return m.LeaseDuration + } + return nil +} + +func (m *RenewLeaseRequest) GetResponseView() Task_View { + if m != nil { + return m.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +// Request message for canceling a lease using +// [CancelLease][google.cloud.tasks.v2beta2.CloudTasks.CancelLease]. +type CancelLeaseRequest struct { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Required. + // + // The task's current schedule time, available in the + // [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] returned by + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] response or + // [RenewLease][google.cloud.tasks.v2beta2.CloudTasks.RenewLease] response. This restriction is + // to ensure that your worker currently holds the lease. + ScheduleTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=schedule_time,json=scheduleTime" json:"schedule_time,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,3,opt,name=response_view,json=responseView,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *CancelLeaseRequest) Reset() { *m = CancelLeaseRequest{} } +func (m *CancelLeaseRequest) String() string { return proto.CompactTextString(m) } +func (*CancelLeaseRequest) ProtoMessage() {} +func (*CancelLeaseRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{18} +} +func (m *CancelLeaseRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CancelLeaseRequest.Unmarshal(m, b) +} +func (m *CancelLeaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CancelLeaseRequest.Marshal(b, m, deterministic) +} +func (dst *CancelLeaseRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CancelLeaseRequest.Merge(dst, src) +} +func (m *CancelLeaseRequest) XXX_Size() int { + return xxx_messageInfo_CancelLeaseRequest.Size(m) +} +func (m *CancelLeaseRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CancelLeaseRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CancelLeaseRequest proto.InternalMessageInfo + +func (m *CancelLeaseRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *CancelLeaseRequest) GetScheduleTime() *timestamp.Timestamp { + if m != nil { + return m.ScheduleTime + } + return nil +} + +func (m *CancelLeaseRequest) GetResponseView() Task_View { + if m != nil { + return m.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +// Request message for forcing a task to run now using +// [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask]. +type RunTaskRequest struct { + // Required. + // + // The task name. For example: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // The response_view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] will be + // returned. + // + // By default response_view is [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC]; not all + // information is retrieved by default because some data, such as + // payloads, might be desirable to return only when needed because + // of its large size or because of the sensitivity of data that it + // contains. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](/iam/) permission on the + // [Task][google.cloud.tasks.v2beta2.Task] resource. + ResponseView Task_View `protobuf:"varint,2,opt,name=response_view,json=responseView,enum=google.cloud.tasks.v2beta2.Task_View" json:"response_view,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RunTaskRequest) Reset() { *m = RunTaskRequest{} } +func (m *RunTaskRequest) String() string { return proto.CompactTextString(m) } +func (*RunTaskRequest) ProtoMessage() {} +func (*RunTaskRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_cloudtasks_553b5bb5c78c1a10, []int{19} +} +func (m *RunTaskRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RunTaskRequest.Unmarshal(m, b) +} +func (m *RunTaskRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RunTaskRequest.Marshal(b, m, deterministic) +} +func (dst *RunTaskRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_RunTaskRequest.Merge(dst, src) +} +func (m *RunTaskRequest) XXX_Size() int { + return xxx_messageInfo_RunTaskRequest.Size(m) +} +func (m *RunTaskRequest) XXX_DiscardUnknown() { + xxx_messageInfo_RunTaskRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_RunTaskRequest proto.InternalMessageInfo + +func (m *RunTaskRequest) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *RunTaskRequest) GetResponseView() Task_View { + if m != nil { + return m.ResponseView + } + return Task_VIEW_UNSPECIFIED +} + +func init() { + proto.RegisterType((*ListQueuesRequest)(nil), "google.cloud.tasks.v2beta2.ListQueuesRequest") + proto.RegisterType((*ListQueuesResponse)(nil), "google.cloud.tasks.v2beta2.ListQueuesResponse") + proto.RegisterType((*GetQueueRequest)(nil), "google.cloud.tasks.v2beta2.GetQueueRequest") + proto.RegisterType((*CreateQueueRequest)(nil), "google.cloud.tasks.v2beta2.CreateQueueRequest") + proto.RegisterType((*UpdateQueueRequest)(nil), "google.cloud.tasks.v2beta2.UpdateQueueRequest") + proto.RegisterType((*DeleteQueueRequest)(nil), "google.cloud.tasks.v2beta2.DeleteQueueRequest") + proto.RegisterType((*PurgeQueueRequest)(nil), "google.cloud.tasks.v2beta2.PurgeQueueRequest") + proto.RegisterType((*PauseQueueRequest)(nil), "google.cloud.tasks.v2beta2.PauseQueueRequest") + proto.RegisterType((*ResumeQueueRequest)(nil), "google.cloud.tasks.v2beta2.ResumeQueueRequest") + proto.RegisterType((*ListTasksRequest)(nil), "google.cloud.tasks.v2beta2.ListTasksRequest") + proto.RegisterType((*ListTasksResponse)(nil), "google.cloud.tasks.v2beta2.ListTasksResponse") + proto.RegisterType((*GetTaskRequest)(nil), "google.cloud.tasks.v2beta2.GetTaskRequest") + proto.RegisterType((*CreateTaskRequest)(nil), "google.cloud.tasks.v2beta2.CreateTaskRequest") + proto.RegisterType((*DeleteTaskRequest)(nil), "google.cloud.tasks.v2beta2.DeleteTaskRequest") + proto.RegisterType((*LeaseTasksRequest)(nil), "google.cloud.tasks.v2beta2.LeaseTasksRequest") + proto.RegisterType((*LeaseTasksResponse)(nil), "google.cloud.tasks.v2beta2.LeaseTasksResponse") + proto.RegisterType((*AcknowledgeTaskRequest)(nil), "google.cloud.tasks.v2beta2.AcknowledgeTaskRequest") + proto.RegisterType((*RenewLeaseRequest)(nil), "google.cloud.tasks.v2beta2.RenewLeaseRequest") + proto.RegisterType((*CancelLeaseRequest)(nil), "google.cloud.tasks.v2beta2.CancelLeaseRequest") + proto.RegisterType((*RunTaskRequest)(nil), "google.cloud.tasks.v2beta2.RunTaskRequest") +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// CloudTasksClient is the client API for CloudTasks service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type CloudTasksClient interface { + // Lists queues. + // + // Queues are returned in lexicographical order. + ListQueues(ctx context.Context, in *ListQueuesRequest, opts ...grpc.CallOption) (*ListQueuesResponse, error) + // Gets a queue. + GetQueue(ctx context.Context, in *GetQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // 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](/cloud-tasks/docs/queue-yaml) + // before using this method. + CreateQueue(ctx context.Context, in *CreateQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // 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](/cloud-tasks/docs/queue-yaml) + // before using this method. + UpdateQueue(ctx context.Context, in *UpdateQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // 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](/cloud-tasks/docs/queue-yaml) + // before using this method. + DeleteQueue(ctx context.Context, in *DeleteQueueRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // 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. + PurgeQueue(ctx context.Context, in *PurgeQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Pauses the queue. + // + // If a queue is paused then the system will stop dispatching tasks + // until the queue is resumed via + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added + // when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + PauseQueue(ctx context.Context, in *PauseQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Resume a queue. + // + // This method resumes a queue after it has been + // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + // [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored + // in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it + // will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.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](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf). + ResumeQueue(ctx context.Context, in *ResumeQueueRequest, opts ...grpc.CallOption) (*Queue, error) + // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. + // Returns an empty policy if the resource exists and does not have a policy + // set. + // + // Authorization requires the following [Google IAM](/iam) permission on the + // specified resource parent: + // + // * `cloudtasks.queues.getIamPolicy` + GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.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](/iam) permission on the + // specified resource parent: + // + // * `cloudtasks.queues.setIamPolicy` + SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) + // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. + // If the resource does not exist, this will return an empty set of + // permissions, not a [NOT_FOUND][google.rpc.Code.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. + TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) + // Lists the tasks in a queue. + // + // By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + // due to performance considerations; + // [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the + // subset of information which is returned. + ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) + // Gets a task. + GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) + // Creates a task and adds it to a queue. + // + // To add multiple tasks at the same time, use + // [HTTP batching](/storage/docs/json_api/v1/how-tos/batch) + // or the batching documentation for your client library, for example + // https://developers.google.com/api-client-library/python/guide/batch. + // + // Tasks cannot be updated after creation; there is no UpdateTask command. + // + // * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + // the maximum task size is 100KB. + // * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this + // the maximum task size is 1MB. + CreateTask(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*Task, error) + // Deletes a task. + // + // A task can be deleted if it is scheduled or dispatched. A task + // cannot be deleted if it has completed successfully or permanently + // failed. + DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // Leases tasks from a pull queue for + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + // + // This method is invoked by the worker to obtain a lease. The + // worker must acknowledge the task via + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have + // performed the work associated with the task. + // + // The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that + // the worker needs to perform the work associated with the task. To + // return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + // [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to + // [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + // + // A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] + // requests are allowed per + // queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // is returned when this limit is + // exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // is also returned when + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + // is exceeded. + LeaseTasks(ctx context.Context, in *LeaseTasksRequest, opts ...grpc.CallOption) (*LeaseTasksResponse, error) + // Acknowledges a pull task. + // + // The worker, that is, the entity that + // [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method + // to indicate that the work associated with the task has finished. + // + // The worker must acknowledge a task within the + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease + // will expire and the task will become available to be leased + // again. After the task is acknowledged, it will not be returned + // by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + // [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + // + // To acknowledge multiple tasks at the same time, use + // [HTTP batching](/storage/docs/json_api/v1/how-tos/batch) + // or the batching documentation for your client library, for example + // https://developers.google.com/api-client-library/python/guide/batch. + AcknowledgeTask(ctx context.Context, in *AcknowledgeTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) + // Renew the current lease of a pull task. + // + // The worker can use this method to extend the lease by a new + // duration, starting from now. The new task lease will be + // returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*Task, error) + // Cancel a pull task's lease. + // + // The worker can use this method to cancel a task's lease by + // setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will + // make the task available to be leased to the next caller of + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + CancelLease(ctx context.Context, in *CancelLeaseRequest, opts ...grpc.CallOption) (*Task, error) + // 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][google.cloud.tasks.v2beta2.RateLimits] or + // is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + // + // This command is meant to be used for manual debugging. For + // example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.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][google.cloud.tasks.v2beta2.Task.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][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified + // in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + // + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + // task that has already succeeded or permanently failed. + // + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a + // [pull task][google.cloud.tasks.v2beta2.PullMessage]. + RunTask(ctx context.Context, in *RunTaskRequest, opts ...grpc.CallOption) (*Task, error) +} + +type cloudTasksClient struct { + cc *grpc.ClientConn +} + +func NewCloudTasksClient(cc *grpc.ClientConn) CloudTasksClient { + return &cloudTasksClient{cc} +} + +func (c *cloudTasksClient) ListQueues(ctx context.Context, in *ListQueuesRequest, opts ...grpc.CallOption) (*ListQueuesResponse, error) { + out := new(ListQueuesResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/ListQueues", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) GetQueue(ctx context.Context, in *GetQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/GetQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) CreateQueue(ctx context.Context, in *CreateQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/CreateQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) UpdateQueue(ctx context.Context, in *UpdateQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/UpdateQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) DeleteQueue(ctx context.Context, in *DeleteQueueRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/DeleteQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) PurgeQueue(ctx context.Context, in *PurgeQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/PurgeQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) PauseQueue(ctx context.Context, in *PauseQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/PauseQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) ResumeQueue(ctx context.Context, in *ResumeQueueRequest, opts ...grpc.CallOption) (*Queue, error) { + out := new(Queue) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/ResumeQueue", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/GetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) { + out := new(v1.Policy) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/SetIamPolicy", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) { + out := new(v1.TestIamPermissionsResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/TestIamPermissions", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error) { + out := new(ListTasksResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/ListTasks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) GetTask(ctx context.Context, in *GetTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/GetTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) CreateTask(ctx context.Context, in *CreateTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/CreateTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) DeleteTask(ctx context.Context, in *DeleteTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/DeleteTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) LeaseTasks(ctx context.Context, in *LeaseTasksRequest, opts ...grpc.CallOption) (*LeaseTasksResponse, error) { + out := new(LeaseTasksResponse) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/LeaseTasks", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) AcknowledgeTask(ctx context.Context, in *AcknowledgeTaskRequest, opts ...grpc.CallOption) (*empty.Empty, error) { + out := new(empty.Empty) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/AcknowledgeTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) RenewLease(ctx context.Context, in *RenewLeaseRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/RenewLease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) CancelLease(ctx context.Context, in *CancelLeaseRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/CancelLease", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *cloudTasksClient) RunTask(ctx context.Context, in *RunTaskRequest, opts ...grpc.CallOption) (*Task, error) { + out := new(Task) + err := c.cc.Invoke(ctx, "/google.cloud.tasks.v2beta2.CloudTasks/RunTask", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for CloudTasks service + +type CloudTasksServer interface { + // Lists queues. + // + // Queues are returned in lexicographical order. + ListQueues(context.Context, *ListQueuesRequest) (*ListQueuesResponse, error) + // Gets a queue. + GetQueue(context.Context, *GetQueueRequest) (*Queue, error) + // 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](/cloud-tasks/docs/queue-yaml) + // before using this method. + CreateQueue(context.Context, *CreateQueueRequest) (*Queue, error) + // 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](/cloud-tasks/docs/queue-yaml) + // before using this method. + UpdateQueue(context.Context, *UpdateQueueRequest) (*Queue, error) + // 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](/cloud-tasks/docs/queue-yaml) + // before using this method. + DeleteQueue(context.Context, *DeleteQueueRequest) (*empty.Empty, error) + // 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. + PurgeQueue(context.Context, *PurgeQueueRequest) (*Queue, error) + // Pauses the queue. + // + // If a queue is paused then the system will stop dispatching tasks + // until the queue is resumed via + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue]. Tasks can still be added + // when the queue is paused. A queue is paused if its + // [state][google.cloud.tasks.v2beta2.Queue.state] is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + PauseQueue(context.Context, *PauseQueueRequest) (*Queue, error) + // Resume a queue. + // + // This method resumes a queue after it has been + // [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED] or + // [DISABLED][google.cloud.tasks.v2beta2.Queue.State.DISABLED]. The state of a queue is stored + // in the queue's [state][google.cloud.tasks.v2beta2.Queue.state]; after calling this method it + // will be set to [RUNNING][google.cloud.tasks.v2beta2.Queue.State.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](/cloud-tasks/pdfs/managing-cloud-tasks-scaling-risks-2017-06-05.pdf). + ResumeQueue(context.Context, *ResumeQueueRequest) (*Queue, error) + // Gets the access control policy for a [Queue][google.cloud.tasks.v2beta2.Queue]. + // Returns an empty policy if the resource exists and does not have a policy + // set. + // + // Authorization requires the following [Google IAM](/iam) permission on the + // specified resource parent: + // + // * `cloudtasks.queues.getIamPolicy` + GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error) + // Sets the access control policy for a [Queue][google.cloud.tasks.v2beta2.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](/iam) permission on the + // specified resource parent: + // + // * `cloudtasks.queues.setIamPolicy` + SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error) + // Returns permissions that a caller has on a [Queue][google.cloud.tasks.v2beta2.Queue]. + // If the resource does not exist, this will return an empty set of + // permissions, not a [NOT_FOUND][google.rpc.Code.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. + TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error) + // Lists the tasks in a queue. + // + // By default, only the [BASIC][google.cloud.tasks.v2beta2.Task.View.BASIC] view is retrieved + // due to performance considerations; + // [response_view][google.cloud.tasks.v2beta2.ListTasksRequest.response_view] controls the + // subset of information which is returned. + ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) + // Gets a task. + GetTask(context.Context, *GetTaskRequest) (*Task, error) + // Creates a task and adds it to a queue. + // + // To add multiple tasks at the same time, use + // [HTTP batching](/storage/docs/json_api/v1/how-tos/batch) + // or the batching documentation for your client library, for example + // https://developers.google.com/api-client-library/python/guide/batch. + // + // Tasks cannot be updated after creation; there is no UpdateTask command. + // + // * For [App Engine queues](google.cloud.tasks.v2beta2.AppEngineHttpTarget), + // the maximum task size is 100KB. + // * For [pull queues](google.cloud.tasks.v2beta2.PullTarget), this + // the maximum task size is 1MB. + CreateTask(context.Context, *CreateTaskRequest) (*Task, error) + // Deletes a task. + // + // A task can be deleted if it is scheduled or dispatched. A task + // cannot be deleted if it has completed successfully or permanently + // failed. + DeleteTask(context.Context, *DeleteTaskRequest) (*empty.Empty, error) + // Leases tasks from a pull queue for + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + // + // This method is invoked by the worker to obtain a lease. The + // worker must acknowledge the task via + // [AcknowledgeTask][google.cloud.tasks.v2beta2.CloudTasks.AcknowledgeTask] after they have + // performed the work associated with the task. + // + // The [payload][google.cloud.tasks.v2beta2.PullMessage.payload] is intended to store data that + // the worker needs to perform the work associated with the task. To + // return the payloads in the [response][google.cloud.tasks.v2beta2.LeaseTasksResponse], set + // [response_view][google.cloud.tasks.v2beta2.LeaseTasksRequest.response_view] to + // [FULL][google.cloud.tasks.v2beta2.Task.View.FULL]. + // + // A maximum of 10 qps of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] + // requests are allowed per + // queue. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // is returned when this limit is + // exceeded. [RESOURCE_EXHAUSTED][google.rpc.Code.RESOURCE_EXHAUSTED] + // is also returned when + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + // is exceeded. + LeaseTasks(context.Context, *LeaseTasksRequest) (*LeaseTasksResponse, error) + // Acknowledges a pull task. + // + // The worker, that is, the entity that + // [leased][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] this task must call this method + // to indicate that the work associated with the task has finished. + // + // The worker must acknowledge a task within the + // [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration] or the lease + // will expire and the task will become available to be leased + // again. After the task is acknowledged, it will not be returned + // by a later [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks], + // [GetTask][google.cloud.tasks.v2beta2.CloudTasks.GetTask], or + // [ListTasks][google.cloud.tasks.v2beta2.CloudTasks.ListTasks]. + // + // To acknowledge multiple tasks at the same time, use + // [HTTP batching](/storage/docs/json_api/v1/how-tos/batch) + // or the batching documentation for your client library, for example + // https://developers.google.com/api-client-library/python/guide/batch. + AcknowledgeTask(context.Context, *AcknowledgeTaskRequest) (*empty.Empty, error) + // Renew the current lease of a pull task. + // + // The worker can use this method to extend the lease by a new + // duration, starting from now. The new task lease will be + // returned in the task's [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time]. + RenewLease(context.Context, *RenewLeaseRequest) (*Task, error) + // Cancel a pull task's lease. + // + // The worker can use this method to cancel a task's lease by + // setting its [schedule_time][google.cloud.tasks.v2beta2.Task.schedule_time] to now. This will + // make the task available to be leased to the next caller of + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks]. + CancelLease(context.Context, *CancelLeaseRequest) (*Task, error) + // 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][google.cloud.tasks.v2beta2.RateLimits] or + // is [PAUSED][google.cloud.tasks.v2beta2.Queue.State.PAUSED]. + // + // This command is meant to be used for manual debugging. For + // example, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.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][google.cloud.tasks.v2beta2.Task.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][google.cloud.tasks.v2beta2.Task.schedule_time] will be reset to the time that + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] was called plus the retry delay specified + // in the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig]. + // + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] returns + // [NOT_FOUND][google.rpc.Code.NOT_FOUND] when it is called on a + // task that has already succeeded or permanently failed. + // + // [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask] cannot be called on a + // [pull task][google.cloud.tasks.v2beta2.PullMessage]. + RunTask(context.Context, *RunTaskRequest) (*Task, error) +} + +func RegisterCloudTasksServer(s *grpc.Server, srv CloudTasksServer) { + s.RegisterService(&_CloudTasks_serviceDesc, srv) +} + +func _CloudTasks_ListQueues_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListQueuesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).ListQueues(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/ListQueues", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).ListQueues(ctx, req.(*ListQueuesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_GetQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).GetQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/GetQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).GetQueue(ctx, req.(*GetQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_CreateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).CreateQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/CreateQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).CreateQueue(ctx, req.(*CreateQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_UpdateQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdateQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).UpdateQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/UpdateQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).UpdateQueue(ctx, req.(*UpdateQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_DeleteQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).DeleteQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/DeleteQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).DeleteQueue(ctx, req.(*DeleteQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_PurgeQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PurgeQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).PurgeQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/PurgeQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).PurgeQueue(ctx, req.(*PurgeQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_PauseQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PauseQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).PauseQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/PauseQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).PauseQueue(ctx, req.(*PauseQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_ResumeQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ResumeQueueRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).ResumeQueue(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/ResumeQueue", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).ResumeQueue(ctx, req.(*ResumeQueueRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.GetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).GetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/GetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).GetIamPolicy(ctx, req.(*v1.GetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.SetIamPolicyRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).SetIamPolicy(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/SetIamPolicy", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).SetIamPolicy(ctx, req.(*v1.SetIamPolicyRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1.TestIamPermissionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).TestIamPermissions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/TestIamPermissions", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).TestIamPermissions(ctx, req.(*v1.TestIamPermissionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_ListTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).ListTasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/ListTasks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).ListTasks(ctx, req.(*ListTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).GetTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/GetTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).GetTask(ctx, req.(*GetTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_CreateTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).CreateTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/CreateTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).CreateTask(ctx, req.(*CreateTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_DeleteTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DeleteTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).DeleteTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/DeleteTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).DeleteTask(ctx, req.(*DeleteTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_LeaseTasks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(LeaseTasksRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).LeaseTasks(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/LeaseTasks", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).LeaseTasks(ctx, req.(*LeaseTasksRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_AcknowledgeTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AcknowledgeTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).AcknowledgeTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/AcknowledgeTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).AcknowledgeTask(ctx, req.(*AcknowledgeTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_RenewLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RenewLeaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).RenewLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/RenewLease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).RenewLease(ctx, req.(*RenewLeaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_CancelLease_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CancelLeaseRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).CancelLease(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/CancelLease", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).CancelLease(ctx, req.(*CancelLeaseRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _CloudTasks_RunTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RunTaskRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(CloudTasksServer).RunTask(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/google.cloud.tasks.v2beta2.CloudTasks/RunTask", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(CloudTasksServer).RunTask(ctx, req.(*RunTaskRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _CloudTasks_serviceDesc = grpc.ServiceDesc{ + ServiceName: "google.cloud.tasks.v2beta2.CloudTasks", + HandlerType: (*CloudTasksServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ListQueues", + Handler: _CloudTasks_ListQueues_Handler, + }, + { + MethodName: "GetQueue", + Handler: _CloudTasks_GetQueue_Handler, + }, + { + MethodName: "CreateQueue", + Handler: _CloudTasks_CreateQueue_Handler, + }, + { + MethodName: "UpdateQueue", + Handler: _CloudTasks_UpdateQueue_Handler, + }, + { + MethodName: "DeleteQueue", + Handler: _CloudTasks_DeleteQueue_Handler, + }, + { + MethodName: "PurgeQueue", + Handler: _CloudTasks_PurgeQueue_Handler, + }, + { + MethodName: "PauseQueue", + Handler: _CloudTasks_PauseQueue_Handler, + }, + { + MethodName: "ResumeQueue", + Handler: _CloudTasks_ResumeQueue_Handler, + }, + { + MethodName: "GetIamPolicy", + Handler: _CloudTasks_GetIamPolicy_Handler, + }, + { + MethodName: "SetIamPolicy", + Handler: _CloudTasks_SetIamPolicy_Handler, + }, + { + MethodName: "TestIamPermissions", + Handler: _CloudTasks_TestIamPermissions_Handler, + }, + { + MethodName: "ListTasks", + Handler: _CloudTasks_ListTasks_Handler, + }, + { + MethodName: "GetTask", + Handler: _CloudTasks_GetTask_Handler, + }, + { + MethodName: "CreateTask", + Handler: _CloudTasks_CreateTask_Handler, + }, + { + MethodName: "DeleteTask", + Handler: _CloudTasks_DeleteTask_Handler, + }, + { + MethodName: "LeaseTasks", + Handler: _CloudTasks_LeaseTasks_Handler, + }, + { + MethodName: "AcknowledgeTask", + Handler: _CloudTasks_AcknowledgeTask_Handler, + }, + { + MethodName: "RenewLease", + Handler: _CloudTasks_RenewLease_Handler, + }, + { + MethodName: "CancelLease", + Handler: _CloudTasks_CancelLease_Handler, + }, + { + MethodName: "RunTask", + Handler: _CloudTasks_RunTask_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "google/cloud/tasks/v2beta2/cloudtasks.proto", +} + +func init() { + proto.RegisterFile("google/cloud/tasks/v2beta2/cloudtasks.proto", fileDescriptor_cloudtasks_553b5bb5c78c1a10) +} + +var fileDescriptor_cloudtasks_553b5bb5c78c1a10 = []byte{ + // 1383 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x98, 0xcf, 0x6f, 0x1b, 0x45, + 0x14, 0xc7, 0x35, 0x6d, 0xd2, 0x36, 0xcf, 0x4d, 0x82, 0x47, 0xa2, 0x4a, 0x5d, 0x28, 0x61, 0xa4, + 0xb6, 0xc6, 0xa5, 0x5e, 0xd5, 0xd0, 0x96, 0x3a, 0xb4, 0x4d, 0x9d, 0x34, 0x29, 0x34, 0x45, 0xe9, + 0x26, 0x70, 0xe0, 0x62, 0x6d, 0xec, 0x89, 0x59, 0xb2, 0x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xbe, 0x94, 0xb5, 0x64, + 0x4a, 0x53, 0x55, 0xea, 0x45, 0xcd, 0x05, 0x00, 0xb9, 0xf6, 0xc5, 0x9f, 0x7f, 0x3d, 0x3e, 0x72, + 0x19, 0x2b, 0x7d, 0xc5, 0xf9, 0x99, 0x78, 0x39, 0x6e, 0x38, 0xae, 0xfd, 0x29, 0xed, 0xf8, 0x9e, + 0x52, 0x53, 0x0c, 0xbb, 0x23, 0x84, 0xad, 0x52, 0xdb, 0x55, 0xa4, 0xfe, 0x79, 0x8c, 0xe0, 0x44, + 0x28, 0x6c, 0xf0, 0xc5, 0x2c, 0xaf, 0x09, 0xf9, 0x53, 0xc9, 0x57, 0x17, 0xfb, 0x51, 0xb1, 0xb0, + 0x0f, 0x60, 0x92, 0x48, 0x4a, 0x6d, 0x17, 0x7f, 0x8f, 0xa0, 0x14, 0xd3, 0x51, 0x38, 0x33, 0x1c, + 0x69, 0xc1, 0x55, 0x84, 0xed, 0x26, 0x67, 0x7b, 0x87, 0x1c, 0x34, 0x62, 0x4d, 0x29, 0x99, 0x7e, + 0x46, 0x50, 0x8a, 0x49, 0xb0, 0x6c, 0xc4, 0xb4, 0x56, 0x2b, 0x82, 0x38, 0xcf, 0x11, 0x6f, 0x36, + 0xae, 0x44, 0x88, 0xa2, 0xde, 0x28, 0x14, 0xc4, 0x10, 0xf4, 0x2b, 0x04, 0xa5, 0x98, 0x3e, 0xcb, + 0x06, 0x4d, 0x0b, 0xb9, 0xca, 0xa9, 0x54, 0xfe, 0xde, 0x61, 0x45, 0x45, 0x78, 0xb8, 0xb5, 0x61, + 0x0e, 0x17, 0x22, 0x19, 0x98, 0x9d, 0x19, 0x29, 0xb9, 0x58, 0x24, 0x6e, 0xb3, 0x9c, 0xac, 0x49, + 0xae, 0x1c, 0x90, 0xac, 0xe9, 0x30, 0x6f, 0x4d, 0x54, 0x13, 0x88, 0x7d, 0x01, 0x9a, 0x83, 0x98, + 0x14, 0xaa, 0x87, 0x8b, 0xc8, 0x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a, 0x66, 0xd7, 0x71, 0x19, 0x7d, 0x7c, 0x4b, 0x9a, 0xf7, 0x6c, 0x43, 0xb3, 0x7a, + 0x75, 0xdb, 0xed, 0x29, 0x3d, 0x6a, 0xf1, 0xcb, 0xaa, 0x88, 0x21, 0xcd, 0xd1, 0xbd, 0xfd, 0x7e, + 0x45, 0x9f, 0xe1, 0xad, 0xb5, 0x63, 0xdc, 0xf6, 0xad, 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0xc6, + 0x8e, 0x27, 0x27, 0xff, 0x17, 0x00, 0x00, +} diff --git a/googleapis/cloud/tasks/v2beta2/queue.pb.go b/googleapis/cloud/tasks/v2beta2/queue.pb.go new file mode 100644 index 00000000..c9bcef2f --- /dev/null +++ b/googleapis/cloud/tasks/v2beta2/queue.pb.go @@ -0,0 +1,783 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/cloud/tasks/v2beta2/queue.proto + +package tasks // import "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import duration "github.com/golang/protobuf/ptypes/duration" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" +import _ "google.golang.org/genproto/googleapis/api/annotations" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +// State of the queue. +type Queue_State int32 + +const ( + // Unspecified state. + Queue_STATE_UNSPECIFIED Queue_State = 0 + // The queue is running. Tasks can be dispatched. + // + // If the queue was created using Cloud Tasks and the queue has + // had no activity (method calls or task dispatches) for 30 days, + // the queue may take a few minutes to re-activate. Some method + // calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and + // tasks may not be dispatched for a few minutes until the queue + // has been re-activated. + Queue_RUNNING Queue_State = 1 + // Tasks are paused by the user. If the queue is paused then Cloud + // Tasks will stop delivering tasks from it, but more tasks can + // still be added to it by the user. When a pull queue is paused, + // all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls will return a + // [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION]. + Queue_PAUSED Queue_State = 2 + // The queue is disabled. + // + // A queue becomes `DISABLED` when + // [queue.yaml](/appengine/docs/python/config/queueref) or + // [queue.xml](appengine/docs/standard/java/config/queueref) is uploaded + // which does not contain the queue. You cannot directly disable a queue. + // + // When a queue is disabled, tasks can still be added to a queue + // but the tasks are not dispatched and + // [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls return a + // `FAILED_PRECONDITION` error. + // + // To permanently delete this queue and all of its tasks, call + // [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue]. + Queue_DISABLED Queue_State = 3 +) + +var Queue_State_name = map[int32]string{ + 0: "STATE_UNSPECIFIED", + 1: "RUNNING", + 2: "PAUSED", + 3: "DISABLED", +} +var Queue_State_value = map[string]int32{ + "STATE_UNSPECIFIED": 0, + "RUNNING": 1, + "PAUSED": 2, + "DISABLED": 3, +} + +func (x Queue_State) String() string { + return proto.EnumName(Queue_State_name, int32(x)) +} +func (Queue_State) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_queue_fcad6349d23af99b, []int{0, 0} +} + +// A queue is a container of related tasks. Queues are configured to manage +// how those tasks are dispatched. Configurable properties include rate limits, +// retry options, target types, and others. +type Queue struct { + // The queue name. + // + // The queue name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID` + // + // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects) + // * `LOCATION_ID` is the canonical ID for the queue's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + // + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue], + // after which it becomes output only. + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // The queue's target. + // + // The target applies to all tasks in the queue. + // + // Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue][], + // after which the queue config type becomes output only, though fields within + // the config are mutable. + // + // Types that are valid to be assigned to TargetType: + // *Queue_AppEngineHttpTarget + // *Queue_PullTarget + TargetType isQueue_TargetType `protobuf_oneof:"target_type"` + // Rate limits for task dispatches. + // + // [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and + // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both + // control task attempts however they control how tasks are + // attempted in different ways: + // + // * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of + // dispatches from a queue (i.e. all traffic dispatched from the + // queue, regardless of whether the dispatch is from a first + // attempt or a retry). + // * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to + // particular a task after its first attempt fails. That is, + // [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the + // second attempt, third attempt, etc). + RateLimits *RateLimits `protobuf:"bytes,5,opt,name=rate_limits,json=rateLimits" json:"rate_limits,omitempty"` + // Settings that determine the retry behavior. + // + // * For tasks created using Cloud Tasks: the queue-level retry settings + // apply to all tasks in the queue that were created using Cloud Tasks. + // Retry settings cannot be set on individual tasks. + // * For tasks created using the App Engine SDK: the queue-level retry + // settings apply to all tasks in the queue which do not have retry settings + // explicitly set on the task and were created by the App Engine SDK. See + // [App Engine documentation](/appengine/docs/standard/python/taskqueue/push/retrying-tasks). + RetryConfig *RetryConfig `protobuf:"bytes,6,opt,name=retry_config,json=retryConfig" json:"retry_config,omitempty"` + // Output only. The state of the queue. + // + // `state` can only be changed by called + // [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue], + // [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading + // [queue.yaml/xml](/appengine/docs/python/config/queueref). + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`. + State Queue_State `protobuf:"varint,7,opt,name=state,enum=google.cloud.tasks.v2beta2.Queue_State" json:"state,omitempty"` + // Output only. The last time this queue was purged. + // + // All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time + // were purged. + // + // A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the + // [App Engine Task Queue SDK, or the Cloud Console](/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue). + // + // Purge time will be truncated to the nearest microsecond. Purge + // time will be unset if the queue has never been purged. + PurgeTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=purge_time,json=purgeTime" json:"purge_time,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Queue) Reset() { *m = Queue{} } +func (m *Queue) String() string { return proto.CompactTextString(m) } +func (*Queue) ProtoMessage() {} +func (*Queue) Descriptor() ([]byte, []int) { + return fileDescriptor_queue_fcad6349d23af99b, []int{0} +} +func (m *Queue) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Queue.Unmarshal(m, b) +} +func (m *Queue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Queue.Marshal(b, m, deterministic) +} +func (dst *Queue) XXX_Merge(src proto.Message) { + xxx_messageInfo_Queue.Merge(dst, src) +} +func (m *Queue) XXX_Size() int { + return xxx_messageInfo_Queue.Size(m) +} +func (m *Queue) XXX_DiscardUnknown() { + xxx_messageInfo_Queue.DiscardUnknown(m) +} + +var xxx_messageInfo_Queue proto.InternalMessageInfo + +type isQueue_TargetType interface { + isQueue_TargetType() +} + +type Queue_AppEngineHttpTarget struct { + AppEngineHttpTarget *AppEngineHttpTarget `protobuf:"bytes,3,opt,name=app_engine_http_target,json=appEngineHttpTarget,oneof"` +} +type Queue_PullTarget struct { + PullTarget *PullTarget `protobuf:"bytes,4,opt,name=pull_target,json=pullTarget,oneof"` +} + +func (*Queue_AppEngineHttpTarget) isQueue_TargetType() {} +func (*Queue_PullTarget) isQueue_TargetType() {} + +func (m *Queue) GetTargetType() isQueue_TargetType { + if m != nil { + return m.TargetType + } + return nil +} + +func (m *Queue) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Queue) GetAppEngineHttpTarget() *AppEngineHttpTarget { + if x, ok := m.GetTargetType().(*Queue_AppEngineHttpTarget); ok { + return x.AppEngineHttpTarget + } + return nil +} + +func (m *Queue) GetPullTarget() *PullTarget { + if x, ok := m.GetTargetType().(*Queue_PullTarget); ok { + return x.PullTarget + } + return nil +} + +func (m *Queue) GetRateLimits() *RateLimits { + if m != nil { + return m.RateLimits + } + return nil +} + +func (m *Queue) GetRetryConfig() *RetryConfig { + if m != nil { + return m.RetryConfig + } + return nil +} + +func (m *Queue) GetState() Queue_State { + if m != nil { + return m.State + } + return Queue_STATE_UNSPECIFIED +} + +func (m *Queue) GetPurgeTime() *timestamp.Timestamp { + if m != nil { + return m.PurgeTime + } + return nil +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Queue) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Queue_OneofMarshaler, _Queue_OneofUnmarshaler, _Queue_OneofSizer, []interface{}{ + (*Queue_AppEngineHttpTarget)(nil), + (*Queue_PullTarget)(nil), + } +} + +func _Queue_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Queue) + // target_type + switch x := m.TargetType.(type) { + case *Queue_AppEngineHttpTarget: + b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.AppEngineHttpTarget); err != nil { + return err + } + case *Queue_PullTarget: + b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.PullTarget); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Queue.TargetType has unexpected type %T", x) + } + return nil +} + +func _Queue_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Queue) + switch tag { + case 3: // target_type.app_engine_http_target + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(AppEngineHttpTarget) + err := b.DecodeMessage(msg) + m.TargetType = &Queue_AppEngineHttpTarget{msg} + return true, err + case 4: // target_type.pull_target + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(PullTarget) + err := b.DecodeMessage(msg) + m.TargetType = &Queue_PullTarget{msg} + return true, err + default: + return false, nil + } +} + +func _Queue_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Queue) + // target_type + switch x := m.TargetType.(type) { + case *Queue_AppEngineHttpTarget: + s := proto.Size(x.AppEngineHttpTarget) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *Queue_PullTarget: + s := proto.Size(x.PullTarget) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// Rate limits. +// +// This message determines the maximum rate that tasks can be dispatched by a +// queue, regardless of whether the dispatch is a first task attempt or a retry. +// +// Note: The debugging command, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task +// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits]. +type RateLimits struct { + // The maximum rate at which tasks are dispatched from this queue. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // * For App Engine queues, the maximum allowed value is 500. + // * This field is output only for [pull queues](google.cloud.tasks.v2beta2.PullTarget). In + // addition to the `max_tasks_dispatched_per_second` limit, a + // maximum of 10 QPS of [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] + // requests are allowed per pull queue. + // + // + // This field has the same meaning as + // [rate in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#rate). + MaxTasksDispatchedPerSecond float64 `protobuf:"fixed64,1,opt,name=max_tasks_dispatched_per_second,json=maxTasksDispatchedPerSecond" json:"max_tasks_dispatched_per_second,omitempty"` + // Output only. The max burst size. + // + // Max burst size limits how fast tasks in queue are processed when + // many tasks are in the queue and the rate is high. This field + // allows the queue to have a high rate so processing starts shortly + // after a task is enqueued, but still limits resource usage when + // many tasks are enqueued in a short period of time. + // + // The [token bucket](https://wikipedia.org/wiki/Token_Bucket) + // algorithm is used to control the rate of task dispatches. Each + // queue has a token bucket that holds tokens, up to the maximum + // specified by `max_burst_size`. Each time a task is dispatched, a + // token is removed from the bucket. Tasks will be dispatched until + // the queue's bucket runs out of tokens. The bucket will be + // continuously refilled with new tokens based on + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]. + // + // Cloud Tasks will pick the value of `max_burst_size` based on the + // value of + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]. + // + // For App Engine queues that were created or updated using + // `queue.yaml/xml`, `max_burst_size` is equal to + // [bucket_size](/appengine/docs/standard/python/config/queueref#bucket_size). + // Since `max_burst_size` is output only, if + // [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue + // created by `queue.yaml/xml`, `max_burst_size` will be reset based + // on the value of + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second], + // regardless of whether + // [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second] + // is updated. + // + MaxBurstSize int32 `protobuf:"varint,2,opt,name=max_burst_size,json=maxBurstSize" json:"max_burst_size,omitempty"` + // The maximum number of concurrent tasks that Cloud Tasks allows + // to be dispatched for this queue. After this threshold has been + // reached, Cloud Tasks stops dispatching tasks until the number of + // concurrent requests decreases. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // + // The maximum allowed value is 5,000. + // + // This field is output only for + // [pull queues](google.cloud.tasks.v2beta2.PullTarget) and always -1, which + // indicates no limit. No other queue types can have `max_concurrent_tasks` + // set to -1. + // + // + // This field has the same meaning as + // [max_concurrent_requests in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#max_concurrent_requests). + MaxConcurrentTasks int32 `protobuf:"varint,3,opt,name=max_concurrent_tasks,json=maxConcurrentTasks" json:"max_concurrent_tasks,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RateLimits) Reset() { *m = RateLimits{} } +func (m *RateLimits) String() string { return proto.CompactTextString(m) } +func (*RateLimits) ProtoMessage() {} +func (*RateLimits) Descriptor() ([]byte, []int) { + return fileDescriptor_queue_fcad6349d23af99b, []int{1} +} +func (m *RateLimits) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RateLimits.Unmarshal(m, b) +} +func (m *RateLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RateLimits.Marshal(b, m, deterministic) +} +func (dst *RateLimits) XXX_Merge(src proto.Message) { + xxx_messageInfo_RateLimits.Merge(dst, src) +} +func (m *RateLimits) XXX_Size() int { + return xxx_messageInfo_RateLimits.Size(m) +} +func (m *RateLimits) XXX_DiscardUnknown() { + xxx_messageInfo_RateLimits.DiscardUnknown(m) +} + +var xxx_messageInfo_RateLimits proto.InternalMessageInfo + +func (m *RateLimits) GetMaxTasksDispatchedPerSecond() float64 { + if m != nil { + return m.MaxTasksDispatchedPerSecond + } + return 0 +} + +func (m *RateLimits) GetMaxBurstSize() int32 { + if m != nil { + return m.MaxBurstSize + } + return 0 +} + +func (m *RateLimits) GetMaxConcurrentTasks() int32 { + if m != nil { + return m.MaxConcurrentTasks + } + return 0 +} + +// Retry config. +// +// These settings determine how a failed task attempt is retried. +type RetryConfig struct { + // Number of attempts per task. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // + // + // This field has the same meaning as + // [task_retry_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + // + // Types that are valid to be assigned to NumAttempts: + // *RetryConfig_MaxAttempts + // *RetryConfig_UnlimitedAttempts + NumAttempts isRetryConfig_NumAttempts `protobuf_oneof:"num_attempts"` + // If positive, `max_retry_duration` specifies the time limit for + // retrying a failed task, measured from when the task was first + // attempted. Once `max_retry_duration` time has passed *and* the + // task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] + // times, no further attempts will be made and the task will be + // deleted. + // + // If zero, then the task age is unlimited. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for + // [pull queues](google.cloud.tasks.v2beta2.PullTarget). + // + // + // `max_retry_duration` will be truncated to the nearest second. + // + // This field has the same meaning as + // [task_age_limit in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + MaxRetryDuration *duration.Duration `protobuf:"bytes,3,opt,name=max_retry_duration,json=maxRetryDuration" json:"max_retry_duration,omitempty"` + // A task will be [scheduled](Task.schedule_time) for retry between + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for + // [pull queues](google.cloud.tasks.v2beta2.PullTarget). + // + // + // `min_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [min_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + MinBackoff *duration.Duration `protobuf:"bytes,4,opt,name=min_backoff,json=minBackoff" json:"min_backoff,omitempty"` + // A task will be [scheduled](Task.schedule_time) for retry between + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails, + // if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be + // retried. + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for + // [pull queues](google.cloud.tasks.v2beta2.PullTarget). + // + // + // `max_backoff` will be truncated to the nearest second. + // + // This field has the same meaning as + // [max_backoff_seconds in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + MaxBackoff *duration.Duration `protobuf:"bytes,5,opt,name=max_backoff,json=maxBackoff" json:"max_backoff,omitempty"` + // The time between retries will double `max_doublings` times. + // + // A task's retry interval starts at + // [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles + // `max_doublings` times, then increases linearly, and finally + // retries retries at intervals of + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to + // [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times. + // + // For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s, + // [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and + // `max_doublings` is 3, then the a task will first be retried in + // 10s. The retry interval will double three times, and then + // increase linearly by 2^3 * 10s. Finally, the task will retry at + // intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the + // task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] + // times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s, + // 240s, 300s, 300s, .... + // + // If unspecified when the queue is created, Cloud Tasks will pick the + // default. + // + // This field is output only for + // [pull queues](google.cloud.tasks.v2beta2.PullTarget). + // + // + // This field has the same meaning as + // [max_doublings in queue.yaml/xml](/appengine/docs/standard/python/config/queueref#retry_parameters). + MaxDoublings int32 `protobuf:"varint,6,opt,name=max_doublings,json=maxDoublings" json:"max_doublings,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *RetryConfig) Reset() { *m = RetryConfig{} } +func (m *RetryConfig) String() string { return proto.CompactTextString(m) } +func (*RetryConfig) ProtoMessage() {} +func (*RetryConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_queue_fcad6349d23af99b, []int{2} +} +func (m *RetryConfig) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_RetryConfig.Unmarshal(m, b) +} +func (m *RetryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_RetryConfig.Marshal(b, m, deterministic) +} +func (dst *RetryConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_RetryConfig.Merge(dst, src) +} +func (m *RetryConfig) XXX_Size() int { + return xxx_messageInfo_RetryConfig.Size(m) +} +func (m *RetryConfig) XXX_DiscardUnknown() { + xxx_messageInfo_RetryConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_RetryConfig proto.InternalMessageInfo + +type isRetryConfig_NumAttempts interface { + isRetryConfig_NumAttempts() +} + +type RetryConfig_MaxAttempts struct { + MaxAttempts int32 `protobuf:"varint,1,opt,name=max_attempts,json=maxAttempts,oneof"` +} +type RetryConfig_UnlimitedAttempts struct { + UnlimitedAttempts bool `protobuf:"varint,2,opt,name=unlimited_attempts,json=unlimitedAttempts,oneof"` +} + +func (*RetryConfig_MaxAttempts) isRetryConfig_NumAttempts() {} +func (*RetryConfig_UnlimitedAttempts) isRetryConfig_NumAttempts() {} + +func (m *RetryConfig) GetNumAttempts() isRetryConfig_NumAttempts { + if m != nil { + return m.NumAttempts + } + return nil +} + +func (m *RetryConfig) GetMaxAttempts() int32 { + if x, ok := m.GetNumAttempts().(*RetryConfig_MaxAttempts); ok { + return x.MaxAttempts + } + return 0 +} + +func (m *RetryConfig) GetUnlimitedAttempts() bool { + if x, ok := m.GetNumAttempts().(*RetryConfig_UnlimitedAttempts); ok { + return x.UnlimitedAttempts + } + return false +} + +func (m *RetryConfig) GetMaxRetryDuration() *duration.Duration { + if m != nil { + return m.MaxRetryDuration + } + return nil +} + +func (m *RetryConfig) GetMinBackoff() *duration.Duration { + if m != nil { + return m.MinBackoff + } + return nil +} + +func (m *RetryConfig) GetMaxBackoff() *duration.Duration { + if m != nil { + return m.MaxBackoff + } + return nil +} + +func (m *RetryConfig) GetMaxDoublings() int32 { + if m != nil { + return m.MaxDoublings + } + return 0 +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*RetryConfig) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _RetryConfig_OneofMarshaler, _RetryConfig_OneofUnmarshaler, _RetryConfig_OneofSizer, []interface{}{ + (*RetryConfig_MaxAttempts)(nil), + (*RetryConfig_UnlimitedAttempts)(nil), + } +} + +func _RetryConfig_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*RetryConfig) + // num_attempts + switch x := m.NumAttempts.(type) { + case *RetryConfig_MaxAttempts: + b.EncodeVarint(1<<3 | proto.WireVarint) + b.EncodeVarint(uint64(x.MaxAttempts)) + case *RetryConfig_UnlimitedAttempts: + t := uint64(0) + if x.UnlimitedAttempts { + t = 1 + } + b.EncodeVarint(2<<3 | proto.WireVarint) + b.EncodeVarint(t) + case nil: + default: + return fmt.Errorf("RetryConfig.NumAttempts has unexpected type %T", x) + } + return nil +} + +func _RetryConfig_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*RetryConfig) + switch tag { + case 1: // num_attempts.max_attempts + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.NumAttempts = &RetryConfig_MaxAttempts{int32(x)} + return true, err + case 2: // num_attempts.unlimited_attempts + if wire != proto.WireVarint { + return true, proto.ErrInternalBadWireType + } + x, err := b.DecodeVarint() + m.NumAttempts = &RetryConfig_UnlimitedAttempts{x != 0} + return true, err + default: + return false, nil + } +} + +func _RetryConfig_OneofSizer(msg proto.Message) (n int) { + m := msg.(*RetryConfig) + // num_attempts + switch x := m.NumAttempts.(type) { + case *RetryConfig_MaxAttempts: + n += 1 // tag and wire + n += proto.SizeVarint(uint64(x.MaxAttempts)) + case *RetryConfig_UnlimitedAttempts: + n += 1 // tag and wire + n += 1 + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +func init() { + proto.RegisterType((*Queue)(nil), "google.cloud.tasks.v2beta2.Queue") + proto.RegisterType((*RateLimits)(nil), "google.cloud.tasks.v2beta2.RateLimits") + proto.RegisterType((*RetryConfig)(nil), "google.cloud.tasks.v2beta2.RetryConfig") + proto.RegisterEnum("google.cloud.tasks.v2beta2.Queue_State", Queue_State_name, Queue_State_value) +} + +func init() { + proto.RegisterFile("google/cloud/tasks/v2beta2/queue.proto", fileDescriptor_queue_fcad6349d23af99b) +} + +var fileDescriptor_queue_fcad6349d23af99b = []byte{ + // 702 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xcb, 0x6e, 0xdb, 0x3a, + 0x10, 0x86, 0xad, 0x24, 0xca, 0x65, 0xe4, 0x04, 0x0e, 0xcf, 0x05, 0x3e, 0x3e, 0x45, 0x62, 0x38, + 0x45, 0xe2, 0x95, 0x54, 0xa4, 0xab, 0xb6, 0x28, 0x0a, 0x3b, 0x72, 0x63, 0x17, 0x81, 0xe1, 0xca, + 0xce, 0xa6, 0x1b, 0x82, 0x96, 0x69, 0x45, 0x88, 0x44, 0xb2, 0x12, 0x55, 0x38, 0x79, 0xa4, 0x6e, + 0xfb, 0x34, 0x7d, 0x9b, 0x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e, 0xc0, 0xbe, 0xd2, 0x2e, 0x78, 0x36, 0x8f, + 0x42, 0x16, 0xa4, 0x7a, 0xe1, 0xf3, 0xdb, 0x77, 0xcb, 0x58, 0xff, 0x00, 0xea, 0x2c, 0x8b, 0xab, + 0x0b, 0xe9, 0x73, 0x38, 0xf2, 0x79, 0xbc, 0x66, 0x9d, 0xfb, 0xa0, 0xf7, 0x79, 0xa2, 0x4a, 0x4f, + 0x8c, 0x4f, 0xef, 0x0a, 0x32, 0xe0, 0x11, 0x61, 0x81, 0xcd, 0x93, 0xc0, 0x09, 0x28, 0xd3, 0x8d, + 0x39, 0x79, 0x8a, 0x88, 0x30, 0xfd, 0xdd, 0xff, 0xde, 0x1b, 0x7d, 0x9a, 0x6f, 0x6b, 0xf6, 0xe5, + 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xd1, 0xaa, 0xde, 0x84, 0x05, 0x00, 0x00, +} diff --git a/googleapis/cloud/tasks/v2beta2/target.pb.go b/googleapis/cloud/tasks/v2beta2/target.pb.go new file mode 100644 index 00000000..5cee2df3 --- /dev/null +++ b/googleapis/cloud/tasks/v2beta2/target.pb.go @@ -0,0 +1,632 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/cloud/tasks/v2beta2/target.proto + +package tasks // import "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/golang/protobuf/ptypes/duration" +import _ "google.golang.org/genproto/googleapis/api/annotations" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +// The HTTP method used to execute the task. +type HttpMethod int32 + +const ( + // HTTP method unspecified + HttpMethod_HTTP_METHOD_UNSPECIFIED HttpMethod = 0 + // HTTP Post + HttpMethod_POST HttpMethod = 1 + // HTTP Get + HttpMethod_GET HttpMethod = 2 + // HTTP Head + HttpMethod_HEAD HttpMethod = 3 + // HTTP Put + HttpMethod_PUT HttpMethod = 4 + // HTTP Delete + HttpMethod_DELETE HttpMethod = 5 +) + +var HttpMethod_name = map[int32]string{ + 0: "HTTP_METHOD_UNSPECIFIED", + 1: "POST", + 2: "GET", + 3: "HEAD", + 4: "PUT", + 5: "DELETE", +} +var HttpMethod_value = map[string]int32{ + "HTTP_METHOD_UNSPECIFIED": 0, + "POST": 1, + "GET": 2, + "HEAD": 3, + "PUT": 4, + "DELETE": 5, +} + +func (x HttpMethod) String() string { + return proto.EnumName(HttpMethod_name, int32(x)) +} +func (HttpMethod) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_target_e86c4298963e6a5c, []int{0} +} + +// Pull target. +type PullTarget struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PullTarget) Reset() { *m = PullTarget{} } +func (m *PullTarget) String() string { return proto.CompactTextString(m) } +func (*PullTarget) ProtoMessage() {} +func (*PullTarget) Descriptor() ([]byte, []int) { + return fileDescriptor_target_e86c4298963e6a5c, []int{0} +} +func (m *PullTarget) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullTarget.Unmarshal(m, b) +} +func (m *PullTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullTarget.Marshal(b, m, deterministic) +} +func (dst *PullTarget) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullTarget.Merge(dst, src) +} +func (m *PullTarget) XXX_Size() int { + return xxx_messageInfo_PullTarget.Size(m) +} +func (m *PullTarget) XXX_DiscardUnknown() { + xxx_messageInfo_PullTarget.DiscardUnknown(m) +} + +var xxx_messageInfo_PullTarget proto.InternalMessageInfo + +// The pull message contains data that can be used by the caller of +// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task. +// +// This proto can only be used for tasks in a queue which has +// [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set. +type PullMessage struct { + // A data payload consumed by the worker to execute the task. + Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` + // The task's tag. + // + // Tags allow similar tasks to be processed in a batch. If you label + // tasks with a tag, your worker can + // [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using + // [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to + // aggregate the events associated with a specific user once a day, + // you could tag tasks with the user ID. + // + // The task's tag can only be set when the + // [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + // + // The tag must be less than 500 characters. + // + // SDK compatibility: Although the SDK allows tags to be either + // string or [bytes](/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-), + // only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8 + // encoded, the tag will be empty when the task is returned by Cloud Tasks. + Tag string `protobuf:"bytes,2,opt,name=tag" json:"tag,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *PullMessage) Reset() { *m = PullMessage{} } +func (m *PullMessage) String() string { return proto.CompactTextString(m) } +func (*PullMessage) ProtoMessage() {} +func (*PullMessage) Descriptor() ([]byte, []int) { + return fileDescriptor_target_e86c4298963e6a5c, []int{1} +} +func (m *PullMessage) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_PullMessage.Unmarshal(m, b) +} +func (m *PullMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_PullMessage.Marshal(b, m, deterministic) +} +func (dst *PullMessage) XXX_Merge(src proto.Message) { + xxx_messageInfo_PullMessage.Merge(dst, src) +} +func (m *PullMessage) XXX_Size() int { + return xxx_messageInfo_PullMessage.Size(m) +} +func (m *PullMessage) XXX_DiscardUnknown() { + xxx_messageInfo_PullMessage.DiscardUnknown(m) +} + +var xxx_messageInfo_PullMessage proto.InternalMessageInfo + +func (m *PullMessage) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +func (m *PullMessage) GetTag() string { + if m != nil { + return m.Tag + } + return "" +} + +// App Engine HTTP target. +// +// The task will be delivered to the App Engine application hostname +// specified by its [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest]. +// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] explains how the +// task's host URL is constructed. +// +// Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] requires +// [`appengine.applications.get`](/appengine/docs/admin-api/access-control) +// Google IAM permission for the project +// and the following scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +type AppEngineHttpTarget struct { + // Overrides for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + // + // If set, `app_engine_routing_override` is used for all tasks in + // the queue, no matter what the setting is for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + AppEngineRoutingOverride *AppEngineRouting `protobuf:"bytes,1,opt,name=app_engine_routing_override,json=appEngineRoutingOverride" json:"app_engine_routing_override,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AppEngineHttpTarget) Reset() { *m = AppEngineHttpTarget{} } +func (m *AppEngineHttpTarget) String() string { return proto.CompactTextString(m) } +func (*AppEngineHttpTarget) ProtoMessage() {} +func (*AppEngineHttpTarget) Descriptor() ([]byte, []int) { + return fileDescriptor_target_e86c4298963e6a5c, []int{2} +} +func (m *AppEngineHttpTarget) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppEngineHttpTarget.Unmarshal(m, b) +} +func (m *AppEngineHttpTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppEngineHttpTarget.Marshal(b, m, deterministic) +} +func (dst *AppEngineHttpTarget) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppEngineHttpTarget.Merge(dst, src) +} +func (m *AppEngineHttpTarget) XXX_Size() int { + return xxx_messageInfo_AppEngineHttpTarget.Size(m) +} +func (m *AppEngineHttpTarget) XXX_DiscardUnknown() { + xxx_messageInfo_AppEngineHttpTarget.DiscardUnknown(m) +} + +var xxx_messageInfo_AppEngineHttpTarget proto.InternalMessageInfo + +func (m *AppEngineHttpTarget) GetAppEngineRoutingOverride() *AppEngineRouting { + if m != nil { + return m.AppEngineRoutingOverride + } + return nil +} + +// App Engine HTTP request. +// +// The message defines the HTTP request that is sent to an App Engine app when +// the task is dispatched. +// +// This proto can only be used for tasks in a queue which has +// [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] set. +// +// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] requires +// [`appengine.applications.get`](/appengine/docs/admin-api/access-control) +// Google IAM permission for the project +// and the following scope: +// +// `https://www.googleapis.com/auth/cloud-platform` +// +// The task will be delivered to the App Engine app which belongs to the same +// project as the queue. For more information, see +// [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed) +// and how routing is affected by +// [dispatch files](/appengine/docs/python/config/dispatchref). +// +// The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is +// delivered to can be set at the queue-level or task-level: +// +// * If set, +// [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] +// is used for all tasks in the queue, no matter what the setting +// is for the +// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. +// +// +// The `url` that the task will be sent to is: +// +// * `url =` [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] `+` +// [relative_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url] +// +// The task attempt has succeeded if the app's request handler returns +// an HTTP response code in the range [`200` - `299`]. `503` is +// considered an App Engine system error instead of an application +// error. Requests returning error `503` will be retried regardless of +// retry configuration and not counted against retry counts. +// Any other response code or a failure to receive a response before the +// deadline is a failed attempt. +type AppEngineHttpRequest struct { + // The HTTP method to use for the request. The default is POST. + // + // The app's request handler for the task's target URL must be able to handle + // HTTP requests with this http_method, otherwise the task attempt will fail + // with error code 405 (Method Not Allowed). See + // [Writing a push task request handler](/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler) + // and the documentation for the request handlers in the language your app is + // written in e.g. + // [Python Request Handler](/appengine/docs/python/tools/webapp/requesthandlerclass). + HttpMethod HttpMethod `protobuf:"varint,1,opt,name=http_method,json=httpMethod,enum=google.cloud.tasks.v2beta2.HttpMethod" json:"http_method,omitempty"` + // Task-level setting for App Engine routing. + // + // If set, + // [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override] + // is used for all tasks in the queue, no matter what the setting is for the + // [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing]. + AppEngineRouting *AppEngineRouting `protobuf:"bytes,2,opt,name=app_engine_routing,json=appEngineRouting" json:"app_engine_routing,omitempty"` + // The relative URL. + // + // The relative URL must begin with "/" and must be a valid HTTP relative URL. + // It can contain a path and query string arguments. + // If the relative URL is empty, then the root path "/" will be used. + // No spaces are allowed, and the maximum length allowed is 2083 characters. + RelativeUrl string `protobuf:"bytes,3,opt,name=relative_url,json=relativeUrl" json:"relative_url,omitempty"` + // HTTP request headers. + // + // This map contains the header field names and values. + // Headers can be set when the + // [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + // Repeated headers are not supported but a header value can contain commas. + // + // Cloud Tasks sets some headers to default values: + // + // * `User-Agent`: By default, this header is + // `"AppEngine-Google; (+http://code.google.com/appengine)"`. + // This header can be modified, but Cloud Tasks will append + // `"AppEngine-Google; (+http://code.google.com/appengine)"` to the + // modified `User-Agent`. + // + // If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud + // Tasks sets the following headers: + // + // * `Content-Type`: By default, the `Content-Type` header is set to + // `"application/octet-stream"`. The default can be overridden by explicitly + // setting `Content-Type` to a particular media type when the + // [task is created](google.cloud.tasks.v2beta2.CloudTasks.CreateTask). + // For example, `Content-Type` can be set to `"application/json"`. + // * `Content-Length`: This is computed by Cloud Tasks. This value is + // output only. It cannot be changed. + // + // The headers below cannot be set or overridden: + // + // * `Host` + // * `X-Google-*` + // * `X-AppEngine-*` + // + // In addition, Cloud Tasks sets some headers when the task is dispatched, + // such as headers containing information about the task; see + // [request headers](/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers). + // These headers are set only when the task is dispatched, so they are not + // visible when the task is returned in a Cloud Tasks response. + // + // Although there is no specific limit for the maximum number of headers or + // the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more + // information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation. + Headers map[string]string `protobuf:"bytes,4,rep,name=headers" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` + // Payload. + // + // The payload will be sent as the HTTP message body. A message + // body, and thus a payload, is allowed only if the HTTP method is + // POST or PUT. It is an error to set a data payload on a task with + // an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod]. + Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AppEngineHttpRequest) Reset() { *m = AppEngineHttpRequest{} } +func (m *AppEngineHttpRequest) String() string { return proto.CompactTextString(m) } +func (*AppEngineHttpRequest) ProtoMessage() {} +func (*AppEngineHttpRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_target_e86c4298963e6a5c, []int{3} +} +func (m *AppEngineHttpRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppEngineHttpRequest.Unmarshal(m, b) +} +func (m *AppEngineHttpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppEngineHttpRequest.Marshal(b, m, deterministic) +} +func (dst *AppEngineHttpRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppEngineHttpRequest.Merge(dst, src) +} +func (m *AppEngineHttpRequest) XXX_Size() int { + return xxx_messageInfo_AppEngineHttpRequest.Size(m) +} +func (m *AppEngineHttpRequest) XXX_DiscardUnknown() { + xxx_messageInfo_AppEngineHttpRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_AppEngineHttpRequest proto.InternalMessageInfo + +func (m *AppEngineHttpRequest) GetHttpMethod() HttpMethod { + if m != nil { + return m.HttpMethod + } + return HttpMethod_HTTP_METHOD_UNSPECIFIED +} + +func (m *AppEngineHttpRequest) GetAppEngineRouting() *AppEngineRouting { + if m != nil { + return m.AppEngineRouting + } + return nil +} + +func (m *AppEngineHttpRequest) GetRelativeUrl() string { + if m != nil { + return m.RelativeUrl + } + return "" +} + +func (m *AppEngineHttpRequest) GetHeaders() map[string]string { + if m != nil { + return m.Headers + } + return nil +} + +func (m *AppEngineHttpRequest) GetPayload() []byte { + if m != nil { + return m.Payload + } + return nil +} + +// App Engine Routing. +// +// For more information about services, versions, and instances see +// [An Overview of App Engine](/appengine/docs/python/an-overview-of-app-engine), +// [Microservices Architecture on Google App Engine](/appengine/docs/python/microservices-on-app-engine), +// [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed), +// and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed). +type AppEngineRouting struct { + // App service. + // + // By default, the task is sent to the service which is the default + // service when the task is attempted ("default"). + // + // For some queues or tasks which were created using the App Engine + // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks + // which were created using the App Engine SDK use a custom domain + // name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string. + Service string `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"` + // App version. + // + // By default, the task is sent to the version which is the default + // version when the task is attempted ("default"). + // + // For some queues or tasks which were created using the App Engine + // Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable + // into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks + // which were created using the App Engine SDK use a custom domain + // name; custom domains are not parsed by Cloud Tasks. If + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string. + Version string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` + // App instance. + // + // By default, the task is sent to an instance which is available when + // the task is attempted. + // + // Requests can only be sent to a specific instance if + // [manual scaling is used in App Engine Standard](/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). + // App Engine Flex does not support instances. For more information, see + // [App Engine Standard request routing](/appengine/docs/standard/python/how-requests-are-routed) + // and [App Engine Flex request routing](/appengine/docs/flexible/python/how-requests-are-routed). + Instance string `protobuf:"bytes,3,opt,name=instance" json:"instance,omitempty"` + // Output only. The host that the task is sent to. + // + // For more information, see + // [How Requests are Routed](/appengine/docs/standard/python/how-requests-are-routed). + // + // The host is constructed as: + // + // + // * `host = [application_domain_name]`</br> + // `| [service] + '.' + [application_domain_name]`</br> + // `| [version] + '.' + [application_domain_name]`</br> + // `| [version_dot_service]+ '.' + [application_domain_name]`</br> + // `| [instance] + '.' + [application_domain_name]`</br> + // `| [instance_dot_service] + '.' + [application_domain_name]`</br> + // `| [instance_dot_version] + '.' + [application_domain_name]`</br> + // `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` + // + // * `application_domain_name` = The domain name of the app, for + // example <app-id>.appspot.com, which is associated with the + // queue's project ID. Some tasks which were created using the App Engine + // SDK use a custom domain name. + // + // * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + // + // * `version_dot_service =` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] + // + // * `instance_dot_service =` + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // * `instance_dot_version =` + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] + // + // * `instance_dot_version_dot_service =` + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +` + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +` + // [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] + // + // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent + // to the service which is the default service when the task is attempted. + // + // If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent + // to the version which is the default version when the task is attempted. + // + // If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task + // will be sent to an instance which is available when the task is + // attempted. + // + // When [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is "default", + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is "default", and + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, + // [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is shortened to just the + // `application_domain_name`. + // + // If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service], + // [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or + // [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task + // will be sent to the default version of the default service when + // the task is attempted. + Host string `protobuf:"bytes,4,opt,name=host" json:"host,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AppEngineRouting) Reset() { *m = AppEngineRouting{} } +func (m *AppEngineRouting) String() string { return proto.CompactTextString(m) } +func (*AppEngineRouting) ProtoMessage() {} +func (*AppEngineRouting) Descriptor() ([]byte, []int) { + return fileDescriptor_target_e86c4298963e6a5c, []int{4} +} +func (m *AppEngineRouting) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AppEngineRouting.Unmarshal(m, b) +} +func (m *AppEngineRouting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AppEngineRouting.Marshal(b, m, deterministic) +} +func (dst *AppEngineRouting) XXX_Merge(src proto.Message) { + xxx_messageInfo_AppEngineRouting.Merge(dst, src) +} +func (m *AppEngineRouting) XXX_Size() int { + return xxx_messageInfo_AppEngineRouting.Size(m) +} +func (m *AppEngineRouting) XXX_DiscardUnknown() { + xxx_messageInfo_AppEngineRouting.DiscardUnknown(m) +} + +var xxx_messageInfo_AppEngineRouting proto.InternalMessageInfo + +func (m *AppEngineRouting) GetService() string { + if m != nil { + return m.Service + } + return "" +} + +func (m *AppEngineRouting) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *AppEngineRouting) GetInstance() string { + if m != nil { + return m.Instance + } + return "" +} + +func (m *AppEngineRouting) GetHost() string { + if m != nil { + return m.Host + } + return "" +} + +func init() { + proto.RegisterType((*PullTarget)(nil), "google.cloud.tasks.v2beta2.PullTarget") + proto.RegisterType((*PullMessage)(nil), "google.cloud.tasks.v2beta2.PullMessage") + proto.RegisterType((*AppEngineHttpTarget)(nil), "google.cloud.tasks.v2beta2.AppEngineHttpTarget") + proto.RegisterType((*AppEngineHttpRequest)(nil), "google.cloud.tasks.v2beta2.AppEngineHttpRequest") + proto.RegisterMapType((map[string]string)(nil), "google.cloud.tasks.v2beta2.AppEngineHttpRequest.HeadersEntry") + proto.RegisterType((*AppEngineRouting)(nil), "google.cloud.tasks.v2beta2.AppEngineRouting") + proto.RegisterEnum("google.cloud.tasks.v2beta2.HttpMethod", HttpMethod_name, HttpMethod_value) +} + +func init() { + proto.RegisterFile("google/cloud/tasks/v2beta2/target.proto", fileDescriptor_target_e86c4298963e6a5c) +} + +var fileDescriptor_target_e86c4298963e6a5c = []byte{ + // 557 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x6f, 0xd3, 0x4c, + 0x10, 0xfd, 0x5c, 0xa7, 0xbf, 0xc6, 0xd1, 0x27, 0x6b, 0xa9, 0x84, 0x95, 0xa2, 0xaa, 0xe4, 0x00, + 0x15, 0x42, 0xb6, 0x14, 0x2e, 0x50, 0x84, 0x50, 0x4b, 0x4c, 0x53, 0x89, 0x12, 0xcb, 0x75, 0x84, + 0x54, 0x0e, 0xd6, 0x26, 0x19, 0x1c, 0x2b, 0xee, 0xae, 0xd9, 0x5d, 0x5b, 0xca, 0x95, 0x3b, 0xff, + 0x33, 0xf2, 0xda, 0x09, 0x69, 0x80, 0x0a, 0x6e, 0xf3, 0x66, 0xde, 0xbc, 0xc9, 0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 0x86, 0xfd, 0x78, 0xf4, 0xf1, + 0x3a, 0xf0, 0xdf, 0x5d, 0xbe, 0xbf, 0xf4, 0xfb, 0xf6, 0x7f, 0x64, 0x0f, 0x5a, 0xc1, 0xf0, 0x3a, + 0xb2, 0x0d, 0xb2, 0x0b, 0xe6, 0x85, 0x1f, 0xd9, 0x5b, 0x55, 0x6a, 0xe0, 0x9f, 0xf5, 0x6d, 0xb3, + 0x4a, 0x05, 0xa3, 0xc8, 0x6e, 0x11, 0x80, 0x9d, 0xbe, 0xff, 0xc1, 0x8f, 0x7c, 0x7b, 0xfb, 0x3c, + 0x87, 0xa3, 0x09, 0xbf, 0xbd, 0xc7, 0xf7, 0x73, 0xab, 0xfe, 0xf6, 0x83, 0xea, 0x85, 0x05, 0xc6, + 0xcd, 0xdb, 0x86, 0x9a, 0xf0, 0x8c, 0xb2, 0xc4, 0xe5, 0x22, 0xf1, 0x12, 0x64, 0xfa, 0xfd, 0x79, + 0x75, 0x89, 0xe6, 0xa9, 0xfc, 0xdd, 0xbf, 0xc0, 0x6b, 0x8d, 0xc6, 0x3b, 0x9a, 0xfb, 0xe2, 0x47, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x5d, 0x40, 0x26, 0x30, 0x04, 0x00, 0x00, +} diff --git a/googleapis/cloud/tasks/v2beta2/task.pb.go b/googleapis/cloud/tasks/v2beta2/task.pb.go new file mode 100644 index 00000000..feffd2a0 --- /dev/null +++ b/googleapis/cloud/tasks/v2beta2/task.pb.go @@ -0,0 +1,505 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// source: google/cloud/tasks/v2beta2/task.proto + +package tasks // import "google.golang.org/genproto/googleapis/cloud/tasks/v2beta2" + +import proto "github.com/golang/protobuf/proto" +import fmt "fmt" +import math "math" +import timestamp "github.com/golang/protobuf/ptypes/timestamp" +import _ "google.golang.org/genproto/googleapis/api/annotations" +import status "google.golang.org/genproto/googleapis/rpc/status" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package + +// The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task] data. +// +// When a task is returned in a response, not all +// information is retrieved by default because some data, such as +// payloads, might be desirable to return only when needed because +// of its large size or because of the sensitivity of data that it +// contains. +type Task_View int32 + +const ( + // Unspecified. Defaults to BASIC. + Task_VIEW_UNSPECIFIED Task_View = 0 + // The basic view omits fields which can be large or can contain + // sensitive data. + // + // This view does not include the + // ([payload in AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] and + // [payload in PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These payloads are + // desirable to return only when needed, because they can be large + // and because of the sensitivity of the data that you choose to + // store in it. + Task_BASIC Task_View = 1 + // All information is returned. + // + // Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires + // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) + // permission on the [Queue][google.cloud.tasks.v2beta2.Queue] resource. + Task_FULL Task_View = 2 +) + +var Task_View_name = map[int32]string{ + 0: "VIEW_UNSPECIFIED", + 1: "BASIC", + 2: "FULL", +} +var Task_View_value = map[string]int32{ + "VIEW_UNSPECIFIED": 0, + "BASIC": 1, + "FULL": 2, +} + +func (x Task_View) String() string { + return proto.EnumName(Task_View_name, int32(x)) +} +func (Task_View) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_task_d7b9980220f5fece, []int{0, 0} +} + +// A unit of scheduled work. +type Task struct { + // The task name. + // + // The task name must have the following format: + // `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID` + // + // * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), colons (:), or periods (.). + // For more information, see + // [Identifying projects](/resource-manager/docs/creating-managing-projects#identifying_projects) + // * `LOCATION_ID` is the canonical ID for the task's location. + // The list of available locations can be obtained by calling + // [ListLocations][google.cloud.location.Locations.ListLocations]. + // For more information, see https://cloud.google.com/about/locations/. + // * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or + // hyphens (-). The maximum length is 100 characters. + // * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]), + // hyphens (-), or underscores (_). The maximum length is 500 characters. + // + // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask]. + Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Required. + // + // The task's payload is used by the task's target to process the task. + // A payload is valid only if it is compatible with the queue's target. + // + // Types that are valid to be assigned to PayloadType: + // *Task_AppEngineHttpRequest + // *Task_PullMessage + PayloadType isTask_PayloadType `protobuf_oneof:"payload_type"` + // The time when the task is scheduled to be attempted. + // + // For App Engine queues, this is when the task will be attempted or retried. + // + // For pull queues, this is the time when the task is available to + // be leased; if a task is currently leased, this is the time when + // the current lease expires, that is, the time that the task was + // leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration]. + // + // `schedule_time` will be truncated to the nearest microsecond. + ScheduleTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=schedule_time,json=scheduleTime" json:"schedule_time,omitempty"` + // Output only. The time that the task was created. + // + // `create_time` will be truncated to the nearest second. + CreateTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime" json:"create_time,omitempty"` + // Output only. The task status. + Status *TaskStatus `protobuf:"bytes,7,opt,name=status" json:"status,omitempty"` + // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has + // been returned. + View Task_View `protobuf:"varint,8,opt,name=view,enum=google.cloud.tasks.v2beta2.Task_View" json:"view,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *Task) Reset() { *m = Task{} } +func (m *Task) String() string { return proto.CompactTextString(m) } +func (*Task) ProtoMessage() {} +func (*Task) Descriptor() ([]byte, []int) { + return fileDescriptor_task_d7b9980220f5fece, []int{0} +} +func (m *Task) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Task.Unmarshal(m, b) +} +func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Task.Marshal(b, m, deterministic) +} +func (dst *Task) XXX_Merge(src proto.Message) { + xxx_messageInfo_Task.Merge(dst, src) +} +func (m *Task) XXX_Size() int { + return xxx_messageInfo_Task.Size(m) +} +func (m *Task) XXX_DiscardUnknown() { + xxx_messageInfo_Task.DiscardUnknown(m) +} + +var xxx_messageInfo_Task proto.InternalMessageInfo + +type isTask_PayloadType interface { + isTask_PayloadType() +} + +type Task_AppEngineHttpRequest struct { + AppEngineHttpRequest *AppEngineHttpRequest `protobuf:"bytes,3,opt,name=app_engine_http_request,json=appEngineHttpRequest,oneof"` +} +type Task_PullMessage struct { + PullMessage *PullMessage `protobuf:"bytes,4,opt,name=pull_message,json=pullMessage,oneof"` +} + +func (*Task_AppEngineHttpRequest) isTask_PayloadType() {} +func (*Task_PullMessage) isTask_PayloadType() {} + +func (m *Task) GetPayloadType() isTask_PayloadType { + if m != nil { + return m.PayloadType + } + return nil +} + +func (m *Task) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Task) GetAppEngineHttpRequest() *AppEngineHttpRequest { + if x, ok := m.GetPayloadType().(*Task_AppEngineHttpRequest); ok { + return x.AppEngineHttpRequest + } + return nil +} + +func (m *Task) GetPullMessage() *PullMessage { + if x, ok := m.GetPayloadType().(*Task_PullMessage); ok { + return x.PullMessage + } + return nil +} + +func (m *Task) GetScheduleTime() *timestamp.Timestamp { + if m != nil { + return m.ScheduleTime + } + return nil +} + +func (m *Task) GetCreateTime() *timestamp.Timestamp { + if m != nil { + return m.CreateTime + } + return nil +} + +func (m *Task) GetStatus() *TaskStatus { + if m != nil { + return m.Status + } + return nil +} + +func (m *Task) GetView() Task_View { + if m != nil { + return m.View + } + return Task_VIEW_UNSPECIFIED +} + +// XXX_OneofFuncs is for the internal use of the proto package. +func (*Task) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { + return _Task_OneofMarshaler, _Task_OneofUnmarshaler, _Task_OneofSizer, []interface{}{ + (*Task_AppEngineHttpRequest)(nil), + (*Task_PullMessage)(nil), + } +} + +func _Task_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { + m := msg.(*Task) + // payload_type + switch x := m.PayloadType.(type) { + case *Task_AppEngineHttpRequest: + b.EncodeVarint(3<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.AppEngineHttpRequest); err != nil { + return err + } + case *Task_PullMessage: + b.EncodeVarint(4<<3 | proto.WireBytes) + if err := b.EncodeMessage(x.PullMessage); err != nil { + return err + } + case nil: + default: + return fmt.Errorf("Task.PayloadType has unexpected type %T", x) + } + return nil +} + +func _Task_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { + m := msg.(*Task) + switch tag { + case 3: // payload_type.app_engine_http_request + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(AppEngineHttpRequest) + err := b.DecodeMessage(msg) + m.PayloadType = &Task_AppEngineHttpRequest{msg} + return true, err + case 4: // payload_type.pull_message + if wire != proto.WireBytes { + return true, proto.ErrInternalBadWireType + } + msg := new(PullMessage) + err := b.DecodeMessage(msg) + m.PayloadType = &Task_PullMessage{msg} + return true, err + default: + return false, nil + } +} + +func _Task_OneofSizer(msg proto.Message) (n int) { + m := msg.(*Task) + // payload_type + switch x := m.PayloadType.(type) { + case *Task_AppEngineHttpRequest: + s := proto.Size(x.AppEngineHttpRequest) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case *Task_PullMessage: + s := proto.Size(x.PullMessage) + n += 1 // tag and wire + n += proto.SizeVarint(uint64(s)) + n += s + case nil: + default: + panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) + } + return n +} + +// Status of the task. +type TaskStatus struct { + // Output only. The number of attempts dispatched. + // + // This count includes tasks which have been dispatched but haven't + // received a response. + AttemptDispatchCount int32 `protobuf:"varint,1,opt,name=attempt_dispatch_count,json=attemptDispatchCount" json:"attempt_dispatch_count,omitempty"` + // Output only. The number of attempts which have received a response. + // + // This field is not calculated for + // [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + AttemptResponseCount int32 `protobuf:"varint,2,opt,name=attempt_response_count,json=attemptResponseCount" json:"attempt_response_count,omitempty"` + // Output only. The status of the task's first attempt. + // + // Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set. + // The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks. + // + // This field is not calculated for + // [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + FirstAttemptStatus *AttemptStatus `protobuf:"bytes,3,opt,name=first_attempt_status,json=firstAttemptStatus" json:"first_attempt_status,omitempty"` + // Output only. The status of the task's last attempt. + // + // This field is not calculated for + // [pull tasks](google.cloud.tasks.v2beta2.PullTaskTarget). + LastAttemptStatus *AttemptStatus `protobuf:"bytes,4,opt,name=last_attempt_status,json=lastAttemptStatus" json:"last_attempt_status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *TaskStatus) Reset() { *m = TaskStatus{} } +func (m *TaskStatus) String() string { return proto.CompactTextString(m) } +func (*TaskStatus) ProtoMessage() {} +func (*TaskStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_task_d7b9980220f5fece, []int{1} +} +func (m *TaskStatus) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_TaskStatus.Unmarshal(m, b) +} +func (m *TaskStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_TaskStatus.Marshal(b, m, deterministic) +} +func (dst *TaskStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_TaskStatus.Merge(dst, src) +} +func (m *TaskStatus) XXX_Size() int { + return xxx_messageInfo_TaskStatus.Size(m) +} +func (m *TaskStatus) XXX_DiscardUnknown() { + xxx_messageInfo_TaskStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_TaskStatus proto.InternalMessageInfo + +func (m *TaskStatus) GetAttemptDispatchCount() int32 { + if m != nil { + return m.AttemptDispatchCount + } + return 0 +} + +func (m *TaskStatus) GetAttemptResponseCount() int32 { + if m != nil { + return m.AttemptResponseCount + } + return 0 +} + +func (m *TaskStatus) GetFirstAttemptStatus() *AttemptStatus { + if m != nil { + return m.FirstAttemptStatus + } + return nil +} + +func (m *TaskStatus) GetLastAttemptStatus() *AttemptStatus { + if m != nil { + return m.LastAttemptStatus + } + return nil +} + +// The status of a task attempt. +type AttemptStatus struct { + // Output only. The time that this attempt was scheduled. + // + // `schedule_time` will be truncated to the nearest microsecond. + ScheduleTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=schedule_time,json=scheduleTime" json:"schedule_time,omitempty"` + // Output only. The time that this attempt was dispatched. + // + // `dispatch_time` will be truncated to the nearest microsecond. + DispatchTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=dispatch_time,json=dispatchTime" json:"dispatch_time,omitempty"` + // Output only. The time that this attempt response was received. + // + // `response_time` will be truncated to the nearest microsecond. + ResponseTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=response_time,json=responseTime" json:"response_time,omitempty"` + // Output only. The response from the target for this attempt. + // + // If the task has not been attempted or the task is currently running + // then the response status is unset. + ResponseStatus *status.Status `protobuf:"bytes,4,opt,name=response_status,json=responseStatus" json:"response_status,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *AttemptStatus) Reset() { *m = AttemptStatus{} } +func (m *AttemptStatus) String() string { return proto.CompactTextString(m) } +func (*AttemptStatus) ProtoMessage() {} +func (*AttemptStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_task_d7b9980220f5fece, []int{2} +} +func (m *AttemptStatus) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_AttemptStatus.Unmarshal(m, b) +} +func (m *AttemptStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_AttemptStatus.Marshal(b, m, deterministic) +} +func (dst *AttemptStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_AttemptStatus.Merge(dst, src) +} +func (m *AttemptStatus) XXX_Size() int { + return xxx_messageInfo_AttemptStatus.Size(m) +} +func (m *AttemptStatus) XXX_DiscardUnknown() { + xxx_messageInfo_AttemptStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_AttemptStatus proto.InternalMessageInfo + +func (m *AttemptStatus) GetScheduleTime() *timestamp.Timestamp { + if m != nil { + return m.ScheduleTime + } + return nil +} + +func (m *AttemptStatus) GetDispatchTime() *timestamp.Timestamp { + if m != nil { + return m.DispatchTime + } + return nil +} + +func (m *AttemptStatus) GetResponseTime() *timestamp.Timestamp { + if m != nil { + return m.ResponseTime + } + return nil +} + +func (m *AttemptStatus) GetResponseStatus() *status.Status { + if m != nil { + return m.ResponseStatus + } + return nil +} + +func init() { + proto.RegisterType((*Task)(nil), "google.cloud.tasks.v2beta2.Task") + proto.RegisterType((*TaskStatus)(nil), "google.cloud.tasks.v2beta2.TaskStatus") + proto.RegisterType((*AttemptStatus)(nil), "google.cloud.tasks.v2beta2.AttemptStatus") + proto.RegisterEnum("google.cloud.tasks.v2beta2.Task_View", Task_View_name, Task_View_value) +} + +func init() { + proto.RegisterFile("google/cloud/tasks/v2beta2/task.proto", fileDescriptor_task_d7b9980220f5fece) +} + +var fileDescriptor_task_d7b9980220f5fece = []byte{ + // 601 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x5f, 0x6f, 0xda, 0x3c, + 0x14, 0xc6, 0x1b, 0x9a, 0xf6, 0x2d, 0xe6, 0xcf, 0xcb, 0x3c, 0xb4, 0x46, 0x68, 0xda, 0x10, 0x52, + 0x57, 0x76, 0x93, 0x6c, 0x6c, 0x37, 0x53, 0xa5, 0xa1, 0x42, 0xa9, 0x40, 0x62, 0x13, 0x0a, 0x6d, + 0xa7, 0x6d, 0x17, 0x91, 0x09, 0x6e, 0x88, 0x9a, 0xc4, 0x5e, 0x7c, 0xd2, 0xaa, 0x9f, 0xa2, 0x5f, + 0x65, 0x1f, 0x71, 0x8a, 0xe3, 0xd0, 0xa1, 0x76, 0xa0, 0xde, 0x71, 0xce, 0x79, 0x7e, 0x8f, 0xed, + 0x47, 0x87, 0xa0, 0x03, 0x8f, 0x31, 0x2f, 0xa0, 0x96, 0x1b, 0xb0, 0x64, 0x6e, 0x01, 0x11, 0x57, + 0xc2, 0xba, 0xee, 0xcc, 0x28, 0x90, 0x8e, 0xac, 0x4c, 0x1e, 0x33, 0x60, 0xb8, 0x91, 0xc9, 0x4c, + 0x29, 0x33, 0xa5, 0xcc, 0x54, 0xb2, 0xc6, 0x4b, 0x65, 0x41, 0xb8, 0x6f, 0x91, 0x28, 0x62, 0x40, + 0xc0, 0x67, 0x91, 0xc8, 0xc8, 0xc6, 0xe1, 0xda, 0x03, 0x62, 0x8f, 0x82, 0x12, 0xbe, 0x56, 0x42, + 0x59, 0xcd, 0x92, 0x4b, 0x0b, 0xfc, 0x90, 0x0a, 0x20, 0x21, 0x57, 0x82, 0x7d, 0x25, 0x88, 0xb9, + 0x6b, 0x09, 0x20, 0x90, 0xa8, 0x23, 0x5a, 0x77, 0x3a, 0xd2, 0xcf, 0x88, 0xb8, 0xc2, 0x18, 0xe9, + 0x11, 0x09, 0xa9, 0xa1, 0x35, 0xb5, 0x76, 0xd1, 0x96, 0xbf, 0xb1, 0x8f, 0xf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