1// Code generated by protoc-gen-go. DO NOT EDIT.
2// source: google/cloud/tasks/v2/task.proto
3
4package tasks
5
6import (
7	fmt "fmt"
8	math "math"
9
10	proto "github.com/golang/protobuf/proto"
11	duration "github.com/golang/protobuf/ptypes/duration"
12	timestamp "github.com/golang/protobuf/ptypes/timestamp"
13	_ "google.golang.org/genproto/googleapis/api/annotations"
14	status "google.golang.org/genproto/googleapis/rpc/status"
15)
16
17// Reference imports to suppress errors if they are not otherwise used.
18var _ = proto.Marshal
19var _ = fmt.Errorf
20var _ = math.Inf
21
22// This is a compile-time assertion to ensure that this generated file
23// is compatible with the proto package it is being compiled against.
24// A compilation error at this line likely means your copy of the
25// proto package needs to be updated.
26const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
27
28// The view specifies a subset of [Task][google.cloud.tasks.v2.Task] data.
29//
30// When a task is returned in a response, not all
31// information is retrieved by default because some data, such as
32// payloads, might be desirable to return only when needed because
33// of its large size or because of the sensitivity of data that it
34// contains.
35type Task_View int32
36
37const (
38	// Unspecified. Defaults to BASIC.
39	Task_VIEW_UNSPECIFIED Task_View = 0
40	// The basic view omits fields which can be large or can contain
41	// sensitive data.
42	//
43	// This view does not include the
44	// [body in AppEngineHttpRequest][google.cloud.tasks.v2.AppEngineHttpRequest.body].
45	// Bodies are desirable to return only when needed, because they
46	// can be large and because of the sensitivity of the data that you
47	// choose to store in it.
48	Task_BASIC Task_View = 1
49	// All information is returned.
50	//
51	// Authorization for [FULL][google.cloud.tasks.v2.Task.View.FULL] requires
52	// `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
53	// permission on the [Queue][google.cloud.tasks.v2.Queue] resource.
54	Task_FULL Task_View = 2
55)
56
57var Task_View_name = map[int32]string{
58	0: "VIEW_UNSPECIFIED",
59	1: "BASIC",
60	2: "FULL",
61}
62
63var Task_View_value = map[string]int32{
64	"VIEW_UNSPECIFIED": 0,
65	"BASIC":            1,
66	"FULL":             2,
67}
68
69func (x Task_View) String() string {
70	return proto.EnumName(Task_View_name, int32(x))
71}
72
73func (Task_View) EnumDescriptor() ([]byte, []int) {
74	return fileDescriptor_5d55198283613840, []int{0, 0}
75}
76
77// A unit of scheduled work.
78type Task struct {
79	// Optionally caller-specified in [CreateTask][google.cloud.tasks.v2.CloudTasks.CreateTask].
80	//
81	// The task name.
82	//
83	// The task name must have the following format:
84	// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
85	//
86	// * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
87	//    hyphens (-), colons (:), or periods (.).
88	//    For more information, see
89	//    [Identifying
90	//    projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
91	// * `LOCATION_ID` is the canonical ID for the task's location.
92	//    The list of available locations can be obtained by calling
93	//    [ListLocations][google.cloud.location.Locations.ListLocations].
94	//    For more information, see https://cloud.google.com/about/locations/.
95	// * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
96	//   hyphens (-). The maximum length is 100 characters.
97	// * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
98	//   hyphens (-), or underscores (_). The maximum length is 500 characters.
99	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
100	// Required. The message to send to the worker.
101	//
102	// Types that are valid to be assigned to MessageType:
103	//	*Task_AppEngineHttpRequest
104	MessageType isTask_MessageType `protobuf_oneof:"message_type"`
105	// The time when the task is scheduled to be attempted.
106	//
107	// For App Engine queues, this is when the task will be attempted or retried.
108	//
109	// `schedule_time` will be truncated to the nearest microsecond.
110	ScheduleTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
111	// Output only. The time that the task was created.
112	//
113	// `create_time` will be truncated to the nearest second.
114	CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
115	// The deadline for requests sent to the worker. If the worker does not
116	// respond by this deadline then the request is cancelled and the attempt
117	// is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the
118	// task according to the [RetryConfig][google.cloud.tasks.v2.RetryConfig].
119	//
120	// Note that when the request is cancelled, Cloud Tasks will stop listing for
121	// the response, but whether the worker stops processing depends on the
122	// worker. For example, if the worker is stuck, it may not react to cancelled
123	// requests.
124	//
125	// The default and maximum values depend on the type of request:
126	//
127	//
128	// * For [App Engine tasks][google.cloud.tasks.v2.AppEngineHttpRequest], 0 indicates that the
129	//   request has the default deadline. The default deadline depends on the
130	//   [scaling
131	//   type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling)
132	//   of the service: 10 minutes for standard apps with automatic scaling, 24
133	//   hours for standard apps with manual and basic scaling, and 60 minutes for
134	//   flex apps. If the request deadline is set, it must be in the interval [15
135	//   seconds, 24 hours 15 seconds]. Regardless of the task's
136	//   `dispatch_deadline`, the app handler will not run for longer than than
137	//   the service's timeout. We recommend setting the `dispatch_deadline` to
138	//   at most a few seconds more than the app handler's timeout. For more
139	//   information see
140	//   [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts).
141	//
142	// `dispatch_deadline` will be truncated to the nearest millisecond. The
143	// deadline is an approximate deadline.
144	DispatchDeadline *duration.Duration `protobuf:"bytes,6,opt,name=dispatch_deadline,json=dispatchDeadline,proto3" json:"dispatch_deadline,omitempty"`
145	// Output only. The number of attempts dispatched.
146	//
147	// This count includes attempts which have been dispatched but haven't
148	// received a response.
149	DispatchCount int32 `protobuf:"varint,7,opt,name=dispatch_count,json=dispatchCount,proto3" json:"dispatch_count,omitempty"`
150	// Output only. The number of attempts which have received a response.
151	ResponseCount int32 `protobuf:"varint,8,opt,name=response_count,json=responseCount,proto3" json:"response_count,omitempty"`
152	// Output only. The status of the task's first attempt.
153	//
154	// Only [dispatch_time][google.cloud.tasks.v2.Attempt.dispatch_time] will be set.
155	// The other [Attempt][google.cloud.tasks.v2.Attempt] information is not retained by Cloud Tasks.
156	FirstAttempt *Attempt `protobuf:"bytes,9,opt,name=first_attempt,json=firstAttempt,proto3" json:"first_attempt,omitempty"`
157	// Output only. The status of the task's last attempt.
158	LastAttempt *Attempt `protobuf:"bytes,10,opt,name=last_attempt,json=lastAttempt,proto3" json:"last_attempt,omitempty"`
159	// Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2.Task] has
160	// been returned.
161	View                 Task_View `protobuf:"varint,11,opt,name=view,proto3,enum=google.cloud.tasks.v2.Task_View" json:"view,omitempty"`
162	XXX_NoUnkeyedLiteral struct{}  `json:"-"`
163	XXX_unrecognized     []byte    `json:"-"`
164	XXX_sizecache        int32     `json:"-"`
165}
166
167func (m *Task) Reset()         { *m = Task{} }
168func (m *Task) String() string { return proto.CompactTextString(m) }
169func (*Task) ProtoMessage()    {}
170func (*Task) Descriptor() ([]byte, []int) {
171	return fileDescriptor_5d55198283613840, []int{0}
172}
173
174func (m *Task) XXX_Unmarshal(b []byte) error {
175	return xxx_messageInfo_Task.Unmarshal(m, b)
176}
177func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
178	return xxx_messageInfo_Task.Marshal(b, m, deterministic)
179}
180func (m *Task) XXX_Merge(src proto.Message) {
181	xxx_messageInfo_Task.Merge(m, src)
182}
183func (m *Task) XXX_Size() int {
184	return xxx_messageInfo_Task.Size(m)
185}
186func (m *Task) XXX_DiscardUnknown() {
187	xxx_messageInfo_Task.DiscardUnknown(m)
188}
189
190var xxx_messageInfo_Task proto.InternalMessageInfo
191
192func (m *Task) GetName() string {
193	if m != nil {
194		return m.Name
195	}
196	return ""
197}
198
199type isTask_MessageType interface {
200	isTask_MessageType()
201}
202
203type Task_AppEngineHttpRequest struct {
204	AppEngineHttpRequest *AppEngineHttpRequest `protobuf:"bytes,2,opt,name=app_engine_http_request,json=appEngineHttpRequest,proto3,oneof"`
205}
206
207func (*Task_AppEngineHttpRequest) isTask_MessageType() {}
208
209func (m *Task) GetMessageType() isTask_MessageType {
210	if m != nil {
211		return m.MessageType
212	}
213	return nil
214}
215
216func (m *Task) GetAppEngineHttpRequest() *AppEngineHttpRequest {
217	if x, ok := m.GetMessageType().(*Task_AppEngineHttpRequest); ok {
218		return x.AppEngineHttpRequest
219	}
220	return nil
221}
222
223func (m *Task) GetScheduleTime() *timestamp.Timestamp {
224	if m != nil {
225		return m.ScheduleTime
226	}
227	return nil
228}
229
230func (m *Task) GetCreateTime() *timestamp.Timestamp {
231	if m != nil {
232		return m.CreateTime
233	}
234	return nil
235}
236
237func (m *Task) GetDispatchDeadline() *duration.Duration {
238	if m != nil {
239		return m.DispatchDeadline
240	}
241	return nil
242}
243
244func (m *Task) GetDispatchCount() int32 {
245	if m != nil {
246		return m.DispatchCount
247	}
248	return 0
249}
250
251func (m *Task) GetResponseCount() int32 {
252	if m != nil {
253		return m.ResponseCount
254	}
255	return 0
256}
257
258func (m *Task) GetFirstAttempt() *Attempt {
259	if m != nil {
260		return m.FirstAttempt
261	}
262	return nil
263}
264
265func (m *Task) GetLastAttempt() *Attempt {
266	if m != nil {
267		return m.LastAttempt
268	}
269	return nil
270}
271
272func (m *Task) GetView() Task_View {
273	if m != nil {
274		return m.View
275	}
276	return Task_VIEW_UNSPECIFIED
277}
278
279// XXX_OneofWrappers is for the internal use of the proto package.
280func (*Task) XXX_OneofWrappers() []interface{} {
281	return []interface{}{
282		(*Task_AppEngineHttpRequest)(nil),
283	}
284}
285
286// The status of a task attempt.
287type Attempt struct {
288	// Output only. The time that this attempt was scheduled.
289	//
290	// `schedule_time` will be truncated to the nearest microsecond.
291	ScheduleTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
292	// Output only. The time that this attempt was dispatched.
293	//
294	// `dispatch_time` will be truncated to the nearest microsecond.
295	DispatchTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=dispatch_time,json=dispatchTime,proto3" json:"dispatch_time,omitempty"`
296	// Output only. The time that this attempt response was received.
297	//
298	// `response_time` will be truncated to the nearest microsecond.
299	ResponseTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"`
300	// Output only. The response from the worker for this attempt.
301	//
302	// If `response_time` is unset, then the task has not been attempted or is
303	// currently running and the `response_status` field is meaningless.
304	ResponseStatus       *status.Status `protobuf:"bytes,4,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"`
305	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
306	XXX_unrecognized     []byte         `json:"-"`
307	XXX_sizecache        int32          `json:"-"`
308}
309
310func (m *Attempt) Reset()         { *m = Attempt{} }
311func (m *Attempt) String() string { return proto.CompactTextString(m) }
312func (*Attempt) ProtoMessage()    {}
313func (*Attempt) Descriptor() ([]byte, []int) {
314	return fileDescriptor_5d55198283613840, []int{1}
315}
316
317func (m *Attempt) XXX_Unmarshal(b []byte) error {
318	return xxx_messageInfo_Attempt.Unmarshal(m, b)
319}
320func (m *Attempt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
321	return xxx_messageInfo_Attempt.Marshal(b, m, deterministic)
322}
323func (m *Attempt) XXX_Merge(src proto.Message) {
324	xxx_messageInfo_Attempt.Merge(m, src)
325}
326func (m *Attempt) XXX_Size() int {
327	return xxx_messageInfo_Attempt.Size(m)
328}
329func (m *Attempt) XXX_DiscardUnknown() {
330	xxx_messageInfo_Attempt.DiscardUnknown(m)
331}
332
333var xxx_messageInfo_Attempt proto.InternalMessageInfo
334
335func (m *Attempt) GetScheduleTime() *timestamp.Timestamp {
336	if m != nil {
337		return m.ScheduleTime
338	}
339	return nil
340}
341
342func (m *Attempt) GetDispatchTime() *timestamp.Timestamp {
343	if m != nil {
344		return m.DispatchTime
345	}
346	return nil
347}
348
349func (m *Attempt) GetResponseTime() *timestamp.Timestamp {
350	if m != nil {
351		return m.ResponseTime
352	}
353	return nil
354}
355
356func (m *Attempt) GetResponseStatus() *status.Status {
357	if m != nil {
358		return m.ResponseStatus
359	}
360	return nil
361}
362
363func init() {
364	proto.RegisterEnum("google.cloud.tasks.v2.Task_View", Task_View_name, Task_View_value)
365	proto.RegisterType((*Task)(nil), "google.cloud.tasks.v2.Task")
366	proto.RegisterType((*Attempt)(nil), "google.cloud.tasks.v2.Attempt")
367}
368
369func init() { proto.RegisterFile("google/cloud/tasks/v2/task.proto", fileDescriptor_5d55198283613840) }
370
371var fileDescriptor_5d55198283613840 = []byte{
372	// 579 bytes of a gzipped FileDescriptorProto
373	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x51, 0x6b, 0xdb, 0x30,
374	0x10, 0xc7, 0xeb, 0xcc, 0x69, 0x1b, 0x25, 0xed, 0x32, 0xd1, 0x51, 0xb7, 0x8c, 0xce, 0x04, 0x06,
375	0x81, 0x81, 0xcd, 0xb2, 0x3d, 0xad, 0x0f, 0xa5, 0x49, 0x53, 0x1a, 0x28, 0xa3, 0x38, 0x6d, 0x07,
376	0x7b, 0x31, 0xaa, 0x7d, 0x75, 0x4c, 0x6d, 0x4b, 0x93, 0xe4, 0x94, 0x7d, 0x84, 0x7d, 0x80, 0x7d,
377	0xdf, 0x61, 0x59, 0x0a, 0xa5, 0x4d, 0xc8, 0xf6, 0xa6, 0xbb, 0xfb, 0xff, 0x7f, 0x3e, 0x9d, 0x2e,
378	0x41, 0x6e, 0x42, 0x69, 0x92, 0x81, 0x1f, 0x65, 0xb4, 0x8c, 0x7d, 0x49, 0xc4, 0x83, 0xf0, 0xe7,
379	0x03, 0x75, 0xf0, 0x18, 0xa7, 0x92, 0xe2, 0xb7, 0xb5, 0xc2, 0x53, 0x0a, 0x4f, 0x29, 0xbc, 0xf9,
380	0xe0, 0xf0, 0x9d, 0x36, 0x12, 0x96, 0xfa, 0xa4, 0x28, 0xa8, 0x24, 0x32, 0xa5, 0x85, 0xa8, 0x4d,
381	0x87, 0x07, 0x4f, 0xaa, 0x1c, 0x04, 0x2d, 0x79, 0x04,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, 0x03, 0xda, 0x5d,
393	0x70, 0x22, 0x5a, 0x16, 0xd2, 0xd9, 0x72, 0xad, 0x7e, 0x33, 0xd8, 0x31, 0xd9, 0x51, 0x95, 0xac,
394	0x64, 0x1c, 0x04, 0xa3, 0x85, 0x00, 0x2d, 0xdb, 0xae, 0x65, 0x26, 0x5b, 0xcb, 0x46, 0x68, 0xe7,
395	0x3e, 0xe5, 0x42, 0x86, 0x44, 0x4a, 0xc8, 0x99, 0x74, 0x5a, 0xaa, 0xa3, 0xa3, 0x55, 0xf3, 0xae,
396	0x55, 0x41, 0x47, 0x99, 0x74, 0x84, 0x4f, 0x51, 0x27, 0x23, 0x4f, 0x18, 0xe8, 0x9f, 0x18, 0xed,
397	0xca, 0x63, 0x10, 0x5f, 0x90, 0x3d, 0x4f, 0xe1, 0xd1, 0x69, 0xbb, 0x56, 0x7f, 0x77, 0xe0, 0xae,
398	0xb0, 0x56, 0x0b, 0xe4, 0xdd, 0xa6, 0xf0, 0x18, 0x28, 0x75, 0xef, 0x13, 0xb2, 0xab, 0x08, 0xef,
399	0xa1, 0xee, 0xed, 0x64, 0xfc, 0x3d, 0xbc, 0xf9, 0x36, 0xbd, 0x1a, 0x8f, 0x26, 0xe7, 0x93, 0xf1,
400	0x59, 0x77, 0x03, 0xb7, 0x50, 0x73, 0x78, 0x3a, 0x9d, 0x8c, 0xba, 0x16, 0xde, 0x46, 0xf6, 0xf9,
401	0xcd, 0xe5, 0x65, 0xb7, 0x31, 0xdc, 0x45, 0x9d, 0x1c, 0x84, 0x20, 0x09, 0x84, 0xf2, 0x17, 0x83,
402	0xde, 0xef, 0x06, 0xda, 0x32, 0x4d, 0xbc, 0x58, 0x10, 0xeb, 0x3f, 0x17, 0xe4, 0x04, 0x2d, 0x5e,
403	0xa1, 0x06, 0x34, 0xd6, 0x03, 0x8c, 0xc1, 0x00, 0x16, 0xaf, 0xa6, 0x00, 0xaf, 0xd6, 0x03, 0x8c,
404	0x41, 0xaf, 0xe8, 0xeb, 0x05, 0xa0, 0xfe, 0xfd, 0xe9, 0x2d, 0xc7, 0x06, 0xc1, 0x59, 0xe4, 0x4d,
405	0x55, 0x25, 0x58, 0x6c, 0x48, 0x1d, 0x0f, 0x63, 0x74, 0x10, 0xd1, 0x7c, 0xf9, 0xec, 0x87, 0xad,
406	0x6a, 0xf8, 0x57, 0xd5, 0xf7, 0xaf, 0xac, 0x1f, 0x5f, 0xb5, 0x26, 0xa1, 0x19, 0x29, 0x12, 0x8f,
407	0xf2, 0xc4, 0x4f, 0xa0, 0x50, 0xdd, 0xf9, 0x75, 0x89, 0xb0, 0x54, 0x3c, 0xfb, 0xab, 0x39, 0x56,
408	0x87, 0xbb, 0x4d, 0x25, 0xfb, 0xfc, 0x37, 0x00, 0x00, 0xff, 0xff, 0xac, 0xc4, 0x10, 0xa0, 0x02,
409	0x05, 0x00, 0x00,
410}
411