1// Code generated by protoc-gen-go. DO NOT EDIT. 2// source: google/cloud/tasks/v2beta3/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.v2beta3.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.v2beta3.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.v2beta3.Task.View.FULL] requires 52 // `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/) 53 // permission on the [Queue][google.cloud.tasks.v2beta3.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_ef2a735969aa09d5, []int{0, 0} 75} 76 77// A unit of scheduled work. 78type Task struct { 79 // Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta3.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 PayloadType: 103 // *Task_AppEngineHttpRequest 104 // *Task_HttpRequest 105 PayloadType isTask_PayloadType `protobuf_oneof:"payload_type"` 106 // The time when the task is scheduled to be attempted. 107 // 108 // For App Engine queues, this is when the task will be attempted or retried. 109 // 110 // `schedule_time` will be truncated to the nearest microsecond. 111 ScheduleTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` 112 // Output only. The time that the task was created. 113 // 114 // `create_time` will be truncated to the nearest second. 115 CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` 116 // The deadline for requests sent to the worker. If the worker does not 117 // respond by this deadline then the request is cancelled and the attempt 118 // is marked as a `DEADLINE_EXCEEDED` failure. Cloud Tasks will retry the 119 // task according to the [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig]. 120 // 121 // Note that when the request is cancelled, Cloud Tasks will stop listing for 122 // the response, but whether the worker stops processing depends on the 123 // worker. For example, if the worker is stuck, it may not react to cancelled 124 // requests. 125 // 126 // The default and maximum values depend on the type of request: 127 // 128 // * For [HTTP tasks][google.cloud.tasks.v2beta3.HttpRequest], the default is 10 minutes. The deadline 129 // must be in the interval [15 seconds, 30 minutes]. 130 // 131 // * For [App Engine tasks][google.cloud.tasks.v2beta3.AppEngineHttpRequest], 0 indicates that the 132 // request has the default deadline. The default deadline depends on the 133 // [scaling 134 // type](https://cloud.google.com/appengine/docs/standard/go/how-instances-are-managed#instance_scaling) 135 // of the service: 10 minutes for standard apps with automatic scaling, 24 136 // hours for standard apps with manual and basic scaling, and 60 minutes for 137 // flex apps. If the request deadline is set, it must be in the interval [15 138 // seconds, 24 hours 15 seconds]. Regardless of the task's 139 // `dispatch_deadline`, the app handler will not run for longer than than 140 // the service's timeout. We recommend setting the `dispatch_deadline` to 141 // at most a few seconds more than the app handler's timeout. For more 142 // information see 143 // [Timeouts](https://cloud.google.com/tasks/docs/creating-appengine-handlers#timeouts). 144 // 145 // `dispatch_deadline` will be truncated to the nearest millisecond. The 146 // deadline is an approximate deadline. 147 DispatchDeadline *duration.Duration `protobuf:"bytes,12,opt,name=dispatch_deadline,json=dispatchDeadline,proto3" json:"dispatch_deadline,omitempty"` 148 // Output only. The number of attempts dispatched. 149 // 150 // This count includes attempts which have been dispatched but haven't 151 // received a response. 152 DispatchCount int32 `protobuf:"varint,6,opt,name=dispatch_count,json=dispatchCount,proto3" json:"dispatch_count,omitempty"` 153 // Output only. The number of attempts which have received a response. 154 ResponseCount int32 `protobuf:"varint,7,opt,name=response_count,json=responseCount,proto3" json:"response_count,omitempty"` 155 // Output only. The status of the task's first attempt. 156 // 157 // Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will be set. 158 // The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information is not retained by Cloud Tasks. 159 FirstAttempt *Attempt `protobuf:"bytes,8,opt,name=first_attempt,json=firstAttempt,proto3" json:"first_attempt,omitempty"` 160 // Output only. The status of the task's last attempt. 161 LastAttempt *Attempt `protobuf:"bytes,9,opt,name=last_attempt,json=lastAttempt,proto3" json:"last_attempt,omitempty"` 162 // Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] has 163 // been returned. 164 View Task_View `protobuf:"varint,10,opt,name=view,proto3,enum=google.cloud.tasks.v2beta3.Task_View" json:"view,omitempty"` 165 XXX_NoUnkeyedLiteral struct{} `json:"-"` 166 XXX_unrecognized []byte `json:"-"` 167 XXX_sizecache int32 `json:"-"` 168} 169 170func (m *Task) Reset() { *m = Task{} } 171func (m *Task) String() string { return proto.CompactTextString(m) } 172func (*Task) ProtoMessage() {} 173func (*Task) Descriptor() ([]byte, []int) { 174 return fileDescriptor_ef2a735969aa09d5, []int{0} 175} 176 177func (m *Task) XXX_Unmarshal(b []byte) error { 178 return xxx_messageInfo_Task.Unmarshal(m, b) 179} 180func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 181 return xxx_messageInfo_Task.Marshal(b, m, deterministic) 182} 183func (m *Task) XXX_Merge(src proto.Message) { 184 xxx_messageInfo_Task.Merge(m, src) 185} 186func (m *Task) XXX_Size() int { 187 return xxx_messageInfo_Task.Size(m) 188} 189func (m *Task) XXX_DiscardUnknown() { 190 xxx_messageInfo_Task.DiscardUnknown(m) 191} 192 193var xxx_messageInfo_Task proto.InternalMessageInfo 194 195func (m *Task) GetName() string { 196 if m != nil { 197 return m.Name 198 } 199 return "" 200} 201 202type isTask_PayloadType interface { 203 isTask_PayloadType() 204} 205 206type Task_AppEngineHttpRequest struct { 207 AppEngineHttpRequest *AppEngineHttpRequest `protobuf:"bytes,3,opt,name=app_engine_http_request,json=appEngineHttpRequest,proto3,oneof"` 208} 209 210type Task_HttpRequest struct { 211 HttpRequest *HttpRequest `protobuf:"bytes,11,opt,name=http_request,json=httpRequest,proto3,oneof"` 212} 213 214func (*Task_AppEngineHttpRequest) isTask_PayloadType() {} 215 216func (*Task_HttpRequest) isTask_PayloadType() {} 217 218func (m *Task) GetPayloadType() isTask_PayloadType { 219 if m != nil { 220 return m.PayloadType 221 } 222 return nil 223} 224 225func (m *Task) GetAppEngineHttpRequest() *AppEngineHttpRequest { 226 if x, ok := m.GetPayloadType().(*Task_AppEngineHttpRequest); ok { 227 return x.AppEngineHttpRequest 228 } 229 return nil 230} 231 232func (m *Task) GetHttpRequest() *HttpRequest { 233 if x, ok := m.GetPayloadType().(*Task_HttpRequest); ok { 234 return x.HttpRequest 235 } 236 return nil 237} 238 239func (m *Task) GetScheduleTime() *timestamp.Timestamp { 240 if m != nil { 241 return m.ScheduleTime 242 } 243 return nil 244} 245 246func (m *Task) GetCreateTime() *timestamp.Timestamp { 247 if m != nil { 248 return m.CreateTime 249 } 250 return nil 251} 252 253func (m *Task) GetDispatchDeadline() *duration.Duration { 254 if m != nil { 255 return m.DispatchDeadline 256 } 257 return nil 258} 259 260func (m *Task) GetDispatchCount() int32 { 261 if m != nil { 262 return m.DispatchCount 263 } 264 return 0 265} 266 267func (m *Task) GetResponseCount() int32 { 268 if m != nil { 269 return m.ResponseCount 270 } 271 return 0 272} 273 274func (m *Task) GetFirstAttempt() *Attempt { 275 if m != nil { 276 return m.FirstAttempt 277 } 278 return nil 279} 280 281func (m *Task) GetLastAttempt() *Attempt { 282 if m != nil { 283 return m.LastAttempt 284 } 285 return nil 286} 287 288func (m *Task) GetView() Task_View { 289 if m != nil { 290 return m.View 291 } 292 return Task_VIEW_UNSPECIFIED 293} 294 295// XXX_OneofWrappers is for the internal use of the proto package. 296func (*Task) XXX_OneofWrappers() []interface{} { 297 return []interface{}{ 298 (*Task_AppEngineHttpRequest)(nil), 299 (*Task_HttpRequest)(nil), 300 } 301} 302 303// The status of a task attempt. 304type Attempt struct { 305 // Output only. The time that this attempt was scheduled. 306 // 307 // `schedule_time` will be truncated to the nearest microsecond. 308 ScheduleTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"` 309 // Output only. The time that this attempt was dispatched. 310 // 311 // `dispatch_time` will be truncated to the nearest microsecond. 312 DispatchTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=dispatch_time,json=dispatchTime,proto3" json:"dispatch_time,omitempty"` 313 // Output only. The time that this attempt response was received. 314 // 315 // `response_time` will be truncated to the nearest microsecond. 316 ResponseTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"` 317 // Output only. The response from the worker for this attempt. 318 // 319 // If `response_time` is unset, then the task has not been attempted or is 320 // currently running and the `response_status` field is meaningless. 321 ResponseStatus *status.Status `protobuf:"bytes,4,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"` 322 XXX_NoUnkeyedLiteral struct{} `json:"-"` 323 XXX_unrecognized []byte `json:"-"` 324 XXX_sizecache int32 `json:"-"` 325} 326 327func (m *Attempt) Reset() { *m = Attempt{} } 328func (m *Attempt) String() string { return proto.CompactTextString(m) } 329func (*Attempt) ProtoMessage() {} 330func (*Attempt) Descriptor() ([]byte, []int) { 331 return fileDescriptor_ef2a735969aa09d5, []int{1} 332} 333 334func (m *Attempt) XXX_Unmarshal(b []byte) error { 335 return xxx_messageInfo_Attempt.Unmarshal(m, b) 336} 337func (m *Attempt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { 338 return xxx_messageInfo_Attempt.Marshal(b, m, deterministic) 339} 340func (m *Attempt) XXX_Merge(src proto.Message) { 341 xxx_messageInfo_Attempt.Merge(m, src) 342} 343func (m *Attempt) XXX_Size() int { 344 return xxx_messageInfo_Attempt.Size(m) 345} 346func (m *Attempt) XXX_DiscardUnknown() { 347 xxx_messageInfo_Attempt.DiscardUnknown(m) 348} 349 350var xxx_messageInfo_Attempt proto.InternalMessageInfo 351 352func (m *Attempt) GetScheduleTime() *timestamp.Timestamp { 353 if m != nil { 354 return m.ScheduleTime 355 } 356 return nil 357} 358 359func (m *Attempt) GetDispatchTime() *timestamp.Timestamp { 360 if m != nil { 361 return m.DispatchTime 362 } 363 return nil 364} 365 366func (m *Attempt) GetResponseTime() *timestamp.Timestamp { 367 if m != nil { 368 return m.ResponseTime 369 } 370 return nil 371} 372 373func (m *Attempt) GetResponseStatus() *status.Status { 374 if m != nil { 375 return m.ResponseStatus 376 } 377 return nil 378} 379 380func init() { 381 proto.RegisterEnum("google.cloud.tasks.v2beta3.Task_View", Task_View_name, Task_View_value) 382 proto.RegisterType((*Task)(nil), "google.cloud.tasks.v2beta3.Task") 383 proto.RegisterType((*Attempt)(nil), "google.cloud.tasks.v2beta3.Attempt") 384} 385 386func init() { 387 proto.RegisterFile("google/cloud/tasks/v2beta3/task.proto", fileDescriptor_ef2a735969aa09d5) 388} 389 390var fileDescriptor_ef2a735969aa09d5 = []byte{ 391 // 599 bytes of a gzipped FileDescriptorProto 392 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x5f, 0x4f, 0xdb, 0x3c, 393 0x14, 0xc6, 0x09, 0xa4, 0x40, 0xdd, 0xc0, 0xdb, 0xd7, 0x42, 0x22, 0x54, 0x13, 0xab, 0x98, 0x10, 394 0xbd, 0x4a, 0x36, 0xb8, 0x9a, 0xb8, 0x40, 0xf4, 0x9f, 0x5a, 0xa9, 0x9a, 0xaa, 0x14, 0x98, 0xb4, 395 0x9b, 0xc8, 0x4d, 0x4c, 0x1a, 0x91, 0xda, 0x9e, 0xed, 0x80, 0xf8, 0x08, 0xfb, 0xc4, 0xbb, 0x9d, 396 0xe2, 0xd8, 0x55, 0x19, 0xac, 0xdd, 0xee, 0x7a, 0xce, 0x79, 0x9e, 0x9f, 0x8f, 0xce, 0x39, 0x0d, 397 0x38, 0x4d, 0x28, 0x4d, 0x32, 0xec, 0x47, 0x19, 0xcd, 0x63, 0x5f, 0x22, 0xf1, 0x20, 0xfc, 0xc7, 398 0xf3, 0x29, 0x96, 0xe8, 0x42, 0x45, 0x1e, 0xe3, 0x54, 0x52, 0xd8, 0x28, 0x65, 0x9e, 0x92, 0x79, 399 0x4a, 0xe6, 0x69, 0x59, 0xe3, 0x9d, 0x46, 0x20, 0x96, 0xfa, 0x88, 0x10, 0x2a, 0x91, 0x4c, 0x29, 400 0x11, 0xa5, 0xb3, 0x71, 0xb4, 0x54, 0xe5, 0x58, 0xd0, 0x9c, 0x47, 0x58, 0x97, 0xce, 0x56, 0xbe, 401 0xcd, 0x13, 0x2c, 0xb5, 0xf0, 0x58, 0x0b, 0x55, 0x34, 0xcd, 0xef, 0xfd, 0x38, 0xe7, 0xea, 0x11, 402 0x5d, 0x7f, 0xff, 0x7b, 0x5d, 0xa6, 0x73, 0x2c, 0x24, 0x9a, 0x33, 0x2d, 0x38, 0xd4, 0x02, 0xce, 403 0x22, 0x5f, 0x48, 0x24, 0x73, 0xdd, 0xdd, 0xc9, 0xcf, 0x0a, 0xb0, 0x6f, 0x90, 0x78, 0x80, 0x10, 404 0xd8, 0x04, 0xcd, 0xb1, 0x6b, 0x35, 0xad, 0x56, 0x35, 0x50, 0xbf, 0x61, 0x0a, 0x0e, 0x11, 0x63, 405 0x21, 0x26, 0x49, 0x4a, 0x70, 0x38, 0x93, 0x92, 0x85, 0x1c, 0x7f, 0xcf, 0xb1, 0x90, 0xee, 0x56, 406 0xd3, 0x6a, 0xd5, 0xce, 0x3f, 0x7a, 0x7f, 0x1e, 0x8b, 0x77, 0xcd, 0x58, 0x4f, 0x39, 0x07, 0x52, 407 0xb2, 0xa0, 0xf4, 0x0d, 0x36, 0x82, 0x03, 0xf4, 0x46, 0x1e, 0x8e, 0x80, 0xf3, 0x82, 0x5f, 0x53, 408 0xfc, 0xb3, 0x55, 0xfc, 0x97, 0xd8, 0xda, 0x6c, 0x89, 0x76, 0x05, 0xf6, 0x44, 0x34, 0xc3, 0x71, 409 0x9e, 0xe1, 0xb0, 0x18, 0x85, 0x6b, 0x2b, 0x5c, 0xc3, 0xe0, 0xcc, 0x9c, 0xbc, 0x1b, 0x33, 0xa7, 410 0xc0, 0x31, 0x86, 0x22, 0x05, 0x2f, 0x41, 0x2d, 0xe2, 0x18, 0x49, 0x6d, 0xaf, 0xac, 0xb5, 0x83, 411 0x52, 0xae, 0xcc, 0x7d, 0xf0, 0x7f, 0x9c, 0x0a, 0x86, 0x64, 0x34, 0x0b, 0x63, 0x8c, 0xe2, 0x2c, 412 0x25, 0xd8, 0x75, 0x14, 0xe2, 0xe8, 0x15, 0xa2, 0xab, 0x37, 0x19, 0xd4, 0x8d, 0xa7, 0xab, 0x2d, 413 0xf0, 0x14, 0xec, 0x2f, 0x38, 0x11, 0xcd, 0x89, 0x74, 0xb7, 0x9b, 0x56, 0xab, 0x12, 0xec, 0x99, 414 0x6c, 0xa7, 0x48, 0x16, 0x32, 0x8e, 0x05, 0xa3, 0x44, 0x60, 0x2d, 0xdb, 0x29, 0x65, 0x26, 0x5b, 415 0xca, 0x06, 0x60, 0xef, 0x3e, 0xe5, 0x42, 0x86, 0x48, 0x4a, 0x3c, 0x67, 0xd2, 0xdd, 0x55, 0x1d, 416 0x7d, 0x58, 0xb9, 0xc2, 0x52, 0x1a, 0x38, 0xca, 0xa9, 0x23, 0xd8, 0x07, 0x4e, 0x86, 0x96, 0x40, 417 0xd5, 0xbf, 0x07, 0xd5, 0x0a, 0xa3, 0xe1, 0x7c, 0x06, 0xf6, 0x63, 0x8a, 0x9f, 0x5c, 0xd0, 0xb4, 418 0x5a, 0xfb, 0xe7, 0xa7, 0xab, 0xfc, 0xc5, 0x89, 0x7a, 0x77, 0x29, 0x7e, 0x0a, 0x94, 0xe5, 0xe4, 419 0x13, 0xb0, 0x8b, 0x08, 0x1e, 0x80, 0xfa, 0xdd, 0xb0, 0xf7, 0x35, 0xbc, 0xfd, 0x32, 0x19, 0xf7, 420 0x3a, 0xc3, 0xfe, 0xb0, 0xd7, 0xad, 0x6f, 0xc0, 0x2a, 0xa8, 0xb4, 0xaf, 0x27, 0xc3, 0x4e, 0xdd, 421 0x82, 0xbb, 0xc0, 0xee, 0xdf, 0x8e, 0x46, 0xf5, 0xcd, 0xf6, 0x3e, 0x70, 0x18, 0x7a, 0xce, 0x28, 422 0x8a, 0x43, 0xf9, 0xcc, 0xf0, 0xc9, 0x8f, 0x4d, 0xb0, 0x63, 0x3a, 0x79, 0x75, 0x2f, 0xd6, 0x3f, 423 0xde, 0xcb, 0x15, 0x58, 0x2c, 0xa5, 0x04, 0x6c, 0xae, 0x07, 0x18, 0x83, 0x01, 0x2c, 0x96, 0xa8, 424 0x00, 0x5b, 0xeb, 0x01, 0xc6, 0xa0, 0x2f, 0xf6, 0xbf, 0x05, 0xa0, 0xfc, 0x87, 0xeb, 0xa3, 0x87, 425 0x06, 0xc1, 0x59, 0xe4, 0x4d, 0x54, 0x25, 0x58, 0x1c, 0x4c, 0x19, 0xb7, 0x09, 0x38, 0x8e, 0xe8, 426 0x7c, 0xc5, 0x02, 0xda, 0xd5, 0x62, 0x03, 0xe3, 0xa2, 0x89, 0xb1, 0xf5, 0xed, 0x4a, 0x0b, 0x13, 427 0x9a, 0x21, 0x92, 0x78, 0x94, 0x27, 0x7e, 0x82, 0x89, 0x6a, 0xd1, 0x2f, 0x4b, 0x88, 0xa5, 0xe2, 428 0xad, 0xcf, 0xda, 0xa5, 0x8a, 0xa6, 0xdb, 0x4a, 0x7b, 0xf1, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x9c, 429 0x28, 0xef, 0x11, 0x7d, 0x05, 0x00, 0x00, 430} 431