diff --git a/core/scheduler/handler/v1beta1/job_run.go b/core/scheduler/handler/v1beta1/job_run.go index 6354ba42c7..0a1790de1a 100644 --- a/core/scheduler/handler/v1beta1/job_run.go +++ b/core/scheduler/handler/v1beta1/job_run.go @@ -11,12 +11,14 @@ import ( "github.com/goto/optimus/core/tenant" "github.com/goto/optimus/internal/errors" "github.com/goto/optimus/internal/lib/interval" + "github.com/goto/optimus/internal/utils/filter" pb "github.com/goto/optimus/protos/gotocompany/optimus/core/v1beta1" ) type JobRunService interface { JobRunInput(context.Context, tenant.ProjectName, scheduler.JobName, scheduler.RunConfig) (*scheduler.ExecutorInput, error) UpdateJobState(context.Context, *scheduler.Event) error + GetJobRunsByFilter(ctx context.Context, projectName tenant.ProjectName, jobName scheduler.JobName, filters ...filter.FilterOpt) ([]*scheduler.JobRun, error) GetJobRuns(ctx context.Context, projectName tenant.ProjectName, jobName scheduler.JobName, criteria *scheduler.JobRunsCriteria) ([]*scheduler.JobRunStatus, error) UploadToScheduler(ctx context.Context, projectName tenant.ProjectName) error GetInterval(ctx context.Context, projectName tenant.ProjectName, jobName scheduler.JobName, referenceTime time.Time) (interval.Interval, error) @@ -80,8 +82,51 @@ func (h JobRunHandler) JobRunInput(ctx context.Context, req *pb.JobRunInputReque }, nil } -// JobRun currently gets the job runs from scheduler based on the criteria -// TODO: later should collect the job runs from optimus +// GetJobRun gets job runs from optimus DB based on the criteria +func (h JobRunHandler) GetJobRun(ctx context.Context, req *pb.GetJobRunsRequest) (*pb.GetJobRunsResponse, error) { + projectName, err := tenant.ProjectNameFrom(req.GetProjectName()) + if err != nil { + h.l.Error("error adapting project name [%s]: %s", req.GetProjectName(), err) + return nil, errors.GRPCErr(err, "unable to get job run for "+req.GetJobName()) + } + + jobName, err := scheduler.JobNameFrom(req.GetJobName()) + if err != nil { + h.l.Error("error adapting job name [%s]: %s", req.GetJobName(), err) + return nil, errors.GRPCErr(err, "unable to get job run for "+req.GetJobName()) + } + + if len(req.GetState()) > 0 { + _, err := scheduler.StateFromString(req.GetState()) + if err != nil { + h.l.Error("error adapting job run state [%s]: %s", req.GetState(), err) + return nil, errors.GRPCErr(err, "invalid job run state: "+req.GetSince().String()) + } + } + + var jobRuns []*scheduler.JobRun + jobRuns, err = h.service.GetJobRunsByFilter(ctx, projectName, jobName, + filter.WithString(filter.RunState, req.GetState()), + filter.WithTime(filter.StartDate, req.GetSince().AsTime()), + filter.WithTime(filter.EndDate, req.GetUntil().AsTime()), + ) + if err != nil { + h.l.Error("error getting job runs: %s", err) + return nil, errors.GRPCErr(err, "unable to get job run for "+req.GetJobName()) + } + + var runs []*pb.JobRun + for _, run := range jobRuns { + ts := timestamppb.New(run.ScheduledAt) + runs = append(runs, &pb.JobRun{ + State: run.State.String(), + ScheduledAt: ts, + }) + } + return &pb.GetJobRunsResponse{JobRuns: runs}, nil +} + +// JobRun gets the job runs from scheduler based on the criteria func (h JobRunHandler) JobRun(ctx context.Context, req *pb.JobRunRequest) (*pb.JobRunResponse, error) { projectName, err := tenant.ProjectNameFrom(req.GetProjectName()) if err != nil { diff --git a/core/scheduler/handler/v1beta1/job_run_test.go b/core/scheduler/handler/v1beta1/job_run_test.go index 581fd1604e..bb031fb5aa 100644 --- a/core/scheduler/handler/v1beta1/job_run_test.go +++ b/core/scheduler/handler/v1beta1/job_run_test.go @@ -18,6 +18,7 @@ import ( "github.com/goto/optimus/core/tenant" "github.com/goto/optimus/internal/lib/interval" "github.com/goto/optimus/internal/lib/window" + "github.com/goto/optimus/internal/utils/filter" pb "github.com/goto/optimus/protos/gotocompany/optimus/core/v1beta1" ) @@ -716,6 +717,11 @@ func (m *mockJobRunService) UploadToScheduler(ctx context.Context, projectName t return args.Error(0) } +func (m *mockJobRunService) GetJobRunsByFilter(ctx context.Context, projectName tenant.ProjectName, jobName scheduler.JobName, filters ...filter.FilterOpt) ([]*scheduler.JobRun, error) { + args := m.Called(ctx, projectName, jobName, filters) + return args.Get(0).([]*scheduler.JobRun), args.Error(1) +} + func (m *mockJobRunService) GetJobRuns(ctx context.Context, projectName tenant.ProjectName, jobName scheduler.JobName, criteria *scheduler.JobRunsCriteria) ([]*scheduler.JobRunStatus, error) { args := m.Called(ctx, projectName, jobName, criteria) if args.Get(0) == nil { diff --git a/core/scheduler/service/job_run_service.go b/core/scheduler/service/job_run_service.go index c7149cce01..5531f25b7e 100644 --- a/core/scheduler/service/job_run_service.go +++ b/core/scheduler/service/job_run_service.go @@ -22,6 +22,7 @@ import ( "github.com/goto/optimus/internal/lib/interval" "github.com/goto/optimus/internal/lib/window" "github.com/goto/optimus/internal/models" + "github.com/goto/optimus/internal/utils/filter" ) type metricType string @@ -54,6 +55,8 @@ type JobRepository interface { type JobRunRepository interface { GetByID(ctx context.Context, id scheduler.JobRunID) (*scheduler.JobRun, error) GetByScheduledAt(ctx context.Context, tenant tenant.Tenant, name scheduler.JobName, scheduledAt time.Time) (*scheduler.JobRun, error) + GetLatestRun(ctx context.Context, project tenant.ProjectName, name scheduler.JobName, status *scheduler.State) (*scheduler.JobRun, error) + GetRunsByTimeRange(ctx context.Context, project tenant.ProjectName, jobName scheduler.JobName, status *scheduler.State, since, until time.Time) ([]*scheduler.JobRun, error) GetByScheduledTimes(ctx context.Context, tenant tenant.Tenant, jobName scheduler.JobName, scheduledTimes []time.Time) ([]*scheduler.JobRun, error) Create(ctx context.Context, tenant tenant.Tenant, name scheduler.JobName, scheduledAt time.Time, slaDefinitionInSec int64) error Update(ctx context.Context, jobRunID uuid.UUID, endTime time.Time, jobRunStatus scheduler.State) error @@ -146,6 +149,27 @@ func (s *JobRunService) JobRunInput(ctx context.Context, projectName tenant.Proj return s.compiler.Compile(ctx, details, config, executedAt) } +func (s *JobRunService) GetJobRunsByFilter(ctx context.Context, projectName tenant.ProjectName, jobName scheduler.JobName, filters ...filter.FilterOpt) ([]*scheduler.JobRun, error) { + f := filter.NewFilter(filters...) + var runState *scheduler.State + state, err := scheduler.StateFromString(f.GetStringValue(filter.RunState)) + if err == nil { + runState = &state + } + + if f.Contains(filter.StartDate) && f.Contains(filter.EndDate) { + // get job run by scheduled at between start date and end date, filter by runState if applicable + return s.repo.GetRunsByTimeRange(ctx, projectName, jobName, runState, + f.GetTimeValue(filter.StartDate), f.GetTimeValue(filter.EndDate)) + } + + jobRun, err := s.repo.GetLatestRun(ctx, projectName, jobName, runState) + if err != nil { + return nil, err + } + return []*scheduler.JobRun{jobRun}, nil +} + func (s *JobRunService) GetJobRuns(ctx context.Context, projectName tenant.ProjectName, jobName scheduler.JobName, criteria *scheduler.JobRunsCriteria) ([]*scheduler.JobRunStatus, error) { jobWithDetails, err := s.jobRepo.GetJobDetails(ctx, projectName, jobName) if err != nil { diff --git a/core/scheduler/service/job_run_service_test.go b/core/scheduler/service/job_run_service_test.go index 13dd10c574..cd7d2974a8 100644 --- a/core/scheduler/service/job_run_service_test.go +++ b/core/scheduler/service/job_run_service_test.go @@ -1522,6 +1522,16 @@ func (m *mockJobRunRepository) Create(ctx context.Context, tenant tenant.Tenant, return args.Error(0) } +func (m *mockJobRunRepository) GetLatestRun(ctx context.Context, project tenant.ProjectName, jobName scheduler.JobName, runState *scheduler.State) (*scheduler.JobRun, error) { + args := m.Called(ctx, project, jobName, runState) + return args.Get(0).(*scheduler.JobRun), args.Error(1) +} + +func (m *mockJobRunRepository) GetRunsByTimeRange(ctx context.Context, project tenant.ProjectName, jobName scheduler.JobName, runState *scheduler.State, since, until time.Time) ([]*scheduler.JobRun, error) { + args := m.Called(ctx, project, jobName, runState, since, until) + return args.Get(0).([]*scheduler.JobRun), args.Error(1) +} + func (m *mockJobRunRepository) Update(ctx context.Context, jobRunID uuid.UUID, endTime time.Time, jobRunStatus scheduler.State) error { args := m.Called(ctx, jobRunID, endTime, jobRunStatus) return args.Error(0) diff --git a/internal/store/postgres/scheduler/job_run_repository.go b/internal/store/postgres/scheduler/job_run_repository.go index f3aa2c939f..e412dde619 100644 --- a/internal/store/postgres/scheduler/job_run_repository.go +++ b/internal/store/postgres/scheduler/job_run_repository.go @@ -3,6 +3,7 @@ package scheduler import ( "context" "encoding/json" + "fmt" "strings" "time" @@ -90,6 +91,56 @@ func (j *JobRunRepository) GetByID(ctx context.Context, id scheduler.JobRunID) ( return jr.toJobRun() } +func (j *JobRunRepository) GetLatestRun(ctx context.Context, project tenant.ProjectName, jobName scheduler.JobName, runState *scheduler.State) (*scheduler.JobRun, error) { + var jr jobRun + var stateClause string + if runState != nil { + stateClause = fmt.Sprintf(" and status = '%s'", runState) + } + getLatestRun := fmt.Sprintf("SELECT %s, created_at FROM job_run j where project_name = $1 and job_name = $2 %s order by scheduled_at desc limit 1", jobRunColumns, stateClause) + err := j.db.QueryRow(ctx, getLatestRun, project, jobName). + Scan(&jr.ID, &jr.JobName, &jr.NamespaceName, &jr.ProjectName, &jr.ScheduledAt, &jr.StartTime, &jr.EndTime, + &jr.Status, &jr.SLADefinition, &jr.SLAAlert, &jr.Monitoring, &jr.CreatedAt) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + return nil, errors.NotFound(scheduler.EntityJobRun, "no record for job:"+jobName.String()+stateClause) + } + return nil, errors.Wrap(scheduler.EntityJobRun, "error while getting run", err) + } + return jr.toJobRun() +} + +func (j *JobRunRepository) GetRunsByTimeRange(ctx context.Context, project tenant.ProjectName, jobName scheduler.JobName, runState *scheduler.State, since, until time.Time) ([]*scheduler.JobRun, error) { + var jobRunList []*scheduler.JobRun + var stateClause string + if runState != nil { + stateClause = fmt.Sprintf(" and status = '%s'", runState) + } + getLatestRun := fmt.Sprintf("SELECT %s, created_at FROM job_run j where project_name = $1 and job_name = $2 and scheduled_at >= $3 and scheduled_at <= $4 %s", jobRunColumns, stateClause) + rows, err := j.db.Query(ctx, getLatestRun, project, jobName, since, until) + if err != nil { + return nil, errors.Wrap(scheduler.EntityJobRun, "error while getting job runs", err) + } + for rows.Next() { + var jr jobRun + err := rows.Scan(&jr.ID, &jr.JobName, &jr.NamespaceName, &jr.ProjectName, &jr.ScheduledAt, &jr.StartTime, &jr.EndTime, + &jr.Status, &jr.SLADefinition, &jr.SLAAlert, &jr.Monitoring, &jr.CreatedAt) + if err != nil { + if errors.Is(err, pgx.ErrNoRows) { + errMsg := fmt.Sprintf("no record for job: %s, scheduled between : %s -> %s, %s", jobName, since, until, stateClause) + return nil, errors.NotFound(scheduler.EntityJobRun, errMsg) + } + return nil, errors.Wrap(scheduler.EntityJobRun, "error while getting run", err) + } + jobRun, err := jr.toJobRun() + if err != nil { + return nil, errors.Wrap(scheduler.EntityJobRun, "error while getting job runs", err) + } + jobRunList = append(jobRunList, jobRun) + } + return jobRunList, nil +} + func (j *JobRunRepository) GetByScheduledAt(ctx context.Context, t tenant.Tenant, jobName scheduler.JobName, scheduledAt time.Time) (*scheduler.JobRun, error) { var jr jobRun // todo: check if `order by created_at desc limit 1` is required diff --git a/internal/utils/filter/filter_opt.go b/internal/utils/filter/filter_opt.go index 9801aca1e9..3ff803c014 100644 --- a/internal/utils/filter/filter_opt.go +++ b/internal/utils/filter/filter_opt.go @@ -17,6 +17,9 @@ const ( bitOnReplayStatus uint64 = 1 << 6 bitOnScheduledAt uint64 = 1 << 7 bitOnReplayID uint64 = 1 << 8 + bitOnRunState uint64 = 1 << 9 + bitOnStartDate uint64 = 1 << 10 + bitOnEndDate uint64 = 1 << 11 ) const ( @@ -29,6 +32,9 @@ const ( ReplayStatus = Operand(bitOnReplayStatus) ScheduledAt = Operand(bitOnScheduledAt) ReplayID = Operand(bitOnReplayID) + RunState = Operand(bitOnRunState) + StartDate = Operand(bitOnStartDate) + EndDate = Operand(bitOnEndDate) ) func WithTime(operand Operand, value time.Time) FilterOpt { diff --git a/protos/gotocompany/optimus/core/v1beta1/job_run.pb.go b/protos/gotocompany/optimus/core/v1beta1/job_run.pb.go index 2580528447..ccf7f84878 100644 --- a/protos/gotocompany/optimus/core/v1beta1/job_run.pb.go +++ b/protos/gotocompany/optimus/core/v1beta1/job_run.pb.go @@ -70,7 +70,7 @@ func (x InstanceSpec_Type) Number() protoreflect.EnumNumber { // Deprecated: Use InstanceSpec_Type.Descriptor instead. func (InstanceSpec_Type) EnumDescriptor() ([]byte, []int) { - return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{9, 0} + return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{11, 0} } // type of data, could be an env var or file @@ -120,7 +120,7 @@ func (x InstanceSpecData_Type) Number() protoreflect.EnumNumber { // Deprecated: Use InstanceSpecData_Type.Descriptor instead. func (InstanceSpecData_Type) EnumDescriptor() ([]byte, []int) { - return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{10, 0} + return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{12, 0} } type GetIntervalRequest struct { @@ -550,6 +550,133 @@ func (x *JobRunInputRequest) GetJobrunId() string { return "" } +// get latest 1 runs by schedule time by default when start date and end date is not mentioned +type GetJobRunsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ProjectName string `protobuf:"bytes,1,opt,name=project_name,json=projectName,proto3" json:"project_name,omitempty"` + JobName string `protobuf:"bytes,2,opt,name=job_name,json=jobName,proto3" json:"job_name,omitempty"` + State string `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"` + Since *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=since,proto3" json:"since,omitempty"` + Until *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=until,proto3" json:"until,omitempty"` +} + +func (x *GetJobRunsRequest) Reset() { + *x = GetJobRunsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJobRunsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJobRunsRequest) ProtoMessage() {} + +func (x *GetJobRunsRequest) ProtoReflect() protoreflect.Message { + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetJobRunsRequest.ProtoReflect.Descriptor instead. +func (*GetJobRunsRequest) Descriptor() ([]byte, []int) { + return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{7} +} + +func (x *GetJobRunsRequest) GetProjectName() string { + if x != nil { + return x.ProjectName + } + return "" +} + +func (x *GetJobRunsRequest) GetJobName() string { + if x != nil { + return x.JobName + } + return "" +} + +func (x *GetJobRunsRequest) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *GetJobRunsRequest) GetSince() *timestamppb.Timestamp { + if x != nil { + return x.Since + } + return nil +} + +func (x *GetJobRunsRequest) GetUntil() *timestamppb.Timestamp { + if x != nil { + return x.Until + } + return nil +} + +type GetJobRunsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + JobRuns []*JobRun `protobuf:"bytes,1,rep,name=job_runs,json=jobRuns,proto3" json:"job_runs,omitempty"` +} + +func (x *GetJobRunsResponse) Reset() { + *x = GetJobRunsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetJobRunsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetJobRunsResponse) ProtoMessage() {} + +func (x *GetJobRunsResponse) ProtoReflect() protoreflect.Message { + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetJobRunsResponse.ProtoReflect.Descriptor instead. +func (*GetJobRunsResponse) Descriptor() ([]byte, []int) { + return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{8} +} + +func (x *GetJobRunsResponse) GetJobRuns() []*JobRun { + if x != nil { + return x.JobRuns + } + return nil +} + type JobRunRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -567,7 +694,7 @@ type JobRunRequest struct { func (x *JobRunRequest) Reset() { *x = JobRunRequest{} if protoimpl.UnsafeEnabled { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[7] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -580,7 +707,7 @@ func (x *JobRunRequest) String() string { func (*JobRunRequest) ProtoMessage() {} func (x *JobRunRequest) ProtoReflect() protoreflect.Message { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[7] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -593,7 +720,7 @@ func (x *JobRunRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use JobRunRequest.ProtoReflect.Descriptor instead. func (*JobRunRequest) Descriptor() ([]byte, []int) { - return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{7} + return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{9} } func (x *JobRunRequest) GetProjectName() string { @@ -656,7 +783,7 @@ type JobRunResponse struct { func (x *JobRunResponse) Reset() { *x = JobRunResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[8] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -669,7 +796,7 @@ func (x *JobRunResponse) String() string { func (*JobRunResponse) ProtoMessage() {} func (x *JobRunResponse) ProtoReflect() protoreflect.Message { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[8] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -682,7 +809,7 @@ func (x *JobRunResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use JobRunResponse.ProtoReflect.Descriptor instead. func (*JobRunResponse) Descriptor() ([]byte, []int) { - return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{8} + return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{10} } func (x *JobRunResponse) GetJobRuns() []*JobRun { @@ -707,7 +834,7 @@ type InstanceSpec struct { func (x *InstanceSpec) Reset() { *x = InstanceSpec{} if protoimpl.UnsafeEnabled { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[9] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -720,7 +847,7 @@ func (x *InstanceSpec) String() string { func (*InstanceSpec) ProtoMessage() {} func (x *InstanceSpec) ProtoReflect() protoreflect.Message { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[9] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -733,7 +860,7 @@ func (x *InstanceSpec) ProtoReflect() protoreflect.Message { // Deprecated: Use InstanceSpec.ProtoReflect.Descriptor instead. func (*InstanceSpec) Descriptor() ([]byte, []int) { - return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{9} + return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{11} } func (x *InstanceSpec) GetState() string { @@ -784,7 +911,7 @@ type InstanceSpecData struct { func (x *InstanceSpecData) Reset() { *x = InstanceSpecData{} if protoimpl.UnsafeEnabled { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[10] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -797,7 +924,7 @@ func (x *InstanceSpecData) String() string { func (*InstanceSpecData) ProtoMessage() {} func (x *InstanceSpecData) ProtoReflect() protoreflect.Message { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[10] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -810,7 +937,7 @@ func (x *InstanceSpecData) ProtoReflect() protoreflect.Message { // Deprecated: Use InstanceSpecData.ProtoReflect.Descriptor instead. func (*InstanceSpecData) Descriptor() ([]byte, []int) { - return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{10} + return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{12} } func (x *InstanceSpecData) GetName() string { @@ -847,7 +974,7 @@ type JobRunInputResponse struct { func (x *JobRunInputResponse) Reset() { *x = JobRunInputResponse{} if protoimpl.UnsafeEnabled { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[11] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -860,7 +987,7 @@ func (x *JobRunInputResponse) String() string { func (*JobRunInputResponse) ProtoMessage() {} func (x *JobRunInputResponse) ProtoReflect() protoreflect.Message { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[11] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -873,7 +1000,7 @@ func (x *JobRunInputResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use JobRunInputResponse.ProtoReflect.Descriptor instead. func (*JobRunInputResponse) Descriptor() ([]byte, []int) { - return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{11} + return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{13} } func (x *JobRunInputResponse) GetEnvs() map[string]string { @@ -910,7 +1037,7 @@ type TaskWindow struct { func (x *TaskWindow) Reset() { *x = TaskWindow{} if protoimpl.UnsafeEnabled { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[12] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -923,7 +1050,7 @@ func (x *TaskWindow) String() string { func (*TaskWindow) ProtoMessage() {} func (x *TaskWindow) ProtoReflect() protoreflect.Message { - mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[12] + mi := &file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -936,7 +1063,7 @@ func (x *TaskWindow) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskWindow.ProtoReflect.Descriptor instead. func (*TaskWindow) Descriptor() ([]byte, []int) { - return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{12} + return file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP(), []int{14} } func (x *TaskWindow) GetSize() *durationpb.Duration { @@ -1045,177 +1172,207 @@ var file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDesc = []byte{ 0x52, 0x0c, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6a, 0x6f, 0x62, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6a, 0x6f, 0x62, 0x72, 0x75, 0x6e, 0x49, 0x64, 0x4a, 0x04, 0x08, 0x03, 0x10, - 0x04, 0x22, 0xbf, 0x02, 0x0a, 0x0d, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, - 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x08, - 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, - 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x64, - 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x64, 0x6f, - 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, - 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, - 0x6d, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4a, 0x6f, 0x62, 0x4e, - 0x61, 0x6d, 0x65, 0x22, 0x55, 0x0a, 0x0e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, + 0x04, 0x22, 0xcb, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x72, 0x6f, 0x6a, 0x65, + 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6a, 0x6f, + 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6a, 0x6f, + 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x05, 0x73, + 0x69, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x30, 0x0a, + 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, + 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x22, + 0x59, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, - 0x6e, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x22, 0xce, 0x02, 0x0a, 0x0c, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x46, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x32, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, - 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, - 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x44, - 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x6e, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x22, 0xbf, 0x02, 0x0a, 0x0d, 0x4a, + 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, + 0x19, 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x0a, 0x0a, 0x73, 0x74, + 0x61, 0x72, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, - 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, - 0x79, 0x70, 0x65, 0x22, 0x3a, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, - 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, - 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x01, - 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x4f, 0x4f, 0x4b, 0x10, 0x02, 0x4a, - 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0xd0, 0x01, 0x0a, 0x10, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x44, 0x61, 0x74, 0x61, - 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x04, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, + 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, + 0x74, 0x44, 0x61, 0x74, 0x65, 0x12, 0x35, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x64, 0x61, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x44, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, + 0x61, 0x6d, 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, + 0x6d, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, + 0x64, 0x6f, 0x77, 0x6e, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x5f, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x64, 0x6f, 0x77, 0x6e, 0x73, + 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4a, 0x6f, 0x62, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x55, 0x0a, 0x0e, + 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, + 0x0a, 0x08, 0x6a, 0x6f, 0x62, 0x5f, 0x72, 0x75, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x28, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, + 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, + 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x07, 0x6a, 0x6f, 0x62, 0x52, + 0x75, 0x6e, 0x73, 0x22, 0xce, 0x02, 0x0a, 0x0c, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, + 0x53, 0x70, 0x65, 0x63, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x46, 0x0a, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x79, 0x70, - 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x39, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, - 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, - 0x56, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, - 0x10, 0x02, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0xcf, - 0x03, 0x0a, 0x13, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x04, 0x65, 0x6e, 0x76, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x6e, 0x76, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x65, 0x6e, 0x76, 0x73, 0x12, 0x56, 0x0a, 0x05, 0x66, - 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x74, + 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, 0x63, 0x44, 0x61, 0x74, 0x61, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, + 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x33, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x0a, 0x04, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, + 0x50, 0x45, 0x5f, 0x54, 0x41, 0x53, 0x4b, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x59, 0x50, + 0x45, 0x5f, 0x48, 0x4f, 0x4f, 0x4b, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, + 0x08, 0x04, 0x10, 0x05, 0x22, 0xd0, 0x01, 0x0a, 0x10, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, + 0x65, 0x53, 0x70, 0x65, 0x63, 0x44, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x4b, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x37, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, + 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, + 0x65, 0x74, 0x61, 0x31, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x53, 0x70, 0x65, + 0x63, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x22, 0x39, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0c, + 0x0a, 0x08, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x56, 0x10, 0x01, 0x12, 0x0d, 0x0a, 0x09, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x03, 0x10, + 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0xcf, 0x03, 0x0a, 0x13, 0x4a, 0x6f, 0x62, 0x52, + 0x75, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x53, 0x0a, 0x04, 0x65, 0x6e, 0x76, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x45, 0x6e, 0x76, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, + 0x65, 0x6e, 0x76, 0x73, 0x12, 0x56, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x40, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, + 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x07, + 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, + 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x45, 0x6e, + 0x76, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3a, 0x0a, + 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x8f, 0x01, 0x0a, 0x0a, 0x54, 0x61, + 0x73, 0x6b, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, 0x2d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, + 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x32, 0x9e, 0x09, 0x0a, 0x0d, + 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xbf, 0x01, + 0x0a, 0x0b, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x12, 0x34, 0x2e, + 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, + 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, + 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, 0x70, + 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x3d, 0x3a, 0x01, 0x2a, 0x22, 0x38, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x75, 0x6e, 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, + 0xa7, 0x01, 0x0a, 0x06, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, - 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x05, 0x66, 0x69, - 0x6c, 0x65, 0x73, 0x12, 0x5c, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, - 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x72, - 0x65, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, - 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x45, 0x6e, 0x76, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x38, 0x0a, 0x0a, 0x46, 0x69, - 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x3a, 0x0a, 0x0c, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0x8f, 0x01, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x12, - 0x2d, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x12, 0x31, - 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, - 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x6f, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x72, 0x75, 0x6e, 0x63, 0x61, 0x74, 0x65, - 0x54, 0x6f, 0x32, 0xe3, 0x07, 0x0a, 0x0d, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0xbf, 0x01, 0x0a, 0x0b, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, - 0x6e, 0x70, 0x75, 0x74, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, + 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, + 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, + 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, + 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x75, 0x6e, 0x12, 0xb8, 0x01, 0x0a, 0x0a, 0x47, 0x65, + 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x12, 0x33, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, + 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, + 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, + 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, + 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x5f, + 0x72, 0x75, 0x6e, 0x73, 0x12, 0xe5, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x4a, 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x74, 0x6f, + 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, - 0x70, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, - 0x62, 0x52, 0x75, 0x6e, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x43, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3d, 0x3a, 0x01, 0x2a, 0x22, 0x38, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, - 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x75, 0x6e, - 0x5f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x12, 0xa7, 0x01, 0x0a, 0x06, 0x4a, 0x6f, 0x62, 0x52, 0x75, - 0x6e, 0x12, 0x2f, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, - 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, - 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x4a, 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x5a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x54, 0x3a, 0x01, 0x2a, 0x22, 0x4f, 0x2f, 0x76, 0x31, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, + 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, + 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0xbf, 0x01, 0x0a, + 0x11, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, + 0x65, 0x72, 0x12, 0x3a, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, - 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x34, 0x12, 0x32, 0x2f, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, - 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, - 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x72, 0x75, 0x6e, - 0x12, 0xe5, 0x01, 0x0a, 0x10, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x6f, 0x62, - 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, - 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, - 0x72, 0x4a, 0x6f, 0x62, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x3a, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x4a, 0x6f, 0x62, 0x45, - 0x76, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x5a, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x54, 0x3a, 0x01, 0x2a, 0x22, 0x4f, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, - 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x2f, 0x7b, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x12, 0xbf, 0x01, 0x0a, 0x11, 0x55, 0x70, 0x6c, - 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x12, 0x3a, + 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x53, 0x63, + 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, - 0x6c, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x67, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x55, 0x70, - 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x6f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2b, 0x3a, - 0x01, 0x2a, 0x1a, 0x26, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, - 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, - 0x6d, 0x65, 0x7d, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0xbb, 0x01, 0x0a, 0x0b, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x34, 0x2e, 0x67, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, - 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x39, 0x12, - 0x37, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, - 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, - 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, - 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x8f, 0x01, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, - 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x6e, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x42, 0x0d, 0x4a, 0x6f, 0x62, - 0x52, 0x75, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x1e, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x74, 0x6f, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x92, 0x41, 0x3b, 0x12, - 0x05, 0x32, 0x03, 0x30, 0x2e, 0x31, 0x1a, 0x0e, 0x31, 0x32, 0x37, 0x2e, 0x30, 0x2e, 0x30, 0x2e, - 0x31, 0x3a, 0x39, 0x31, 0x30, 0x30, 0x22, 0x04, 0x2f, 0x61, 0x70, 0x69, 0x2a, 0x01, 0x01, 0x72, - 0x19, 0x0a, 0x17, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x20, 0x4a, 0x6f, 0x62, 0x20, 0x52, - 0x75, 0x6e, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x31, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x2b, 0x3a, 0x01, 0x2a, 0x1a, 0x26, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, + 0x2f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, + 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x75, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0xbb, + 0x01, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x34, + 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, + 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, + 0x6e, 0x79, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x39, 0x12, 0x37, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x72, + 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x2f, 0x7b, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x6e, + 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x6a, 0x6f, 0x62, 0x2f, 0x7b, 0x6a, 0x6f, 0x62, 0x5f, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x42, 0x8f, 0x01, 0x0a, + 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x6e, 0x79, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2e, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x42, + 0x0d, 0x4a, 0x6f, 0x62, 0x52, 0x75, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x72, 0x50, 0x01, + 0x5a, 0x1e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x74, + 0x6f, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x6e, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, + 0x92, 0x41, 0x3b, 0x12, 0x05, 0x32, 0x03, 0x30, 0x2e, 0x31, 0x1a, 0x0e, 0x31, 0x32, 0x37, 0x2e, + 0x30, 0x2e, 0x30, 0x2e, 0x31, 0x3a, 0x39, 0x31, 0x30, 0x30, 0x22, 0x04, 0x2f, 0x61, 0x70, 0x69, + 0x2a, 0x01, 0x01, 0x72, 0x19, 0x0a, 0x17, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x75, 0x73, 0x20, 0x4a, + 0x6f, 0x62, 0x20, 0x52, 0x75, 0x6e, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1231,7 +1388,7 @@ func file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDescGZIP() []byte { } var file_gotocompany_optimus_core_v1beta1_job_run_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_gotocompany_optimus_core_v1beta1_job_run_proto_goTypes = []interface{}{ (InstanceSpec_Type)(0), // 0: gotocompany.optimus.core.v1beta1.InstanceSpec.Type (InstanceSpecData_Type)(0), // 1: gotocompany.optimus.core.v1beta1.InstanceSpecData.Type @@ -1242,54 +1399,61 @@ var file_gotocompany_optimus_core_v1beta1_job_run_proto_goTypes = []interface{}{ (*RegisterJobEventRequest)(nil), // 6: gotocompany.optimus.core.v1beta1.RegisterJobEventRequest (*RegisterJobEventResponse)(nil), // 7: gotocompany.optimus.core.v1beta1.RegisterJobEventResponse (*JobRunInputRequest)(nil), // 8: gotocompany.optimus.core.v1beta1.JobRunInputRequest - (*JobRunRequest)(nil), // 9: gotocompany.optimus.core.v1beta1.JobRunRequest - (*JobRunResponse)(nil), // 10: gotocompany.optimus.core.v1beta1.JobRunResponse - (*InstanceSpec)(nil), // 11: gotocompany.optimus.core.v1beta1.InstanceSpec - (*InstanceSpecData)(nil), // 12: gotocompany.optimus.core.v1beta1.InstanceSpecData - (*JobRunInputResponse)(nil), // 13: gotocompany.optimus.core.v1beta1.JobRunInputResponse - (*TaskWindow)(nil), // 14: gotocompany.optimus.core.v1beta1.TaskWindow - nil, // 15: gotocompany.optimus.core.v1beta1.JobRunInputResponse.EnvsEntry - nil, // 16: gotocompany.optimus.core.v1beta1.JobRunInputResponse.FilesEntry - nil, // 17: gotocompany.optimus.core.v1beta1.JobRunInputResponse.SecretsEntry - (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp - (*JobEvent)(nil), // 19: gotocompany.optimus.core.v1beta1.JobEvent - (*JobRun)(nil), // 20: gotocompany.optimus.core.v1beta1.JobRun - (*durationpb.Duration)(nil), // 21: google.protobuf.Duration + (*GetJobRunsRequest)(nil), // 9: gotocompany.optimus.core.v1beta1.GetJobRunsRequest + (*GetJobRunsResponse)(nil), // 10: gotocompany.optimus.core.v1beta1.GetJobRunsResponse + (*JobRunRequest)(nil), // 11: gotocompany.optimus.core.v1beta1.JobRunRequest + (*JobRunResponse)(nil), // 12: gotocompany.optimus.core.v1beta1.JobRunResponse + (*InstanceSpec)(nil), // 13: gotocompany.optimus.core.v1beta1.InstanceSpec + (*InstanceSpecData)(nil), // 14: gotocompany.optimus.core.v1beta1.InstanceSpecData + (*JobRunInputResponse)(nil), // 15: gotocompany.optimus.core.v1beta1.JobRunInputResponse + (*TaskWindow)(nil), // 16: gotocompany.optimus.core.v1beta1.TaskWindow + nil, // 17: gotocompany.optimus.core.v1beta1.JobRunInputResponse.EnvsEntry + nil, // 18: gotocompany.optimus.core.v1beta1.JobRunInputResponse.FilesEntry + nil, // 19: gotocompany.optimus.core.v1beta1.JobRunInputResponse.SecretsEntry + (*timestamppb.Timestamp)(nil), // 20: google.protobuf.Timestamp + (*JobEvent)(nil), // 21: gotocompany.optimus.core.v1beta1.JobEvent + (*JobRun)(nil), // 22: gotocompany.optimus.core.v1beta1.JobRun + (*durationpb.Duration)(nil), // 23: google.protobuf.Duration } var file_gotocompany_optimus_core_v1beta1_job_run_proto_depIdxs = []int32{ - 18, // 0: gotocompany.optimus.core.v1beta1.GetIntervalRequest.reference_time:type_name -> google.protobuf.Timestamp - 18, // 1: gotocompany.optimus.core.v1beta1.GetIntervalResponse.start_time:type_name -> google.protobuf.Timestamp - 18, // 2: gotocompany.optimus.core.v1beta1.GetIntervalResponse.end_time:type_name -> google.protobuf.Timestamp - 19, // 3: gotocompany.optimus.core.v1beta1.RegisterJobEventRequest.event:type_name -> gotocompany.optimus.core.v1beta1.JobEvent - 18, // 4: gotocompany.optimus.core.v1beta1.JobRunInputRequest.scheduled_at:type_name -> google.protobuf.Timestamp + 20, // 0: gotocompany.optimus.core.v1beta1.GetIntervalRequest.reference_time:type_name -> google.protobuf.Timestamp + 20, // 1: gotocompany.optimus.core.v1beta1.GetIntervalResponse.start_time:type_name -> google.protobuf.Timestamp + 20, // 2: gotocompany.optimus.core.v1beta1.GetIntervalResponse.end_time:type_name -> google.protobuf.Timestamp + 21, // 3: gotocompany.optimus.core.v1beta1.RegisterJobEventRequest.event:type_name -> gotocompany.optimus.core.v1beta1.JobEvent + 20, // 4: gotocompany.optimus.core.v1beta1.JobRunInputRequest.scheduled_at:type_name -> google.protobuf.Timestamp 0, // 5: gotocompany.optimus.core.v1beta1.JobRunInputRequest.instance_type:type_name -> gotocompany.optimus.core.v1beta1.InstanceSpec.Type - 18, // 6: gotocompany.optimus.core.v1beta1.JobRunRequest.start_date:type_name -> google.protobuf.Timestamp - 18, // 7: gotocompany.optimus.core.v1beta1.JobRunRequest.end_date:type_name -> google.protobuf.Timestamp - 20, // 8: gotocompany.optimus.core.v1beta1.JobRunResponse.job_runs:type_name -> gotocompany.optimus.core.v1beta1.JobRun - 12, // 9: gotocompany.optimus.core.v1beta1.InstanceSpec.data:type_name -> gotocompany.optimus.core.v1beta1.InstanceSpecData - 18, // 10: gotocompany.optimus.core.v1beta1.InstanceSpec.executed_at:type_name -> google.protobuf.Timestamp - 0, // 11: gotocompany.optimus.core.v1beta1.InstanceSpec.type:type_name -> gotocompany.optimus.core.v1beta1.InstanceSpec.Type - 1, // 12: gotocompany.optimus.core.v1beta1.InstanceSpecData.type:type_name -> gotocompany.optimus.core.v1beta1.InstanceSpecData.Type - 15, // 13: gotocompany.optimus.core.v1beta1.JobRunInputResponse.envs:type_name -> gotocompany.optimus.core.v1beta1.JobRunInputResponse.EnvsEntry - 16, // 14: gotocompany.optimus.core.v1beta1.JobRunInputResponse.files:type_name -> gotocompany.optimus.core.v1beta1.JobRunInputResponse.FilesEntry - 17, // 15: gotocompany.optimus.core.v1beta1.JobRunInputResponse.secrets:type_name -> gotocompany.optimus.core.v1beta1.JobRunInputResponse.SecretsEntry - 21, // 16: gotocompany.optimus.core.v1beta1.TaskWindow.size:type_name -> google.protobuf.Duration - 21, // 17: gotocompany.optimus.core.v1beta1.TaskWindow.offset:type_name -> google.protobuf.Duration - 8, // 18: gotocompany.optimus.core.v1beta1.JobRunService.JobRunInput:input_type -> gotocompany.optimus.core.v1beta1.JobRunInputRequest - 9, // 19: gotocompany.optimus.core.v1beta1.JobRunService.JobRun:input_type -> gotocompany.optimus.core.v1beta1.JobRunRequest - 6, // 20: gotocompany.optimus.core.v1beta1.JobRunService.RegisterJobEvent:input_type -> gotocompany.optimus.core.v1beta1.RegisterJobEventRequest - 4, // 21: gotocompany.optimus.core.v1beta1.JobRunService.UploadToScheduler:input_type -> gotocompany.optimus.core.v1beta1.UploadToSchedulerRequest - 2, // 22: gotocompany.optimus.core.v1beta1.JobRunService.GetInterval:input_type -> gotocompany.optimus.core.v1beta1.GetIntervalRequest - 13, // 23: gotocompany.optimus.core.v1beta1.JobRunService.JobRunInput:output_type -> gotocompany.optimus.core.v1beta1.JobRunInputResponse - 10, // 24: gotocompany.optimus.core.v1beta1.JobRunService.JobRun:output_type -> gotocompany.optimus.core.v1beta1.JobRunResponse - 7, // 25: gotocompany.optimus.core.v1beta1.JobRunService.RegisterJobEvent:output_type -> gotocompany.optimus.core.v1beta1.RegisterJobEventResponse - 5, // 26: gotocompany.optimus.core.v1beta1.JobRunService.UploadToScheduler:output_type -> gotocompany.optimus.core.v1beta1.UploadToSchedulerResponse - 3, // 27: gotocompany.optimus.core.v1beta1.JobRunService.GetInterval:output_type -> gotocompany.optimus.core.v1beta1.GetIntervalResponse - 23, // [23:28] is the sub-list for method output_type - 18, // [18:23] is the sub-list for method input_type - 18, // [18:18] is the sub-list for extension type_name - 18, // [18:18] is the sub-list for extension extendee - 0, // [0:18] is the sub-list for field type_name + 20, // 6: gotocompany.optimus.core.v1beta1.GetJobRunsRequest.since:type_name -> google.protobuf.Timestamp + 20, // 7: gotocompany.optimus.core.v1beta1.GetJobRunsRequest.until:type_name -> google.protobuf.Timestamp + 22, // 8: gotocompany.optimus.core.v1beta1.GetJobRunsResponse.job_runs:type_name -> gotocompany.optimus.core.v1beta1.JobRun + 20, // 9: gotocompany.optimus.core.v1beta1.JobRunRequest.start_date:type_name -> google.protobuf.Timestamp + 20, // 10: gotocompany.optimus.core.v1beta1.JobRunRequest.end_date:type_name -> google.protobuf.Timestamp + 22, // 11: gotocompany.optimus.core.v1beta1.JobRunResponse.job_runs:type_name -> gotocompany.optimus.core.v1beta1.JobRun + 14, // 12: gotocompany.optimus.core.v1beta1.InstanceSpec.data:type_name -> gotocompany.optimus.core.v1beta1.InstanceSpecData + 20, // 13: gotocompany.optimus.core.v1beta1.InstanceSpec.executed_at:type_name -> google.protobuf.Timestamp + 0, // 14: gotocompany.optimus.core.v1beta1.InstanceSpec.type:type_name -> gotocompany.optimus.core.v1beta1.InstanceSpec.Type + 1, // 15: gotocompany.optimus.core.v1beta1.InstanceSpecData.type:type_name -> gotocompany.optimus.core.v1beta1.InstanceSpecData.Type + 17, // 16: gotocompany.optimus.core.v1beta1.JobRunInputResponse.envs:type_name -> gotocompany.optimus.core.v1beta1.JobRunInputResponse.EnvsEntry + 18, // 17: gotocompany.optimus.core.v1beta1.JobRunInputResponse.files:type_name -> gotocompany.optimus.core.v1beta1.JobRunInputResponse.FilesEntry + 19, // 18: gotocompany.optimus.core.v1beta1.JobRunInputResponse.secrets:type_name -> gotocompany.optimus.core.v1beta1.JobRunInputResponse.SecretsEntry + 23, // 19: gotocompany.optimus.core.v1beta1.TaskWindow.size:type_name -> google.protobuf.Duration + 23, // 20: gotocompany.optimus.core.v1beta1.TaskWindow.offset:type_name -> google.protobuf.Duration + 8, // 21: gotocompany.optimus.core.v1beta1.JobRunService.JobRunInput:input_type -> gotocompany.optimus.core.v1beta1.JobRunInputRequest + 11, // 22: gotocompany.optimus.core.v1beta1.JobRunService.JobRun:input_type -> gotocompany.optimus.core.v1beta1.JobRunRequest + 9, // 23: gotocompany.optimus.core.v1beta1.JobRunService.GetJobRuns:input_type -> gotocompany.optimus.core.v1beta1.GetJobRunsRequest + 6, // 24: gotocompany.optimus.core.v1beta1.JobRunService.RegisterJobEvent:input_type -> gotocompany.optimus.core.v1beta1.RegisterJobEventRequest + 4, // 25: gotocompany.optimus.core.v1beta1.JobRunService.UploadToScheduler:input_type -> gotocompany.optimus.core.v1beta1.UploadToSchedulerRequest + 2, // 26: gotocompany.optimus.core.v1beta1.JobRunService.GetInterval:input_type -> gotocompany.optimus.core.v1beta1.GetIntervalRequest + 15, // 27: gotocompany.optimus.core.v1beta1.JobRunService.JobRunInput:output_type -> gotocompany.optimus.core.v1beta1.JobRunInputResponse + 12, // 28: gotocompany.optimus.core.v1beta1.JobRunService.JobRun:output_type -> gotocompany.optimus.core.v1beta1.JobRunResponse + 10, // 29: gotocompany.optimus.core.v1beta1.JobRunService.GetJobRuns:output_type -> gotocompany.optimus.core.v1beta1.GetJobRunsResponse + 7, // 30: gotocompany.optimus.core.v1beta1.JobRunService.RegisterJobEvent:output_type -> gotocompany.optimus.core.v1beta1.RegisterJobEventResponse + 5, // 31: gotocompany.optimus.core.v1beta1.JobRunService.UploadToScheduler:output_type -> gotocompany.optimus.core.v1beta1.UploadToSchedulerResponse + 3, // 32: gotocompany.optimus.core.v1beta1.JobRunService.GetInterval:output_type -> gotocompany.optimus.core.v1beta1.GetIntervalResponse + 27, // [27:33] is the sub-list for method output_type + 21, // [21:27] is the sub-list for method input_type + 21, // [21:21] is the sub-list for extension type_name + 21, // [21:21] is the sub-list for extension extendee + 0, // [0:21] is the sub-list for field type_name } func init() { file_gotocompany_optimus_core_v1beta1_job_run_proto_init() } @@ -1384,7 +1548,7 @@ func file_gotocompany_optimus_core_v1beta1_job_run_proto_init() { } } file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JobRunRequest); i { + switch v := v.(*GetJobRunsRequest); i { case 0: return &v.state case 1: @@ -1396,7 +1560,7 @@ func file_gotocompany_optimus_core_v1beta1_job_run_proto_init() { } } file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JobRunResponse); i { + switch v := v.(*GetJobRunsResponse); i { case 0: return &v.state case 1: @@ -1408,7 +1572,7 @@ func file_gotocompany_optimus_core_v1beta1_job_run_proto_init() { } } file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InstanceSpec); i { + switch v := v.(*JobRunRequest); i { case 0: return &v.state case 1: @@ -1420,7 +1584,7 @@ func file_gotocompany_optimus_core_v1beta1_job_run_proto_init() { } } file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*InstanceSpecData); i { + switch v := v.(*JobRunResponse); i { case 0: return &v.state case 1: @@ -1432,7 +1596,7 @@ func file_gotocompany_optimus_core_v1beta1_job_run_proto_init() { } } file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*JobRunInputResponse); i { + switch v := v.(*InstanceSpec); i { case 0: return &v.state case 1: @@ -1444,6 +1608,30 @@ func file_gotocompany_optimus_core_v1beta1_job_run_proto_init() { } } file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*InstanceSpecData); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*JobRunInputResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_gotocompany_optimus_core_v1beta1_job_run_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TaskWindow); i { case 0: return &v.state @@ -1463,7 +1651,7 @@ func file_gotocompany_optimus_core_v1beta1_job_run_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_gotocompany_optimus_core_v1beta1_job_run_proto_rawDesc, NumEnums: 2, - NumMessages: 16, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/protos/gotocompany/optimus/core/v1beta1/job_run.pb.gw.go b/protos/gotocompany/optimus/core/v1beta1/job_run.pb.gw.go index 2b6c7f5e47..c780a7780b 100644 --- a/protos/gotocompany/optimus/core/v1beta1/job_run.pb.gw.go +++ b/protos/gotocompany/optimus/core/v1beta1/job_run.pb.gw.go @@ -209,6 +209,96 @@ func local_request_JobRunService_JobRun_0(ctx context.Context, marshaler runtime } +var ( + filter_JobRunService_GetJobRuns_0 = &utilities.DoubleArray{Encoding: map[string]int{"project_name": 0, "job_name": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + +func request_JobRunService_GetJobRuns_0(ctx context.Context, marshaler runtime.Marshaler, client JobRunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetJobRunsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["project_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_name") + } + + protoReq.ProjectName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_name", err) + } + + val, ok = pathParams["job_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "job_name") + } + + protoReq.JobName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "job_name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_JobRunService_GetJobRuns_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.GetJobRuns(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_JobRunService_GetJobRuns_0(ctx context.Context, marshaler runtime.Marshaler, server JobRunServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetJobRunsRequest + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["project_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "project_name") + } + + protoReq.ProjectName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "project_name", err) + } + + val, ok = pathParams["job_name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "job_name") + } + + protoReq.JobName, err = runtime.String(val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "job_name", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_JobRunService_GetJobRuns_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.GetJobRuns(ctx, &protoReq) + return msg, metadata, err + +} + func request_JobRunService_RegisterJobEvent_0(ctx context.Context, marshaler runtime.Marshaler, client JobRunServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq RegisterJobEventRequest var metadata runtime.ServerMetadata @@ -527,6 +617,29 @@ func RegisterJobRunServiceHandlerServer(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_JobRunService_GetJobRuns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/gotocompany.optimus.core.v1beta1.JobRunService/GetJobRuns", runtime.WithHTTPPathPattern("/v1beta1/project/{project_name}/job/{job_name}/job_runs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_JobRunService_GetJobRuns_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_JobRunService_GetJobRuns_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_JobRunService_RegisterJobEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -677,6 +790,26 @@ func RegisterJobRunServiceHandlerClient(ctx context.Context, mux *runtime.ServeM }) + mux.Handle("GET", pattern_JobRunService_GetJobRuns_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/gotocompany.optimus.core.v1beta1.JobRunService/GetJobRuns", runtime.WithHTTPPathPattern("/v1beta1/project/{project_name}/job/{job_name}/job_runs")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_JobRunService_GetJobRuns_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_JobRunService_GetJobRuns_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("POST", pattern_JobRunService_RegisterJobEvent_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -745,6 +878,8 @@ var ( pattern_JobRunService_JobRun_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1beta1", "project", "project_name", "job", "job_name", "run"}, "")) + pattern_JobRunService_GetJobRuns_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"v1beta1", "project", "project_name", "job", "job_name", "job_runs"}, "")) + pattern_JobRunService_RegisterJobEvent_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5, 1, 0, 4, 1, 5, 6, 2, 7}, []string{"v1beta1", "project", "project_name", "namespace", "namespace_name", "job", "job_name", "event"}, "")) pattern_JobRunService_UploadToScheduler_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1beta1", "project", "project_name", "upload"}, "")) @@ -757,6 +892,8 @@ var ( forward_JobRunService_JobRun_0 = runtime.ForwardResponseMessage + forward_JobRunService_GetJobRuns_0 = runtime.ForwardResponseMessage + forward_JobRunService_RegisterJobEvent_0 = runtime.ForwardResponseMessage forward_JobRunService_UploadToScheduler_0 = runtime.ForwardResponseMessage diff --git a/protos/gotocompany/optimus/core/v1beta1/job_run.swagger.json b/protos/gotocompany/optimus/core/v1beta1/job_run.swagger.json index 86b7ce15e2..a98f93cd8e 100644 --- a/protos/gotocompany/optimus/core/v1beta1/job_run.swagger.json +++ b/protos/gotocompany/optimus/core/v1beta1/job_run.swagger.json @@ -65,6 +65,63 @@ ] } }, + "/v1beta1/project/{projectName}/job/{jobName}/job_runs": { + "get": { + "summary": "JobRunList returns the current and past run status of jobs on a given range", + "operationId": "JobRunService_GetJobRuns", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1beta1GetJobRunsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "projectName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "jobName", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "state", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "since", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + }, + { + "name": "until", + "in": "query", + "required": false, + "type": "string", + "format": "date-time" + } + ], + "tags": [ + "JobRunService" + ] + } + }, "/v1beta1/project/{projectName}/job/{jobName}/run": { "get": { "summary": "JobRun returns the current and past run status of jobs on a given range", @@ -352,6 +409,17 @@ } } }, + "v1beta1GetJobRunsResponse": { + "type": "object", + "properties": { + "jobRuns": { + "type": "array", + "items": { + "$ref": "#/definitions/v1beta1JobRun" + } + } + } + }, "v1beta1InstanceSpecType": { "type": "string", "enum": [ diff --git a/protos/gotocompany/optimus/core/v1beta1/job_run_grpc.pb.go b/protos/gotocompany/optimus/core/v1beta1/job_run_grpc.pb.go index 224dc581aa..81b43c887c 100644 --- a/protos/gotocompany/optimus/core/v1beta1/job_run_grpc.pb.go +++ b/protos/gotocompany/optimus/core/v1beta1/job_run_grpc.pb.go @@ -26,6 +26,8 @@ type JobRunServiceClient interface { JobRunInput(ctx context.Context, in *JobRunInputRequest, opts ...grpc.CallOption) (*JobRunInputResponse, error) // JobRun returns the current and past run status of jobs on a given range JobRun(ctx context.Context, in *JobRunRequest, opts ...grpc.CallOption) (*JobRunResponse, error) + // JobRunList returns the current and past run status of jobs on a given range + GetJobRuns(ctx context.Context, in *GetJobRunsRequest, opts ...grpc.CallOption) (*GetJobRunsResponse, error) // RegisterJobEvent notifies optimus service about an event related to job RegisterJobEvent(ctx context.Context, in *RegisterJobEventRequest, opts ...grpc.CallOption) (*RegisterJobEventResponse, error) // UploadToScheduler comiles jobSpec from database into DAGs and uploads the generated DAGs to scheduler @@ -60,6 +62,15 @@ func (c *jobRunServiceClient) JobRun(ctx context.Context, in *JobRunRequest, opt return out, nil } +func (c *jobRunServiceClient) GetJobRuns(ctx context.Context, in *GetJobRunsRequest, opts ...grpc.CallOption) (*GetJobRunsResponse, error) { + out := new(GetJobRunsResponse) + err := c.cc.Invoke(ctx, "/gotocompany.optimus.core.v1beta1.JobRunService/GetJobRuns", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *jobRunServiceClient) RegisterJobEvent(ctx context.Context, in *RegisterJobEventRequest, opts ...grpc.CallOption) (*RegisterJobEventResponse, error) { out := new(RegisterJobEventResponse) err := c.cc.Invoke(ctx, "/gotocompany.optimus.core.v1beta1.JobRunService/RegisterJobEvent", in, out, opts...) @@ -95,6 +106,8 @@ type JobRunServiceServer interface { JobRunInput(context.Context, *JobRunInputRequest) (*JobRunInputResponse, error) // JobRun returns the current and past run status of jobs on a given range JobRun(context.Context, *JobRunRequest) (*JobRunResponse, error) + // JobRunList returns the current and past run status of jobs on a given range + GetJobRuns(context.Context, *GetJobRunsRequest) (*GetJobRunsResponse, error) // RegisterJobEvent notifies optimus service about an event related to job RegisterJobEvent(context.Context, *RegisterJobEventRequest) (*RegisterJobEventResponse, error) // UploadToScheduler comiles jobSpec from database into DAGs and uploads the generated DAGs to scheduler @@ -114,6 +127,9 @@ func (UnimplementedJobRunServiceServer) JobRunInput(context.Context, *JobRunInpu func (UnimplementedJobRunServiceServer) JobRun(context.Context, *JobRunRequest) (*JobRunResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method JobRun not implemented") } +func (UnimplementedJobRunServiceServer) GetJobRuns(context.Context, *GetJobRunsRequest) (*GetJobRunsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetJobRuns not implemented") +} func (UnimplementedJobRunServiceServer) RegisterJobEvent(context.Context, *RegisterJobEventRequest) (*RegisterJobEventResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterJobEvent not implemented") } @@ -172,6 +188,24 @@ func _JobRunService_JobRun_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _JobRunService_GetJobRuns_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetJobRunsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(JobRunServiceServer).GetJobRuns(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/gotocompany.optimus.core.v1beta1.JobRunService/GetJobRuns", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(JobRunServiceServer).GetJobRuns(ctx, req.(*GetJobRunsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _JobRunService_RegisterJobEvent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RegisterJobEventRequest) if err := dec(in); err != nil { @@ -241,6 +275,10 @@ var JobRunService_ServiceDesc = grpc.ServiceDesc{ MethodName: "JobRun", Handler: _JobRunService_JobRun_Handler, }, + { + MethodName: "GetJobRuns", + Handler: _JobRunService_GetJobRuns_Handler, + }, { MethodName: "RegisterJobEvent", Handler: _JobRunService_RegisterJobEvent_Handler,