github.com/matrixorigin/matrixone@v0.7.0/pkg/pb/task/task.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: task.proto
     3  
     4  package task
     5  
     6  import (
     7  	fmt "fmt"
     8  	io "io"
     9  	math "math"
    10  	math_bits "math/bits"
    11  
    12  	_ "github.com/gogo/protobuf/gogoproto"
    13  	proto "github.com/gogo/protobuf/proto"
    14  )
    15  
    16  // Reference imports to suppress errors if they are not otherwise used.
    17  var _ = proto.Marshal
    18  var _ = fmt.Errorf
    19  var _ = math.Inf
    20  
    21  // This is a compile-time assertion to ensure that this generated file
    22  // is compatible with the proto package it is being compiled against.
    23  // A compilation error at this line likely means your copy of the
    24  // proto package needs to be updated.
    25  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    26  
    27  // TaskStatus task status
    28  type TaskStatus int32
    29  
    30  const (
    31  	// Create is the state of waiting to be scheduled.
    32  	TaskStatus_Created TaskStatus = 0
    33  	// Running is running state. Task is assigned to a CN node and is running
    34  	TaskStatus_Running TaskStatus = 1
    35  	// Completed the task has been completed.
    36  	TaskStatus_Completed TaskStatus = 2
    37  )
    38  
    39  var TaskStatus_name = map[int32]string{
    40  	0: "Created",
    41  	1: "Running",
    42  	2: "Completed",
    43  }
    44  
    45  var TaskStatus_value = map[string]int32{
    46  	"Created":   0,
    47  	"Running":   1,
    48  	"Completed": 2,
    49  }
    50  
    51  func (x TaskStatus) String() string {
    52  	return proto.EnumName(TaskStatus_name, int32(x))
    53  }
    54  
    55  func (TaskStatus) EnumDescriptor() ([]byte, []int) {
    56  	return fileDescriptor_ce5d8dd45b4a91ff, []int{0}
    57  }
    58  
    59  // TaskCode task code
    60  type TaskCode int32
    61  
    62  const (
    63  	// TestOnly reserved for testing.
    64  	TaskCode_TestOnly TaskCode = 0
    65  	// SystemInit system init task
    66  	TaskCode_SystemInit TaskCode = 1
    67  	// MetricLogMerge handle metric/log exported data merge task
    68  	TaskCode_MetricLogMerge TaskCode = 2
    69  	// MetricStorageUsage handle metric server_storage_usage collection
    70  	TaskCode_MetricStorageUsage TaskCode = 3
    71  )
    72  
    73  var TaskCode_name = map[int32]string{
    74  	0: "TestOnly",
    75  	1: "SystemInit",
    76  	2: "MetricLogMerge",
    77  	3: "MetricStorageUsage",
    78  }
    79  
    80  var TaskCode_value = map[string]int32{
    81  	"TestOnly":           0,
    82  	"SystemInit":         1,
    83  	"MetricLogMerge":     2,
    84  	"MetricStorageUsage": 3,
    85  }
    86  
    87  func (x TaskCode) String() string {
    88  	return proto.EnumName(TaskCode_name, int32(x))
    89  }
    90  
    91  func (TaskCode) EnumDescriptor() ([]byte, []int) {
    92  	return fileDescriptor_ce5d8dd45b4a91ff, []int{1}
    93  }
    94  
    95  // ResultCode result code
    96  type ResultCode int32
    97  
    98  const (
    99  	// Success success
   100  	ResultCode_Success ResultCode = 0
   101  	// Failed failed
   102  	ResultCode_Failed ResultCode = 1
   103  )
   104  
   105  var ResultCode_name = map[int32]string{
   106  	0: "Success",
   107  	1: "Failed",
   108  }
   109  
   110  var ResultCode_value = map[string]int32{
   111  	"Success": 0,
   112  	"Failed":  1,
   113  }
   114  
   115  func (x ResultCode) String() string {
   116  	return proto.EnumName(ResultCode_name, int32(x))
   117  }
   118  
   119  func (ResultCode) EnumDescriptor() ([]byte, []int) {
   120  	return fileDescriptor_ce5d8dd45b4a91ff, []int{2}
   121  }
   122  
   123  // TaskMetadata is a task metadata abstraction that can be scheduled for execution at any CN node.
   124  type TaskMetadata struct {
   125  	// ID task id, global unique
   126  	ID string `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
   127  	// Executor used to select a particular task executor to run a task
   128  	Executor TaskCode `protobuf:"varint,2,opt,name=Executor,proto3,enum=task.TaskCode" json:"Executor,omitempty"`
   129  	// Context context needed to run the task
   130  	Context []byte `protobuf:"bytes,3,opt,name=Context,proto3" json:"Context,omitempty"`
   131  	// Options options for execute task
   132  	Options              TaskOptions `protobuf:"bytes,4,opt,name=Options,proto3" json:"Options"`
   133  	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
   134  	XXX_unrecognized     []byte      `json:"-"`
   135  	XXX_sizecache        int32       `json:"-"`
   136  }
   137  
   138  func (m *TaskMetadata) Reset()         { *m = TaskMetadata{} }
   139  func (m *TaskMetadata) String() string { return proto.CompactTextString(m) }
   140  func (*TaskMetadata) ProtoMessage()    {}
   141  func (*TaskMetadata) Descriptor() ([]byte, []int) {
   142  	return fileDescriptor_ce5d8dd45b4a91ff, []int{0}
   143  }
   144  func (m *TaskMetadata) XXX_Unmarshal(b []byte) error {
   145  	return m.Unmarshal(b)
   146  }
   147  func (m *TaskMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   148  	if deterministic {
   149  		return xxx_messageInfo_TaskMetadata.Marshal(b, m, deterministic)
   150  	} else {
   151  		b = b[:cap(b)]
   152  		n, err := m.MarshalToSizedBuffer(b)
   153  		if err != nil {
   154  			return nil, err
   155  		}
   156  		return b[:n], nil
   157  	}
   158  }
   159  func (m *TaskMetadata) XXX_Merge(src proto.Message) {
   160  	xxx_messageInfo_TaskMetadata.Merge(m, src)
   161  }
   162  func (m *TaskMetadata) XXX_Size() int {
   163  	return m.Size()
   164  }
   165  func (m *TaskMetadata) XXX_DiscardUnknown() {
   166  	xxx_messageInfo_TaskMetadata.DiscardUnknown(m)
   167  }
   168  
   169  var xxx_messageInfo_TaskMetadata proto.InternalMessageInfo
   170  
   171  func (m *TaskMetadata) GetID() string {
   172  	if m != nil {
   173  		return m.ID
   174  	}
   175  	return ""
   176  }
   177  
   178  func (m *TaskMetadata) GetExecutor() TaskCode {
   179  	if m != nil {
   180  		return m.Executor
   181  	}
   182  	return TaskCode_TestOnly
   183  }
   184  
   185  func (m *TaskMetadata) GetContext() []byte {
   186  	if m != nil {
   187  		return m.Context
   188  	}
   189  	return nil
   190  }
   191  
   192  func (m *TaskMetadata) GetOptions() TaskOptions {
   193  	if m != nil {
   194  		return m.Options
   195  	}
   196  	return TaskOptions{}
   197  }
   198  
   199  // TaskOptions task options
   200  type TaskOptions struct {
   201  	// MaxRetryTimes 0 means disable retry
   202  	MaxRetryTimes uint32 `protobuf:"varint,1,opt,name=MaxRetryTimes,proto3" json:"MaxRetryTimes,omitempty"`
   203  	// RetryInterval retry interval
   204  	RetryInterval int64 `protobuf:"varint,2,opt,name=RetryInterval,proto3" json:"RetryInterval,omitempty"`
   205  	// DelayDuration delay duration. Controls how long a task is delayed before it is scheduled for
   206  	// execution.
   207  	DelayDuration int64 `protobuf:"varint,3,opt,name=DelayDuration,proto3" json:"DelayDuration,omitempty"`
   208  	// Concurrency is the max number of a task running at the same time. 0 means no limits.
   209  	Concurrency          uint32   `protobuf:"varint,4,opt,name=Concurrency,proto3" json:"Concurrency,omitempty"`
   210  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   211  	XXX_unrecognized     []byte   `json:"-"`
   212  	XXX_sizecache        int32    `json:"-"`
   213  }
   214  
   215  func (m *TaskOptions) Reset()         { *m = TaskOptions{} }
   216  func (m *TaskOptions) String() string { return proto.CompactTextString(m) }
   217  func (*TaskOptions) ProtoMessage()    {}
   218  func (*TaskOptions) Descriptor() ([]byte, []int) {
   219  	return fileDescriptor_ce5d8dd45b4a91ff, []int{1}
   220  }
   221  func (m *TaskOptions) XXX_Unmarshal(b []byte) error {
   222  	return m.Unmarshal(b)
   223  }
   224  func (m *TaskOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   225  	if deterministic {
   226  		return xxx_messageInfo_TaskOptions.Marshal(b, m, deterministic)
   227  	} else {
   228  		b = b[:cap(b)]
   229  		n, err := m.MarshalToSizedBuffer(b)
   230  		if err != nil {
   231  			return nil, err
   232  		}
   233  		return b[:n], nil
   234  	}
   235  }
   236  func (m *TaskOptions) XXX_Merge(src proto.Message) {
   237  	xxx_messageInfo_TaskOptions.Merge(m, src)
   238  }
   239  func (m *TaskOptions) XXX_Size() int {
   240  	return m.Size()
   241  }
   242  func (m *TaskOptions) XXX_DiscardUnknown() {
   243  	xxx_messageInfo_TaskOptions.DiscardUnknown(m)
   244  }
   245  
   246  var xxx_messageInfo_TaskOptions proto.InternalMessageInfo
   247  
   248  func (m *TaskOptions) GetMaxRetryTimes() uint32 {
   249  	if m != nil {
   250  		return m.MaxRetryTimes
   251  	}
   252  	return 0
   253  }
   254  
   255  func (m *TaskOptions) GetRetryInterval() int64 {
   256  	if m != nil {
   257  		return m.RetryInterval
   258  	}
   259  	return 0
   260  }
   261  
   262  func (m *TaskOptions) GetDelayDuration() int64 {
   263  	if m != nil {
   264  		return m.DelayDuration
   265  	}
   266  	return 0
   267  }
   268  
   269  func (m *TaskOptions) GetConcurrency() uint32 {
   270  	if m != nil {
   271  		return m.Concurrency
   272  	}
   273  	return 0
   274  }
   275  
   276  // ExecuteResult task execute result
   277  type ExecuteResult struct {
   278  	// Code result code
   279  	Code ResultCode `protobuf:"varint,1,opt,name=Code,proto3,enum=task.ResultCode" json:"Code,omitempty"`
   280  	// Error error message
   281  	Error                string   `protobuf:"bytes,2,opt,name=Error,proto3" json:"Error,omitempty"`
   282  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   283  	XXX_unrecognized     []byte   `json:"-"`
   284  	XXX_sizecache        int32    `json:"-"`
   285  }
   286  
   287  func (m *ExecuteResult) Reset()         { *m = ExecuteResult{} }
   288  func (m *ExecuteResult) String() string { return proto.CompactTextString(m) }
   289  func (*ExecuteResult) ProtoMessage()    {}
   290  func (*ExecuteResult) Descriptor() ([]byte, []int) {
   291  	return fileDescriptor_ce5d8dd45b4a91ff, []int{2}
   292  }
   293  func (m *ExecuteResult) XXX_Unmarshal(b []byte) error {
   294  	return m.Unmarshal(b)
   295  }
   296  func (m *ExecuteResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   297  	if deterministic {
   298  		return xxx_messageInfo_ExecuteResult.Marshal(b, m, deterministic)
   299  	} else {
   300  		b = b[:cap(b)]
   301  		n, err := m.MarshalToSizedBuffer(b)
   302  		if err != nil {
   303  			return nil, err
   304  		}
   305  		return b[:n], nil
   306  	}
   307  }
   308  func (m *ExecuteResult) XXX_Merge(src proto.Message) {
   309  	xxx_messageInfo_ExecuteResult.Merge(m, src)
   310  }
   311  func (m *ExecuteResult) XXX_Size() int {
   312  	return m.Size()
   313  }
   314  func (m *ExecuteResult) XXX_DiscardUnknown() {
   315  	xxx_messageInfo_ExecuteResult.DiscardUnknown(m)
   316  }
   317  
   318  var xxx_messageInfo_ExecuteResult proto.InternalMessageInfo
   319  
   320  func (m *ExecuteResult) GetCode() ResultCode {
   321  	if m != nil {
   322  		return m.Code
   323  	}
   324  	return ResultCode_Success
   325  }
   326  
   327  func (m *ExecuteResult) GetError() string {
   328  	if m != nil {
   329  		return m.Error
   330  	}
   331  	return ""
   332  }
   333  
   334  // Task task execute info.
   335  type Task struct {
   336  	ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
   337  	// TaskMetadata task metadata
   338  	Metadata TaskMetadata `protobuf:"bytes,2,opt,name=Metadata,proto3" json:"Metadata"`
   339  	// ParentTaskID used to record the parent task of the current task
   340  	ParentTaskID string `protobuf:"bytes,3,opt,name=ParentTaskID,proto3" json:"ParentTaskID,omitempty"`
   341  	// TaskStatus task status
   342  	Status TaskStatus `protobuf:"varint,4,opt,name=Status,proto3,enum=task.TaskStatus" json:"Status,omitempty"`
   343  	// TaskRunner is the UUID of the CN node which the task run is assigned to
   344  	TaskRunner string `protobuf:"bytes,5,opt,name=TaskRunner,proto3" json:"TaskRunner,omitempty"`
   345  	// Epoch indicates how many times the current task is scheduled, the first time it is scheduled
   346  	// is 1. Each time it is scheduled, Epoch++.
   347  	Epoch uint32 `protobuf:"varint,6,opt,name=Epoch,proto3" json:"Epoch,omitempty"`
   348  	// LastHeartbeat time of the last heartbeat reported by TaskRunner. Unix timestamp in ms
   349  	LastHeartbeat int64 `protobuf:"varint,7,opt,name=LastHeartbeat,proto3" json:"LastHeartbeat,omitempty"`
   350  	// CreateAt time of the task created. Unix timestamp in ms
   351  	CreateAt int64 `protobuf:"varint,8,opt,name=CreateAt,proto3" json:"CreateAt,omitempty"`
   352  	// CompletedAt time of the task completed. Unix timestamp in ms
   353  	CompletedAt int64 `protobuf:"varint,9,opt,name=CompletedAt,proto3" json:"CompletedAt,omitempty"`
   354  	// ExecuteResult execute result
   355  	ExecuteResult        *ExecuteResult `protobuf:"bytes,10,opt,name=ExecuteResult,proto3" json:"ExecuteResult,omitempty"`
   356  	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
   357  	XXX_unrecognized     []byte         `json:"-"`
   358  	XXX_sizecache        int32          `json:"-"`
   359  }
   360  
   361  func (m *Task) Reset()         { *m = Task{} }
   362  func (m *Task) String() string { return proto.CompactTextString(m) }
   363  func (*Task) ProtoMessage()    {}
   364  func (*Task) Descriptor() ([]byte, []int) {
   365  	return fileDescriptor_ce5d8dd45b4a91ff, []int{3}
   366  }
   367  func (m *Task) XXX_Unmarshal(b []byte) error {
   368  	return m.Unmarshal(b)
   369  }
   370  func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   371  	if deterministic {
   372  		return xxx_messageInfo_Task.Marshal(b, m, deterministic)
   373  	} else {
   374  		b = b[:cap(b)]
   375  		n, err := m.MarshalToSizedBuffer(b)
   376  		if err != nil {
   377  			return nil, err
   378  		}
   379  		return b[:n], nil
   380  	}
   381  }
   382  func (m *Task) XXX_Merge(src proto.Message) {
   383  	xxx_messageInfo_Task.Merge(m, src)
   384  }
   385  func (m *Task) XXX_Size() int {
   386  	return m.Size()
   387  }
   388  func (m *Task) XXX_DiscardUnknown() {
   389  	xxx_messageInfo_Task.DiscardUnknown(m)
   390  }
   391  
   392  var xxx_messageInfo_Task proto.InternalMessageInfo
   393  
   394  func (m *Task) GetID() uint64 {
   395  	if m != nil {
   396  		return m.ID
   397  	}
   398  	return 0
   399  }
   400  
   401  func (m *Task) GetMetadata() TaskMetadata {
   402  	if m != nil {
   403  		return m.Metadata
   404  	}
   405  	return TaskMetadata{}
   406  }
   407  
   408  func (m *Task) GetParentTaskID() string {
   409  	if m != nil {
   410  		return m.ParentTaskID
   411  	}
   412  	return ""
   413  }
   414  
   415  func (m *Task) GetStatus() TaskStatus {
   416  	if m != nil {
   417  		return m.Status
   418  	}
   419  	return TaskStatus_Created
   420  }
   421  
   422  func (m *Task) GetTaskRunner() string {
   423  	if m != nil {
   424  		return m.TaskRunner
   425  	}
   426  	return ""
   427  }
   428  
   429  func (m *Task) GetEpoch() uint32 {
   430  	if m != nil {
   431  		return m.Epoch
   432  	}
   433  	return 0
   434  }
   435  
   436  func (m *Task) GetLastHeartbeat() int64 {
   437  	if m != nil {
   438  		return m.LastHeartbeat
   439  	}
   440  	return 0
   441  }
   442  
   443  func (m *Task) GetCreateAt() int64 {
   444  	if m != nil {
   445  		return m.CreateAt
   446  	}
   447  	return 0
   448  }
   449  
   450  func (m *Task) GetCompletedAt() int64 {
   451  	if m != nil {
   452  		return m.CompletedAt
   453  	}
   454  	return 0
   455  }
   456  
   457  func (m *Task) GetExecuteResult() *ExecuteResult {
   458  	if m != nil {
   459  		return m.ExecuteResult
   460  	}
   461  	return nil
   462  }
   463  
   464  // CronTask task execute info.
   465  type CronTask struct {
   466  	ID uint64 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
   467  	// TaskMetadata task metadata
   468  	Metadata TaskMetadata `protobuf:"bytes,2,opt,name=Metadata,proto3" json:"Metadata"`
   469  	// CronExpr cron expr
   470  	CronExpr string `protobuf:"bytes,3,opt,name=CronExpr,proto3" json:"CronExpr,omitempty"`
   471  	// NextTime the next time it should be scheduled for execution. Unix timestamp in ms
   472  	NextTime int64 `protobuf:"varint,4,opt,name=NextTime,proto3" json:"NextTime,omitempty"`
   473  	// TriggerTimes the number of times it was triggered
   474  	TriggerTimes uint64 `protobuf:"varint,5,opt,name=TriggerTimes,proto3" json:"TriggerTimes,omitempty"`
   475  	// CreateAt time of the cron task created. Unix timestamp in ms
   476  	CreateAt int64 `protobuf:"varint,6,opt,name=CreateAt,proto3" json:"CreateAt,omitempty"`
   477  	// CreateAt time of the cron task created. Unix timestamp in ms
   478  	UpdateAt             int64    `protobuf:"varint,7,opt,name=UpdateAt,proto3" json:"UpdateAt,omitempty"`
   479  	XXX_NoUnkeyedLiteral struct{} `json:"-"`
   480  	XXX_unrecognized     []byte   `json:"-"`
   481  	XXX_sizecache        int32    `json:"-"`
   482  }
   483  
   484  func (m *CronTask) Reset()         { *m = CronTask{} }
   485  func (m *CronTask) String() string { return proto.CompactTextString(m) }
   486  func (*CronTask) ProtoMessage()    {}
   487  func (*CronTask) Descriptor() ([]byte, []int) {
   488  	return fileDescriptor_ce5d8dd45b4a91ff, []int{4}
   489  }
   490  func (m *CronTask) XXX_Unmarshal(b []byte) error {
   491  	return m.Unmarshal(b)
   492  }
   493  func (m *CronTask) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   494  	if deterministic {
   495  		return xxx_messageInfo_CronTask.Marshal(b, m, deterministic)
   496  	} else {
   497  		b = b[:cap(b)]
   498  		n, err := m.MarshalToSizedBuffer(b)
   499  		if err != nil {
   500  			return nil, err
   501  		}
   502  		return b[:n], nil
   503  	}
   504  }
   505  func (m *CronTask) XXX_Merge(src proto.Message) {
   506  	xxx_messageInfo_CronTask.Merge(m, src)
   507  }
   508  func (m *CronTask) XXX_Size() int {
   509  	return m.Size()
   510  }
   511  func (m *CronTask) XXX_DiscardUnknown() {
   512  	xxx_messageInfo_CronTask.DiscardUnknown(m)
   513  }
   514  
   515  var xxx_messageInfo_CronTask proto.InternalMessageInfo
   516  
   517  func (m *CronTask) GetID() uint64 {
   518  	if m != nil {
   519  		return m.ID
   520  	}
   521  	return 0
   522  }
   523  
   524  func (m *CronTask) GetMetadata() TaskMetadata {
   525  	if m != nil {
   526  		return m.Metadata
   527  	}
   528  	return TaskMetadata{}
   529  }
   530  
   531  func (m *CronTask) GetCronExpr() string {
   532  	if m != nil {
   533  		return m.CronExpr
   534  	}
   535  	return ""
   536  }
   537  
   538  func (m *CronTask) GetNextTime() int64 {
   539  	if m != nil {
   540  		return m.NextTime
   541  	}
   542  	return 0
   543  }
   544  
   545  func (m *CronTask) GetTriggerTimes() uint64 {
   546  	if m != nil {
   547  		return m.TriggerTimes
   548  	}
   549  	return 0
   550  }
   551  
   552  func (m *CronTask) GetCreateAt() int64 {
   553  	if m != nil {
   554  		return m.CreateAt
   555  	}
   556  	return 0
   557  }
   558  
   559  func (m *CronTask) GetUpdateAt() int64 {
   560  	if m != nil {
   561  		return m.UpdateAt
   562  	}
   563  	return 0
   564  }
   565  
   566  func init() {
   567  	proto.RegisterEnum("task.TaskStatus", TaskStatus_name, TaskStatus_value)
   568  	proto.RegisterEnum("task.TaskCode", TaskCode_name, TaskCode_value)
   569  	proto.RegisterEnum("task.ResultCode", ResultCode_name, ResultCode_value)
   570  	proto.RegisterType((*TaskMetadata)(nil), "task.TaskMetadata")
   571  	proto.RegisterType((*TaskOptions)(nil), "task.TaskOptions")
   572  	proto.RegisterType((*ExecuteResult)(nil), "task.ExecuteResult")
   573  	proto.RegisterType((*Task)(nil), "task.Task")
   574  	proto.RegisterType((*CronTask)(nil), "task.CronTask")
   575  }
   576  
   577  func init() { proto.RegisterFile("task.proto", fileDescriptor_ce5d8dd45b4a91ff) }
   578  
   579  var fileDescriptor_ce5d8dd45b4a91ff = []byte{
   580  	// 680 bytes of a gzipped FileDescriptorProto
   581  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xda, 0x4c,
   582  	0x14, 0x65, 0x80, 0xf0, 0x73, 0xf9, 0x91, 0xbf, 0xf9, 0x3e, 0x7d, 0xb2, 0x58, 0x50, 0x84, 0x52,
   583  	0x09, 0x21, 0x35, 0xa8, 0xb4, 0x5d, 0x74, 0x55, 0x25, 0x90, 0xaa, 0xa8, 0xa1, 0xa9, 0x06, 0xb2,
   584  	0xe9, 0x6e, 0x30, 0xb7, 0x8e, 0x15, 0xf0, 0x58, 0xe3, 0x71, 0x05, 0x4f, 0xd2, 0x75, 0xdf, 0x26,
   585  	0xcb, 0x3c, 0x41, 0xd5, 0x46, 0xdd, 0xf7, 0x15, 0xaa, 0x99, 0x01, 0x07, 0x67, 0xdd, 0x9d, 0xcf,
   586  	0x39, 0x77, 0xee, 0xdc, 0x7b, 0x8e, 0x6d, 0x00, 0xc5, 0xe3, 0x9b, 0x93, 0x48, 0x0a, 0x25, 0x68,
   587  	0x51, 0x3f, 0xb7, 0x9e, 0xf9, 0x81, 0xba, 0x4e, 0x16, 0x27, 0x9e, 0x58, 0x0f, 0x7c, 0xe1, 0x8b,
   588  	0x81, 0x11, 0x17, 0xc9, 0x67, 0x83, 0x0c, 0x30, 0x4f, 0xf6, 0x50, 0xf7, 0x2b, 0x81, 0xfa, 0x9c,
   589  	0xc7, 0x37, 0x53, 0x54, 0x7c, 0xc9, 0x15, 0xa7, 0x4d, 0xc8, 0x4f, 0xc6, 0x2e, 0xe9, 0x90, 0x5e,
   590  	0x95, 0xe5, 0x27, 0x63, 0xda, 0x87, 0xca, 0xf9, 0x06, 0xbd, 0x44, 0x09, 0xe9, 0xe6, 0x3b, 0xa4,
   591  	0xd7, 0x1c, 0x36, 0x4f, 0xcc, 0xa5, 0xfa, 0xd4, 0x48, 0x2c, 0x91, 0xa5, 0x3a, 0x75, 0xa1, 0x3c,
   592  	0x12, 0xa1, 0xc2, 0x8d, 0x72, 0x0b, 0x1d, 0xd2, 0xab, 0xb3, 0x3d, 0xa4, 0xcf, 0xa1, 0x7c, 0x19,
   593  	0xa9, 0x40, 0x84, 0xb1, 0x5b, 0xec, 0x90, 0x5e, 0x6d, 0xf8, 0xcf, 0x43, 0x93, 0x9d, 0x70, 0x56,
   594  	0xbc, 0xfd, 0xfe, 0x24, 0xc7, 0xf6, 0x75, 0xdd, 0x6f, 0x04, 0x6a, 0x07, 0x32, 0x3d, 0x86, 0xc6,
   595  	0x94, 0x6f, 0x18, 0x2a, 0xb9, 0x9d, 0x07, 0x6b, 0x8c, 0xcd, 0x8c, 0x0d, 0x96, 0x25, 0x75, 0x95,
   596  	0x41, 0x93, 0x50, 0xa1, 0xfc, 0xc2, 0x57, 0x66, 0xe6, 0x02, 0xcb, 0x92, 0xba, 0x6a, 0x8c, 0x2b,
   597  	0xbe, 0x1d, 0x27, 0x92, 0xeb, 0xee, 0x66, 0xdc, 0x02, 0xcb, 0x92, 0xb4, 0x03, 0xb5, 0x91, 0x08,
   598  	0xbd, 0x44, 0x4a, 0x0c, 0xbd, 0xad, 0x19, 0xbc, 0xc1, 0x0e, 0xa9, 0xee, 0x7b, 0x68, 0xd8, 0xe5,
   599  	0x91, 0x61, 0x9c, 0xac, 0x14, 0x3d, 0x86, 0xa2, 0xf6, 0xc4, 0xcc, 0xd6, 0x1c, 0x3a, 0x76, 0x49,
   600  	0xab, 0x19, 0xaf, 0x8c, 0x4a, 0xff, 0x83, 0xa3, 0x73, 0x29, 0x77, 0x86, 0x56, 0x99, 0x05, 0xdd,
   601  	0xdf, 0x79, 0x28, 0xea, 0x85, 0x0f, 0x22, 0x28, 0x9a, 0x08, 0x5e, 0x42, 0x65, 0x1f, 0x8f, 0x39,
   602  	0x51, 0x1b, 0xd2, 0x07, 0xf7, 0xf6, 0xca, 0xce, 0xbe, 0xb4, 0x92, 0x76, 0xa1, 0xfe, 0x91, 0x4b,
   603  	0x0c, 0x95, 0xae, 0x9a, 0x8c, 0xcd, 0x8a, 0x55, 0x96, 0xe1, 0x68, 0x0f, 0x4a, 0x33, 0xc5, 0x55,
   604  	0x62, 0x53, 0x49, 0x07, 0xd6, 0xaa, 0xe5, 0xd9, 0x4e, 0xa7, 0x6d, 0x00, 0xcd, 0xb2, 0x24, 0x0c,
   605  	0x51, 0xba, 0x47, 0xa6, 0xd7, 0x01, 0x63, 0x56, 0x8a, 0x84, 0x77, 0xed, 0x96, 0x8c, 0x4b, 0x16,
   606  	0x68, 0x9f, 0x2f, 0x78, 0xac, 0xde, 0x21, 0x97, 0x6a, 0x81, 0x5c, 0xb9, 0x65, 0xeb, 0x73, 0x86,
   607  	0xa4, 0x2d, 0xa8, 0x8c, 0x24, 0x72, 0x85, 0xa7, 0xca, 0xad, 0x98, 0x82, 0x14, 0xdb, 0x0c, 0xd6,
   608  	0xd1, 0x0a, 0x15, 0x2e, 0x4f, 0x95, 0x5b, 0x35, 0xf2, 0x21, 0x45, 0x5f, 0x3f, 0xca, 0xc0, 0x05,
   609  	0x63, 0xd1, 0xbf, 0x76, 0x95, 0x8c, 0xc4, 0xb2, 0x95, 0xdd, 0x5f, 0x44, 0xdf, 0x2c, 0xc2, 0xbf,
   610  	0xe8, 0x7a, 0xcb, 0x76, 0x3c, 0xdf, 0x44, 0x72, 0xe7, 0x78, 0x8a, 0xb5, 0xf6, 0x01, 0x37, 0x4a,
   611  	0xbf, 0xa8, 0xc6, 0xef, 0x02, 0x4b, 0xb1, 0x4e, 0x6b, 0x2e, 0x03, 0xdf, 0x47, 0x69, 0x5f, 0xee,
   612  	0x23, 0x33, 0x47, 0x86, 0xcb, 0xf8, 0x54, 0x7a, 0xe4, 0x53, 0x0b, 0x2a, 0x57, 0xd1, 0xd2, 0x6a,
   613  	0xd6, 0xe4, 0x14, 0xf7, 0x5f, 0xd9, 0xec, 0x76, 0x49, 0xd6, 0xa0, 0x6c, 0x4f, 0x2d, 0x9d, 0x9c,
   614  	0x06, 0x3a, 0xc0, 0x20, 0xf4, 0x1d, 0x42, 0x1b, 0x50, 0x4d, 0x8d, 0x75, 0xf2, 0xfd, 0x39, 0x54,
   615  	0xf6, 0xdf, 0x38, 0xad, 0x43, 0x65, 0x8e, 0xb1, 0xba, 0x0c, 0x57, 0x5b, 0x27, 0x47, 0x9b, 0x00,
   616  	0xb3, 0x6d, 0xac, 0x70, 0x3d, 0x09, 0x03, 0xe5, 0x10, 0x4a, 0xa1, 0x39, 0x45, 0x25, 0x03, 0xef,
   617  	0x42, 0xf8, 0x53, 0x94, 0x3e, 0x3a, 0x79, 0xfa, 0x3f, 0x50, 0xcb, 0xcd, 0x94, 0x90, 0xdc, 0xc7,
   618  	0xab, 0x98, 0xfb, 0xe8, 0x14, 0xfa, 0x4f, 0x01, 0x1e, 0xbe, 0x07, 0x7d, 0xff, 0x2c, 0xf1, 0x3c,
   619  	0x8c, 0x63, 0x27, 0x47, 0x01, 0x4a, 0x6f, 0x79, 0xb0, 0xc2, 0xa5, 0x43, 0xce, 0xde, 0xdc, 0xfd,
   620  	0x6c, 0x93, 0xdb, 0xfb, 0x36, 0xb9, 0xbb, 0x6f, 0x93, 0x1f, 0xf7, 0x6d, 0xf2, 0xe9, 0xf0, 0xc7,
   621  	0xb6, 0xe6, 0x4a, 0x06, 0x1b, 0x21, 0x03, 0x3f, 0x08, 0xf7, 0x20, 0xc4, 0x41, 0x74, 0xe3, 0x0f,
   622  	0xa2, 0xc5, 0x40, 0xa7, 0xb4, 0x28, 0x99, 0xff, 0xdb, 0x8b, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff,
   623  	0xbd, 0x41, 0x97, 0x03, 0x22, 0x05, 0x00, 0x00,
   624  }
   625  
   626  func (m *TaskMetadata) Marshal() (dAtA []byte, err error) {
   627  	size := m.Size()
   628  	dAtA = make([]byte, size)
   629  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   630  	if err != nil {
   631  		return nil, err
   632  	}
   633  	return dAtA[:n], nil
   634  }
   635  
   636  func (m *TaskMetadata) MarshalTo(dAtA []byte) (int, error) {
   637  	size := m.Size()
   638  	return m.MarshalToSizedBuffer(dAtA[:size])
   639  }
   640  
   641  func (m *TaskMetadata) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   642  	i := len(dAtA)
   643  	_ = i
   644  	var l int
   645  	_ = l
   646  	if m.XXX_unrecognized != nil {
   647  		i -= len(m.XXX_unrecognized)
   648  		copy(dAtA[i:], m.XXX_unrecognized)
   649  	}
   650  	{
   651  		size, err := m.Options.MarshalToSizedBuffer(dAtA[:i])
   652  		if err != nil {
   653  			return 0, err
   654  		}
   655  		i -= size
   656  		i = encodeVarintTask(dAtA, i, uint64(size))
   657  	}
   658  	i--
   659  	dAtA[i] = 0x22
   660  	if len(m.Context) > 0 {
   661  		i -= len(m.Context)
   662  		copy(dAtA[i:], m.Context)
   663  		i = encodeVarintTask(dAtA, i, uint64(len(m.Context)))
   664  		i--
   665  		dAtA[i] = 0x1a
   666  	}
   667  	if m.Executor != 0 {
   668  		i = encodeVarintTask(dAtA, i, uint64(m.Executor))
   669  		i--
   670  		dAtA[i] = 0x10
   671  	}
   672  	if len(m.ID) > 0 {
   673  		i -= len(m.ID)
   674  		copy(dAtA[i:], m.ID)
   675  		i = encodeVarintTask(dAtA, i, uint64(len(m.ID)))
   676  		i--
   677  		dAtA[i] = 0xa
   678  	}
   679  	return len(dAtA) - i, nil
   680  }
   681  
   682  func (m *TaskOptions) Marshal() (dAtA []byte, err error) {
   683  	size := m.Size()
   684  	dAtA = make([]byte, size)
   685  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   686  	if err != nil {
   687  		return nil, err
   688  	}
   689  	return dAtA[:n], nil
   690  }
   691  
   692  func (m *TaskOptions) MarshalTo(dAtA []byte) (int, error) {
   693  	size := m.Size()
   694  	return m.MarshalToSizedBuffer(dAtA[:size])
   695  }
   696  
   697  func (m *TaskOptions) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   698  	i := len(dAtA)
   699  	_ = i
   700  	var l int
   701  	_ = l
   702  	if m.XXX_unrecognized != nil {
   703  		i -= len(m.XXX_unrecognized)
   704  		copy(dAtA[i:], m.XXX_unrecognized)
   705  	}
   706  	if m.Concurrency != 0 {
   707  		i = encodeVarintTask(dAtA, i, uint64(m.Concurrency))
   708  		i--
   709  		dAtA[i] = 0x20
   710  	}
   711  	if m.DelayDuration != 0 {
   712  		i = encodeVarintTask(dAtA, i, uint64(m.DelayDuration))
   713  		i--
   714  		dAtA[i] = 0x18
   715  	}
   716  	if m.RetryInterval != 0 {
   717  		i = encodeVarintTask(dAtA, i, uint64(m.RetryInterval))
   718  		i--
   719  		dAtA[i] = 0x10
   720  	}
   721  	if m.MaxRetryTimes != 0 {
   722  		i = encodeVarintTask(dAtA, i, uint64(m.MaxRetryTimes))
   723  		i--
   724  		dAtA[i] = 0x8
   725  	}
   726  	return len(dAtA) - i, nil
   727  }
   728  
   729  func (m *ExecuteResult) Marshal() (dAtA []byte, err error) {
   730  	size := m.Size()
   731  	dAtA = make([]byte, size)
   732  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   733  	if err != nil {
   734  		return nil, err
   735  	}
   736  	return dAtA[:n], nil
   737  }
   738  
   739  func (m *ExecuteResult) MarshalTo(dAtA []byte) (int, error) {
   740  	size := m.Size()
   741  	return m.MarshalToSizedBuffer(dAtA[:size])
   742  }
   743  
   744  func (m *ExecuteResult) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   745  	i := len(dAtA)
   746  	_ = i
   747  	var l int
   748  	_ = l
   749  	if m.XXX_unrecognized != nil {
   750  		i -= len(m.XXX_unrecognized)
   751  		copy(dAtA[i:], m.XXX_unrecognized)
   752  	}
   753  	if len(m.Error) > 0 {
   754  		i -= len(m.Error)
   755  		copy(dAtA[i:], m.Error)
   756  		i = encodeVarintTask(dAtA, i, uint64(len(m.Error)))
   757  		i--
   758  		dAtA[i] = 0x12
   759  	}
   760  	if m.Code != 0 {
   761  		i = encodeVarintTask(dAtA, i, uint64(m.Code))
   762  		i--
   763  		dAtA[i] = 0x8
   764  	}
   765  	return len(dAtA) - i, nil
   766  }
   767  
   768  func (m *Task) Marshal() (dAtA []byte, err error) {
   769  	size := m.Size()
   770  	dAtA = make([]byte, size)
   771  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   772  	if err != nil {
   773  		return nil, err
   774  	}
   775  	return dAtA[:n], nil
   776  }
   777  
   778  func (m *Task) MarshalTo(dAtA []byte) (int, error) {
   779  	size := m.Size()
   780  	return m.MarshalToSizedBuffer(dAtA[:size])
   781  }
   782  
   783  func (m *Task) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   784  	i := len(dAtA)
   785  	_ = i
   786  	var l int
   787  	_ = l
   788  	if m.XXX_unrecognized != nil {
   789  		i -= len(m.XXX_unrecognized)
   790  		copy(dAtA[i:], m.XXX_unrecognized)
   791  	}
   792  	if m.ExecuteResult != nil {
   793  		{
   794  			size, err := m.ExecuteResult.MarshalToSizedBuffer(dAtA[:i])
   795  			if err != nil {
   796  				return 0, err
   797  			}
   798  			i -= size
   799  			i = encodeVarintTask(dAtA, i, uint64(size))
   800  		}
   801  		i--
   802  		dAtA[i] = 0x52
   803  	}
   804  	if m.CompletedAt != 0 {
   805  		i = encodeVarintTask(dAtA, i, uint64(m.CompletedAt))
   806  		i--
   807  		dAtA[i] = 0x48
   808  	}
   809  	if m.CreateAt != 0 {
   810  		i = encodeVarintTask(dAtA, i, uint64(m.CreateAt))
   811  		i--
   812  		dAtA[i] = 0x40
   813  	}
   814  	if m.LastHeartbeat != 0 {
   815  		i = encodeVarintTask(dAtA, i, uint64(m.LastHeartbeat))
   816  		i--
   817  		dAtA[i] = 0x38
   818  	}
   819  	if m.Epoch != 0 {
   820  		i = encodeVarintTask(dAtA, i, uint64(m.Epoch))
   821  		i--
   822  		dAtA[i] = 0x30
   823  	}
   824  	if len(m.TaskRunner) > 0 {
   825  		i -= len(m.TaskRunner)
   826  		copy(dAtA[i:], m.TaskRunner)
   827  		i = encodeVarintTask(dAtA, i, uint64(len(m.TaskRunner)))
   828  		i--
   829  		dAtA[i] = 0x2a
   830  	}
   831  	if m.Status != 0 {
   832  		i = encodeVarintTask(dAtA, i, uint64(m.Status))
   833  		i--
   834  		dAtA[i] = 0x20
   835  	}
   836  	if len(m.ParentTaskID) > 0 {
   837  		i -= len(m.ParentTaskID)
   838  		copy(dAtA[i:], m.ParentTaskID)
   839  		i = encodeVarintTask(dAtA, i, uint64(len(m.ParentTaskID)))
   840  		i--
   841  		dAtA[i] = 0x1a
   842  	}
   843  	{
   844  		size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i])
   845  		if err != nil {
   846  			return 0, err
   847  		}
   848  		i -= size
   849  		i = encodeVarintTask(dAtA, i, uint64(size))
   850  	}
   851  	i--
   852  	dAtA[i] = 0x12
   853  	if m.ID != 0 {
   854  		i = encodeVarintTask(dAtA, i, uint64(m.ID))
   855  		i--
   856  		dAtA[i] = 0x8
   857  	}
   858  	return len(dAtA) - i, nil
   859  }
   860  
   861  func (m *CronTask) Marshal() (dAtA []byte, err error) {
   862  	size := m.Size()
   863  	dAtA = make([]byte, size)
   864  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   865  	if err != nil {
   866  		return nil, err
   867  	}
   868  	return dAtA[:n], nil
   869  }
   870  
   871  func (m *CronTask) MarshalTo(dAtA []byte) (int, error) {
   872  	size := m.Size()
   873  	return m.MarshalToSizedBuffer(dAtA[:size])
   874  }
   875  
   876  func (m *CronTask) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   877  	i := len(dAtA)
   878  	_ = i
   879  	var l int
   880  	_ = l
   881  	if m.XXX_unrecognized != nil {
   882  		i -= len(m.XXX_unrecognized)
   883  		copy(dAtA[i:], m.XXX_unrecognized)
   884  	}
   885  	if m.UpdateAt != 0 {
   886  		i = encodeVarintTask(dAtA, i, uint64(m.UpdateAt))
   887  		i--
   888  		dAtA[i] = 0x38
   889  	}
   890  	if m.CreateAt != 0 {
   891  		i = encodeVarintTask(dAtA, i, uint64(m.CreateAt))
   892  		i--
   893  		dAtA[i] = 0x30
   894  	}
   895  	if m.TriggerTimes != 0 {
   896  		i = encodeVarintTask(dAtA, i, uint64(m.TriggerTimes))
   897  		i--
   898  		dAtA[i] = 0x28
   899  	}
   900  	if m.NextTime != 0 {
   901  		i = encodeVarintTask(dAtA, i, uint64(m.NextTime))
   902  		i--
   903  		dAtA[i] = 0x20
   904  	}
   905  	if len(m.CronExpr) > 0 {
   906  		i -= len(m.CronExpr)
   907  		copy(dAtA[i:], m.CronExpr)
   908  		i = encodeVarintTask(dAtA, i, uint64(len(m.CronExpr)))
   909  		i--
   910  		dAtA[i] = 0x1a
   911  	}
   912  	{
   913  		size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i])
   914  		if err != nil {
   915  			return 0, err
   916  		}
   917  		i -= size
   918  		i = encodeVarintTask(dAtA, i, uint64(size))
   919  	}
   920  	i--
   921  	dAtA[i] = 0x12
   922  	if m.ID != 0 {
   923  		i = encodeVarintTask(dAtA, i, uint64(m.ID))
   924  		i--
   925  		dAtA[i] = 0x8
   926  	}
   927  	return len(dAtA) - i, nil
   928  }
   929  
   930  func encodeVarintTask(dAtA []byte, offset int, v uint64) int {
   931  	offset -= sovTask(v)
   932  	base := offset
   933  	for v >= 1<<7 {
   934  		dAtA[offset] = uint8(v&0x7f | 0x80)
   935  		v >>= 7
   936  		offset++
   937  	}
   938  	dAtA[offset] = uint8(v)
   939  	return base
   940  }
   941  func (m *TaskMetadata) Size() (n int) {
   942  	if m == nil {
   943  		return 0
   944  	}
   945  	var l int
   946  	_ = l
   947  	l = len(m.ID)
   948  	if l > 0 {
   949  		n += 1 + l + sovTask(uint64(l))
   950  	}
   951  	if m.Executor != 0 {
   952  		n += 1 + sovTask(uint64(m.Executor))
   953  	}
   954  	l = len(m.Context)
   955  	if l > 0 {
   956  		n += 1 + l + sovTask(uint64(l))
   957  	}
   958  	l = m.Options.Size()
   959  	n += 1 + l + sovTask(uint64(l))
   960  	if m.XXX_unrecognized != nil {
   961  		n += len(m.XXX_unrecognized)
   962  	}
   963  	return n
   964  }
   965  
   966  func (m *TaskOptions) Size() (n int) {
   967  	if m == nil {
   968  		return 0
   969  	}
   970  	var l int
   971  	_ = l
   972  	if m.MaxRetryTimes != 0 {
   973  		n += 1 + sovTask(uint64(m.MaxRetryTimes))
   974  	}
   975  	if m.RetryInterval != 0 {
   976  		n += 1 + sovTask(uint64(m.RetryInterval))
   977  	}
   978  	if m.DelayDuration != 0 {
   979  		n += 1 + sovTask(uint64(m.DelayDuration))
   980  	}
   981  	if m.Concurrency != 0 {
   982  		n += 1 + sovTask(uint64(m.Concurrency))
   983  	}
   984  	if m.XXX_unrecognized != nil {
   985  		n += len(m.XXX_unrecognized)
   986  	}
   987  	return n
   988  }
   989  
   990  func (m *ExecuteResult) Size() (n int) {
   991  	if m == nil {
   992  		return 0
   993  	}
   994  	var l int
   995  	_ = l
   996  	if m.Code != 0 {
   997  		n += 1 + sovTask(uint64(m.Code))
   998  	}
   999  	l = len(m.Error)
  1000  	if l > 0 {
  1001  		n += 1 + l + sovTask(uint64(l))
  1002  	}
  1003  	if m.XXX_unrecognized != nil {
  1004  		n += len(m.XXX_unrecognized)
  1005  	}
  1006  	return n
  1007  }
  1008  
  1009  func (m *Task) Size() (n int) {
  1010  	if m == nil {
  1011  		return 0
  1012  	}
  1013  	var l int
  1014  	_ = l
  1015  	if m.ID != 0 {
  1016  		n += 1 + sovTask(uint64(m.ID))
  1017  	}
  1018  	l = m.Metadata.Size()
  1019  	n += 1 + l + sovTask(uint64(l))
  1020  	l = len(m.ParentTaskID)
  1021  	if l > 0 {
  1022  		n += 1 + l + sovTask(uint64(l))
  1023  	}
  1024  	if m.Status != 0 {
  1025  		n += 1 + sovTask(uint64(m.Status))
  1026  	}
  1027  	l = len(m.TaskRunner)
  1028  	if l > 0 {
  1029  		n += 1 + l + sovTask(uint64(l))
  1030  	}
  1031  	if m.Epoch != 0 {
  1032  		n += 1 + sovTask(uint64(m.Epoch))
  1033  	}
  1034  	if m.LastHeartbeat != 0 {
  1035  		n += 1 + sovTask(uint64(m.LastHeartbeat))
  1036  	}
  1037  	if m.CreateAt != 0 {
  1038  		n += 1 + sovTask(uint64(m.CreateAt))
  1039  	}
  1040  	if m.CompletedAt != 0 {
  1041  		n += 1 + sovTask(uint64(m.CompletedAt))
  1042  	}
  1043  	if m.ExecuteResult != nil {
  1044  		l = m.ExecuteResult.Size()
  1045  		n += 1 + l + sovTask(uint64(l))
  1046  	}
  1047  	if m.XXX_unrecognized != nil {
  1048  		n += len(m.XXX_unrecognized)
  1049  	}
  1050  	return n
  1051  }
  1052  
  1053  func (m *CronTask) Size() (n int) {
  1054  	if m == nil {
  1055  		return 0
  1056  	}
  1057  	var l int
  1058  	_ = l
  1059  	if m.ID != 0 {
  1060  		n += 1 + sovTask(uint64(m.ID))
  1061  	}
  1062  	l = m.Metadata.Size()
  1063  	n += 1 + l + sovTask(uint64(l))
  1064  	l = len(m.CronExpr)
  1065  	if l > 0 {
  1066  		n += 1 + l + sovTask(uint64(l))
  1067  	}
  1068  	if m.NextTime != 0 {
  1069  		n += 1 + sovTask(uint64(m.NextTime))
  1070  	}
  1071  	if m.TriggerTimes != 0 {
  1072  		n += 1 + sovTask(uint64(m.TriggerTimes))
  1073  	}
  1074  	if m.CreateAt != 0 {
  1075  		n += 1 + sovTask(uint64(m.CreateAt))
  1076  	}
  1077  	if m.UpdateAt != 0 {
  1078  		n += 1 + sovTask(uint64(m.UpdateAt))
  1079  	}
  1080  	if m.XXX_unrecognized != nil {
  1081  		n += len(m.XXX_unrecognized)
  1082  	}
  1083  	return n
  1084  }
  1085  
  1086  func sovTask(x uint64) (n int) {
  1087  	return (math_bits.Len64(x|1) + 6) / 7
  1088  }
  1089  func sozTask(x uint64) (n int) {
  1090  	return sovTask(uint64((x << 1) ^ uint64((int64(x) >> 63))))
  1091  }
  1092  func (m *TaskMetadata) Unmarshal(dAtA []byte) error {
  1093  	l := len(dAtA)
  1094  	iNdEx := 0
  1095  	for iNdEx < l {
  1096  		preIndex := iNdEx
  1097  		var wire uint64
  1098  		for shift := uint(0); ; shift += 7 {
  1099  			if shift >= 64 {
  1100  				return ErrIntOverflowTask
  1101  			}
  1102  			if iNdEx >= l {
  1103  				return io.ErrUnexpectedEOF
  1104  			}
  1105  			b := dAtA[iNdEx]
  1106  			iNdEx++
  1107  			wire |= uint64(b&0x7F) << shift
  1108  			if b < 0x80 {
  1109  				break
  1110  			}
  1111  		}
  1112  		fieldNum := int32(wire >> 3)
  1113  		wireType := int(wire & 0x7)
  1114  		if wireType == 4 {
  1115  			return fmt.Errorf("proto: TaskMetadata: wiretype end group for non-group")
  1116  		}
  1117  		if fieldNum <= 0 {
  1118  			return fmt.Errorf("proto: TaskMetadata: illegal tag %d (wire type %d)", fieldNum, wire)
  1119  		}
  1120  		switch fieldNum {
  1121  		case 1:
  1122  			if wireType != 2 {
  1123  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1124  			}
  1125  			var stringLen uint64
  1126  			for shift := uint(0); ; shift += 7 {
  1127  				if shift >= 64 {
  1128  					return ErrIntOverflowTask
  1129  				}
  1130  				if iNdEx >= l {
  1131  					return io.ErrUnexpectedEOF
  1132  				}
  1133  				b := dAtA[iNdEx]
  1134  				iNdEx++
  1135  				stringLen |= uint64(b&0x7F) << shift
  1136  				if b < 0x80 {
  1137  					break
  1138  				}
  1139  			}
  1140  			intStringLen := int(stringLen)
  1141  			if intStringLen < 0 {
  1142  				return ErrInvalidLengthTask
  1143  			}
  1144  			postIndex := iNdEx + intStringLen
  1145  			if postIndex < 0 {
  1146  				return ErrInvalidLengthTask
  1147  			}
  1148  			if postIndex > l {
  1149  				return io.ErrUnexpectedEOF
  1150  			}
  1151  			m.ID = string(dAtA[iNdEx:postIndex])
  1152  			iNdEx = postIndex
  1153  		case 2:
  1154  			if wireType != 0 {
  1155  				return fmt.Errorf("proto: wrong wireType = %d for field Executor", wireType)
  1156  			}
  1157  			m.Executor = 0
  1158  			for shift := uint(0); ; shift += 7 {
  1159  				if shift >= 64 {
  1160  					return ErrIntOverflowTask
  1161  				}
  1162  				if iNdEx >= l {
  1163  					return io.ErrUnexpectedEOF
  1164  				}
  1165  				b := dAtA[iNdEx]
  1166  				iNdEx++
  1167  				m.Executor |= TaskCode(b&0x7F) << shift
  1168  				if b < 0x80 {
  1169  					break
  1170  				}
  1171  			}
  1172  		case 3:
  1173  			if wireType != 2 {
  1174  				return fmt.Errorf("proto: wrong wireType = %d for field Context", wireType)
  1175  			}
  1176  			var byteLen int
  1177  			for shift := uint(0); ; shift += 7 {
  1178  				if shift >= 64 {
  1179  					return ErrIntOverflowTask
  1180  				}
  1181  				if iNdEx >= l {
  1182  					return io.ErrUnexpectedEOF
  1183  				}
  1184  				b := dAtA[iNdEx]
  1185  				iNdEx++
  1186  				byteLen |= int(b&0x7F) << shift
  1187  				if b < 0x80 {
  1188  					break
  1189  				}
  1190  			}
  1191  			if byteLen < 0 {
  1192  				return ErrInvalidLengthTask
  1193  			}
  1194  			postIndex := iNdEx + byteLen
  1195  			if postIndex < 0 {
  1196  				return ErrInvalidLengthTask
  1197  			}
  1198  			if postIndex > l {
  1199  				return io.ErrUnexpectedEOF
  1200  			}
  1201  			m.Context = append(m.Context[:0], dAtA[iNdEx:postIndex]...)
  1202  			if m.Context == nil {
  1203  				m.Context = []byte{}
  1204  			}
  1205  			iNdEx = postIndex
  1206  		case 4:
  1207  			if wireType != 2 {
  1208  				return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType)
  1209  			}
  1210  			var msglen int
  1211  			for shift := uint(0); ; shift += 7 {
  1212  				if shift >= 64 {
  1213  					return ErrIntOverflowTask
  1214  				}
  1215  				if iNdEx >= l {
  1216  					return io.ErrUnexpectedEOF
  1217  				}
  1218  				b := dAtA[iNdEx]
  1219  				iNdEx++
  1220  				msglen |= int(b&0x7F) << shift
  1221  				if b < 0x80 {
  1222  					break
  1223  				}
  1224  			}
  1225  			if msglen < 0 {
  1226  				return ErrInvalidLengthTask
  1227  			}
  1228  			postIndex := iNdEx + msglen
  1229  			if postIndex < 0 {
  1230  				return ErrInvalidLengthTask
  1231  			}
  1232  			if postIndex > l {
  1233  				return io.ErrUnexpectedEOF
  1234  			}
  1235  			if err := m.Options.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1236  				return err
  1237  			}
  1238  			iNdEx = postIndex
  1239  		default:
  1240  			iNdEx = preIndex
  1241  			skippy, err := skipTask(dAtA[iNdEx:])
  1242  			if err != nil {
  1243  				return err
  1244  			}
  1245  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1246  				return ErrInvalidLengthTask
  1247  			}
  1248  			if (iNdEx + skippy) > l {
  1249  				return io.ErrUnexpectedEOF
  1250  			}
  1251  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1252  			iNdEx += skippy
  1253  		}
  1254  	}
  1255  
  1256  	if iNdEx > l {
  1257  		return io.ErrUnexpectedEOF
  1258  	}
  1259  	return nil
  1260  }
  1261  func (m *TaskOptions) Unmarshal(dAtA []byte) error {
  1262  	l := len(dAtA)
  1263  	iNdEx := 0
  1264  	for iNdEx < l {
  1265  		preIndex := iNdEx
  1266  		var wire uint64
  1267  		for shift := uint(0); ; shift += 7 {
  1268  			if shift >= 64 {
  1269  				return ErrIntOverflowTask
  1270  			}
  1271  			if iNdEx >= l {
  1272  				return io.ErrUnexpectedEOF
  1273  			}
  1274  			b := dAtA[iNdEx]
  1275  			iNdEx++
  1276  			wire |= uint64(b&0x7F) << shift
  1277  			if b < 0x80 {
  1278  				break
  1279  			}
  1280  		}
  1281  		fieldNum := int32(wire >> 3)
  1282  		wireType := int(wire & 0x7)
  1283  		if wireType == 4 {
  1284  			return fmt.Errorf("proto: TaskOptions: wiretype end group for non-group")
  1285  		}
  1286  		if fieldNum <= 0 {
  1287  			return fmt.Errorf("proto: TaskOptions: illegal tag %d (wire type %d)", fieldNum, wire)
  1288  		}
  1289  		switch fieldNum {
  1290  		case 1:
  1291  			if wireType != 0 {
  1292  				return fmt.Errorf("proto: wrong wireType = %d for field MaxRetryTimes", wireType)
  1293  			}
  1294  			m.MaxRetryTimes = 0
  1295  			for shift := uint(0); ; shift += 7 {
  1296  				if shift >= 64 {
  1297  					return ErrIntOverflowTask
  1298  				}
  1299  				if iNdEx >= l {
  1300  					return io.ErrUnexpectedEOF
  1301  				}
  1302  				b := dAtA[iNdEx]
  1303  				iNdEx++
  1304  				m.MaxRetryTimes |= uint32(b&0x7F) << shift
  1305  				if b < 0x80 {
  1306  					break
  1307  				}
  1308  			}
  1309  		case 2:
  1310  			if wireType != 0 {
  1311  				return fmt.Errorf("proto: wrong wireType = %d for field RetryInterval", wireType)
  1312  			}
  1313  			m.RetryInterval = 0
  1314  			for shift := uint(0); ; shift += 7 {
  1315  				if shift >= 64 {
  1316  					return ErrIntOverflowTask
  1317  				}
  1318  				if iNdEx >= l {
  1319  					return io.ErrUnexpectedEOF
  1320  				}
  1321  				b := dAtA[iNdEx]
  1322  				iNdEx++
  1323  				m.RetryInterval |= int64(b&0x7F) << shift
  1324  				if b < 0x80 {
  1325  					break
  1326  				}
  1327  			}
  1328  		case 3:
  1329  			if wireType != 0 {
  1330  				return fmt.Errorf("proto: wrong wireType = %d for field DelayDuration", wireType)
  1331  			}
  1332  			m.DelayDuration = 0
  1333  			for shift := uint(0); ; shift += 7 {
  1334  				if shift >= 64 {
  1335  					return ErrIntOverflowTask
  1336  				}
  1337  				if iNdEx >= l {
  1338  					return io.ErrUnexpectedEOF
  1339  				}
  1340  				b := dAtA[iNdEx]
  1341  				iNdEx++
  1342  				m.DelayDuration |= int64(b&0x7F) << shift
  1343  				if b < 0x80 {
  1344  					break
  1345  				}
  1346  			}
  1347  		case 4:
  1348  			if wireType != 0 {
  1349  				return fmt.Errorf("proto: wrong wireType = %d for field Concurrency", wireType)
  1350  			}
  1351  			m.Concurrency = 0
  1352  			for shift := uint(0); ; shift += 7 {
  1353  				if shift >= 64 {
  1354  					return ErrIntOverflowTask
  1355  				}
  1356  				if iNdEx >= l {
  1357  					return io.ErrUnexpectedEOF
  1358  				}
  1359  				b := dAtA[iNdEx]
  1360  				iNdEx++
  1361  				m.Concurrency |= uint32(b&0x7F) << shift
  1362  				if b < 0x80 {
  1363  					break
  1364  				}
  1365  			}
  1366  		default:
  1367  			iNdEx = preIndex
  1368  			skippy, err := skipTask(dAtA[iNdEx:])
  1369  			if err != nil {
  1370  				return err
  1371  			}
  1372  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1373  				return ErrInvalidLengthTask
  1374  			}
  1375  			if (iNdEx + skippy) > l {
  1376  				return io.ErrUnexpectedEOF
  1377  			}
  1378  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1379  			iNdEx += skippy
  1380  		}
  1381  	}
  1382  
  1383  	if iNdEx > l {
  1384  		return io.ErrUnexpectedEOF
  1385  	}
  1386  	return nil
  1387  }
  1388  func (m *ExecuteResult) Unmarshal(dAtA []byte) error {
  1389  	l := len(dAtA)
  1390  	iNdEx := 0
  1391  	for iNdEx < l {
  1392  		preIndex := iNdEx
  1393  		var wire uint64
  1394  		for shift := uint(0); ; shift += 7 {
  1395  			if shift >= 64 {
  1396  				return ErrIntOverflowTask
  1397  			}
  1398  			if iNdEx >= l {
  1399  				return io.ErrUnexpectedEOF
  1400  			}
  1401  			b := dAtA[iNdEx]
  1402  			iNdEx++
  1403  			wire |= uint64(b&0x7F) << shift
  1404  			if b < 0x80 {
  1405  				break
  1406  			}
  1407  		}
  1408  		fieldNum := int32(wire >> 3)
  1409  		wireType := int(wire & 0x7)
  1410  		if wireType == 4 {
  1411  			return fmt.Errorf("proto: ExecuteResult: wiretype end group for non-group")
  1412  		}
  1413  		if fieldNum <= 0 {
  1414  			return fmt.Errorf("proto: ExecuteResult: illegal tag %d (wire type %d)", fieldNum, wire)
  1415  		}
  1416  		switch fieldNum {
  1417  		case 1:
  1418  			if wireType != 0 {
  1419  				return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType)
  1420  			}
  1421  			m.Code = 0
  1422  			for shift := uint(0); ; shift += 7 {
  1423  				if shift >= 64 {
  1424  					return ErrIntOverflowTask
  1425  				}
  1426  				if iNdEx >= l {
  1427  					return io.ErrUnexpectedEOF
  1428  				}
  1429  				b := dAtA[iNdEx]
  1430  				iNdEx++
  1431  				m.Code |= ResultCode(b&0x7F) << shift
  1432  				if b < 0x80 {
  1433  					break
  1434  				}
  1435  			}
  1436  		case 2:
  1437  			if wireType != 2 {
  1438  				return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType)
  1439  			}
  1440  			var stringLen uint64
  1441  			for shift := uint(0); ; shift += 7 {
  1442  				if shift >= 64 {
  1443  					return ErrIntOverflowTask
  1444  				}
  1445  				if iNdEx >= l {
  1446  					return io.ErrUnexpectedEOF
  1447  				}
  1448  				b := dAtA[iNdEx]
  1449  				iNdEx++
  1450  				stringLen |= uint64(b&0x7F) << shift
  1451  				if b < 0x80 {
  1452  					break
  1453  				}
  1454  			}
  1455  			intStringLen := int(stringLen)
  1456  			if intStringLen < 0 {
  1457  				return ErrInvalidLengthTask
  1458  			}
  1459  			postIndex := iNdEx + intStringLen
  1460  			if postIndex < 0 {
  1461  				return ErrInvalidLengthTask
  1462  			}
  1463  			if postIndex > l {
  1464  				return io.ErrUnexpectedEOF
  1465  			}
  1466  			m.Error = string(dAtA[iNdEx:postIndex])
  1467  			iNdEx = postIndex
  1468  		default:
  1469  			iNdEx = preIndex
  1470  			skippy, err := skipTask(dAtA[iNdEx:])
  1471  			if err != nil {
  1472  				return err
  1473  			}
  1474  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1475  				return ErrInvalidLengthTask
  1476  			}
  1477  			if (iNdEx + skippy) > l {
  1478  				return io.ErrUnexpectedEOF
  1479  			}
  1480  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1481  			iNdEx += skippy
  1482  		}
  1483  	}
  1484  
  1485  	if iNdEx > l {
  1486  		return io.ErrUnexpectedEOF
  1487  	}
  1488  	return nil
  1489  }
  1490  func (m *Task) Unmarshal(dAtA []byte) error {
  1491  	l := len(dAtA)
  1492  	iNdEx := 0
  1493  	for iNdEx < l {
  1494  		preIndex := iNdEx
  1495  		var wire uint64
  1496  		for shift := uint(0); ; shift += 7 {
  1497  			if shift >= 64 {
  1498  				return ErrIntOverflowTask
  1499  			}
  1500  			if iNdEx >= l {
  1501  				return io.ErrUnexpectedEOF
  1502  			}
  1503  			b := dAtA[iNdEx]
  1504  			iNdEx++
  1505  			wire |= uint64(b&0x7F) << shift
  1506  			if b < 0x80 {
  1507  				break
  1508  			}
  1509  		}
  1510  		fieldNum := int32(wire >> 3)
  1511  		wireType := int(wire & 0x7)
  1512  		if wireType == 4 {
  1513  			return fmt.Errorf("proto: Task: wiretype end group for non-group")
  1514  		}
  1515  		if fieldNum <= 0 {
  1516  			return fmt.Errorf("proto: Task: illegal tag %d (wire type %d)", fieldNum, wire)
  1517  		}
  1518  		switch fieldNum {
  1519  		case 1:
  1520  			if wireType != 0 {
  1521  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1522  			}
  1523  			m.ID = 0
  1524  			for shift := uint(0); ; shift += 7 {
  1525  				if shift >= 64 {
  1526  					return ErrIntOverflowTask
  1527  				}
  1528  				if iNdEx >= l {
  1529  					return io.ErrUnexpectedEOF
  1530  				}
  1531  				b := dAtA[iNdEx]
  1532  				iNdEx++
  1533  				m.ID |= uint64(b&0x7F) << shift
  1534  				if b < 0x80 {
  1535  					break
  1536  				}
  1537  			}
  1538  		case 2:
  1539  			if wireType != 2 {
  1540  				return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  1541  			}
  1542  			var msglen int
  1543  			for shift := uint(0); ; shift += 7 {
  1544  				if shift >= 64 {
  1545  					return ErrIntOverflowTask
  1546  				}
  1547  				if iNdEx >= l {
  1548  					return io.ErrUnexpectedEOF
  1549  				}
  1550  				b := dAtA[iNdEx]
  1551  				iNdEx++
  1552  				msglen |= int(b&0x7F) << shift
  1553  				if b < 0x80 {
  1554  					break
  1555  				}
  1556  			}
  1557  			if msglen < 0 {
  1558  				return ErrInvalidLengthTask
  1559  			}
  1560  			postIndex := iNdEx + msglen
  1561  			if postIndex < 0 {
  1562  				return ErrInvalidLengthTask
  1563  			}
  1564  			if postIndex > l {
  1565  				return io.ErrUnexpectedEOF
  1566  			}
  1567  			if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1568  				return err
  1569  			}
  1570  			iNdEx = postIndex
  1571  		case 3:
  1572  			if wireType != 2 {
  1573  				return fmt.Errorf("proto: wrong wireType = %d for field ParentTaskID", wireType)
  1574  			}
  1575  			var stringLen uint64
  1576  			for shift := uint(0); ; shift += 7 {
  1577  				if shift >= 64 {
  1578  					return ErrIntOverflowTask
  1579  				}
  1580  				if iNdEx >= l {
  1581  					return io.ErrUnexpectedEOF
  1582  				}
  1583  				b := dAtA[iNdEx]
  1584  				iNdEx++
  1585  				stringLen |= uint64(b&0x7F) << shift
  1586  				if b < 0x80 {
  1587  					break
  1588  				}
  1589  			}
  1590  			intStringLen := int(stringLen)
  1591  			if intStringLen < 0 {
  1592  				return ErrInvalidLengthTask
  1593  			}
  1594  			postIndex := iNdEx + intStringLen
  1595  			if postIndex < 0 {
  1596  				return ErrInvalidLengthTask
  1597  			}
  1598  			if postIndex > l {
  1599  				return io.ErrUnexpectedEOF
  1600  			}
  1601  			m.ParentTaskID = string(dAtA[iNdEx:postIndex])
  1602  			iNdEx = postIndex
  1603  		case 4:
  1604  			if wireType != 0 {
  1605  				return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType)
  1606  			}
  1607  			m.Status = 0
  1608  			for shift := uint(0); ; shift += 7 {
  1609  				if shift >= 64 {
  1610  					return ErrIntOverflowTask
  1611  				}
  1612  				if iNdEx >= l {
  1613  					return io.ErrUnexpectedEOF
  1614  				}
  1615  				b := dAtA[iNdEx]
  1616  				iNdEx++
  1617  				m.Status |= TaskStatus(b&0x7F) << shift
  1618  				if b < 0x80 {
  1619  					break
  1620  				}
  1621  			}
  1622  		case 5:
  1623  			if wireType != 2 {
  1624  				return fmt.Errorf("proto: wrong wireType = %d for field TaskRunner", wireType)
  1625  			}
  1626  			var stringLen uint64
  1627  			for shift := uint(0); ; shift += 7 {
  1628  				if shift >= 64 {
  1629  					return ErrIntOverflowTask
  1630  				}
  1631  				if iNdEx >= l {
  1632  					return io.ErrUnexpectedEOF
  1633  				}
  1634  				b := dAtA[iNdEx]
  1635  				iNdEx++
  1636  				stringLen |= uint64(b&0x7F) << shift
  1637  				if b < 0x80 {
  1638  					break
  1639  				}
  1640  			}
  1641  			intStringLen := int(stringLen)
  1642  			if intStringLen < 0 {
  1643  				return ErrInvalidLengthTask
  1644  			}
  1645  			postIndex := iNdEx + intStringLen
  1646  			if postIndex < 0 {
  1647  				return ErrInvalidLengthTask
  1648  			}
  1649  			if postIndex > l {
  1650  				return io.ErrUnexpectedEOF
  1651  			}
  1652  			m.TaskRunner = string(dAtA[iNdEx:postIndex])
  1653  			iNdEx = postIndex
  1654  		case 6:
  1655  			if wireType != 0 {
  1656  				return fmt.Errorf("proto: wrong wireType = %d for field Epoch", wireType)
  1657  			}
  1658  			m.Epoch = 0
  1659  			for shift := uint(0); ; shift += 7 {
  1660  				if shift >= 64 {
  1661  					return ErrIntOverflowTask
  1662  				}
  1663  				if iNdEx >= l {
  1664  					return io.ErrUnexpectedEOF
  1665  				}
  1666  				b := dAtA[iNdEx]
  1667  				iNdEx++
  1668  				m.Epoch |= uint32(b&0x7F) << shift
  1669  				if b < 0x80 {
  1670  					break
  1671  				}
  1672  			}
  1673  		case 7:
  1674  			if wireType != 0 {
  1675  				return fmt.Errorf("proto: wrong wireType = %d for field LastHeartbeat", wireType)
  1676  			}
  1677  			m.LastHeartbeat = 0
  1678  			for shift := uint(0); ; shift += 7 {
  1679  				if shift >= 64 {
  1680  					return ErrIntOverflowTask
  1681  				}
  1682  				if iNdEx >= l {
  1683  					return io.ErrUnexpectedEOF
  1684  				}
  1685  				b := dAtA[iNdEx]
  1686  				iNdEx++
  1687  				m.LastHeartbeat |= int64(b&0x7F) << shift
  1688  				if b < 0x80 {
  1689  					break
  1690  				}
  1691  			}
  1692  		case 8:
  1693  			if wireType != 0 {
  1694  				return fmt.Errorf("proto: wrong wireType = %d for field CreateAt", wireType)
  1695  			}
  1696  			m.CreateAt = 0
  1697  			for shift := uint(0); ; shift += 7 {
  1698  				if shift >= 64 {
  1699  					return ErrIntOverflowTask
  1700  				}
  1701  				if iNdEx >= l {
  1702  					return io.ErrUnexpectedEOF
  1703  				}
  1704  				b := dAtA[iNdEx]
  1705  				iNdEx++
  1706  				m.CreateAt |= int64(b&0x7F) << shift
  1707  				if b < 0x80 {
  1708  					break
  1709  				}
  1710  			}
  1711  		case 9:
  1712  			if wireType != 0 {
  1713  				return fmt.Errorf("proto: wrong wireType = %d for field CompletedAt", wireType)
  1714  			}
  1715  			m.CompletedAt = 0
  1716  			for shift := uint(0); ; shift += 7 {
  1717  				if shift >= 64 {
  1718  					return ErrIntOverflowTask
  1719  				}
  1720  				if iNdEx >= l {
  1721  					return io.ErrUnexpectedEOF
  1722  				}
  1723  				b := dAtA[iNdEx]
  1724  				iNdEx++
  1725  				m.CompletedAt |= int64(b&0x7F) << shift
  1726  				if b < 0x80 {
  1727  					break
  1728  				}
  1729  			}
  1730  		case 10:
  1731  			if wireType != 2 {
  1732  				return fmt.Errorf("proto: wrong wireType = %d for field ExecuteResult", wireType)
  1733  			}
  1734  			var msglen int
  1735  			for shift := uint(0); ; shift += 7 {
  1736  				if shift >= 64 {
  1737  					return ErrIntOverflowTask
  1738  				}
  1739  				if iNdEx >= l {
  1740  					return io.ErrUnexpectedEOF
  1741  				}
  1742  				b := dAtA[iNdEx]
  1743  				iNdEx++
  1744  				msglen |= int(b&0x7F) << shift
  1745  				if b < 0x80 {
  1746  					break
  1747  				}
  1748  			}
  1749  			if msglen < 0 {
  1750  				return ErrInvalidLengthTask
  1751  			}
  1752  			postIndex := iNdEx + msglen
  1753  			if postIndex < 0 {
  1754  				return ErrInvalidLengthTask
  1755  			}
  1756  			if postIndex > l {
  1757  				return io.ErrUnexpectedEOF
  1758  			}
  1759  			if m.ExecuteResult == nil {
  1760  				m.ExecuteResult = &ExecuteResult{}
  1761  			}
  1762  			if err := m.ExecuteResult.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1763  				return err
  1764  			}
  1765  			iNdEx = postIndex
  1766  		default:
  1767  			iNdEx = preIndex
  1768  			skippy, err := skipTask(dAtA[iNdEx:])
  1769  			if err != nil {
  1770  				return err
  1771  			}
  1772  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1773  				return ErrInvalidLengthTask
  1774  			}
  1775  			if (iNdEx + skippy) > l {
  1776  				return io.ErrUnexpectedEOF
  1777  			}
  1778  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1779  			iNdEx += skippy
  1780  		}
  1781  	}
  1782  
  1783  	if iNdEx > l {
  1784  		return io.ErrUnexpectedEOF
  1785  	}
  1786  	return nil
  1787  }
  1788  func (m *CronTask) Unmarshal(dAtA []byte) error {
  1789  	l := len(dAtA)
  1790  	iNdEx := 0
  1791  	for iNdEx < l {
  1792  		preIndex := iNdEx
  1793  		var wire uint64
  1794  		for shift := uint(0); ; shift += 7 {
  1795  			if shift >= 64 {
  1796  				return ErrIntOverflowTask
  1797  			}
  1798  			if iNdEx >= l {
  1799  				return io.ErrUnexpectedEOF
  1800  			}
  1801  			b := dAtA[iNdEx]
  1802  			iNdEx++
  1803  			wire |= uint64(b&0x7F) << shift
  1804  			if b < 0x80 {
  1805  				break
  1806  			}
  1807  		}
  1808  		fieldNum := int32(wire >> 3)
  1809  		wireType := int(wire & 0x7)
  1810  		if wireType == 4 {
  1811  			return fmt.Errorf("proto: CronTask: wiretype end group for non-group")
  1812  		}
  1813  		if fieldNum <= 0 {
  1814  			return fmt.Errorf("proto: CronTask: illegal tag %d (wire type %d)", fieldNum, wire)
  1815  		}
  1816  		switch fieldNum {
  1817  		case 1:
  1818  			if wireType != 0 {
  1819  				return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType)
  1820  			}
  1821  			m.ID = 0
  1822  			for shift := uint(0); ; shift += 7 {
  1823  				if shift >= 64 {
  1824  					return ErrIntOverflowTask
  1825  				}
  1826  				if iNdEx >= l {
  1827  					return io.ErrUnexpectedEOF
  1828  				}
  1829  				b := dAtA[iNdEx]
  1830  				iNdEx++
  1831  				m.ID |= uint64(b&0x7F) << shift
  1832  				if b < 0x80 {
  1833  					break
  1834  				}
  1835  			}
  1836  		case 2:
  1837  			if wireType != 2 {
  1838  				return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType)
  1839  			}
  1840  			var msglen int
  1841  			for shift := uint(0); ; shift += 7 {
  1842  				if shift >= 64 {
  1843  					return ErrIntOverflowTask
  1844  				}
  1845  				if iNdEx >= l {
  1846  					return io.ErrUnexpectedEOF
  1847  				}
  1848  				b := dAtA[iNdEx]
  1849  				iNdEx++
  1850  				msglen |= int(b&0x7F) << shift
  1851  				if b < 0x80 {
  1852  					break
  1853  				}
  1854  			}
  1855  			if msglen < 0 {
  1856  				return ErrInvalidLengthTask
  1857  			}
  1858  			postIndex := iNdEx + msglen
  1859  			if postIndex < 0 {
  1860  				return ErrInvalidLengthTask
  1861  			}
  1862  			if postIndex > l {
  1863  				return io.ErrUnexpectedEOF
  1864  			}
  1865  			if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
  1866  				return err
  1867  			}
  1868  			iNdEx = postIndex
  1869  		case 3:
  1870  			if wireType != 2 {
  1871  				return fmt.Errorf("proto: wrong wireType = %d for field CronExpr", wireType)
  1872  			}
  1873  			var stringLen uint64
  1874  			for shift := uint(0); ; shift += 7 {
  1875  				if shift >= 64 {
  1876  					return ErrIntOverflowTask
  1877  				}
  1878  				if iNdEx >= l {
  1879  					return io.ErrUnexpectedEOF
  1880  				}
  1881  				b := dAtA[iNdEx]
  1882  				iNdEx++
  1883  				stringLen |= uint64(b&0x7F) << shift
  1884  				if b < 0x80 {
  1885  					break
  1886  				}
  1887  			}
  1888  			intStringLen := int(stringLen)
  1889  			if intStringLen < 0 {
  1890  				return ErrInvalidLengthTask
  1891  			}
  1892  			postIndex := iNdEx + intStringLen
  1893  			if postIndex < 0 {
  1894  				return ErrInvalidLengthTask
  1895  			}
  1896  			if postIndex > l {
  1897  				return io.ErrUnexpectedEOF
  1898  			}
  1899  			m.CronExpr = string(dAtA[iNdEx:postIndex])
  1900  			iNdEx = postIndex
  1901  		case 4:
  1902  			if wireType != 0 {
  1903  				return fmt.Errorf("proto: wrong wireType = %d for field NextTime", wireType)
  1904  			}
  1905  			m.NextTime = 0
  1906  			for shift := uint(0); ; shift += 7 {
  1907  				if shift >= 64 {
  1908  					return ErrIntOverflowTask
  1909  				}
  1910  				if iNdEx >= l {
  1911  					return io.ErrUnexpectedEOF
  1912  				}
  1913  				b := dAtA[iNdEx]
  1914  				iNdEx++
  1915  				m.NextTime |= int64(b&0x7F) << shift
  1916  				if b < 0x80 {
  1917  					break
  1918  				}
  1919  			}
  1920  		case 5:
  1921  			if wireType != 0 {
  1922  				return fmt.Errorf("proto: wrong wireType = %d for field TriggerTimes", wireType)
  1923  			}
  1924  			m.TriggerTimes = 0
  1925  			for shift := uint(0); ; shift += 7 {
  1926  				if shift >= 64 {
  1927  					return ErrIntOverflowTask
  1928  				}
  1929  				if iNdEx >= l {
  1930  					return io.ErrUnexpectedEOF
  1931  				}
  1932  				b := dAtA[iNdEx]
  1933  				iNdEx++
  1934  				m.TriggerTimes |= uint64(b&0x7F) << shift
  1935  				if b < 0x80 {
  1936  					break
  1937  				}
  1938  			}
  1939  		case 6:
  1940  			if wireType != 0 {
  1941  				return fmt.Errorf("proto: wrong wireType = %d for field CreateAt", wireType)
  1942  			}
  1943  			m.CreateAt = 0
  1944  			for shift := uint(0); ; shift += 7 {
  1945  				if shift >= 64 {
  1946  					return ErrIntOverflowTask
  1947  				}
  1948  				if iNdEx >= l {
  1949  					return io.ErrUnexpectedEOF
  1950  				}
  1951  				b := dAtA[iNdEx]
  1952  				iNdEx++
  1953  				m.CreateAt |= int64(b&0x7F) << shift
  1954  				if b < 0x80 {
  1955  					break
  1956  				}
  1957  			}
  1958  		case 7:
  1959  			if wireType != 0 {
  1960  				return fmt.Errorf("proto: wrong wireType = %d for field UpdateAt", wireType)
  1961  			}
  1962  			m.UpdateAt = 0
  1963  			for shift := uint(0); ; shift += 7 {
  1964  				if shift >= 64 {
  1965  					return ErrIntOverflowTask
  1966  				}
  1967  				if iNdEx >= l {
  1968  					return io.ErrUnexpectedEOF
  1969  				}
  1970  				b := dAtA[iNdEx]
  1971  				iNdEx++
  1972  				m.UpdateAt |= int64(b&0x7F) << shift
  1973  				if b < 0x80 {
  1974  					break
  1975  				}
  1976  			}
  1977  		default:
  1978  			iNdEx = preIndex
  1979  			skippy, err := skipTask(dAtA[iNdEx:])
  1980  			if err != nil {
  1981  				return err
  1982  			}
  1983  			if (skippy < 0) || (iNdEx+skippy) < 0 {
  1984  				return ErrInvalidLengthTask
  1985  			}
  1986  			if (iNdEx + skippy) > l {
  1987  				return io.ErrUnexpectedEOF
  1988  			}
  1989  			m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
  1990  			iNdEx += skippy
  1991  		}
  1992  	}
  1993  
  1994  	if iNdEx > l {
  1995  		return io.ErrUnexpectedEOF
  1996  	}
  1997  	return nil
  1998  }
  1999  func skipTask(dAtA []byte) (n int, err error) {
  2000  	l := len(dAtA)
  2001  	iNdEx := 0
  2002  	depth := 0
  2003  	for iNdEx < l {
  2004  		var wire uint64
  2005  		for shift := uint(0); ; shift += 7 {
  2006  			if shift >= 64 {
  2007  				return 0, ErrIntOverflowTask
  2008  			}
  2009  			if iNdEx >= l {
  2010  				return 0, io.ErrUnexpectedEOF
  2011  			}
  2012  			b := dAtA[iNdEx]
  2013  			iNdEx++
  2014  			wire |= (uint64(b) & 0x7F) << shift
  2015  			if b < 0x80 {
  2016  				break
  2017  			}
  2018  		}
  2019  		wireType := int(wire & 0x7)
  2020  		switch wireType {
  2021  		case 0:
  2022  			for shift := uint(0); ; shift += 7 {
  2023  				if shift >= 64 {
  2024  					return 0, ErrIntOverflowTask
  2025  				}
  2026  				if iNdEx >= l {
  2027  					return 0, io.ErrUnexpectedEOF
  2028  				}
  2029  				iNdEx++
  2030  				if dAtA[iNdEx-1] < 0x80 {
  2031  					break
  2032  				}
  2033  			}
  2034  		case 1:
  2035  			iNdEx += 8
  2036  		case 2:
  2037  			var length int
  2038  			for shift := uint(0); ; shift += 7 {
  2039  				if shift >= 64 {
  2040  					return 0, ErrIntOverflowTask
  2041  				}
  2042  				if iNdEx >= l {
  2043  					return 0, io.ErrUnexpectedEOF
  2044  				}
  2045  				b := dAtA[iNdEx]
  2046  				iNdEx++
  2047  				length |= (int(b) & 0x7F) << shift
  2048  				if b < 0x80 {
  2049  					break
  2050  				}
  2051  			}
  2052  			if length < 0 {
  2053  				return 0, ErrInvalidLengthTask
  2054  			}
  2055  			iNdEx += length
  2056  		case 3:
  2057  			depth++
  2058  		case 4:
  2059  			if depth == 0 {
  2060  				return 0, ErrUnexpectedEndOfGroupTask
  2061  			}
  2062  			depth--
  2063  		case 5:
  2064  			iNdEx += 4
  2065  		default:
  2066  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
  2067  		}
  2068  		if iNdEx < 0 {
  2069  			return 0, ErrInvalidLengthTask
  2070  		}
  2071  		if depth == 0 {
  2072  			return iNdEx, nil
  2073  		}
  2074  	}
  2075  	return 0, io.ErrUnexpectedEOF
  2076  }
  2077  
  2078  var (
  2079  	ErrInvalidLengthTask        = fmt.Errorf("proto: negative length found during unmarshaling")
  2080  	ErrIntOverflowTask          = fmt.Errorf("proto: integer overflow")
  2081  	ErrUnexpectedEndOfGroupTask = fmt.Errorf("proto: unexpected end of group")
  2082  )